pub struct BastionId(/* private fields */);Expand description
An identifier used by supervisors, children groups and their elements to identify themselves, using a v4 UUID.
A BastionId is unique to its attached element and is
reset when it is restarted. A special BastionId exists
for the “system supervisor” (the supervisor created by
the system at startup) which is a nil UUID
(00000000-0000-0000-0000-000000000000).
§Example
Bastion::children(|children| {
children.with_exec(|ctx| {
async move {
let child_id: &BastionId = ctx.current().id();
// ...
}
})
}).expect("Couldn't create the children group.");Trait Implementations§
impl Eq for BastionId
impl StructuralPartialEq for BastionId
Auto Trait Implementations§
impl Freeze for BastionId
impl RefUnwindSafe for BastionId
impl Send for BastionId
impl Sync for BastionId
impl Unpin for BastionId
impl UnwindSafe for BastionId
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> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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