MCPcopy Create free account
hub / github.com/base/base / encode

Method encode

crates/consensus/protocol/src/frame.rs:199–203  ·  view source on GitHub ↗

Encode the frame into a byte vector.

(&self)

Source from the content-addressed store, hash-verified

197
198 /// Encode the frame into a byte vector.
199 pub fn encode(&self) -> Vec<u8> {
200 let mut encoded = Vec::with_capacity(self.encoded_len());
201 self.encode_into(&mut encoded);
202 encoded
203 }
204
205 /// Returns the encoded length of the frame.
206 pub const fn encoded_len(&self) -> usize {

Callers 10

test_data_too_shortFunction · 0.45
test_decode_manyFunction · 0.45
mint_bearerMethod · 0.45
build_enrMethod · 0.45
encode_framesFunction · 0.45

Calls 2

encoded_lenMethod · 0.80
encode_intoMethod · 0.80

Tested by 5

test_data_too_shortFunction · 0.36
test_decode_manyFunction · 0.36