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