pub enum Event<'a> {
PutRequest {
source_file_name: FileId,
destination_file_name: FileId,
destination_id: EntityId,
file_size: u64,
checksum_type: ChecksumType,
},
PromptRequest {
transaction_id: TransactionId,
prompt_type: PromptType,
},
SuspendRequest {
transaction_id: TransactionId,
},
ResumeRequest {
transaction_id: TransactionId,
},
PduReceived {
transaction_id: TransactionId,
pdu: &'a Pdu,
},
TimerExpired {
transaction_id: TransactionId,
timer_type: TimerType,
},
DataSegmentReady {
transaction_id: TransactionId,
data: &'a [u8],
offset: u64,
},
ChecksumReady {
transaction_id: TransactionId,
checksum: u32,
},
}Expand description
Represents all possible inputs that can drive the SenderMachine.
Variants§
PutRequest
A user request to send a file to a remote entity.
Fields
checksum_type: ChecksumTypeAlgorithm used to verify file integrity.
PromptRequest
A user request to prompt the receiver for a NAK or Keep Alive response.
Fields
transaction_id: TransactionIdIdentifies the transaction to send the prompt for.
prompt_type: PromptTypeWhether to prompt for a NAK or Keep Alive response.
SuspendRequest
A user request to suspend a transaction.
Fields
transaction_id: TransactionIdIdentifies the transaction to suspend.
ResumeRequest
A user request to resume a suspended transaction.
Fields
transaction_id: TransactionIdIdentifies the transaction to resume.
PduReceived
A PDU has been received from a remote entity for a transaction this machine is handling.
Fields
transaction_id: TransactionIdIdentifies the transaction the received PDU belongs to.
TimerExpired
A timer, previously requested via an Action, has expired.
Fields
transaction_id: TransactionIdIdentifies the transaction the expired timer belongs to.
DataSegmentReady
A chunk of file data, requested via a RequestFileData action, is ready to be sent.
Fields
transaction_id: TransactionIdIdentifies the transaction the data belongs to.
ChecksumReady
The checksum calculation, requested via an Action, has completed.
Fields
transaction_id: TransactionIdIdentifies the transaction the checksum was computed for.