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§
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".