pub struct ProtocolError {
pub error_type: ProtocolErrorType,
pub error: Box<dyn Error + Send + Sync>,
}
Expand description
A “one size fits all” error type for the protocol. Contains a boxed error, and the error type.
Fields§
§error_type: ProtocolErrorType
§error: Box<dyn Error + Send + Sync>
Implementations§
Source§impl ProtocolError
impl ProtocolError
pub fn new( error_type: ProtocolErrorType, error: Box<dyn Error + Send + Sync>, ) -> ProtocolError
Trait Implementations§
Source§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
Source§impl Error for ProtocolError
impl Error for ProtocolError
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<ProtocolError> for SerializableProtocolError
impl From<ProtocolError> for SerializableProtocolError
Source§fn from(value: ProtocolError) -> SerializableProtocolError
fn from(value: ProtocolError) -> SerializableProtocolError
Converts to this type from the input type.
Source§impl From<SerializableProtocolError> for ProtocolError
impl From<SerializableProtocolError> for ProtocolError
Source§fn from(value: SerializableProtocolError) -> ProtocolError
fn from(value: SerializableProtocolError) -> ProtocolError
Converts to this type from the input type.
Source§impl Into<ProtocolError> for StdioError
impl Into<ProtocolError> for StdioError
Source§fn into(self) -> ProtocolError
fn into(self) -> ProtocolError
Converts this type into the (usually inferred) 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