pub enum Ints<'a> {
Run(&'a PrimArray, &'a Meter),
Items(&'a [Value], &'static str, &'a Meter),
Raw(&'a [u8], &'a Meter),
}Expand description
A list of integers: a primitive run, or a list or tuple of ints.
Variants§
Run(&'a PrimArray, &'a Meter)
A primitive run.
Items(&'a [Value], &'static str, &'a Meter)
A list or tuple of values, each checked as it is read.
Raw(&'a [u8], &'a Meter)
bytes (TypelessData), which bytes() copies as it is.
Implementations§
Source§impl<'a> Ints<'a>
impl<'a> Ints<'a>
Sourcepub fn byte(&self, i: usize) -> Result<u8, MeshError>
pub fn byte(&self, i: usize) -> Result<u8, MeshError>
Element i of bytes(self): the value, which must be a byte
(ValueError “bytes must be in range(0, 256)” otherwise; a bool
is its int). i past the end reads as 0.
Sourcepub fn item(&self, i: usize) -> Result<Option<u8>, MeshError>
pub fn item(&self, i: usize) -> Result<Option<u8>, MeshError>
Item i as m_Data[i] reads it (helpers/PackedBitVector.py:56):
None past the end, where Python raises IndexError; a value that
is no byte, which no typetree’s UInt8 holds, is Malformed.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Ints<'a>
impl<'a> !UnwindSafe for Ints<'a>
impl<'a> Forget for Ints<'a>
impl<'a> Freeze for Ints<'a>
impl<'a> Move for Ints<'a>
impl<'a> Send for Ints<'a>
impl<'a> Sync for Ints<'a>
impl<'a> Unpin for Ints<'a>
impl<'a> UnsafeUnpin for Ints<'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