pub struct StringRefHeader(/* private fields */);Expand description
16-bit String Reference header entry.
Implementations§
Source§impl StringRefHeader
impl StringRefHeader
Sourcepub const RSVD1_MASK: u16
pub const RSVD1_MASK: u16
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u16
pub const RSVD0_MASK: u16
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u16
pub const DEFAULT: u16
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const IS_INLINE_MASK: u16
pub const IS_INLINE_MASK: u16
Unshifted bitmask of is_inline.
Sourcepub const IS_INLINE_SHIFT: usize = 15
pub const IS_INLINE_SHIFT: usize = 15
Bit shift (i.e., the low bit) of is_inline.
Sourcepub const ID_OR_LEN_MASK: u16
pub const ID_OR_LEN_MASK: u16
Unshifted bitmask of id_or_len.
Sourcepub const ID_OR_LEN_SHIFT: usize = 0
pub const ID_OR_LEN_SHIFT: usize = 0
Bit shift (i.e., the low bit) of id_or_len.
Sourcepub const FIELDS: [FieldMetadata<u16>; 2]
pub const FIELDS: [FieldMetadata<u16>; 2]
Metadata of all named fields in the layout.
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new instance with reserved-as-1 bits set and
all other bits zeroed (i.e., with a value of
Self::RSVD1_MASK).
pub const fn bits(self) -> u16
Sourcepub const fn set_is_inline(&mut self, value: bool) -> &mut Self
pub const fn set_is_inline(&mut self, value: bool) -> &mut Self
Sets the value of StringRefHeader15.
Sourcepub const fn set_id_or_len(&mut self, value: u16) -> &mut Self
pub const fn set_id_or_len(&mut self, value: u16) -> &mut Self
Sets the value of StringRefHeader[14:0].
Trait Implementations§
Source§impl Binary for StringRefHeader
impl Binary for StringRefHeader
Source§impl Clone for StringRefHeader
impl Clone for StringRefHeader
Source§fn clone(&self) -> StringRefHeader
fn clone(&self) -> StringRefHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StringRefHeader
Source§impl Debug for StringRefHeader
impl Debug for StringRefHeader
Source§impl Default for StringRefHeader
impl Default for StringRefHeader
Source§fn default() -> Self
fn default() -> Self
Returns an instance with the default bits set (i.e,. with a
value of Self::DEFAULT.
impl Eq for StringRefHeader
Source§impl From<StringRefHeader> for u16
impl From<StringRefHeader> for u16
Source§fn from(value: StringRefHeader) -> Self
fn from(value: StringRefHeader) -> Self
Converts to this type from the input type.
Source§impl From<u16> for StringRefHeader
impl From<u16> for StringRefHeader
Source§impl IntoIterator for StringRefHeader
impl IntoIterator for StringRefHeader
Source§impl<'a> IntoIterator for &'a StringRefHeader
impl<'a> IntoIterator for &'a StringRefHeader
Source§impl LowerHex for StringRefHeader
impl LowerHex for StringRefHeader
Source§impl Octal for StringRefHeader
impl Octal for StringRefHeader
Source§impl PartialEq for StringRefHeader
impl PartialEq for StringRefHeader
impl StructuralPartialEq for StringRefHeader
Auto Trait Implementations§
impl Freeze for StringRefHeader
impl RefUnwindSafe for StringRefHeader
impl Send for StringRefHeader
impl Sync for StringRefHeader
impl Unpin for StringRefHeader
impl UnsafeUnpin for StringRefHeader
impl UnwindSafe for StringRefHeader
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)