pub struct Component {
pub name: String,
pub evse: Option<EVSE>,
pub instance: Option<String>,
pub custom_data: Option<CustomData>,
}Expand description
A physical or logical component
The OCPP 2.1 Component data type.
Fields§
§name: StringName of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case.
evse: Option<EVSE>The evse member.
instance: Option<String>Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl Component
impl Component
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 Component
impl<'de> Deserialize<'de> for Component
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 Component
Source§impl Validate for Component
impl Validate for Component
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 Component
impl Freeze for Component
impl Move for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnsafeUnpin for Component
impl UnwindSafe for Component
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