MCPcopy Create free account
hub / github.com/apache/fory / value_at

Method value_at

rust/fory-core/src/buffer.rs:573–582  ·  view source on GitHub ↗
(&self, index: usize)

Source from the content-addressed store, hash-verified

571
572 #[inline(always)]
573 fn value_at(&self, index: usize) -> Result<u8, Error> {
574 match self.bf.get(index) {
575 None => Err(Error::buffer_out_of_bound(
576 index,
577 self.bf.len(),
578 self.bf.len(),
579 )),
580 Some(v) => Ok(*v),
581 }
582 }
583
584 #[inline(always)]
585 pub(crate) fn check_bound(&self, n: usize) -> Result<(), Error> {

Callers 4

peek_u8Method · 0.45
read_u8Method · 0.45
read_var_u32Method · 0.45
read_var_u64Method · 0.45

Calls 2

lenMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected