pub struct Credentials {
pub token: OcpiString<64>,
pub url: Url,
pub business_details: BusinessDetails,
pub party_id: OcpiString<3>,
pub country_code: OcpiString<2>,
pub extensions: Extensions,
}Available on crate feature
v2_1_1 only.Expand description
The credentials one party gives another, in OCPI 2.1.1.
Spec: 2.1.1 §credentials_credentials_object
Fields§
§token: OcpiString<64>The token for the other party to authenticate in your system.
url: UrlThe URL to your API versions endpoint.
business_details: BusinessDetailsDetails of this party.
party_id: OcpiString<3>CPO or eMSP ID of this party.
country_code: OcpiString<2>Country code of the country this party is operating in.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn builder() -> CredentialsBuilder
pub fn builder() -> CredentialsBuilder
Create an instance of Credentials using the builder syntax
Source§impl Credentials
impl Credentials
Sourcepub fn party(&self) -> Result<PartyRef, InvalidString>
pub fn party(&self) -> Result<PartyRef, InvalidString>
The single party these credentials speak for.
§Errors
Returns crate::types::InvalidString if the two fields are not a usable party
reference, which can happen for a value that came off the wire.
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Credentials
impl Debug for Credentials
Source§impl<'de> Deserialize<'de> for Credentials
impl<'de> Deserialize<'de> for Credentials
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Credentials
impl JsonSchema for Credentials
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for Credentials
impl PartialEq for Credentials
Source§impl Serialize for Credentials
impl Serialize for Credentials
impl StructuralPartialEq for Credentials
Source§impl Validate for Credentials
impl Validate for Credentials
Auto Trait Implementations§
impl Freeze for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnsafeUnpin for Credentials
impl UnwindSafe for Credentials
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more