Skip to main content

ExtendedHeader

Struct ExtendedHeader 

Source
pub struct ExtendedHeader { /* private fields */ }

Implementations§

Source§

impl ExtendedHeader

Source

pub const fn new() -> Self

Returns an instance with zero initialized data.

Source§

impl ExtendedHeader

Source

pub const fn into_bytes(self) -> [u8; 4]

Returns the underlying bits.

§Layout

The returned byte array is layed out in the same way as described here.

Source

pub const fn from_bytes(bytes: [u8; 4]) -> Self

Converts the given bytes directly into the bitfield struct.

Source§

impl ExtendedHeader

Source

pub fn attribute(&self) -> <B15 as Specifier>::InOut

Returns the value of attribute.

Source

pub fn attribute_or_err( &self, ) -> Result<<B15 as Specifier>::InOut, InvalidBitPattern<<B15 as Specifier>::Bytes>>

Returns the value of attribute.

§Errors

If the returned value contains an invalid bit pattern for attribute.

Source

pub fn with_attribute(self, new_val: <B15 as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of attribute set to the given value.

§Panics

If the given value is out of bounds for attribute.

Source

pub fn with_attribute_checked( self, new_val: <B15 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of attribute set to the given value.

§Errors

If the given value is out of bounds for attribute.

Source

pub fn set_attribute(&mut self, new_val: <B15 as Specifier>::InOut)

Sets the value of attribute to the given value.

§Panics

If the given value is out of bounds for attribute.

Source

pub fn set_attribute_checked( &mut self, new_val: <B15 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of attribute to the given value.

§Errors

If the given value is out of bounds for attribute.

Source

pub fn next(&self) -> <bool as Specifier>::InOut

Returns the value of next.

Source

pub fn next_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>

Returns the value of next.

§Errors

If the returned value contains an invalid bit pattern for next.

Source

pub fn with_next(self, new_val: <bool as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of next set to the given value.

§Panics

If the given value is out of bounds for next.

Source

pub fn with_next_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of next set to the given value.

§Errors

If the given value is out of bounds for next.

Source

pub fn set_next(&mut self, new_val: <bool as Specifier>::InOut)

Sets the value of next to the given value.

§Panics

If the given value is out of bounds for next.

Source

pub fn set_next_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of next to the given value.

§Errors

If the given value is out of bounds for next.

Source

pub fn chunk(&self) -> <B6 as Specifier>::InOut

Returns the value of chunk.

Source

pub fn chunk_or_err( &self, ) -> Result<<B6 as Specifier>::InOut, InvalidBitPattern<<B6 as Specifier>::Bytes>>

Returns the value of chunk.

§Errors

If the returned value contains an invalid bit pattern for chunk.

Source

pub fn with_chunk(self, new_val: <B6 as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of chunk set to the given value.

§Panics

If the given value is out of bounds for chunk.

Source

pub fn with_chunk_checked( self, new_val: <B6 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of chunk set to the given value.

§Errors

If the given value is out of bounds for chunk.

Source

pub fn set_chunk(&mut self, new_val: <B6 as Specifier>::InOut)

Sets the value of chunk to the given value.

§Panics

If the given value is out of bounds for chunk.

Source

pub fn set_chunk_checked( &mut self, new_val: <B6 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of chunk to the given value.

§Errors

If the given value is out of bounds for chunk.

Source

pub fn size(&self) -> <B10 as Specifier>::InOut

Returns the value of size.

Source

pub fn size_or_err( &self, ) -> Result<<B10 as Specifier>::InOut, InvalidBitPattern<<B10 as Specifier>::Bytes>>

Returns the value of size.

§Errors

If the returned value contains an invalid bit pattern for size.

Source

pub fn with_size(self, new_val: <B10 as Specifier>::InOut) -> Self

Returns a copy of the bitfield with the value of size set to the given value.

§Panics

If the given value is out of bounds for size.

Source

pub fn with_size_checked( self, new_val: <B10 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>

Returns a copy of the bitfield with the value of size set to the given value.

§Errors

If the given value is out of bounds for size.

Source

pub fn set_size(&mut self, new_val: <B10 as Specifier>::InOut)

Sets the value of size to the given value.

§Panics

If the given value is out of bounds for size.

Source

pub fn set_size_checked( &mut self, new_val: <B10 as Specifier>::InOut, ) -> Result<(), OutOfBounds>

Sets the value of size to the given value.

§Errors

If the given value is out of bounds for size.

Trait Implementations§

Source§

impl CheckTotalSizeMultipleOf8 for ExtendedHeader

Source§

type Size = TotalSize<BitCount<#[derive(Debug, Clone, Copy, PartialEq)] pub struct ExtendedHeader { pub attribute: B15, pub next: bool, pub chunk: B6, pub size: B10, }>>

Source§

impl Clone for ExtendedHeader

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ExtendedHeader

Source§

impl Debug for ExtendedHeader

Source§

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

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

impl From<ExtendedHeader> for [u8; 4]

Source§

fn from(bytes: ExtendedHeader) -> Self

Converts to this type from the input type.
Source§

impl From<[u8; 4]> for ExtendedHeader

Source§

fn from(bytes: [u8; 4]) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExtendedHeader

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ExtendedHeader

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more