MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / borrowed_clone

Method borrowed_clone

src/length.rs:125–133  ·  view source on GitHub ↗

For decoding lengths multiple times (e.g. ArrayVec, utf8 validation).

(&'me self)

Source from the content-addressed store, hash-verified

123
124 // For decoding lengths multiple times (e.g. ArrayVec, utf8 validation).
125 pub fn borrowed_clone<'me: 'a>(&'me self) -> LengthDecoder<'me> {
126 let mut small = CowSlice::default();
127 small.set_borrowed_slice_impl(self.small.ref_slice().clone());
128 Self {
129 small,
130 large: self.large.borrowed_clone(),
131 sum: self.sum,
132 }
133 }
134
135 /// Returns if any of the decoded lengths are > `N`.
136 /// Safety: `length` must be the `length` passed to populate.

Callers 2

any_greater_thanMethod · 0.45
populateMethod · 0.45

Calls 2

ref_sliceMethod · 0.80

Tested by

no test coverage detected