pub struct SessionsSender<'a>(/* private fields */);Available on crate feature
client only.Expand description
Pulls Sessions from a CPO, and sets a driver’s charging preferences.
Spec: 2.3.0 §mod_sessions_cpo_interface
Implementations§
Source§impl<'a> SessionsSender<'a>
impl<'a> SessionsSender<'a>
Sourcepub const fn new(client: ModuleClient<'a>) -> Self
pub const fn new(client: ModuleClient<'a>) -> Self
Wraps a module client.
Sourcepub async fn set_charging_preferences(
&self,
session_id: &str,
preferences: &ChargingPreferences,
) -> Result<ChargingPreferencesResponse, OcpiError>
pub async fn set_charging_preferences( &self, session_id: &str, preferences: &ChargingPreferences, ) -> Result<ChargingPreferencesResponse, OcpiError>
PUT {sessions}/{session_id}/charging_preferences.
The response is a
ChargingPreferencesResponse, not
an acknowledgement: a CPO that accepts the request may still answer
NOT_POSSIBLE, and the caller has to look.
§Errors
Propagates validation, transport and OCPI-level errors.
Trait Implementations§
Source§impl<'a> Clone for SessionsSender<'a>
impl<'a> Clone for SessionsSender<'a>
Source§fn clone(&self) -> SessionsSender<'a>
fn clone(&self) -> SessionsSender<'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 SessionsSender<'a>
impl<'a> !UnwindSafe for SessionsSender<'a>
impl<'a> Freeze for SessionsSender<'a>
impl<'a> Send for SessionsSender<'a>
impl<'a> Sync for SessionsSender<'a>
impl<'a> Unpin for SessionsSender<'a>
impl<'a> UnsafeUnpin for SessionsSender<'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