pub struct SignedValue {
pub nature: CiString<32>,
pub plain_data: OcpiString<5000>,
pub signed_data: OcpiString<5000>,
pub extensions: Extensions,
}v2_3_0 only.Expand description
One signed and plain value pair.
Spec: 2.3.0 §mod_cdrs_signed_value_class
Fields§
§nature: CiString<32>Nature of the value: the event it belongs to.
Possible values at moment of writing: Start, End, Intermediate. Others might be added later.
plain_data: OcpiString<5000>The un-encoded string of data. Its format depends on the encoding method.
NOTE: earlier releases of the OCPI 2.3.0 documentation mistakenly gave a maximum of 512.
signed_data: OcpiString<5000>Blob of signed data, base64 encoded.
Carried verbatim, whatever its length. A signed record is evidence: it is worth
nothing if a byte moves, and an OCMF blob from a real meter routinely runs past the
string(5000) the specification gives. This crate’s governing rule applies — the value
arrives intact and validate() reports the length as a
crate::types::ViolationCode::TooLong — so a decode and re-encode
round trip reproduces the original bytes exactly. tests/fixtures.rs asserts it.
extensions: ExtensionsUndocumented JSON fields, preserved verbatim.
Trait Implementations§
Source§impl Clone for SignedValue
impl Clone for SignedValue
Source§fn clone(&self) -> SignedValue
fn clone(&self) -> SignedValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SignedValue
impl Debug for SignedValue
Source§impl<'de> Deserialize<'de> for SignedValue
impl<'de> Deserialize<'de> for SignedValue
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>,
Source§impl JsonSchema for SignedValue
impl JsonSchema for SignedValue
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more