MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / with_range

Method with_range

core/src/interest.rs:253–268  ·  view source on GitHub ↗

Builds interest with specific range.

(mut self, range: impl Into<RangeOpen<&'a [u8]>>)

Source from the content-addressed store, hash-verified

251 }
252 /// Builds interest with specific range.
253 pub fn with_range<'a>(mut self, range: impl Into<RangeOpen<&'a [u8]>>) -> Builder<WithRange> {
254 let range = range.into();
255 self.state
256 .encoder
257 .u8(1)
258 .expect("range start indicator should cbor encode")
259 .bytes(range.start)
260 .expect("start_key should cbor encode")
261 .bytes(range.end)
262 .expect("end_key should cbor encode");
263 Builder {
264 state: WithRange {
265 encoder: self.state.encoder,
266 },
267 }
268 }
269}
270impl Builder<WithRange> {
271 /// Builds interest as fencepost.

Callers 8

random_interestFunction · 0.80
roundtripFunction · 0.80
accessorsFunction · 0.80
post_interestsMethod · 0.80
process_extra_interestsFunction · 0.80

Calls 2

expectMethod · 0.80
bytesMethod · 0.45

Tested by 6

random_interestFunction · 0.64
roundtripFunction · 0.64
accessorsFunction · 0.64