pub struct SignedDataBuilder<S: State = Empty> { /* private fields */ }v2_3_0 only.Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> SignedDataBuilder<S>
impl<S: State> SignedDataBuilder<S>
Sourcepub fn build(self) -> SignedDatawhere
S: IsComplete,
pub fn build(self) -> SignedDatawhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn encoding_method(
self,
value: impl Into<CiString<36>>,
) -> SignedDataBuilder<SetEncodingMethod<S>>where
S::EncodingMethod: IsUnset,
pub fn encoding_method(
self,
value: impl Into<CiString<36>>,
) -> SignedDataBuilder<SetEncodingMethod<S>>where
S::EncodingMethod: IsUnset,
Required.
The name of the encoding used, as given by a company or group of companies.
Known implementations include OCMF, Alfen Eichrecht, EDL40 E-Mobility Extension and
EDL40 Mennekes.
Sourcepub fn encoding_method_version(
self,
value: impl Into<i32>,
) -> SignedDataBuilder<SetEncodingMethodVersion<S>>where
S::EncodingMethodVersion: IsUnset,
pub fn encoding_method_version(
self,
value: impl Into<i32>,
) -> SignedDataBuilder<SetEncodingMethodVersion<S>>where
S::EncodingMethodVersion: IsUnset,
Sourcepub fn maybe_encoding_method_version(
self,
value: Option<impl Into<i32>>,
) -> SignedDataBuilder<SetEncodingMethodVersion<S>>where
S::EncodingMethodVersion: IsUnset,
pub fn maybe_encoding_method_version(
self,
value: Option<impl Into<i32>>,
) -> SignedDataBuilder<SetEncodingMethodVersion<S>>where
S::EncodingMethodVersion: IsUnset,
Sourcepub fn public_key(
self,
value: impl Into<OcpiString<512>>,
) -> SignedDataBuilder<SetPublicKey<S>>where
S::PublicKey: IsUnset,
pub fn public_key(
self,
value: impl Into<OcpiString<512>>,
) -> SignedDataBuilder<SetPublicKey<S>>where
S::PublicKey: IsUnset,
Sourcepub fn maybe_public_key(
self,
value: Option<impl Into<OcpiString<512>>>,
) -> SignedDataBuilder<SetPublicKey<S>>where
S::PublicKey: IsUnset,
pub fn maybe_public_key(
self,
value: Option<impl Into<OcpiString<512>>>,
) -> SignedDataBuilder<SetPublicKey<S>>where
S::PublicKey: IsUnset,
Sourcepub fn signed_values(
self,
value: impl Into<Vec<SignedValue>>,
) -> SignedDataBuilder<SetSignedValues<S>>where
S::SignedValues: IsUnset,
pub fn signed_values(
self,
value: impl Into<Vec<SignedValue>>,
) -> SignedDataBuilder<SetSignedValues<S>>where
S::SignedValues: IsUnset,
Required.
One or more signed values. Cardinality +.
Sourcepub fn url(
self,
value: impl Into<OcpiString<512>>,
) -> SignedDataBuilder<SetUrl<S>>where
S::Url: IsUnset,
pub fn url(
self,
value: impl Into<OcpiString<512>>,
) -> SignedDataBuilder<SetUrl<S>>where
S::Url: IsUnset,
Optional (Some / Option setters). URL where an EV driver can check the signed data of a charging session.
A string(512), not the URL type every other URL-shaped field in OCPI uses — which is
string(255). Modelling it as a Url would report a conformant
300-character link as TooLong and refuse to construct one, so it is the string the
specification says it is. Url::new_lenient turns it
into one when a caller wants that.
Sourcepub fn maybe_url(
self,
value: Option<impl Into<OcpiString<512>>>,
) -> SignedDataBuilder<SetUrl<S>>where
S::Url: IsUnset,
pub fn maybe_url(
self,
value: Option<impl Into<OcpiString<512>>>,
) -> SignedDataBuilder<SetUrl<S>>where
S::Url: IsUnset,
Optional (Some / Option setters). URL where an EV driver can check the signed data of a charging session.
A string(512), not the URL type every other URL-shaped field in OCPI uses — which is
string(255). Modelling it as a Url would report a conformant
300-character link as TooLong and refuse to construct one, so it is the string the
specification says it is. Url::new_lenient turns it
into one when a caller wants that.