pub struct RobotId(/* private fields */);Expand description
A non-empty robot identifier.
Implementations§
Source§impl RobotId
impl RobotId
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, RobotIdError>
pub fn new(value: impl AsRef<str>) -> Result<Self, RobotIdError>
Creates a robot ID from non-empty text.
§Errors
Returns RobotIdError::Empty when the trimmed identifier is empty.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the ID and returns the owned string.
Trait Implementations§
Source§impl Ord for RobotId
impl Ord for RobotId
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 RobotId
impl PartialOrd for RobotId
impl Eq for RobotId
impl StructuralPartialEq for RobotId
Auto Trait Implementations§
impl Freeze for RobotId
impl RefUnwindSafe for RobotId
impl Send for RobotId
impl Sync for RobotId
impl Unpin for RobotId
impl UnsafeUnpin for RobotId
impl UnwindSafe for RobotId
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