pub enum ClientError<E> {
Protocol(E),
Timeout,
Decode(Error),
Transport(TransportError),
Closed,
}Expand description
Everything that can go wrong sending or receiving a single OCPP action, flattened into
one type instead of the Result<Result<Response, ProtocolError>, Box<dyn Error>> shape.
Variants§
Protocol(E)
The other side answered with a CALLERROR.
Timeout
No CALLRESULT/CALLERROR arrived before the client’s timeout elapsed.
Decode(Error)
The payload didn’t match the expected request/response type.
Transport(TransportError)
The transport failed to send or receive a frame.
Closed
The connection was closed before a response arrived.
Trait Implementations§
Source§impl<E: Debug> Debug for ClientError<E>
impl<E: Debug> Debug for ClientError<E>
Source§impl<E: ProtocolError> Display for ClientError<E>
impl<E: ProtocolError> Display for ClientError<E>
Source§impl<E: ProtocolError> Error for ClientError<E>
impl<E: ProtocolError> Error for ClientError<E>
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()
Auto Trait Implementations§
impl<E> !RefUnwindSafe for ClientError<E>
impl<E> !UnwindSafe for ClientError<E>
impl<E> Freeze for ClientError<E>where
E: Freeze,
impl<E> Send for ClientError<E>where
E: Send,
impl<E> Sync for ClientError<E>where
E: Sync,
impl<E> Unpin for ClientError<E>where
E: Unpin,
impl<E> UnsafeUnpin for ClientError<E>where
E: UnsafeUnpin,
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