pub struct SegmentTable<'a> { /* private fields */ }Expand description
Read-only segment table.
Implementations§
Source§impl<'a> SegmentTable<'a>
impl<'a> SegmentTable<'a>
Sourcepub fn from_bytes(data: &'a [u8], count: usize) -> Result<Self, ProgramError>
pub fn from_bytes(data: &'a [u8], count: usize) -> Result<Self, ProgramError>
Parse a segment table from raw bytes.
Sourcepub fn segment_count(&self) -> usize
pub fn segment_count(&self) -> usize
Number of segments.
Sourcepub fn descriptor(
&self,
index: usize,
) -> Result<&SegmentDescriptor, ProgramError>
pub fn descriptor( &self, index: usize, ) -> Result<&SegmentDescriptor, ProgramError>
Get a descriptor by index.
Auto Trait Implementations§
impl<'a> Freeze for SegmentTable<'a>
impl<'a> RefUnwindSafe for SegmentTable<'a>
impl<'a> Send for SegmentTable<'a>
impl<'a> Sync for SegmentTable<'a>
impl<'a> Unpin for SegmentTable<'a>
impl<'a> UnsafeUnpin for SegmentTable<'a>
impl<'a> UnwindSafe for SegmentTable<'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