Skip to content

Commit

Permalink
[nspcc-dev#356] refs: Implement Unmarshal method on SubnetID
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
Leonard Lyubich committed Nov 23, 2021
1 parent 52a416b commit e3c5539
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions refs/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,11 @@ func (s *SubnetID) StableSize() (size int) {

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))
}

0 comments on commit e3c5539

Please sign in to comment.