pub trait BackendTransfer {
    // Required methods
    fn status(&self) -> TransferStatus;
    fn actual_length(&self) -> usize;
    fn buffer(&self) -> &TransferBuffer;
    fn set_callback<C: 'static + Fn(BackendTransferType) + Send + Sync>(
        &mut self,
        cb: C,
    );
}Expand description
The backend transfer trait implemention is the interface of a generic transfer structure that each backend type should implement to be compatible with the generic backend device provider logic.
Required Methods§
sourcefn status(&self) -> TransferStatus
 
fn status(&self) -> TransferStatus
Returns the status of the transfer in a TransferStatus enum
sourcefn actual_length(&self) -> usize
 
fn actual_length(&self) -> usize
Returns the actual amount of data transferred, which may be less than the original length.
sourcefn buffer(&self) -> &TransferBuffer
 
fn buffer(&self) -> &TransferBuffer
Returns a reference to the TransferBuffer object.
sourcefn set_callback<C: 'static + Fn(BackendTransferType) + Send + Sync>(
    &mut self,
    cb: C,
)
 
fn set_callback<C: 'static + Fn(BackendTransferType) + Send + Sync>( &mut self, cb: C, )
Sets an optional callback on the transfer to be called when the transfer completes.
Object Safety§
This trait is not object safe.