pub struct Composer { /* private fields */ }Expand description
Creates one destination object from ordered complete source objects.
Composer::compose accepts sources incrementally and may start backend
work before returning. Composer::close waits for pending work and commits
the destination.
Implementations§
Source§impl Composer
impl Composer
Sourcepub async fn compose(&mut self, input: impl IntoComposeInput) -> Result<()>
pub async fn compose(&mut self, input: impl IntoComposeInput) -> Result<()>
Accept one complete source object in sequence.
A successful return means the source was accepted in order. Backend work may still be pending. This method applies backpressure when the configured concurrency window is full.
Sourcepub fn compose_with(
&mut self,
input: impl IntoComposeInput,
) -> FutureComposeSource<'_, impl Future<Output = Result<()>> + '_>
pub fn compose_with( &mut self, input: impl IntoComposeInput, ) -> FutureComposeSource<'_, impl Future<Output = Result<()>> + '_>
Accept one complete source object with additional options.
Visit options::ComposeSourceOptions for all available options.
Sourcepub async fn compose_options(
&mut self,
path: &str,
options: ComposeSourceOptions,
) -> Result<()>
pub async fn compose_options( &mut self, path: &str, options: ComposeSourceOptions, ) -> Result<()>
Accept one complete source object with explicit options.
Visit options::ComposeSourceOptions for all available options.
Sourcepub async fn close(&mut self) -> Result<Metadata>
pub async fn close(&mut self) -> Result<Metadata>
Commit all accepted sources and return destination metadata.
Closing a composer with no accepted sources returns
ErrorKind::ConfigInvalid.