#[non_exhaustive]pub struct Identity {
pub mfg_name: Option<String>,
pub model_name: Option<String>,
pub serial_num: Option<String>,
pub hardware_rev: Option<String>,
pub firmware_rev: Option<String>,
pub software_rev: Option<String>,
pub imei: Option<String>,
}Expand description
What a device is, with RFC 8348’s field names (#122).
Every field optional and the type #[non_exhaustive]: a device says what
it knows, and a field arrives when a device produces it. Subscriber
identifiers never appear here — an IMSI, an ICCID, an MSISDN identifies
a person’s subscription, not equipment (invariant I5). The equipment
identifier does, because the gateway keys its endpoints by it; it is an
addressing identifier, never a proof of identity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mfg_name: Option<String>Who made it.
model_name: Option<String>What it is, in the maker’s words.
serial_num: Option<String>The maker’s serial number.
hardware_rev: Option<String>Hardware revision.
firmware_rev: Option<String>Firmware revision.
software_rev: Option<String>Software revision, where it is distinct from the firmware’s.
imei: Option<String>The bearer’s equipment identifier — an IMEI.
Implementations§
Source§impl Identity
impl Identity
Sourcepub fn model_name(self, v: impl Into<String>) -> Self
pub fn model_name(self, v: impl Into<String>) -> Self
With the model name.
Sourcepub fn serial_num(self, v: impl Into<String>) -> Self
pub fn serial_num(self, v: impl Into<String>) -> Self
With the serial number.
Sourcepub fn hardware_rev(self, v: impl Into<String>) -> Self
pub fn hardware_rev(self, v: impl Into<String>) -> Self
With the hardware revision.
Sourcepub fn firmware_rev(self, v: impl Into<String>) -> Self
pub fn firmware_rev(self, v: impl Into<String>) -> Self
With the firmware revision.
Sourcepub fn software_rev(self, v: impl Into<String>) -> Self
pub fn software_rev(self, v: impl Into<String>) -> Self
With the software revision.