Skip to main content

ProtocolError

Trait ProtocolError 

Source
pub trait ProtocolError:
    Debug
    + Send
    + Sync
    + Sized
    + 'static {
    // Required methods
    fn code(&self) -> &str;
    fn description(&self) -> &str;
    fn details(&self) -> &Value;
    fn not_implemented(action: &str) -> Self;
    fn from_wire(code: &str, description: &str, details: Value) -> Self;
}
Expand description

Implemented once per OCPP version by that version’s error enum (OCPP1_6Error, OCPP2_0_1Error, …), so the generic crate::Client engine can build and read CALLERROR payloads without knowing which version it’s carrying.

Required Methods§

Source

fn code(&self) -> &str

Source

fn description(&self) -> &str

Source

fn details(&self) -> &Value

Source

fn not_implemented(action: &str) -> Self

Source

fn from_wire(code: &str, description: &str, details: Value) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§