pub enum FlareErr {
Show 24 variants
Error(String),
InvalidParams(String),
ConnectionError(String),
BusinessError(String),
ArgsError(String),
ConnectionClosed,
ConnectionNotFound,
DecodeError(DecodeError),
EncodeError(EncodeError),
WebSocketError(String),
InvalidMessageType,
ProtocolError(String),
AuthError(String),
Other(Error),
NotFondHandler,
PushToClientErr(String),
SendMsgErr(i32, String),
InvalidCommand(String),
Unauthorized(String),
InternalError(String),
InvalidState(String),
Timeout(String),
ResourceError(String),
ServiceNotFound(String),
}Variants§
Error(String)
InvalidParams(String)
ConnectionError(String)
BusinessError(String)
ArgsError(String)
ConnectionClosed
ConnectionNotFound
链接不存在
DecodeError(DecodeError)
EncodeError(EncodeError)
WebSocketError(String)
InvalidMessageType
ProtocolError(String)
AuthError(String)
Other(Error)
NotFondHandler
PushToClientErr(String)
SendMsgErr(i32, String)
InvalidCommand(String)
InternalError(String)
InvalidState(String)
Timeout(String)
ResourceError(String)
ServiceNotFound(String)
Implementations§
Source§impl FlareErr
impl FlareErr
pub fn code(&self) -> ResCode
pub fn to_res(&self) -> Response
pub fn from_str(s: impl Into<String>) -> Self
pub fn invalid_params(msg: impl Into<String>) -> Self
pub fn invalid_command(msg: impl Into<String>) -> Self
pub fn internal_error(msg: impl Into<String>) -> Self
pub fn invalid_state(msg: impl Into<String>) -> Self
pub fn timeout(msg: impl Into<String>) -> Self
pub fn resource_error(msg: impl Into<String>) -> Self
pub fn not_found_service(msg: impl Into<String>) -> Self
pub fn connection_error(msg: impl Into<String>) -> Self
pub fn decode_error(err: DecodeError) -> Self
Trait Implementations§
Source§impl Error for FlareErr
impl Error for FlareErr
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<DecodeError> for FlareErr
impl From<DecodeError> for FlareErr
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for FlareErr
impl From<EncodeError> for FlareErr
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FlareErr
impl RefUnwindSafe for FlareErr
impl Send for FlareErr
impl Sync for FlareErr
impl Unpin for FlareErr
impl UnwindSafe for FlareErr
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