pub struct SvelteComponentName(/* private fields */);Expand description
Validated Svelte component name metadata.
Implementations§
Source§impl SvelteComponentName
impl SvelteComponentName
Sourcepub fn new(input: &str) -> Result<SvelteComponentName, SvelteNameError>
pub fn new(input: &str) -> Result<SvelteComponentName, SvelteNameError>
Creates a PascalCase ASCII Svelte component name.
§Errors
Returns SvelteNameError when input is not an ASCII identifier or is not PascalCase-shaped.
Trait Implementations§
Source§impl Clone for SvelteComponentName
impl Clone for SvelteComponentName
Source§fn clone(&self) -> SvelteComponentName
fn clone(&self) -> SvelteComponentName
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 SvelteComponentName
impl Debug for SvelteComponentName
Source§impl Display for SvelteComponentName
impl Display for SvelteComponentName
Source§impl FromStr for SvelteComponentName
impl FromStr for SvelteComponentName
Source§type Err = SvelteNameError
type Err = SvelteNameError
The associated error which can be returned from parsing.
Source§fn from_str(
input: &str,
) -> Result<SvelteComponentName, <SvelteComponentName as FromStr>::Err>
fn from_str( input: &str, ) -> Result<SvelteComponentName, <SvelteComponentName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for SvelteComponentName
impl Hash for SvelteComponentName
Source§impl Ord for SvelteComponentName
impl Ord for SvelteComponentName
Source§fn cmp(&self, other: &SvelteComponentName) -> Ordering
fn cmp(&self, other: &SvelteComponentName) -> 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 SvelteComponentName
impl PartialEq for SvelteComponentName
Source§fn eq(&self, other: &SvelteComponentName) -> bool
fn eq(&self, other: &SvelteComponentName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SvelteComponentName
impl PartialOrd for SvelteComponentName
Source§impl TryFrom<&str> for SvelteComponentName
impl TryFrom<&str> for SvelteComponentName
Source§type Error = SvelteNameError
type Error = SvelteNameError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<SvelteComponentName, <SvelteComponentName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<SvelteComponentName, <SvelteComponentName as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for SvelteComponentName
impl StructuralPartialEq for SvelteComponentName
Auto Trait Implementations§
impl Freeze for SvelteComponentName
impl RefUnwindSafe for SvelteComponentName
impl Send for SvelteComponentName
impl Sync for SvelteComponentName
impl Unpin for SvelteComponentName
impl UnsafeUnpin for SvelteComponentName
impl UnwindSafe for SvelteComponentName
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