Skip to main content

read_peer_bytes

Function read_peer_bytes 

Source
pub fn read_peer_bytes(node: &NodeProto) -> Option<&[u8]>
Expand description

Read the destination peer’s multihash bytes from a Send / gate NodeProto. Returns None if the attribute is absent or carries no byte content. The byte payload lives on attribute.s per the ONNX convention for raw bytes (paired with AttributeType::String); callers reconstruct the PeerId via PeerId::from_bytes(read_peer_bytes(node)?).