pub struct ArgumentHeader(/* private fields */);Expand description
Header word for an FXT Argument.
Implementations§
Source§impl ArgumentHeader
impl ArgumentHeader
Sourcepub const RSVD1_MASK: u64
pub const RSVD1_MASK: u64
Mask of all reserved-as-1 bits.
Sourcepub const RSVD0_MASK: u64
pub const RSVD0_MASK: u64
Mask of all reserved-as-0 bits.
Sourcepub const DEFAULT: u64
pub const DEFAULT: u64
The default value of the layout, combining all field defaults and reserved-as values.
Sourcepub const VALUE_BITS_MASK: u64
pub const VALUE_BITS_MASK: u64
Unshifted bitmask of value_bits.
Sourcepub const VALUE_BITS_SHIFT: usize = 32
pub const VALUE_BITS_SHIFT: usize = 32
Bit shift (i.e., the low bit) of value_bits.
Sourcepub const NAME_REF_MASK: u64
pub const NAME_REF_MASK: u64
Unshifted bitmask of name_ref.
Sourcepub const NAME_REF_SHIFT: usize = 16
pub const NAME_REF_SHIFT: usize = 16
Bit shift (i.e., the low bit) of name_ref.
Sourcepub const SIZE_WORDS_MASK: u64
pub const SIZE_WORDS_MASK: u64
Unshifted bitmask of size_words.
Sourcepub const SIZE_WORDS_SHIFT: usize = 4
pub const SIZE_WORDS_SHIFT: usize = 4
Bit shift (i.e., the low bit) of size_words.
Sourcepub const ARG_TYPE_MASK: u64
pub const ARG_TYPE_MASK: u64
Unshifted bitmask of arg_type.
Sourcepub const ARG_TYPE_SHIFT: usize = 0
pub const ARG_TYPE_SHIFT: usize = 0
Bit shift (i.e., the low bit) of arg_type.
Sourcepub const FIELDS: [FieldMetadata<u64>; 4]
pub const FIELDS: [FieldMetadata<u64>; 4]
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) -> u64
Sourcepub const fn value_bits(&self) -> u32
pub const fn value_bits(&self) -> u32
The value of ArgumentHeader[63:32].
Sourcepub const fn set_value_bits(&mut self, value: u32) -> &mut Self
pub const fn set_value_bits(&mut self, value: u32) -> &mut Self
Sets the value of ArgumentHeader[63:32].
Sourcepub const fn set_name_ref(&mut self, value: u16) -> &mut Self
pub const fn set_name_ref(&mut self, value: u16) -> &mut Self
Sets the value of ArgumentHeader[31:16].
Sourcepub const fn size_words(&self) -> u16
pub const fn size_words(&self) -> u16
The value of ArgumentHeader[15:4].
Sourcepub const fn set_size_words(&mut self, value: u16) -> &mut Self
pub const fn set_size_words(&mut self, value: u16) -> &mut Self
Sets the value of ArgumentHeader[15:4].
Sourcepub fn arg_type(&self) -> ArgumentTypewhere
ArgumentType: TryFromBytes,
pub fn arg_type(&self) -> ArgumentTypewhere
ArgumentType: TryFromBytes,
The value of ArgumentHeader[3:0].
§Panics
Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_arg_type to recover from invalid bit patterns.
Sourcepub fn try_arg_type(&self) -> Result<ArgumentType, InvalidBits<u8>>where
ArgumentType: TryFromBytes,
pub fn try_arg_type(&self) -> Result<ArgumentType, InvalidBits<u8>>where
ArgumentType: TryFromBytes,
Fallible variant of Self::arg_type.
Sourcepub fn set_arg_type(&mut self, value: ArgumentType) -> &mut Self
pub fn set_arg_type(&mut self, value: ArgumentType) -> &mut Self
Sets the value of ArgumentHeader[3:0].
Source§impl ArgumentHeader
impl ArgumentHeader
Sourcepub fn for_argument(
name_ref: u16,
size_words: u16,
arg_type: ArgumentType,
) -> Self
pub fn for_argument( name_ref: u16, size_words: u16, arg_type: ArgumentType, ) -> Self
Constructs an ArgumentHeader for an argument with the given name reference, size in words, and argument type.
Trait Implementations§
Source§impl Binary for ArgumentHeader
impl Binary for ArgumentHeader
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
Source§impl Clone for ArgumentHeader
impl Clone for ArgumentHeader
Source§fn clone(&self) -> ArgumentHeader
fn clone(&self) -> ArgumentHeader
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ArgumentHeader
Source§impl Debug for ArgumentHeader
impl Debug for ArgumentHeader
Source§impl Default for ArgumentHeader
impl Default for ArgumentHeader
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 ArgumentHeader
Source§impl From<ArgumentHeader> for u64
impl From<ArgumentHeader> for u64
Source§fn from(value: ArgumentHeader) -> Self
fn from(value: ArgumentHeader) -> Self
Source§impl From<u64> for ArgumentHeader
impl From<u64> for ArgumentHeader
Source§impl IntoIterator for ArgumentHeader
impl IntoIterator for ArgumentHeader
Source§impl<'a> IntoIterator for &'a ArgumentHeader
impl<'a> IntoIterator for &'a ArgumentHeader
Source§impl LowerHex for ArgumentHeader
impl LowerHex for ArgumentHeader
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
Source§impl Octal for ArgumentHeader
impl Octal for ArgumentHeader
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
Source§impl PartialEq for ArgumentHeader
impl PartialEq for ArgumentHeader
impl StructuralPartialEq for ArgumentHeader
Source§impl UpperHex for ArgumentHeader
impl UpperHex for ArgumentHeader
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Resultwhere
ArgumentType: Debug,
Auto Trait Implementations§
impl Freeze for ArgumentHeader
impl RefUnwindSafe for ArgumentHeader
impl Send for ArgumentHeader
impl Sync for ArgumentHeader
impl Unpin for ArgumentHeader
impl UnsafeUnpin for ArgumentHeader
impl UnwindSafe for ArgumentHeader
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
§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)
clone_to_uninit)