Enum jupiter::commands::CommandError
source · pub enum CommandError {
OutputError(OutputError),
ClientError(Error),
ServerError(Error),
}
Expand description
Represents an error when executing a command.
We mainly distinguish three cases: OutputErrors mostly occur due to IO / network errors if the Response fails to write data into the internal buffer or onto the underlying socket. A ServerError signals that a server-sided problem or program error occurred which is sort of unexpected. Finally the common case, a ClientError signals that the data passed in from the client was invalid or inconsistent or didn’t match the expectations of the server.
Variants§
OutputError(OutputError)
Represents an error which occurred while building the output.
ClientError(Error)
Represents a client sided error (invalid input).
ServerError(Error)
Represents a server sided error.
Trait Implementations§
source§impl Debug for CommandError
impl Debug for CommandError
source§impl From<Error> for CommandError
impl From<Error> for CommandError
source§impl From<OutputError> for CommandError
impl From<OutputError> for CommandError
source§fn from(output_error: OutputError) -> Self
fn from(output_error: OutputError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CommandError
impl RefUnwindSafe for CommandError
impl Send for CommandError
impl Sync for CommandError
impl Unpin for CommandError
impl UnwindSafe for CommandError
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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