MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / wrap_bytes_versioned

Function wrap_bytes_versioned

nodedb-cluster/src/wire_version/envelope.rs:90–92  ·  view source on GitHub ↗

Wrap arbitrary pre-encoded bytes in a v2 versioned envelope.

(inner: &[u8])

Source from the content-addressed store, hash-verified

88
89/// Wrap arbitrary pre-encoded bytes in a v2 versioned envelope.
90pub fn wrap_bytes_versioned(inner: &[u8]) -> Result<Vec<u8>, WireVersionError> {
91 encode_envelope(WireVersion::CURRENT.0, inner)
92}
93
94/// Unwrap a versioned envelope and return the inner bytes.
95///

Callers 2

versioned_encodeFunction · 0.85

Calls 1

encode_envelopeFunction · 0.85

Tested by

no test coverage detected