Skip to main content

Event

pub enum Event<'a> {
    PduReceived {
        transaction_id: TransactionId,
        pdu: &'a Pdu,
    },
    TimerExpired {
        transaction_id: TransactionId,
        timer_type: TimerType,
    },
    FileDataWritten {
        transaction_id: TransactionId,
        offset: u64,
        len: usize,
    },
    ChecksumVerified {
        transaction_id: TransactionId,
        is_valid: bool,
    },
    SuspendRequest {
        transaction_id: TransactionId,
    },
    ResumeRequest {
        transaction_id: TransactionId,
    },
    FilestoreResponsesReceived {
        transaction_id: TransactionId,
        responses: Vec<FilestoreResponse, 4, u8>,
    },
}
Expand description

Represents all possible inputs that can drive the ReceiverMachine.

Variants§

§

PduReceived

A PDU has been received from a remote entity for a transaction this machine is handling.

Fields

§transaction_id: TransactionId

The transaction this PDU belongs to.

§pdu: &'a Pdu

The received PDU to be processed.

§

TimerExpired

A timer, previously requested via an Action, has expired.

Fields

§transaction_id: TransactionId

The transaction whose timer expired.

§timer_type: TimerType

The kind of timer that expired.

§

FileDataWritten

A chunk of file data, requested to be written via a WriteFileData action, has been successfully written.

Fields

§transaction_id: TransactionId

The transaction this write confirmation belongs to.

§offset: u64

The byte offset within the file where the data was written.

§len: usize

The number of bytes that were written.

§

ChecksumVerified

The checksum verification, requested via an Action, has completed.

Fields

§transaction_id: TransactionId

The transaction whose checksum was verified.

§is_valid: bool

Whether the computed checksum matched the expected value.

§

SuspendRequest

A user request to suspend a transaction.

Fields

§transaction_id: TransactionId

The transaction to suspend.

§

ResumeRequest

A user request to resume a suspended transaction.

Fields

§transaction_id: TransactionId

The transaction to resume.

§

FilestoreResponsesReceived

The filestore requests have been executed and responses are ready.

Fields

§transaction_id: TransactionId

The transaction these responses belong to.

§responses: Vec<FilestoreResponse, 4, u8>

The results of the executed filestore requests.

Trait Implementations§

Source§

impl<'a> Debug for Event<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Event<'a>

§

impl<'a> RefUnwindSafe for Event<'a>

§

impl<'a> Send for Event<'a>

§

impl<'a> Sync for Event<'a>

§

impl<'a> Unpin for Event<'a>

§

impl<'a> UnsafeUnpin for Event<'a>

§

impl<'a> UnwindSafe for Event<'a>

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.