pub struct StreamDataElement {
pub t: Decimal,
pub v: String,
pub custom_data: Option<CustomData>,
}Expand description
The OCPP 2.1 StreamDataElement data type.
Fields§
§t: DecimalOffset relative to basetime of this message. basetime + t is timestamp of recorded value.
v: StringThe v member.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl StreamDataElement
impl StreamDataElement
Sourcepub fn new(t: impl Into<Decimal>, v: impl Into<String>) -> Self
pub fn new(t: impl Into<Decimal>, v: impl Into<String>) -> Self
Creates a StreamDataElement from its required fields.
Sourcepub fn with_custom_data(self, value: CustomData) -> Self
pub fn with_custom_data(self, value: CustomData) -> Self
Sets the optional customData field.
Trait Implementations§
Source§impl Clone for StreamDataElement
impl Clone for StreamDataElement
Source§fn clone(&self) -> StreamDataElement
fn clone(&self) -> StreamDataElement
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 StreamDataElement
impl Debug for StreamDataElement
Source§impl<'de> Deserialize<'de> for StreamDataElement
impl<'de> Deserialize<'de> for StreamDataElement
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 PartialEq for StreamDataElement
impl PartialEq for StreamDataElement
Source§impl Serialize for StreamDataElement
impl Serialize for StreamDataElement
impl StructuralPartialEq for StreamDataElement
Source§impl Validate for StreamDataElement
impl Validate for StreamDataElement
Source§fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
fn validate_at(&self, path: &mut ValidationPath, out: &mut Violations)
Appends this value’s violations to
out, relative to path.Auto Trait Implementations§
impl Freeze for StreamDataElement
impl RefUnwindSafe for StreamDataElement
impl Send for StreamDataElement
impl Sync for StreamDataElement
impl Unpin for StreamDataElement
impl UnsafeUnpin for StreamDataElement
impl UnwindSafe for StreamDataElement
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