Enum tic_tac_toe::team::InvalidStrError
source · pub enum InvalidStrError {
InvalidLength(usize),
InvalidChar(InvalidCharError),
}
Variants§
InvalidLength(usize)
The string is the wrong length. It must contain exactly one ascii char.
The length is in bytes. For another metric, just calculate it yourself on failure.
InvalidChar(InvalidCharError)
The char is not valid.
Trait Implementations§
source§impl Clone for InvalidStrError
impl Clone for InvalidStrError
source§fn clone(&self) -> InvalidStrError
fn clone(&self) -> InvalidStrError
Returns a copy of the value. Read more
1.0.0 · 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 InvalidStrError
impl Debug for InvalidStrError
source§impl Display for InvalidStrError
impl Display for InvalidStrError
source§impl Error for InvalidStrError
impl Error for InvalidStrError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<InvalidCharError> for InvalidStrError
impl From<InvalidCharError> for InvalidStrError
source§fn from(e: InvalidCharError) -> Self
fn from(e: InvalidCharError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for InvalidStrError
impl Send for InvalidStrError
impl Sync for InvalidStrError
impl Unpin for InvalidStrError
impl UnwindSafe for InvalidStrError
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