pub enum EncodedErr {
Rpc(RpcIntErr),
Num(u32),
Static(&'static str),
Buf(Vec<u8>),
}Expand description
A container for error message parse from / send into transport
Variants§
Rpc(RpcIntErr)
The ClientTransport should try the best to parse it from string with “rpc_” prefix
Num(u32)
For nix errno and the like
Static(&'static str)
only for server, the ClientTransport will not parse into static type
Buf(Vec<u8>)
The ClientTransport will fallback to Vec<u8> after try to parse RpcIntErr and num
Implementations§
Source§impl EncodedErr
impl EncodedErr
pub fn try_as_str<'a>(&'a self) -> Result<&'a str, ()>
Trait Implementations§
Source§impl Debug for EncodedErr
impl Debug for EncodedErr
Source§impl Display for EncodedErr
impl Display for EncodedErr
Source§impl Error for EncodedErr
impl Error for EncodedErr
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<RpcIntErr> for EncodedErr
impl From<RpcIntErr> for EncodedErr
Source§impl PartialEq for EncodedErr
Just for macro test
impl PartialEq for EncodedErr
Just for macro test
Auto Trait Implementations§
impl Freeze for EncodedErr
impl RefUnwindSafe for EncodedErr
impl Send for EncodedErr
impl Sync for EncodedErr
impl Unpin for EncodedErr
impl UnwindSafe for EncodedErr
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