Skip to main content

Compose

Trait Compose 

pub trait Compose:
    Unpin
    + Send
    + Sync {
    // Required methods
    fn compose<'a>(
        &'a mut self,
        path: &'a str,
        args: OpRead,
    ) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a;
    fn close(
        &mut self,
    ) -> impl Future<Output = Result<Metadata, Error>> + MaybeSend;
}
Expand description

Compose accepts ordered source objects and commits one destination object.

Required Methods§

fn compose<'a>( &'a mut self, path: &'a str, args: OpRead, ) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a

Accept a complete source object.

A successful return means the source has been accepted in sequence. Backend work may still be pending.

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

Commit all accepted sources and return destination metadata.

Return ErrorKind::ConfigInvalid if no source has been accepted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl Compose for ()

§

async fn compose(&mut self, _: &str, _: OpRead) -> Result<(), Error>

§

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

§

impl<T> Compose for Box<T>
where T: ComposeDyn + ?Sized,

§

fn compose<'a>( &'a mut self, path: &'a str, args: OpRead, ) -> impl Future<Output = Result<(), Error>> + MaybeSend + 'a

§

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

Implementors§