pub struct RunningGuard { /* private fields */ }Expand description
One session’s record, written for exactly as long as the session runs.
launch_session has one ? per staging step and two success returns, so removal is a guard
rather than a line at each of them: a session that ended without retiring its record would
leave an address that resolves to a port nothing holds.
Implementations§
Source§impl RunningGuard
impl RunningGuard
Sourcepub fn write(record: &RunningRecord) -> Result<Self, String>
pub fn write(record: &RunningRecord) -> Result<Self, String>
Writes record and holds it until this guard drops.
The Err names why the record could not be written. Failing to record never fails a
launch: the caller warns and runs on, and what it has lost is the session being addressable
by session address.
Trait Implementations§
Source§impl Drop for RunningGuard
impl Drop for RunningGuard
Auto Trait Implementations§
impl Forget for RunningGuard
impl Freeze for RunningGuard
impl RefUnwindSafe for RunningGuard
impl Send for RunningGuard
impl Sync for RunningGuard
impl Unpin for RunningGuard
impl UnsafeUnpin for RunningGuard
impl UnwindSafe for RunningGuard
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