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§
Sourcefn list(
&self,
query: PageQuery,
context: RequestContext,
) -> impl Future<Output = Handled<Page<Location>>> + Send
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.
Sourcefn location(
&self,
location_id: String,
context: RequestContext,
) -> impl Future<Output = Handled<Location>> + Send
fn location( &self, location_id: String, context: RequestContext, ) -> impl Future<Output = Handled<Location>> + Send
GET {locations}/{location_id}.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl LocationsSender for MockPeer
Available on crate feature
testkit only.