pub struct CheckWriter<'a> { /* private fields */ }
Expand description
Similar to MultiWriter expect for CheckWriter::commit.
Implementations§
Source§impl<'a> CheckWriter<'a>
impl<'a> CheckWriter<'a>
Sourcepub fn add_check_version(
&mut self,
path: &str,
version: i32,
) -> Result<(), Error>
pub fn add_check_version( &mut self, path: &str, version: i32, ) -> Result<(), Error>
Same as MultiWriter::add_check_version.
Sourcepub fn add_create(
&mut self,
path: &str,
data: &[u8],
options: &CreateOptions<'_>,
) -> Result<(), Error>
pub fn add_create( &mut self, path: &str, data: &[u8], options: &CreateOptions<'_>, ) -> Result<(), Error>
Same as MultiWriter::add_create.
Sourcepub fn add_set_data(
&mut self,
path: &str,
data: &[u8],
expected_version: Option<i32>,
) -> Result<(), Error>
pub fn add_set_data( &mut self, path: &str, data: &[u8], expected_version: Option<i32>, ) -> Result<(), Error>
Same as MultiWriter::add_set_data.
Sourcepub fn add_delete(
&mut self,
path: &str,
expected_version: Option<i32>,
) -> Result<(), Error>
pub fn add_delete( &mut self, path: &str, expected_version: Option<i32>, ) -> Result<(), Error>
Same as MultiWriter::add_delete.
Sourcepub fn commit(
self,
) -> impl Future<Output = Result<Vec<MultiWriteResult>, CheckWriteError>> + Send + 'a
pub fn commit( self, ) -> impl Future<Output = Result<Vec<MultiWriteResult>, CheckWriteError>> + Send + 'a
Similar to MultiWriter::commit except independent path check error.
Auto Trait Implementations§
impl<'a> Freeze for CheckWriter<'a>
impl<'a> !RefUnwindSafe for CheckWriter<'a>
impl<'a> Send for CheckWriter<'a>
impl<'a> Sync for CheckWriter<'a>
impl<'a> Unpin for CheckWriter<'a>
impl<'a> !UnwindSafe for CheckWriter<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more