MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / Bytes

Method Bytes

state/state.go:116–126  ·  view source on GitHub ↗

Bytes serializes the State using protobuf. It panics if either casting to protobuf or serialization fails.

()

Source from the content-addressed store, hash-verified

114// Bytes serializes the State using protobuf.
115// It panics if either casting to protobuf or serialization fails.
116func (state State) Bytes() []byte {
117 sm, err := state.ToProto()
118 if err != nil {
119 panic(err)
120 }
121 bz, err := proto.Marshal(sm)
122 if err != nil {
123 panic(err)
124 }
125 return bz
126}
127
128// IsEmpty returns true if the State is equal to the empty State.
129func (state State) IsEmpty() bool {

Callers 1

EqualsMethod · 0.95

Calls 2

ToProtoMethod · 0.95
MarshalMethod · 0.45

Tested by

no test coverage detected