Struct ocpi::Cpo

source · []
pub struct Cpo<DB> where
    DB: Store
{ /* private fields */ }
Expand description

Cpo implements the CPO role of the OCPI Protocol.

Every module supplies an implementation of it self on this type.

Implementations

Creates a new Cpo instance. the base_url must be the url to the base ocpi endpoint. NOT the versions module. This base url will be used to add on each module url. so versions will be appended and the versions module should be served from that path.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

source

fn credentials_post<'life0, 'async_trait>(
    &'life0 self,
    ctx: Context<Self::TemporaryModel>,
    param: Credential
) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Provides credentials for the Server to access the Clients system. This is done using the Temporary model. If this the authentication of the provided Credential is succesful

The provided Credentials will be used to create a new Model. The Credentials for this new Model is what is returned.

7.2.1. GET Method Read more

7.2.3. PUT Method Read more

7.2.4. DELETE Method Read more

6.1. Version information endpoint Read more

6.2. Version details endpoint Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more