pub enum Name {
Suffixed(String, ShortUuid),
Reserved(String),
}Expand description
Names are used to identify objects in the system. They have a user-provided name, and a unique UUID.
Names have a concrete syntax–{name}-{uuid}–printed by Display and parsed by FromStr.
Variants§
Suffixed(String, ShortUuid)
Normal names for most actors.
Reserved(String)
Reserved names for system actors without UUIDs.
Implementations§
Source§impl Name
impl Name
Sourcepub fn is_suffixed(&self) -> bool
pub fn is_suffixed(&self) -> bool
Returns true if this is a Name::Suffixed, otherwise false
Sourcepub fn as_suffixed_mut(&mut self) -> Option<(&mut String, &mut ShortUuid)>
pub fn as_suffixed_mut(&mut self) -> Option<(&mut String, &mut ShortUuid)>
Optionally returns mutable references to the inner fields if this is a Name::Suffixed, otherwise None
Sourcepub fn as_suffixed(&self) -> Option<(&String, &ShortUuid)>
pub fn as_suffixed(&self) -> Option<(&String, &ShortUuid)>
Optionally returns references to the inner fields if this is a Name::Suffixed, otherwise None
Sourcepub fn into_suffixed(self) -> Result<(String, ShortUuid), Self>
pub fn into_suffixed(self) -> Result<(String, ShortUuid), Self>
Returns the inner fields if this is a Name::Suffixed, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
Returns true if this is a Name::Reserved, otherwise false
Sourcepub fn as_reserved_mut(&mut self) -> Option<&mut String>
pub fn as_reserved_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a Name::Reserved, otherwise None
Sourcepub fn as_reserved(&self) -> Option<&String>
pub fn as_reserved(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a Name::Reserved, otherwise None
Sourcepub fn into_reserved(self) -> Result<String, Self>
pub fn into_reserved(self) -> Result<String, Self>
Returns the inner fields if this is a Name::Reserved, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Name
impl<'de> Deserialize<'de> for Name
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for Name
impl Ord for Name
Source§impl PartialOrd for Name
impl PartialOrd for Name
impl Eq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§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