pub struct Variable {
pub name: String,
pub instance: Option<String>,
pub custom_data: Option<CustomData>,
}Expand description
Reference key to a component-variable.
The OCPP 2.1 Variable data type.
Fields§
§name: StringName of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case.
instance: Option<String>Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl Variable
impl Variable
Sourcepub fn with_instance(self, value: impl Into<String>) -> Self
pub fn with_instance(self, value: impl Into<String>) -> Self
Sets the optional instance 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<'de> Deserialize<'de> for Variable
impl<'de> Deserialize<'de> for Variable
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
impl StructuralPartialEq for Variable
Source§impl Validate for Variable
impl Validate for Variable
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 Forget for Variable
impl Freeze for Variable
impl Move for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnsafeUnpin for Variable
impl UnwindSafe for Variable
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