pub struct HardwareClassId(/* private fields */);Expand description
Validated namespaced identity of a hardware class.
§Examples
use tenferro_runtime::HardwareClassId;
assert_eq!(HardwareClassId::new("tenferro.cpu.host")?.as_str(), "tenferro.cpu.host");Implementations§
Source§impl HardwareClassId
impl HardwareClassId
Sourcepub fn new(value: impl Into<Arc<str>>) -> Result<Self, IdentityError>
pub fn new(value: impl Into<Arc<str>>) -> Result<Self, IdentityError>
Validate a lowercase ASCII namespaced hardware-class identifier.
§Examples
use tenferro_runtime::HardwareClassId;
assert!(HardwareClassId::new("tenferro.cpu").is_ok());§Errors
Returns IdentityError with IdentityKind::HardwareClass when
value does not match the lowercase ASCII namespaced identifier grammar.
Trait Implementations§
Source§impl Clone for HardwareClassId
impl Clone for HardwareClassId
Source§impl Debug for HardwareClassId
impl Debug for HardwareClassId
impl Eq for HardwareClassId
Source§impl Hash for HardwareClassId
impl Hash for HardwareClassId
Source§impl Ord for HardwareClassId
impl Ord for HardwareClassId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for HardwareClassId
impl PartialEq for HardwareClassId
Source§impl PartialOrd for HardwareClassId
impl PartialOrd for HardwareClassId
impl StructuralPartialEq for HardwareClassId
Auto Trait Implementations§
impl Freeze for HardwareClassId
impl RefUnwindSafe for HardwareClassId
impl Send for HardwareClassId
impl Sync for HardwareClassId
impl Unpin for HardwareClassId
impl UnsafeUnpin for HardwareClassId
impl UnwindSafe for HardwareClassId
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