Struct LaunchRecovery
pub struct LaunchRecovery { /* private fields */ }Expand description
What a failed launch still owns, handed back to the caller so nothing dirty is lost: the record store holding the canonical record (reopen it, or flush it), and the close reports of components torn down on the way (retry their view or record durability).
These owners are single-threaded (Rc stores). The error carrying them
is still Send + Sync: the owners are reachable only on the thread that
launched, and every accessor returns nothing elsewhere. A recovery dropped
on another thread is leaked rather than dropped there — its stores are
never touched off their thread — so move the error back to the launching
thread (or consume the recovery there) when it must be released.
Implementations§
§impl LaunchRecovery
impl LaunchRecovery
pub fn new(
records: Option<RecordStore>,
reports: Vec<ComponentCloseReport>,
) -> LaunchRecovery
pub fn new( records: Option<RecordStore>, reports: Vec<ComponentCloseReport>, ) -> LaunchRecovery
Recovery owners for the current thread.
pub fn records(records: RecordStore) -> LaunchRecovery
pub fn records(records: RecordStore) -> LaunchRecovery
Only the store still holding the failed launch’s record.
pub fn reports(reports: Vec<ComponentCloseReport>) -> LaunchRecovery
pub fn reports(reports: Vec<ComponentCloseReport>) -> LaunchRecovery
Only the close reports of torn-down components.
pub fn report_count(&self) -> usize
pub fn report_count(&self) -> usize
How many close reports this recovery carries, on any thread.
pub fn record_store(&self) -> Option<&RecordStore>
pub fn record_store(&self) -> Option<&RecordStore>
The record store, on the launching thread.
pub fn close_reports(&self) -> &[ComponentCloseReport]
pub fn close_reports(&self) -> &[ComponentCloseReport]
The close reports, on the launching thread (empty elsewhere).
pub fn into_parts(
self,
) -> Result<(Option<RecordStore>, Vec<ComponentCloseReport>), LaunchRecovery>
pub fn into_parts( self, ) -> Result<(Option<RecordStore>, Vec<ComponentCloseReport>), LaunchRecovery>
Take the owners out, on the launching thread.
§Errors
Returns the recovery unchanged on any other thread.
pub fn into_record_store(self) -> Result<Option<RecordStore>, LaunchRecovery>
pub fn into_record_store(self) -> Result<Option<RecordStore>, LaunchRecovery>
The record store, taken out on the launching thread.
§Errors
Returns the recovery unchanged on any other thread.
pub fn into_close_reports(
self,
) -> Result<Vec<ComponentCloseReport>, LaunchRecovery>
pub fn into_close_reports( self, ) -> Result<Vec<ComponentCloseReport>, LaunchRecovery>
The close reports, taken out on the launching thread.
§Errors
Returns the recovery unchanged on any other thread.
Trait Implementations§
§impl Debug for LaunchRecovery
impl Debug for LaunchRecovery
§impl Drop for LaunchRecovery
impl Drop for LaunchRecovery
impl Send for LaunchRecovery
impl Sync for LaunchRecovery
Auto Trait Implementations§
impl Freeze for LaunchRecovery
impl !RefUnwindSafe for LaunchRecovery
impl Unpin for LaunchRecovery
impl UnsafeUnpin for LaunchRecovery
impl !UnwindSafe for LaunchRecovery
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
§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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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>
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