• Home
  • Raw
  • Download

Lines Matching refs:BitWidth

15 use crate::bitwidth::BitWidth;
49 expected: BitWidth,
50 actual: BitWidth,
106 const WIDTH: BitWidth;
112 const WIDTH: BitWidth = BitWidth::$WIDTH;
148 width: BitWidth,
168 width: BitWidth::default(), in default()
200 fn deref_offset(buffer: &[u8], address: usize, width: BitWidth) -> Result<usize, Error> { in deref_offset()
210 width: BitWidth, in new() argument
211 parent_width: BitWidth, in new() argument
236 let root_width = BitWidth::from_nbytes(buffer[end - 1]).ok_or(Error::InvalidRootWidth)?; in get_root()
256 pub fn bitwidth(&self) -> BitWidth { in bitwidth() argument
292 fn expect_bw(&self, bw: BitWidth) -> Result<(), Error> { in expect_bw()
389 fn get_map_info(&self) -> Result<(usize, BitWidth), Error> { in get_map_info() argument
398 BitWidth::from_nbytes(kw).ok_or(Error::InvalidMapKeysVectorWidth) in get_map_info()
425 BitWidth::W8 => cursor.map(|s| s[0] as u8).map(Into::into), in get_u64()
426 BitWidth::W16 => cursor in get_u64()
430 BitWidth::W32 => cursor in get_u64()
434 BitWidth::W64 => cursor in get_u64()
448 BitWidth::W8 => cursor.map(|s| s[0] as i8).map(Into::into), in get_i64()
449 BitWidth::W16 => cursor in get_i64()
453 BitWidth::W32 => cursor in get_i64()
457 BitWidth::W64 => cursor in get_i64()
471 BitWidth::W8 | BitWidth::W16 => return Err(Error::InvalidPackedType), in get_f64()
472 BitWidth::W32 => cursor in get_f64()
476 BitWidth::W64 => cursor in get_f64()
643 fn read_usize(buffer: &[u8], address: usize, width: BitWidth) -> usize { in read_usize()
646 BitWidth::W8 => cursor[0] as usize, in read_usize()
647 BitWidth::W16 => cursor in read_usize()
652 BitWidth::W32 => cursor in read_usize()
657 BitWidth::W64 => cursor in read_usize()
665 fn unpack_type(ty: u8) -> Result<(FlexBufferType, BitWidth), Error> { in unpack_type() argument
666 let w = BitWidth::try_from(ty & 3u8).map_err(|_| Error::InvalidPackedType)?; in unpack_type()