Skip to main content

CdrsReceiver

Trait CdrsReceiver 

Source
pub trait CdrsReceiver:
    Send
    + Sync
    + 'static {
    // Required methods
    fn cdr(
        &self,
        cdr_id: String,
        context: RequestContext,
    ) -> impl Future<Output = Handled<Cdr>> + Send;
    fn post_cdr(
        &self,
        cdr: Cdr,
        context: RequestContext,
    ) -> impl Future<Output = Handled<Url>> + Send;
}
Available on crate feature server only.
Expand description

The eMSP side of the CDRs module.

The only OCPI module where POST creates a server-owned object:

The eMSP returns the URL to the just created CDR object in the Location header field.

Spec: 2.3.0 §mod_cdrs_emsp_interface

Required Methods§

Source

fn cdr( &self, cdr_id: String, context: RequestContext, ) -> impl Future<Output = Handled<Cdr>> + Send

GET {cdrs}/{cdr_id} — a CDR previously POSTed here.

Source

fn post_cdr( &self, cdr: Cdr, context: RequestContext, ) -> impl Future<Output = Handled<Url>> + Send

POST {cdrs} — stores a CDR and returns the URL it can be fetched from.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl CdrsReceiver for MockPeer

Available on crate feature testkit only.