pub trait StringLike:
Clone
+ Display
+ PartialEq
+ Eq
+ PartialOrd
+ Ord
+ Hash
+ FromStr
+ AsRef<str>
+ Into<String> {
const MAX_LENGTH: usize;
// Required methods
fn new_unchecked<S: Into<String>>(name: S) -> Self;
fn as_str(&self) -> &str;
fn is_valid(s: &str) -> bool;
}Required Associated Constants§
const MAX_LENGTH: usize
Required Methods§
fn new_unchecked<S: Into<String>>(name: S) -> Self
fn as_str(&self) -> &str
fn is_valid(s: &str) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.