Struct bastion::context::BastionId [−][src]
pub struct BastionId(_);
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
Auto Trait Implementations
impl RefUnwindSafe for BastionId
impl UnwindSafe for BastionId
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more