pub struct ScopeId(/* private fields */);Expand description
A validated, named position in the service ownership tree.
Implementations§
Source§impl ScopeId
impl ScopeId
Sourcepub fn try_new(
name: impl Into<Arc<str>>,
) -> Result<Self, RuntimeContractViolation>
pub fn try_new( name: impl Into<Arc<str>>, ) -> Result<Self, RuntimeContractViolation>
Creates a scope identifier.
§Errors
Returns a deterministic contract violation when name is empty or
only contains whitespace.
Sourcepub fn from_static(name: &'static str) -> Self
pub fn from_static(name: &'static str) -> Self
Creates a statically named scope.
§Panics
Panics when name is empty or only contains whitespace. Static scope
names are programmer-owned lifecycle invariants.
Trait Implementations§
impl Eq for ScopeId
impl StructuralPartialEq for ScopeId
Auto Trait Implementations§
impl Freeze for ScopeId
impl RefUnwindSafe for ScopeId
impl Send for ScopeId
impl Sync for ScopeId
impl Unpin for ScopeId
impl UnsafeUnpin for ScopeId
impl UnwindSafe for ScopeId
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