Skip to main content

LocationsSender

Trait LocationsSender 

Source
pub trait LocationsSender:
    Send
    + Sync
    + 'static {
    // Required methods
    fn list(
        &self,
        query: PageQuery,
        context: RequestContext,
    ) -> impl Future<Output = Handled<Page<Location>>> + Send;
    fn location(
        &self,
        location_id: String,
        context: RequestContext,
    ) -> impl Future<Output = Handled<Location>> + Send;
    fn evse(
        &self,
        location_id: String,
        evse_uid: String,
        context: RequestContext,
    ) -> impl Future<Output = Handled<Evse>> + Send;
    fn connector(
        &self,
        location_id: String,
        evse_uid: String,
        connector_id: String,
        context: RequestContext,
    ) -> impl Future<Output = Handled<Connector>> + Send;
}
Available on crate feature server only.
Expand description

The CPO side of the Locations module: serving the Locations this party owns.

Spec: 2.3.0 §mod_locations_cpo_interface

Required Methods§

Source

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

GET {locations} — one page of Locations.

The returned Page carries the Link, X-Total-Count and X-Limit values; build it with Page::single when everything fits in one response.

Source

fn location( &self, location_id: String, context: RequestContext, ) -> impl Future<Output = Handled<Location>> + Send

GET {locations}/{location_id}.

Source

fn evse( &self, location_id: String, evse_uid: String, context: RequestContext, ) -> impl Future<Output = Handled<Evse>> + Send

GET {locations}/{location_id}/{evse_uid}.

Source

fn connector( &self, location_id: String, evse_uid: String, connector_id: String, context: RequestContext, ) -> impl Future<Output = Handled<Connector>> + Send

GET {locations}/{location_id}/{evse_uid}/{connector_id}.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl LocationsSender for MockPeer

Available on crate feature testkit only.