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

Method to_vec

nodedb/src/data/io/aligned_buf.rs:70–72  ·  view source on GitHub ↗

Copy the first `len` bytes into an owned Vec. # Safety Caller must ensure `len <= capacity` and the bytes have been written.

(&self, len: usize)

Source from the content-addressed store, hash-verified

68 /// # Safety
69 /// Caller must ensure `len <= capacity` and the bytes have been written.
70 pub unsafe fn to_vec(&self, len: usize) -> Vec<u8> {
71 unsafe { self.as_slice(len).to_vec() }
72 }
73
74 /// Total capacity in bytes (always aligned).
75 #[inline]

Callers 15

to_vec_copiesFunction · 0.45
read_filesMethod · 0.45
decoded_col_to_valueFunction · 0.45
json_to_msgpackFunction · 0.45
decode_raw_scan_to_docsFunction · 0.45
decode_response_to_docsFunction · 0.45
dispatch_metaMethod · 0.45

Calls 1

as_sliceMethod · 0.45

Tested by 2

to_vec_copiesFunction · 0.36