#[non_exhaustive]pub enum HandleServiceRenamedError {
NameAlreadyRegistered(Name),
ServiceNotFound(ServiceHandle),
}alloc or no-atomic or std only.Expand description
Errors raised by
Endpoint::handle_service_renamed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NameAlreadyRegistered(Name)
The new name is already registered to a different service.
ServiceNotFound(ServiceHandle)
The handle does not refer to a registered service.
Implementations§
Source§impl HandleServiceRenamedError
impl HandleServiceRenamedError
Sourcepub const fn is_name_already_registered(&self) -> bool
pub const fn is_name_already_registered(&self) -> bool
Returns true if this value is of type NameAlreadyRegistered. Returns false otherwise
Sourcepub const fn is_service_not_found(&self) -> bool
pub const fn is_service_not_found(&self) -> bool
Returns true if this value is of type ServiceNotFound. Returns false otherwise
Source§impl HandleServiceRenamedError
impl HandleServiceRenamedError
Sourcepub fn unwrap_name_already_registered(self) -> Name
pub fn unwrap_name_already_registered(self) -> Name
Unwraps this value to the HandleServiceRenamedError::NameAlreadyRegistered variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_name_already_registered_ref(&self) -> &Name
pub fn unwrap_name_already_registered_ref(&self) -> &Name
Unwraps this reference to the HandleServiceRenamedError::NameAlreadyRegistered variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_service_not_found(self) -> ServiceHandle
pub fn unwrap_service_not_found(self) -> ServiceHandle
Unwraps this value to the HandleServiceRenamedError::ServiceNotFound variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_service_not_found_ref(&self) -> &ServiceHandle
pub fn unwrap_service_not_found_ref(&self) -> &ServiceHandle
Unwraps this reference to the HandleServiceRenamedError::ServiceNotFound variant.
Panics if this value is of any other type.
Source§impl HandleServiceRenamedError
impl HandleServiceRenamedError
Sourcepub fn try_unwrap_name_already_registered(
self,
) -> Result<Name, TryUnwrapError<Self>>
pub fn try_unwrap_name_already_registered( self, ) -> Result<Name, TryUnwrapError<Self>>
Attempts to unwrap this value to the HandleServiceRenamedError::NameAlreadyRegistered variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_name_already_registered_ref(
&self,
) -> Result<&Name, TryUnwrapError<&Self>>
pub fn try_unwrap_name_already_registered_ref( &self, ) -> Result<&Name, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the HandleServiceRenamedError::NameAlreadyRegistered variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_service_not_found(
self,
) -> Result<ServiceHandle, TryUnwrapError<Self>>
pub fn try_unwrap_service_not_found( self, ) -> Result<ServiceHandle, TryUnwrapError<Self>>
Attempts to unwrap this value to the HandleServiceRenamedError::ServiceNotFound variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_service_not_found_ref(
&self,
) -> Result<&ServiceHandle, TryUnwrapError<&Self>>
pub fn try_unwrap_service_not_found_ref( &self, ) -> Result<&ServiceHandle, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the HandleServiceRenamedError::ServiceNotFound variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
Source§impl Clone for HandleServiceRenamedError
impl Clone for HandleServiceRenamedError
Source§fn clone(&self) -> HandleServiceRenamedError
fn clone(&self) -> HandleServiceRenamedError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HandleServiceRenamedError
impl Debug for HandleServiceRenamedError
Source§impl Display for HandleServiceRenamedError
impl Display for HandleServiceRenamedError
Source§impl Error for HandleServiceRenamedError
impl Error for HandleServiceRenamedError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()