pub struct NetLabel(/* private fields */);Expand description
A non-empty net label.
Implementations§
Source§impl NetLabel
impl NetLabel
Sourcepub fn new(value: impl AsRef<str>) -> Result<NetLabel, TextLabelError>
pub fn new(value: impl AsRef<str>) -> Result<NetLabel, TextLabelError>
Creates a net label from non-empty text.
§Errors
Returns TextLabelError::Empty when the trimmed value is empty.
Sourcepub fn is_ground(&self) -> bool
pub fn is_ground(&self) -> bool
Returns whether this label is one of the obvious common ground labels.
Sourcepub fn is_power_like(&self) -> bool
pub fn is_power_like(&self) -> bool
Returns whether this label is one of the obvious common power-like labels.
Trait Implementations§
Source§impl Ord for NetLabel
impl Ord for NetLabel
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 NetLabel
impl PartialOrd for NetLabel
impl Eq for NetLabel
impl StructuralPartialEq for NetLabel
Auto Trait Implementations§
impl Freeze for NetLabel
impl RefUnwindSafe for NetLabel
impl Send for NetLabel
impl Sync for NetLabel
impl Unpin for NetLabel
impl UnsafeUnpin for NetLabel
impl UnwindSafe for NetLabel
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