pub struct SectionKind(/* private fields */);Expand description
Typed wrapper over a section’s opaque u32 kind tag.
The container still treats the value opaquely, but SectionKind plus the
kinds band registry give the wire format a single documented authority
over the kind namespace. Layout crates declare their kind constants inside
the band the registry reserves for them so that distinct subsystems cannot
silently collide on a value.
§Performance
All methods are O(1).
Implementations§
Trait Implementations§
Source§impl Clone for SectionKind
impl Clone for SectionKind
Source§fn clone(&self) -> SectionKind
fn clone(&self) -> SectionKind
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 SectionKind
Source§impl Debug for SectionKind
impl Debug for SectionKind
Source§impl Display for SectionKind
impl Display for SectionKind
impl Eq for SectionKind
Source§impl From<u32> for SectionKind
impl From<u32> for SectionKind
Source§impl Hash for SectionKind
impl Hash for SectionKind
Source§impl Ord for SectionKind
impl Ord for SectionKind
Source§fn cmp(&self, other: &SectionKind) -> Ordering
fn cmp(&self, other: &SectionKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SectionKind
impl PartialEq for SectionKind
Source§fn eq(&self, other: &SectionKind) -> bool
fn eq(&self, other: &SectionKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SectionKind
impl PartialOrd for SectionKind
impl StructuralPartialEq for SectionKind
Auto Trait Implementations§
impl Freeze for SectionKind
impl RefUnwindSafe for SectionKind
impl Send for SectionKind
impl Sync for SectionKind
impl Unpin for SectionKind
impl UnsafeUnpin for SectionKind
impl UnwindSafe for SectionKind
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