code: func (d *DUIDUUID) UnmarshalBinary(p []byte) error {
  	b := buffer.New(p)
  	// DUIDUUIDs are fixed-length structures
  	if b.Len() != 18 {
  		return io.ErrUnexpectedEOF
  	}
  
  	// Verify DUID type
  	dType := DUIDType(b.Read16())
  	if dType != DUIDTypeUUID {
  		return errInvalidDUIDUUID
  	}
  	d.Type = dType
  	b.ReadBytes(d.UUID[:])
  	return nil
  }
docs: // UnmarshalBinary unmarshals a raw byte slice into a DUIDUUID.
  // If the byte slice does not contain the exact number of bytes
  // needed to form a valid DUIDUUID, or another DUID type is indicated,
  // errInvalidDUIDUUID is returned.