pub trait TariffsReceiver:
Send
+ Sync
+ 'static {
// Required methods
fn tariff(
&self,
owner: PartyRef,
tariff_id: String,
context: RequestContext,
) -> impl Future<Output = Handled<Tariff>> + Send;
fn put_tariff(
&self,
owner: PartyRef,
tariff: Tariff,
context: RequestContext,
) -> impl Future<Output = Handled<Created>> + Send;
fn delete_tariff(
&self,
owner: PartyRef,
tariff_id: String,
context: RequestContext,
) -> impl Future<Output = Handled<()>> + Send;
}Available on crate feature
server only.Expand description
The eMSP side of the Tariffs module.
The only client-owned module with a DELETE: a tariff that no longer exists is simply gone,
unlike an EVSE, which is retired with a status.
Spec: 2.3.0 §mod_tariffs_emsp_interface
Required Methods§
Sourcefn tariff(
&self,
owner: PartyRef,
tariff_id: String,
context: RequestContext,
) -> impl Future<Output = Handled<Tariff>> + Send
fn tariff( &self, owner: PartyRef, tariff_id: String, context: RequestContext, ) -> impl Future<Output = Handled<Tariff>> + Send
GET {tariffs}/{cc}/{party}/{tariff_id}.
Sourcefn put_tariff(
&self,
owner: PartyRef,
tariff: Tariff,
context: RequestContext,
) -> impl Future<Output = Handled<Created>> + Send
fn put_tariff( &self, owner: PartyRef, tariff: Tariff, context: RequestContext, ) -> impl Future<Output = Handled<Created>> + Send
PUT {tariffs}/{cc}/{party}/{tariff_id}.
Sourcefn delete_tariff(
&self,
owner: PartyRef,
tariff_id: String,
context: RequestContext,
) -> impl Future<Output = Handled<()>> + Send
fn delete_tariff( &self, owner: PartyRef, tariff_id: String, context: RequestContext, ) -> impl Future<Output = Handled<()>> + Send
DELETE {tariffs}/{cc}/{party}/{tariff_id}.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl TariffsReceiver for MockPeer
Available on crate feature
testkit only.