pub struct PreactComponentName(/* private fields */);Expand description
Validated Preact component name metadata.
Implementations§
Source§impl PreactComponentName
impl PreactComponentName
Sourcepub fn new(input: &str) -> Result<Self, PreactNameError>
pub fn new(input: &str) -> Result<Self, PreactNameError>
Creates a PascalCase ASCII Preact component name.
§Errors
Returns PreactNameError when input is not an ASCII identifier or is not PascalCase-shaped.
Trait Implementations§
Source§impl Clone for PreactComponentName
impl Clone for PreactComponentName
Source§fn clone(&self) -> PreactComponentName
fn clone(&self) -> PreactComponentName
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 PreactComponentName
impl Debug for PreactComponentName
Source§impl Display for PreactComponentName
impl Display for PreactComponentName
Source§impl FromStr for PreactComponentName
impl FromStr for PreactComponentName
Source§impl Hash for PreactComponentName
impl Hash for PreactComponentName
Source§impl Ord for PreactComponentName
impl Ord for PreactComponentName
Source§fn cmp(&self, other: &PreactComponentName) -> Ordering
fn cmp(&self, other: &PreactComponentName) -> 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 PreactComponentName
impl PartialEq for PreactComponentName
Source§fn eq(&self, other: &PreactComponentName) -> bool
fn eq(&self, other: &PreactComponentName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PreactComponentName
impl PartialOrd for PreactComponentName
Source§impl TryFrom<&str> for PreactComponentName
impl TryFrom<&str> for PreactComponentName
impl Eq for PreactComponentName
impl StructuralPartialEq for PreactComponentName
Auto Trait Implementations§
impl Freeze for PreactComponentName
impl RefUnwindSafe for PreactComponentName
impl Send for PreactComponentName
impl Sync for PreactComponentName
impl Unpin for PreactComponentName
impl UnsafeUnpin for PreactComponentName
impl UnwindSafe for PreactComponentName
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