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