#[non_exhaustive]pub enum Command {
ReserveNow(Box<ReserveNow>),
StartSession(Box<StartSession>),
StopSession(StopSession),
UnlockConnector(UnlockConnector),
}Available on crate feature
v2_1_1 only.Expand description
Every OCPI 2.1.1 command body, tagged by the CommandType it belongs to.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ReserveNow(Box<ReserveNow>)
POST {commands_endpoint}/RESERVE_NOW
StartSession(Box<StartSession>)
POST {commands_endpoint}/START_SESSION
StopSession(StopSession)
POST {commands_endpoint}/STOP_SESSION
UnlockConnector(UnlockConnector)
POST {commands_endpoint}/UNLOCK_CONNECTOR
Implementations§
Source§impl Command
impl Command
Sourcepub fn command_type(&self) -> CommandType
pub fn command_type(&self) -> CommandType
Which command this is.
Sourcepub fn response_url(&self) -> &Url
pub fn response_url(&self) -> &Url
The URL the eventual CommandResponse must be POSTed to.
Trait Implementations§
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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