pub struct Error { /* private fields */ }Expand description
A failure, with its local cause and — when the specification gives it one — the status code a peer is owed.
The interaction-model status is filled in by the im module once that layer exists; the
field is here from the start so that lower layers can already answer, for example,
RESOURCE_EXHAUSTED for ErrorCode::NoSpace without a second error type.
Implementations§
Trait Implementations§
impl Copy for Error
impl Eq for Error
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.1.30.0 · 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()
Source§impl From<StatusCode> for Error
impl From<StatusCode> for Error
Source§fn from(_: StatusCode) -> Self
fn from(_: StatusCode) -> Self
For a caller that has to hand a BDX failure back through the crate’s own error type — the transfer is over either way.
Source§impl From<SubscribeError> for Error
Builds the Err for a refusal, so a caller can answer a StatusResponse.
impl From<SubscribeError> for Error
Builds the Err for a refusal, so a caller can answer a StatusResponse.
Source§fn from(error: SubscribeError) -> Self
fn from(error: SubscribeError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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