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§

source

fn status(&self) -> TransferStatus

Returns the status of the transfer in a TransferStatus enum

source

fn actual_length(&self) -> usize

Returns the actual amount of data transferred, which may be less than the original length.

source

fn buffer(&self) -> &TransferBuffer

Returns a reference to the TransferBuffer object.

source

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.

Implementations on Foreign Types§

source§

impl BackendTransfer for Transfer

source§

fn status(&self) -> TransferStatus

source§

fn actual_length(&self) -> usize

source§

fn buffer(&self) -> &TransferBuffer

source§

fn set_callback<C: 'static + Fn(BackendTransferType) + Send + Sync>( &mut self, cb: C )

Implementors§