pub struct RobotName(/* private fields */);Expand description
A non-empty robot name.
Implementations§
Source§impl RobotName
impl RobotName
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, RobotTextError>
pub fn new(value: impl AsRef<str>) -> Result<Self, RobotTextError>
Creates a robot name from non-empty text.
§Errors
Returns RobotTextError::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 Ord for RobotName
impl Ord for RobotName
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 RobotName
impl PartialOrd for RobotName
impl Eq for RobotName
impl StructuralPartialEq for RobotName
Auto Trait Implementations§
impl Freeze for RobotName
impl RefUnwindSafe for RobotName
impl Send for RobotName
impl Sync for RobotName
impl Unpin for RobotName
impl UnsafeUnpin for RobotName
impl UnwindSafe for RobotName
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