pub struct Name { /* private fields */ }
Expand description
Holds a validated device name. A device name consists of a path and a base name where each portion of the path is separated with a colon. Each segment of the path or the name is composed of alpha- numeric and the dash characters. The dash cannot be the first or last character, however.
More formally:
ⓘ
DEVICE-NAME = PATH NAME
PATH = (SEGMENT ':')+
NAME = SEGMENT
SEGMENT = [0-9a-zA-Z] ( [0-9a-zA-Z-]* [0-9a-zA-Z] )?
All device names will have a path and a name. Although superficially similar, device names are not like file system names. Specifically, there’s no concept of moving up or down paths. The paths provide a naming convention to organize devices. The client API supports looking up device names using patterns, so a logical path hierarchy can make those searches more productive.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Name
impl<'de> Deserialize<'de> for Name
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<Name> for Name
impl PartialEq<Name> for Name
impl Eq for Name
impl StructuralEq for Name
impl StructuralPartialEq for Name
Auto Trait Implementations§
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
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