Struct RetirementDomain
pub struct RetirementDomain { /* private fields */ }Expand description
Domain owner. Drop retires every marker, even with observers. This is deliberately non-Clone and has no public positive validation method.
Implementations§
§impl RetirementDomain
impl RetirementDomain
pub fn new() -> Result<RetirementDomain, RetirementError>
pub fn new() -> Result<RetirementDomain, RetirementError>
§Errors
RetirementError::Poisoned if the fresh gate cannot be initialized.
pub fn marker(&self) -> Result<RetirementOwner, RetirementError>
pub fn marker(&self) -> Result<RetirementOwner, RetirementError>
Create an inert marker. A successful check orders creation before a concurrent domain retirement; that retirement still denies this marker.
§Errors
RetirementError::Retired, RetirementError::Busy or RetirementError::Poisoned
when the domain no longer accepts markers.
pub fn request_retirement(&self)
pub fn request_retirement(&self)
Early denial only. Finish outside registry locks before cleanup callbacks.
pub fn finish_retirement(&self)
pub fn finish_retirement(&self)
Request denial and synchronize it, waiting only for an entered critical section. No callback or allocation runs; do not call while holding this domain’s guard.
pub fn retire(&self)
pub fn retire(&self)
Irreversibly retire this resource domain; idempotent, including on poison.
Trait Implementations§
§impl Drop for RetirementDomain
impl Drop for RetirementDomain
Auto Trait Implementations§
impl Freeze for RetirementDomain
impl RefUnwindSafe for RetirementDomain
impl Send for RetirementDomain
impl Sync for RetirementDomain
impl Unpin for RetirementDomain
impl UnsafeUnpin for RetirementDomain
impl UnwindSafe for RetirementDomain
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