pub struct EphemeralBatchUpdate<'a, D> { /* private fields */ }Expand description
EphemeralBatchUpdate is a special repository that is designed to write the metadata and targets to an EphemeralRepository in a single batch.
Note: EphemeralBatchUpdate::commit() must be called in order to write the metadata and
targets to the EphemeralRepository. Otherwise any queued changes will be lost on drop.
Implementations§
Source§impl<D> EphemeralBatchUpdate<'_, D>where
D: Pouf,
impl<D> EphemeralBatchUpdate<'_, D>where
D: Pouf,
Sourcepub async fn commit(self) -> Result<(), CommitError>
pub async fn commit(self) -> Result<(), CommitError>
Write all the metadata and targets in the EphemeralBatchUpdate to the source EphemeralRepository in a single batch operation.
Trait Implementations§
Source§impl<'a, D: Debug> Debug for EphemeralBatchUpdate<'a, D>
impl<'a, D: Debug> Debug for EphemeralBatchUpdate<'a, D>
Source§impl<D> RepositoryProvider<D> for EphemeralBatchUpdate<'_, D>where
D: Pouf,
impl<D> RepositoryProvider<D> for EphemeralBatchUpdate<'_, D>where
D: Pouf,
Source§fn fetch_metadata<'a>(
&'a self,
meta_path: &MetadataPath,
version: MetadataVersion,
) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
fn fetch_metadata<'a>( &'a self, meta_path: &MetadataPath, version: MetadataVersion, ) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
Source§fn fetch_target<'a>(
&'a self,
target_path: &TargetPath,
) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
fn fetch_target<'a>( &'a self, target_path: &TargetPath, ) -> BoxFuture<'a, Result<Box<dyn AsyncRead + Send + Unpin + 'a>>>
Fetch the given target. Read more
Source§impl<D> RepositoryStorage<D> for EphemeralBatchUpdate<'_, D>where
D: Pouf,
impl<D> RepositoryStorage<D> for EphemeralBatchUpdate<'_, D>where
D: Pouf,
Source§fn store_metadata<'a>(
&'a self,
meta_path: &MetadataPath,
version: MetadataVersion,
metadata: &'a mut (dyn AsyncRead + Send + Unpin),
) -> BoxFuture<'a, Result<()>>
fn store_metadata<'a>( &'a self, meta_path: &MetadataPath, version: MetadataVersion, metadata: &'a mut (dyn AsyncRead + Send + Unpin), ) -> BoxFuture<'a, Result<()>>
Store the provided
metadata in a location identified by meta_path, version, and
D::extension(), overwriting any existing metadata at that location.Source§fn store_target<'a>(
&'a self,
target_path: &TargetPath,
read: &'a mut (dyn AsyncRead + Send + Unpin),
) -> BoxFuture<'a, Result<()>>
fn store_target<'a>( &'a self, target_path: &TargetPath, read: &'a mut (dyn AsyncRead + Send + Unpin), ) -> BoxFuture<'a, Result<()>>
Store the provided
target in a location identified by target_path, overwriting any
existing target at that location.Auto Trait Implementations§
impl<'a, D> !Freeze for EphemeralBatchUpdate<'a, D>
impl<'a, D> RefUnwindSafe for EphemeralBatchUpdate<'a, D>where
D: RefUnwindSafe,
impl<'a, D> Send for EphemeralBatchUpdate<'a, D>where
D: Send,
impl<'a, D> Sync for EphemeralBatchUpdate<'a, D>where
D: Sync,
impl<'a, D> Unpin for EphemeralBatchUpdate<'a, D>where
D: Unpin,
impl<'a, D> UnsafeUnpin for EphemeralBatchUpdate<'a, D>
impl<'a, D> UnwindSafe for EphemeralBatchUpdate<'a, D>where
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more