Flags

Struct Flags 

Source
pub struct Flags(/* private fields */);

Implementations§

Source§

impl Flags

Source

pub const EXTENDED_LENGTH_BIT_MASK: u8 = 128u8

If bit 8 is set, the length is extended by an extra byte.

Source

pub const INCLUDES_VECTOR_BIT_MASK: u8 = 64u8

If bit 7 is set, the pdu contains a vector segment

Source

pub const INCLUDES_HEADER_BIT_MASK: u8 = 32u8

If bit 6 is set, the pdu contains a header segment

Source

pub const INCLUDES_DATA_BIT_MASK: u8 = 16u8

If bit 5 is set, the pdu contains a data segment

Source

pub const ALL_BIT_MASK: u8 = 240u8

Source

pub const EXTENDED_LENGTH: Self

Source

pub const INCLUDES_VECTOR: Self

Source

pub const INCLUDES_HEADER: Self

Source

pub const INCLUDES_DATA: Self

Source

pub const ALL: Self

Source

pub const fn new(flags: u8) -> Self

Source

pub const fn empty() -> Self

Source

pub const fn bits(&self) -> u8

Source

pub const fn is_extended_length(&self) -> bool

Source

pub const fn is_includes_vector(&self) -> bool

Source

pub const fn is_includes_header(&self) -> bool

Source

pub const fn is_includes_data(&self) -> bool

Source

pub const fn is_all(&self) -> bool

Source

pub fn encode(&self, buf: &mut [u8]) -> Result<usize, AcnError>

Source

pub fn decode(buf: &[u8]) -> Result<Self, AcnError>

Trait Implementations§

Source§

impl BitAnd<Flags> for u8

Source§

type Output = Flags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Flags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<u8> for Flags

Source§

type Output = Flags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: u8) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd for Flags

Source§

type Output = Flags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign<Flags> for u8

Source§

fn bitand_assign(&mut self, rhs: Flags)

Performs the &= operation. Read more
Source§

impl BitAndAssign<u8> for Flags

Source§

fn bitand_assign(&mut self, rhs: u8)

Performs the &= operation. Read more
Source§

impl BitAndAssign for Flags

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr<Flags> for u8

Source§

type Output = Flags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Flags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<u8> for Flags

Source§

type Output = Flags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: u8) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr for Flags

Source§

type Output = Flags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign<Flags> for u8

Source§

fn bitor_assign(&mut self, rhs: Flags)

Performs the |= operation. Read more
Source§

impl BitOrAssign<u8> for Flags

Source§

fn bitor_assign(&mut self, rhs: u8)

Performs the |= operation. Read more
Source§

impl BitOrAssign for Flags

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl Clone for Flags

Source§

fn clone(&self) -> Flags

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Flags

Source§

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

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

impl Default for Flags

Source§

fn default() -> Flags

Returns the “default value” for a type. Read more
Source§

impl From<Flags> for u8

Source§

fn from(flags: Flags) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for Flags

Source§

fn from(flags: u8) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Flags

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Flags

Source§

impl StructuralPartialEq for Flags

Auto Trait Implementations§

§

impl Freeze for Flags

§

impl RefUnwindSafe for Flags

§

impl Send for Flags

§

impl Sync for Flags

§

impl Unpin for Flags

§

impl UnwindSafe for Flags

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<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, 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.