pub struct PinName(/* private fields */);Expand description
A descriptive pin name such as VCC, GND, SDA, or RESET.
Implementations§
Source§impl PinName
impl PinName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, PinNameError>
pub fn new(value: impl AsRef<str>) -> Result<Self, PinNameError>
Creates a pin name from non-empty text.
§Errors
Returns PinNameError::Empty when the trimmed value is empty.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the pin name and returns the owned string.
Trait Implementations§
Source§impl From<PinName> for PinIdentifier
impl From<PinName> for PinIdentifier
Source§impl Ord for PinName
impl Ord for PinName
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
Source§impl PartialOrd for PinName
impl PartialOrd for PinName
impl Eq for PinName
impl StructuralPartialEq for PinName
Auto Trait Implementations§
impl Freeze for PinName
impl RefUnwindSafe for PinName
impl Send for PinName
impl Sync for PinName
impl Unpin for PinName
impl UnsafeUnpin for PinName
impl UnwindSafe for PinName
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