pub struct ResourceNotFoundError { /* private fields */ }Expand description
Error thrown due to a request for a resource that does not exist.
§Translation notes
Error code Errors::ResourceNotFound.
Implementations§
Source§impl ResourceNotFoundError
impl ResourceNotFoundError
Sourcepub fn with_default_message() -> Self
pub fn with_default_message() -> Self
Creates the error with the default message of Errors::ResourceNotFound, as the
broker’s error code is turned into an error.
Sourcepub fn with_resource(
resource: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn with_resource( resource: impl Into<String>, message: impl Into<String>, ) -> Self
Constructor
§Arguments
resource- the (potentiallyNone) resource that was not foundmessage- the error’s message
Sourcepub fn resource(&self) -> Option<&str>
pub fn resource(&self) -> Option<&str>
§Returns
the (potentially None) resource that was not found
Sourcepub fn with_resource_source(
resource: impl Into<String>,
message: impl Into<String>,
source: Error,
) -> Self
pub fn with_resource_source( resource: impl Into<String>, message: impl Into<String>, source: Error, ) -> Self
Constructor
§Arguments
resource- the (potentiallyNone) resource that was not foundmessage- the error’s messagesource- the error’s cause
Trait Implementations§
Source§impl Clone for ResourceNotFoundError
impl Clone for ResourceNotFoundError
Source§fn clone(&self) -> ResourceNotFoundError
fn clone(&self) -> ResourceNotFoundError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceNotFoundError
impl Debug for ResourceNotFoundError
Source§impl Display for ResourceNotFoundError
impl Display for ResourceNotFoundError
Source§impl Error for ResourceNotFoundError
impl Error for ResourceNotFoundError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ResourceNotFoundError
impl RefUnwindSafe for ResourceNotFoundError
impl Send for ResourceNotFoundError
impl Sync for ResourceNotFoundError
impl Unpin for ResourceNotFoundError
impl UnsafeUnpin for ResourceNotFoundError
impl UnwindSafe for ResourceNotFoundError
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