U32AsRef

Type Alias U32AsRef 

Source
pub type U32AsRef<'a> = Inner<'a, true, 4, 0, 0>;
Expand description

Type alias for a 4-byte slice or owned data represented using the Inner type with fixed-size configuration.

Aliased Type§

pub enum U32AsRef<'a> {}

Implementations§

Source§

impl U32AsRef<'_>

Represents a reference to a 32-bit unsigned integer (u32), providing methods for convenient conversions.

Source

pub fn as_u32(&self) -> u32

Returns the u32 value represented by this reference.

Trait Implementations§

Source§

impl<'a> Decodable<'a> for U32AsRef<'a>

Source§

fn get_structure(_: &[u8]) -> Result<Vec<FieldMarker>, Error>

Defines the expected structure of a type based on binary data. Read more
Source§

fn from_decoded_fields(data: Vec<DecodableField<'a>>) -> Result<Self, Error>

Constructs the type from a vector of decoded fields. Read more
Source§

fn from_bytes(data: &'a mut [u8]) -> Result<Self, Error>

Decodes the type from raw bytes. Read more
Source§

impl Display for U32AsRef<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<u32> for U32AsRef<'_>

Source§

fn from(v: u32) -> Self

Converts to this type from the input type.
Source§

impl GetMarker for U32AsRef<'_>

Source§

fn get_marker() -> FieldMarker

Defines the structure of a type for decoding purposes, supporting both primitive and structured types. It helps getting a marker for a type.
Source§

impl<'a> TryFrom<DecodableField<'a>> for U32AsRef<'a>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: DecodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<EncodableField<'a>> for U32AsRef<'a>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: EncodableField<'a>) -> Result<Self, Self::Error>

Performs the conversion.