pub struct SyncOptions<'a> {
pub flush_device: bool,
pub precondition: Option<Box<dyn FnOnce() -> bool + Send + 'a>>,
}
Fields§
§flush_device: bool
If set, the journal will be flushed, as well as the underlying block device. This is much more expensive, but ensures the contents of the journal are persisted (which also acts as a barrier, ensuring all previous journal writes are observable by future operations). Note that when this is not set, the journal is not synchronously flushed by the sync call, and it will return before the journal flush completes. In other words, some journal mutations may still be buffered in memory after this call returns.
precondition: Option<Box<dyn FnOnce() -> bool + Send + 'a>>
A precondition that is evaluated whilst a lock is held that determines whether or not the sync needs to proceed.
Trait Implementations§
Source§impl<'a> Default for SyncOptions<'a>
impl<'a> Default for SyncOptions<'a>
Source§fn default() -> SyncOptions<'a>
fn default() -> SyncOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for SyncOptions<'a>
impl<'a> !RefUnwindSafe for SyncOptions<'a>
impl<'a> Send for SyncOptions<'a>
impl<'a> !Sync for SyncOptions<'a>
impl<'a> Unpin for SyncOptions<'a>
impl<'a> !UnwindSafe for SyncOptions<'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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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