pub struct ReactComponentName(/* private fields */);Expand description
Validated React component name metadata.
Implementations§
Source§impl ReactComponentName
impl ReactComponentName
Sourcepub fn new(input: &str) -> Result<Self, ReactNameError>
pub fn new(input: &str) -> Result<Self, 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§
Source§impl Clone for ReactComponentName
impl Clone for ReactComponentName
Source§fn clone(&self) -> ReactComponentName
fn clone(&self) -> ReactComponentName
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 ReactComponentName
impl Debug for ReactComponentName
Source§impl Display for ReactComponentName
impl Display for ReactComponentName
Source§impl FromStr for ReactComponentName
impl FromStr for ReactComponentName
Source§impl Hash for ReactComponentName
impl Hash for ReactComponentName
Source§impl Ord for ReactComponentName
impl Ord for ReactComponentName
Source§fn cmp(&self, other: &ReactComponentName) -> Ordering
fn cmp(&self, other: &ReactComponentName) -> 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 ReactComponentName
impl PartialEq for ReactComponentName
Source§fn eq(&self, other: &ReactComponentName) -> bool
fn eq(&self, other: &ReactComponentName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§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