pub struct SetVariableData {
pub attribute_value: String,
pub component: Component,
pub variable: Variable,
pub attribute_type: Option<Attribute>,
pub custom_data: Option<CustomData>,
}Expand description
The OCPP 2.0.1 SetVariableData data type.
Fields§
§attribute_value: StringValue to be assigned to attribute of variable.
The Configuration Variable <<configkey-configuration-value-size,ConfigurationValueSize>> can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal.
component: ComponentThe component member.
variable: VariableThe variable member.
attribute_type: Option<Attribute>The attributeType member.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl SetVariableData
impl SetVariableData
Sourcepub fn new(
attribute_value: impl Into<String>,
component: Component,
variable: Variable,
) -> Self
pub fn new( attribute_value: impl Into<String>, component: Component, variable: Variable, ) -> Self
Creates a SetVariableData from its required fields.
Sourcepub fn with_attribute_type(self, value: Attribute) -> Self
pub fn with_attribute_type(self, value: Attribute) -> Self
Sets the optional attributeType 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 SetVariableData
impl Clone for SetVariableData
Source§impl Debug for SetVariableData
impl Debug for SetVariableData
Source§impl<'de> Deserialize<'de> for SetVariableData
impl<'de> Deserialize<'de> for SetVariableData
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 SetVariableData
impl PartialEq for SetVariableData
Source§impl Serialize for SetVariableData
impl Serialize for SetVariableData
impl StructuralPartialEq for SetVariableData
Source§impl Validate for SetVariableData
impl Validate for SetVariableData
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 SetVariableData
impl Freeze for SetVariableData
impl RefUnwindSafe for SetVariableData
impl Send for SetVariableData
impl Sync for SetVariableData
impl Unpin for SetVariableData
impl UnsafeUnpin for SetVariableData
impl UnwindSafe for SetVariableData
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