Struct PreactComponentName
pub struct PreactComponentName(/* private fields */);Expand description
Validated Preact component name metadata.
Implementations§
§impl PreactComponentName
impl PreactComponentName
pub fn new(input: &str) -> Result<PreactComponentName, PreactNameError>
pub fn new(input: &str) -> Result<PreactComponentName, 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§
§impl Clone for PreactComponentName
impl Clone for PreactComponentName
§fn clone(&self) -> PreactComponentName
fn clone(&self) -> PreactComponentName
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 PreactComponentName
impl Debug for PreactComponentName
§impl Display for PreactComponentName
impl Display for PreactComponentName
§impl FromStr for PreactComponentName
impl FromStr for PreactComponentName
§type Err = PreactNameError
type Err = PreactNameError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<PreactComponentName, <PreactComponentName as FromStr>::Err>
fn from_str( input: &str, ) -> Result<PreactComponentName, <PreactComponentName as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for PreactComponentName
impl Hash for PreactComponentName
§impl Ord for PreactComponentName
impl Ord for PreactComponentName
§fn cmp(&self, other: &PreactComponentName) -> Ordering
fn cmp(&self, other: &PreactComponentName) -> 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 PreactComponentName
impl PartialEq for PreactComponentName
§impl PartialOrd for PreactComponentName
impl PartialOrd for PreactComponentName
§impl TryFrom<&str> for PreactComponentName
impl TryFrom<&str> for PreactComponentName
§type Error = PreactNameError
type Error = PreactNameError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<PreactComponentName, <PreactComponentName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<PreactComponentName, <PreactComponentName as TryFrom<&str>>::Error>
Performs the conversion.
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