Struct RecordReservation
pub struct RecordReservation { /* private fields */ }Expand description
The unique construction owner of a not-yet-live record. Drop cancels only this generation.
Implementations§
§impl RecordReservation
impl RecordReservation
pub fn checkout(&self) -> &RecordCheckout
pub fn initialize(
&mut self,
initialize: impl FnOnce(&mut AutoCommit) -> Result<(), String>,
) -> Result<(), RecordOpenError>
pub fn initialize( &mut self, initialize: impl FnOnce(&mut AutoCommit) -> Result<(), String>, ) -> Result<(), RecordOpenError>
Privately initialize once, then create the one history/writer and publish Ready.
§Errors
Retains the reservation on initializer, validation or worker-startup failure.
pub fn initialize_seeded(
&mut self,
initialize: impl FnOnce(&mut AutoCommit) -> Result<(), String>,
seed: impl FnOnce(&mut AutoCommit) -> Result<(), String>,
) -> Result<(), RecordOpenError>
pub fn initialize_seeded( &mut self, initialize: impl FnOnce(&mut AutoCommit) -> Result<(), String>, seed: impl FnOnce(&mut AutoCommit) -> Result<(), String>, ) -> Result<(), RecordOpenError>
Self::initialize, then seed the record on this device: what it
starts with that depends on who creates it or where (the creator as
owner, settings that already exist). The seed is written after the
genesis, which stays the same on every device, and before the
record’s undo history begins, so it is nobody’s undo step.
§Errors
As Self::initialize; a failing seed fails the initialization.
Trait Implementations§
§impl Drop for RecordReservation
impl Drop for RecordReservation
Auto Trait Implementations§
impl Freeze for RecordReservation
impl !RefUnwindSafe for RecordReservation
impl !Send for RecordReservation
impl !Sync for RecordReservation
impl Unpin for RecordReservation
impl UnsafeUnpin for RecordReservation
impl !UnwindSafe for RecordReservation
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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