pub enum ServerError {
ProtocolError,
PortNotFound(u32),
LoadModuleError,
ModuleNotFound(String),
ProcedureNotFound(u32),
UnexpectedErrorOnTransport,
}Expand description
Enum of errors which should be exposed to the client and turned into a crate::rpc_protocol::RemoteError
Variants§
ProtocolError
Error on decoding bytes (Vec<u8>) into a given type using crate::rpc_protocol::parse::parse_protocol_message or using the Message::decode
PortNotFound(u32)
Port was not found in the server state, possibly not created
LoadModuleError
Error on loading a Module, unlikely to happen
ModuleNotFound(String)
Module was not found, not registered in the server
ProcedureNotFound(u32)
Given procedure’s ID was not found
UnexpectedErrorOnTransport
Unexpexted Error while responding back or Error on sending the original procedure response
This error should be use as a “re-try” when a Transport::send failed.
Trait Implementations§
Source§impl Debug for ServerError
impl Debug for ServerError
Source§impl RemoteErrorResponse for ServerError
impl RemoteErrorResponse for ServerError
fn error_code(&self) -> u32
fn error_message(&self) -> String
Auto Trait Implementations§
impl Freeze for ServerError
impl RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnwindSafe for ServerError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more