pub struct CtorView<'lean, 'a> { /* private fields */ }Expand description
Borrowed view of a heap-allocated Lean constructor.
Constructed only after ObjView::ctor has verified that the source
object is a constructor. The cached header facts make repeated reads
cheap and keep scalar-tail bounds checks explicit at each offset.
Implementations§
Source§impl<'lean, 'a> CtorView<'lean, 'a>
impl<'lean, 'a> CtorView<'lean, 'a>
Sourcepub fn uint8(&self, offset: u32, label: &str) -> LeanResult<u8>
pub fn uint8(&self, offset: u32, label: &str) -> LeanResult<u8>
Read a UInt8 field from the constructor scalar tail at byte
offset.
§Errors
Returns a conversion error if the requested byte range is outside the scalar tail.
Trait Implementations§
impl<'lean, 'a> Copy for CtorView<'lean, 'a>
Auto Trait Implementations§
impl<'lean, 'a> !Send for CtorView<'lean, 'a>
impl<'lean, 'a> !Sync for CtorView<'lean, 'a>
impl<'lean, 'a> Freeze for CtorView<'lean, 'a>
impl<'lean, 'a> RefUnwindSafe for CtorView<'lean, 'a>
impl<'lean, 'a> Unpin for CtorView<'lean, 'a>
impl<'lean, 'a> UnsafeUnpin for CtorView<'lean, 'a>
impl<'lean, 'a> UnwindSafe for CtorView<'lean, '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