[#356] refs: Implement Unmarshal
method on SubnetID
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
50ab22c19c
commit
5ce4b22e40
1 changed files with 8 additions and 0 deletions
|
@ -348,3 +348,11 @@ func (s *SubnetID) StableSize() (size int) {
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unmarshal unmarshals SubnetID from NeoFS API V2 binary format (see StableMarshal).
|
||||||
|
// Must not be called on nil.
|
||||||
|
//
|
||||||
|
// Note: empty data corresponds to zero ID value or nil pointer to it.
|
||||||
|
func (s *SubnetID) Unmarshal(data []byte) error {
|
||||||
|
return message.Unmarshal(s, data, new(refs.SubnetID))
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue