Skip to main content

AckPduBuilder

Struct AckPduBuilder 

Source
pub struct AckPduBuilder<'a, S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<'a, S: State> AckPduBuilder<'a, S>

Source

pub fn build(self) -> Result<&'a mut Pdu, CfdpError>
where S: IsComplete,

Finishes building and performs the requested action.

Source

pub fn buffer(self, value: &'a mut [u8]) -> AckPduBuilder<'a, SetBuffer<S>>
where S::Buffer: IsUnset,

Required.

Source

pub fn source_entity_id( self, value: EntityId, ) -> AckPduBuilder<'a, SetSourceEntityId<S>>
where S::SourceEntityId: IsUnset,

Required.

Source

pub fn dest_entity_id( self, value: EntityId, ) -> AckPduBuilder<'a, SetDestEntityId<S>>
where S::DestEntityId: IsUnset,

Required.

Source

pub fn transaction_seq_num( self, value: TransactionSeqNum, ) -> AckPduBuilder<'a, SetTransactionSeqNum<S>>
where S::TransactionSeqNum: IsUnset,

Required.

Source

pub fn transmission_mode( self, value: TransmissionMode, ) -> AckPduBuilder<'a, SetTransmissionMode<S>>
where S::TransmissionMode: IsUnset,

Required.

Source

pub fn crc_flag(self, value: bool) -> AckPduBuilder<'a, SetCrcFlag<S>>
where S::CrcFlag: IsUnset,

Required.

Source

pub fn acked_directive_code( self, value: AckedDirectiveCode, ) -> AckPduBuilder<'a, SetAckedDirectiveCode<S>>
where S::AckedDirectiveCode: IsUnset,

Required.

Source

pub fn condition_code( self, value: ConditionCode, ) -> AckPduBuilder<'a, SetConditionCode<S>>
where S::ConditionCode: IsUnset,

Required.

Source

pub fn transaction_status( self, value: TransactionStatus, ) -> AckPduBuilder<'a, SetTransactionStatus<S>>
where S::TransactionStatus: IsUnset,

Required.

Auto Trait Implementations§

§

impl<'a, S> Freeze for AckPduBuilder<'a, S>

§

impl<'a, S> RefUnwindSafe for AckPduBuilder<'a, S>

§

impl<'a, S> Send for AckPduBuilder<'a, S>

§

impl<'a, S> Sync for AckPduBuilder<'a, S>

§

impl<'a, S> Unpin for AckPduBuilder<'a, S>

§

impl<'a, S> UnsafeUnpin for AckPduBuilder<'a, S>

§

impl<'a, S = Empty> !UnwindSafe for AckPduBuilder<'a, S>

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> Same for T

Source§

type Output = T

Should always be Self
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.