pub struct SignalName(/* private fields */);Expand description
A descriptive signal name such as SDA, SCL, CLK, or RESET.
Implementations§
Source§impl SignalName
impl SignalName
Sourcepub fn new(value: impl AsRef<str>) -> Result<SignalName, TextLabelError>
pub fn new(value: impl AsRef<str>) -> Result<SignalName, TextLabelError>
Creates a signal name from non-empty text.
§Errors
Returns TextLabelError::Empty when the trimmed value is empty.
Trait Implementations§
Source§impl AsRef<str> for SignalName
impl AsRef<str> for SignalName
Source§impl Clone for SignalName
impl Clone for SignalName
Source§fn clone(&self) -> SignalName
fn clone(&self) -> SignalName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SignalName
impl Debug for SignalName
Source§impl Display for SignalName
impl Display for SignalName
Source§impl FromStr for SignalName
impl FromStr for SignalName
Source§type Err = TextLabelError
type Err = TextLabelError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<SignalName, <SignalName as FromStr>::Err>
fn from_str(value: &str) -> Result<SignalName, <SignalName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for SignalName
impl Hash for SignalName
Source§impl Ord for SignalName
impl Ord for SignalName
Source§fn cmp(&self, other: &SignalName) -> Ordering
fn cmp(&self, other: &SignalName) -> Ordering
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 PartialEq for SignalName
impl PartialEq for SignalName
Source§fn eq(&self, other: &SignalName) -> bool
fn eq(&self, other: &SignalName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SignalName
impl PartialOrd for SignalName
impl Eq for SignalName
impl StructuralPartialEq for SignalName
Auto Trait Implementations§
impl Freeze for SignalName
impl RefUnwindSafe for SignalName
impl Send for SignalName
impl Sync for SignalName
impl Unpin for SignalName
impl UnsafeUnpin for SignalName
impl UnwindSafe for SignalName
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