pub struct CommandsClient<'a>(/* private fields */);Available on crate feature
client only.Expand description
Sends commands to a CPO.
Spec: 2.3.0 §mod_commands_commands_module
Implementations§
Source§impl<'a> CommandsClient<'a>
impl<'a> CommandsClient<'a>
Sourcepub const fn new(client: ModuleClient<'a>) -> Self
pub const fn new(client: ModuleClient<'a>) -> Self
Wraps a module client.
Sourcepub async fn send(
&self,
command: &Command,
) -> Result<CommandResponse, OcpiError>
pub async fn send( &self, command: &Command, ) -> Result<CommandResponse, OcpiError>
POST {commands}/{command} — sends a command and returns the synchronous response.
The CommandResponse carries a timeout; the
asynchronous CommandResult arrives later at the
response_url the command carried, which this party must be serving.
§Errors
Propagates validation, transport and OCPI-level errors.
Trait Implementations§
Source§impl<'a> Clone for CommandsClient<'a>
impl<'a> Clone for CommandsClient<'a>
Source§fn clone(&self) -> CommandsClient<'a>
fn clone(&self) -> CommandsClient<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for CommandsClient<'a>
impl<'a> !UnwindSafe for CommandsClient<'a>
impl<'a> Freeze for CommandsClient<'a>
impl<'a> Send for CommandsClient<'a>
impl<'a> Sync for CommandsClient<'a>
impl<'a> Unpin for CommandsClient<'a>
impl<'a> UnsafeUnpin for CommandsClient<'a>
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