pub struct RobotSensorName(/* private fields */);Expand description
A non-empty robot sensor name.
Implementations§
Source§impl RobotSensorName
impl RobotSensorName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, RobotSensorTextError>
pub fn new(value: impl AsRef<str>) -> Result<Self, RobotSensorTextError>
Creates a sensor name from non-empty text.
§Errors
Returns RobotSensorTextError::Empty when the trimmed name is empty.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the name and returns the owned string.
Trait Implementations§
Source§impl AsRef<str> for RobotSensorName
impl AsRef<str> for RobotSensorName
Source§impl Clone for RobotSensorName
impl Clone for RobotSensorName
Source§fn clone(&self) -> RobotSensorName
fn clone(&self) -> RobotSensorName
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 RobotSensorName
impl Debug for RobotSensorName
Source§impl Display for RobotSensorName
impl Display for RobotSensorName
Source§impl FromStr for RobotSensorName
impl FromStr for RobotSensorName
Source§impl Hash for RobotSensorName
impl Hash for RobotSensorName
Source§impl Ord for RobotSensorName
impl Ord for RobotSensorName
Source§fn cmp(&self, other: &RobotSensorName) -> Ordering
fn cmp(&self, other: &RobotSensorName) -> 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 RobotSensorName
impl PartialEq for RobotSensorName
Source§fn eq(&self, other: &RobotSensorName) -> bool
fn eq(&self, other: &RobotSensorName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RobotSensorName
impl PartialOrd for RobotSensorName
impl Eq for RobotSensorName
impl StructuralPartialEq for RobotSensorName
Auto Trait Implementations§
impl Freeze for RobotSensorName
impl RefUnwindSafe for RobotSensorName
impl Send for RobotSensorName
impl Sync for RobotSensorName
impl Unpin for RobotSensorName
impl UnsafeUnpin for RobotSensorName
impl UnwindSafe for RobotSensorName
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