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