MCPcopy Create free account
hub / github.com/dermesser/integer-encoding-rs / encode_var_vec

Method encode_var_vec

src/varint.rs:48–52  ·  view source on GitHub ↗

Helper: Encode a value and return the encoded form as Vec. The Vec must be at least `required_space()` bytes long.

(self)

Source from the content-addressed store, hash-verified

46 /// Helper: Encode a value and return the encoded form as Vec. The Vec must be at least
47 /// `required_space()` bytes long.
48 fn encode_var_vec(self) -> Vec<u8> {
49 let mut v = vec![0; self.required_space()];
50 self.encode_var(&mut v);
51 v
52 }
53}
54
55#[inline]

Callers 4

decode_vFunction · 0.80
test_regression_22Function · 0.80

Implementers 1

varint.rssrc/varint.rs

Calls 1

encode_varMethod · 0.80

Tested by 3

test_regression_22Function · 0.64