pub struct VPN {
pub server: String,
pub user: String,
pub password: String,
pub key: String,
pub type: VPNEnum,
pub group: Option<String>,
pub custom_data: Option<CustomData>,
}Expand description
VPN Configuration settings
The OCPP 2.1 VPN data type.
Fields§
§server: StringVPN Server Address
user: StringVPN User
password: String(2.1) VPN Password.
key: StringVPN shared secret.
type: VPNEnumThe type member.
group: Option<String>VPN group.
custom_data: Option<CustomData>The customData member.
Implementations§
Source§impl VPN
impl VPN
Sourcepub fn new(
server: impl Into<String>,
user: impl Into<String>,
password: impl Into<String>,
key: impl Into<String>,
type: VPNEnum,
) -> Self
pub fn new( server: impl Into<String>, user: impl Into<String>, password: impl Into<String>, key: impl Into<String>, type: VPNEnum, ) -> Self
Creates a VPN from its required fields.
Sourcepub fn with_group(self, value: impl Into<String>) -> Self
pub fn with_group(self, value: impl Into<String>) -> Self
Sets the optional group 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 VPN
impl<'de> Deserialize<'de> for VPN
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 VPN
Source§impl Validate for VPN
impl Validate for VPN
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 VPN
impl Freeze for VPN
impl Move for VPN
impl RefUnwindSafe for VPN
impl Send for VPN
impl Sync for VPN
impl Unpin for VPN
impl UnsafeUnpin for VPN
impl UnwindSafe for VPN
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