pub struct ProtocolError {
pub kind: ProtocolErrorKind,
pub message: String,
}
Expand description
Encodes information about errors encountered within rift library code.
Fields§
§kind: ProtocolErrorKind
Specific Thrift protocol error kind.
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
Convenience constructor to create a new ProtocolError
instance.
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.
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