Skip to main content

Copy

Trait Copy 

pub trait Copy:
    Unpin
    + Send
    + Sync {
    // Required methods
    fn next(
        &mut self,
    ) -> impl Future<Output = Result<Option<usize>, Error>> + MaybeSend;
    fn close(
        &mut self,
    ) -> impl Future<Output = Result<Metadata, Error>> + MaybeSend;
    fn abort(&mut self) -> impl Future<Output = Result<(), Error>> + MaybeSend;
}
Expand description

Copy is the trait that OpenDAL returns for stateful copy operations.

Required Methods§

fn next( &mut self, ) -> impl Future<Output = Result<Option<usize>, Error>> + MaybeSend

Drive the copy operation forward.

Ok(Some(n)) means the copy operation made progress by n bytes. Ok(None) means the copy operation has completed.

fn close(&mut self) -> impl Future<Output = Result<Metadata, Error>> + MaybeSend

Close the copier and return metadata from the server-side completion response.

fn abort(&mut self) -> impl Future<Output = Result<(), Error>> + MaybeSend

Abort the pending copy operation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl Copy for ()

§

async fn next(&mut self) -> Result<Option<usize>, Error>

§

async fn close(&mut self) -> Result<Metadata, Error>

§

async fn abort(&mut self) -> Result<(), Error>

§

impl<T> Copy for Box<T>
where T: CopyDyn + ?Sized,

§

async fn next(&mut self) -> Result<Option<usize>, Error>

§

async fn close(&mut self) -> Result<Metadata, Error>

§

async fn abort(&mut self) -> Result<(), Error>

Implementors§

§

impl Copy for OneShotCopier

§

impl<C> Copy for BlockCopier<C>
where C: BlockCopy,

§

impl<C> Copy for MultipartCopier<C>
where C: MultipartCopy,

§

impl<ONE, TWO> Copy for TwoWays<ONE, TWO>
where ONE: Copy, TWO: Copy,