pub enum Action<'a> {
Show 15 variants
SendMetadata {
transaction_id: TransactionId,
destination_id: EntityId,
file_size: u64,
source_file_name: FileId,
destination_file_name: FileId,
checksum_type: ChecksumType,
},
SendFileData {
transaction_id: TransactionId,
destination_id: EntityId,
offset: u64,
data: &'a [u8],
},
SendEof {
transaction_id: TransactionId,
destination_id: EntityId,
condition_code: ConditionCode,
file_size: u64,
checksum: u32,
},
SendFinished {
transaction_id: TransactionId,
destination_id: EntityId,
condition_code: ConditionCode,
},
SendAck {
transaction_id: TransactionId,
destination_id: EntityId,
acked_directive_code: AckedDirectiveCode,
condition_code: ConditionCode,
transaction_status: TransactionStatus,
},
SendPrompt {
transaction_id: TransactionId,
destination_id: EntityId,
prompt_type: PromptType,
},
ReadDataSegment {
transaction_id: TransactionId,
start_offset: u64,
end_offset: u64,
},
ReadDataSegmentBatch {
transaction_id: TransactionId,
segments: NakSegmentsIterator<'a>,
},
StartTimer {
transaction_id: TransactionId,
timer_type: TimerType,
seconds: u16,
},
StopTimer {
transaction_id: TransactionId,
timer_type: Option<TimerType>,
},
TerminateTransaction {
transaction_id: TransactionId,
condition_code: ConditionCode,
},
CalculateChecksum {
transaction_id: TransactionId,
checksum_type: ChecksumType,
},
NotifyFault {
transaction_id: TransactionId,
condition_code: ConditionCode,
},
NotifySuspended {
transaction_id: TransactionId,
},
NotifyResumed {
transaction_id: TransactionId,
progress: u64,
},
}Expand description
Represents all possible outputs from the SenderMachine.
These are instructions for the Runner to execute, such as sending PDUs,
managing timers, or interacting with the filestore.
Variants§
SendMetadata
Instructs the Runner to serialize and send a Metadata PDU.
Fields
transaction_id: TransactionIdIdentifies the transaction this PDU belongs to.
checksum_type: ChecksumTypeAlgorithm used to verify file integrity.
SendFileData
Instructs the Runner to serialize and send a File Data PDU.
Fields
transaction_id: TransactionIdIdentifies the transaction this PDU belongs to.
SendEof
Instructs the Runner to serialize and send an EOF PDU.
Fields
transaction_id: TransactionIdIdentifies the transaction this PDU belongs to.
condition_code: ConditionCodeStatus condition at the time the EOF is sent.
SendFinished
Instructs the Runner to serialize and send a Finished PDU.
Fields
transaction_id: TransactionIdIdentifies the transaction this PDU belongs to.
condition_code: ConditionCodeFinal status condition of the transaction.
SendAck
Instructs the Runner to serialize and send an ACK PDU.
Fields
transaction_id: TransactionIdIdentifies the transaction this PDU belongs to.
acked_directive_code: AckedDirectiveCodeThe directive code being acknowledged.
condition_code: ConditionCodeStatus condition associated with the acknowledgment.
transaction_status: TransactionStatusCurrent status of the transaction being acknowledged.
SendPrompt
Instructs the Runner to serialize and send a Prompt PDU.
Fields
transaction_id: TransactionIdIdentifies the transaction this PDU belongs to.
prompt_type: PromptTypeWhether to prompt for a NAK or Keep Alive response.
ReadDataSegment
Instructs the Runner to read a segment of data from the filestore.
Fields
transaction_id: TransactionIdIdentifies the transaction this read belongs to.
ReadDataSegmentBatch
Instructs the Runner to read multiple segments of data from the filestore.
Fields
transaction_id: TransactionIdIdentifies the transaction this batch read belongs to.
segments: NakSegmentsIterator<'a>Iterator over the missing segments requested by the receiver.
StartTimer
Instructs the Runner to start a timer for a specific transaction.
Fields
transaction_id: TransactionIdIdentifies the transaction this timer belongs to.
StopTimer
Instructs the Runner to stop a timer for a specific transaction.
Fields
transaction_id: TransactionIdIdentifies the transaction this timer belongs to.
TerminateTransaction
Instructs the Runner that a transaction is completed and can be cleaned up.
Fields
transaction_id: TransactionIdIdentifies the transaction to terminate.
condition_code: ConditionCodeFinal status condition describing why the transaction ended.
CalculateChecksum
Instructs the Runner to calculate a checksum for a transaction.
Fields
transaction_id: TransactionIdIdentifies the transaction to compute the checksum for.
checksum_type: ChecksumTypeAlgorithm to use for the checksum calculation.
NotifyFault
Instructs the Runner to notify the user that a fault has occurred.
Fields
transaction_id: TransactionIdIdentifies the faulted transaction.
condition_code: ConditionCodeThe condition that caused the fault.
NotifySuspended
Instructs the Runner to notify the user that a transaction was suspended.
Fields
transaction_id: TransactionIdIdentifies the suspended transaction.
NotifyResumed
Instructs the Runner to notify the user that a transaction was resumed.
Fields
transaction_id: TransactionIdIdentifies the resumed transaction.