pub struct SegmentEntry {
pub id: [u8; 4],
pub version: u8,
pub _reserved: u8,
/* private fields */
}Expand description
A segment entry in the registry.
Fields§
§id: [u8; 4]§version: u8§_reserved: u8Implementations§
Source§impl SegmentEntry
impl SegmentEntry
Sourcepub const fn new(
id: [u8; 4],
offset: u32,
size: u32,
flags: u16,
version: u8,
) -> SegmentEntry
pub const fn new( id: [u8; 4], offset: u32, size: u32, flags: u16, version: u8, ) -> SegmentEntry
Create a new segment entry.
Sourcepub fn role(&self) -> SegmentRole
pub fn role(&self) -> SegmentRole
The semantic role of this segment (decoded from upper 4 bits of flags).
Sourcepub fn set_offset(&mut self, offset: u32)
pub fn set_offset(&mut self, offset: u32)
Set the offset.
Trait Implementations§
Source§impl Clone for SegmentEntry
impl Clone for SegmentEntry
Source§fn clone(&self) -> SegmentEntry
fn clone(&self) -> SegmentEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SegmentEntry
Auto Trait Implementations§
impl Freeze for SegmentEntry
impl RefUnwindSafe for SegmentEntry
impl Send for SegmentEntry
impl Sync for SegmentEntry
impl Unpin for SegmentEntry
impl UnsafeUnpin for SegmentEntry
impl UnwindSafe for SegmentEntry
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