PduRawWithInfo

Struct PduRawWithInfo 

Source
pub struct PduRawWithInfo<'raw_packet> { /* private fields */ }
Expand description

This is a helper struct which contains base information about a particular PDU packet. This is also necessary information for CFDP packet routing. For example, some packet types like file data PDUs can only be used by CFDP source entities.

Implementations§

Source§

impl<'raw> PduRawWithInfo<'raw>

Source

pub fn new(raw_packet: &'raw [u8]) -> Result<Self, PduError>

Source

pub fn raw_packet(&self) -> &[u8]

Trait Implementations§

Source§

impl From<PduRawWithInfo<'_>> for PduOwnedWithInfo

Available on crate feature alloc only.
Source§

fn from(value: PduRawWithInfo<'_>) -> Self

Converts to this type from the input type.
Source§

impl PduProvider for PduRawWithInfo<'_>

Auto Trait Implementations§

§

impl<'raw_packet> Freeze for PduRawWithInfo<'raw_packet>

§

impl<'raw_packet> RefUnwindSafe for PduRawWithInfo<'raw_packet>

§

impl<'raw_packet> Send for PduRawWithInfo<'raw_packet>

§

impl<'raw_packet> Sync for PduRawWithInfo<'raw_packet>

§

impl<'raw_packet> Unpin for PduRawWithInfo<'raw_packet>

§

impl<'raw_packet> UnwindSafe for PduRawWithInfo<'raw_packet>

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> 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.