pub struct ProtocolError {
pub kind: ProtocolErrorKind,
pub message: String,
}
Expand description
Information about errors that occur in the runtime library.
Fields§
§kind: ProtocolErrorKind
Protocol error variant.
If a specific ProtocolErrorKind
does not apply use
ProtocolErrorKind::Unknown
.
message: String
Human-readable error message.
Implementations§
Source§impl ProtocolError
impl ProtocolError
Sourcepub fn new<S: Into<String>>(
kind: ProtocolErrorKind,
message: S,
) -> ProtocolError
pub fn new<S: Into<String>>( kind: ProtocolErrorKind, message: S, ) -> ProtocolError
Create a new ProtocolError
.
Trait Implementations§
Source§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
Source§impl From<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(e: ProtocolError) -> Self
fn from(e: ProtocolError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ProtocolError
impl PartialEq for ProtocolError
impl Eq for ProtocolError
impl StructuralPartialEq for ProtocolError
Auto Trait Implementations§
impl Freeze for ProtocolError
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnwindSafe for ProtocolError
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