pub struct RelativeTimeInterval {
pub start: i32,
pub duration: Option<i32>,
pub custom_data: Option<CustomData>,
}Expand description
The OCPP 2.1 RelativeTimeInterval data type.
Fields§
§start: i32Start of the interval, in seconds from NOW.
duration: Option<i32>Duration of the interval, in seconds.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl RelativeTimeInterval
impl RelativeTimeInterval
Sourcepub fn with_duration(self, value: i32) -> Self
pub fn with_duration(self, value: i32) -> Self
Sets the optional duration field.
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 RelativeTimeInterval
impl Clone for RelativeTimeInterval
Source§fn clone(&self) -> RelativeTimeInterval
fn clone(&self) -> RelativeTimeInterval
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 RelativeTimeInterval
impl Debug for RelativeTimeInterval
Source§impl<'de> Deserialize<'de> for RelativeTimeInterval
impl<'de> Deserialize<'de> for RelativeTimeInterval
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 RelativeTimeInterval
impl PartialEq for RelativeTimeInterval
Source§impl Serialize for RelativeTimeInterval
impl Serialize for RelativeTimeInterval
impl StructuralPartialEq for RelativeTimeInterval
Source§impl Validate for RelativeTimeInterval
impl Validate for RelativeTimeInterval
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 RelativeTimeInterval
impl RefUnwindSafe for RelativeTimeInterval
impl Send for RelativeTimeInterval
impl Sync for RelativeTimeInterval
impl Unpin for RelativeTimeInterval
impl UnsafeUnpin for RelativeTimeInterval
impl UnwindSafe for RelativeTimeInterval
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