pub struct HardwareBinding {
pub mac_addresses: Vec<String>,
pub disk_ids: Vec<String>,
pub hostnames: Vec<String>,
pub custom: HashMap<String, Vec<String>>,
}Expand description
Hardware binding information for a license
Fields§
§mac_addresses: Vec<String>Allowed MAC addresses (any match is valid)
disk_ids: Vec<String>Allowed disk/drive IDs (any match is valid)
hostnames: Vec<String>Allowed hostnames (any match is valid)
custom: HashMap<String, Vec<String>>Custom hardware identifiers (key-value pairs)
Implementations§
Source§impl HardwareBinding
impl HardwareBinding
Sourcepub fn with_mac_address(self, mac: impl Into<String>) -> Self
pub fn with_mac_address(self, mac: impl Into<String>) -> Self
Add a MAC address to the allowed list
Sourcepub fn with_mac_addresses(
self,
macs: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn with_mac_addresses( self, macs: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Add multiple MAC addresses
Sourcepub fn with_disk_id(self, disk_id: impl Into<String>) -> Self
pub fn with_disk_id(self, disk_id: impl Into<String>) -> Self
Add a disk ID to the allowed list
Sourcepub fn with_hostname(self, hostname: impl Into<String>) -> Self
pub fn with_hostname(self, hostname: impl Into<String>) -> Self
Add a hostname to the allowed list
Trait Implementations§
Source§impl Clone for HardwareBinding
impl Clone for HardwareBinding
Source§fn clone(&self) -> HardwareBinding
fn clone(&self) -> HardwareBinding
Returns a duplicate of the value. Read more
1.0.0 · 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 HardwareBinding
impl Debug for HardwareBinding
Source§impl Default for HardwareBinding
impl Default for HardwareBinding
Source§fn default() -> HardwareBinding
fn default() -> HardwareBinding
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HardwareBinding
impl<'de> Deserialize<'de> for HardwareBinding
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 HardwareBinding
impl PartialEq for HardwareBinding
Source§impl Serialize for HardwareBinding
impl Serialize for HardwareBinding
impl StructuralPartialEq for HardwareBinding
Auto Trait Implementations§
impl Freeze for HardwareBinding
impl RefUnwindSafe for HardwareBinding
impl Send for HardwareBinding
impl Sync for HardwareBinding
impl Unpin for HardwareBinding
impl UnsafeUnpin for HardwareBinding
impl UnwindSafe for HardwareBinding
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