Struct ReactComponentName
pub struct ReactComponentName(/* private fields */);Expand description
Validated React component name metadata.
Implementations§
§impl ReactComponentName
impl ReactComponentName
pub fn new(input: &str) -> Result<ReactComponentName, ReactNameError>
pub fn new(input: &str) -> Result<ReactComponentName, ReactNameError>
Creates a PascalCase ASCII React component name.
§Errors
Returns ReactNameError when input is not an ASCII identifier or is not PascalCase-shaped.
Trait Implementations§
§impl Clone for ReactComponentName
impl Clone for ReactComponentName
§fn clone(&self) -> ReactComponentName
fn clone(&self) -> ReactComponentName
Returns a duplicate 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 more§impl Debug for ReactComponentName
impl Debug for ReactComponentName
§impl Display for ReactComponentName
impl Display for ReactComponentName
§impl FromStr for ReactComponentName
impl FromStr for ReactComponentName
§type Err = ReactNameError
type Err = ReactNameError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<ReactComponentName, <ReactComponentName as FromStr>::Err>
fn from_str( input: &str, ) -> Result<ReactComponentName, <ReactComponentName as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for ReactComponentName
impl Hash for ReactComponentName
§impl Ord for ReactComponentName
impl Ord for ReactComponentName
§fn cmp(&self, other: &ReactComponentName) -> Ordering
fn cmp(&self, other: &ReactComponentName) -> Ordering
1.21.0 · 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
§impl PartialEq for ReactComponentName
impl PartialEq for ReactComponentName
§impl PartialOrd for ReactComponentName
impl PartialOrd for ReactComponentName
impl Eq for ReactComponentName
impl StructuralPartialEq for ReactComponentName
Auto Trait Implementations§
impl Freeze for ReactComponentName
impl RefUnwindSafe for ReactComponentName
impl Send for ReactComponentName
impl Sync for ReactComponentName
impl Unpin for ReactComponentName
impl UnsafeUnpin for ReactComponentName
impl UnwindSafe for ReactComponentName
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