pub struct SetupJournal { /* private fields */ }Expand description
One storage setup’s journal row, as its owner last committed it.
Implementations§
Source§impl SetupJournal
impl SetupJournal
Sourcepub async fn start(
database: &StoreDatabase,
creating: bool,
) -> Result<Self, SyncError>
pub async fn start( database: &StoreDatabase, creating: bool, ) -> Result<Self, SyncError>
Journal a setup before its first write to storage, listed in
coven_operations as StorageSetup from this commit on.
Sourcepub async fn running(
database: &StoreDatabase,
) -> Result<Option<Self>, SyncError>
pub async fn running( database: &StoreDatabase, ) -> Result<Option<Self>, SyncError>
The setup a crash left running, if any.
Sourcepub fn id(&self) -> OperationId
pub fn id(&self) -> OperationId
The row’s id, as coven_operations lists it.
Sourcepub fn creating(&self) -> bool
pub fn creating(&self) -> bool
Whether setup creates the store, rather than reconnecting to it.
Sourcepub fn location(&self) -> Option<&StorageConfig>
pub fn location(&self) -> Option<&StorageConfig>
Where setup claims, once past its point of no return.
Sourcepub async fn claim(
&mut self,
database: &StoreDatabase,
location: StorageConfig,
) -> Result<(), SyncError>
pub async fn claim( &mut self, database: &StoreDatabase, location: StorageConfig, ) -> Result<(), SyncError>
Commit setup past its point of no return, claiming at location:
from here on it finishes (§11.6).
Sourcepub async fn end(
&self,
database: &StoreDatabase,
outcome: StorageSetupOutcome,
) -> Result<(), SyncError>
pub async fn end( &self, database: &StoreDatabase, outcome: StorageSetupOutcome, ) -> Result<(), SyncError>
End the row with outcome, which coven_operations keeps until the
app acknowledges it (§11.4).
Auto Trait Implementations§
impl Freeze for SetupJournal
impl RefUnwindSafe for SetupJournal
impl Send for SetupJournal
impl Sync for SetupJournal
impl Unpin for SetupJournal
impl UnsafeUnpin for SetupJournal
impl UnwindSafe for SetupJournal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreCreates a shared type from an unshared type.