Skip to main content

SessionsSender

Trait SessionsSender 

Source
pub trait SessionsSender:
    Send
    + Sync
    + 'static {
    // Required methods
    fn list(
        &self,
        query: PageQuery,
        context: RequestContext,
    ) -> impl Future<Output = Handled<Page<Session>>> + Send;
    fn set_charging_preferences(
        &self,
        session_id: String,
        preferences: ChargingPreferences,
        context: RequestContext,
    ) -> impl Future<Output = Handled<ChargingPreferencesResponse>> + Send;
}
Available on crate feature server only.
Expand description

The CPO side of the Sessions module.

Spec: 2.3.0 §mod_sessions_cpo_interface

Required Methods§

Source

fn list( &self, query: PageQuery, context: RequestContext, ) -> impl Future<Output = Handled<Page<Session>>> + Send

GET {sessions} — one page of Sessions.

Source

fn set_charging_preferences( &self, session_id: String, preferences: ChargingPreferences, context: RequestContext, ) -> impl Future<Output = Handled<ChargingPreferencesResponse>> + Send

PUT {sessions}/{session_id}/charging_preferences.

If a PUT with ChargingPreferences is received for an EVSE that does not have the capability CHARGING_PREFERENCES_CAPABLE, the receiver should respond with an HTTP status of 404 and an OCPI status code of 2001.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl SessionsSender for MockPeer

Available on crate feature testkit only.