Skip to main content

ActionName

Trait ActionName 

Source
pub trait ActionName:
    Copy
    + Eq
    + Ord
    + Hash
    + Debug
    + Display
    + Sized
    + 'static {
    // Required methods
    fn all() -> &'static [Self];
    fn as_str(&self) -> &'static str;
    fn from_wire(name: &str) -> Option<Self>;
    fn kind(&self) -> MessageKind;
    fn origin(&self) -> Origin;
    fn block(&self) -> &'static str;
}
Expand description

The behaviour every generated per-version Action enum provides.

Required Methods§

Source

fn all() -> &'static [Self]

Every action this version defines, in specification order.

Source

fn as_str(&self) -> &'static str

The action name as it appears on the wire.

Source

fn from_wire(name: &str) -> Option<Self>

Parses a wire action name; None if this version does not define it.

Source

fn kind(&self) -> MessageKind

Whether the action is a CALL or a SEND.

Source

fn origin(&self) -> Origin

Which peer originates the action.

Source

fn block(&self) -> &'static str

The functional block (2.x) or feature profile (1.6) the action belongs to.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl ActionName for ocpp_kit::v1_6::Action

Source§

impl ActionName for ocpp_kit::v2_0_1::Action

Source§

impl ActionName for ocpp_kit::v2_1::Action