Struct nagiosplugin::UnitString
source · pub struct UnitString(/* private fields */);
Expand description
Newtype wrapper around a string to ensure only valid strings end up in the performance data.
Implementations§
source§impl UnitString
impl UnitString
pub fn new(s: impl Into<String>) -> Result<Self, UnitStringCreateError>
pub fn new_unchecked(s: impl Into<String>) -> Self
Trait Implementations§
source§impl Clone for UnitString
impl Clone for UnitString
source§fn clone(&self) -> UnitString
fn clone(&self) -> UnitString
Returns a copy of the value. Read more
1.0.0 · 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 UnitString
impl Debug for UnitString
source§impl FromStr for UnitString
impl FromStr for UnitString
source§impl Ord for UnitString
impl Ord for UnitString
source§fn cmp(&self, other: &UnitString) -> Ordering
fn cmp(&self, other: &UnitString) -> Ordering
1.21.0 · 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 UnitString
impl PartialEq for UnitString
source§fn eq(&self, other: &UnitString) -> bool
fn eq(&self, other: &UnitString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UnitString
impl PartialOrd for UnitString
source§fn partial_cmp(&self, other: &UnitString) -> Option<Ordering>
fn partial_cmp(&self, other: &UnitString) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for UnitString
impl StructuralPartialEq for UnitString
Auto Trait Implementations§
impl Freeze for UnitString
impl RefUnwindSafe for UnitString
impl Send for UnitString
impl Sync for UnitString
impl Unpin for UnitString
impl UnwindSafe for UnitString
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