pub(crate) struct Uints<'a> {
bytes: &'a [u8],
len: u32,
width: u8,
}Expand description
Big-endian unsigned integers of one width, two or three bytes, read from an array in place. Glyph IDs, offsets and rule values of the original and extended formats share code through it.
Fields§
§bytes: &'a [u8]§len: u32§width: u8Implementations§
Source§impl<'a> Uints<'a>
impl<'a> Uints<'a>
Sourcepub fn new(
data: FontData<'a>,
range: Range<usize>,
width: usize,
) -> Option<Self>
pub fn new( data: FontData<'a>, range: Range<usize>, width: usize, ) -> Option<Self>
The integers of width bytes in range of data, or None if the
range is out of bounds.
Sourcepub fn at(
data: FontData<'a>,
start: usize,
count: usize,
width: usize,
) -> Option<Self>
pub fn at( data: FontData<'a>, start: usize, count: usize, width: usize, ) -> Option<Self>
count integers of width bytes at start of data.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<u32>
pub fn first(&self) -> Option<u32>
pub fn iter(&self) -> impl Iterator<Item = u32> + '_
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Uints<'a>
impl<'a> RefUnwindSafe for Uints<'a>
impl<'a> Send for Uints<'a>
impl<'a> Sync for Uints<'a>
impl<'a> Unpin for Uints<'a>
impl<'a> UnsafeUnpin for Uints<'a>
impl<'a> UnwindSafe for Uints<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more