Struct SvelteDirectiveName
pub struct SvelteDirectiveName(/* private fields */);Expand description
Validated Svelte directive name metadata.
Implementations§
§impl SvelteDirectiveName
impl SvelteDirectiveName
pub 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§
§impl Clone for SvelteDirectiveName
impl Clone for SvelteDirectiveName
§fn clone(&self) -> SvelteDirectiveName
fn clone(&self) -> SvelteDirectiveName
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 SvelteDirectiveName
impl Debug for SvelteDirectiveName
§impl Display for SvelteDirectiveName
impl Display for SvelteDirectiveName
§impl FromStr for SvelteDirectiveName
impl FromStr for SvelteDirectiveName
§type Err = SvelteNameError
type Err = SvelteNameError
The associated error which can be returned from parsing.
§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 more§impl Hash for SvelteDirectiveName
impl Hash for SvelteDirectiveName
§impl Ord for SvelteDirectiveName
impl Ord for SvelteDirectiveName
§fn cmp(&self, other: &SvelteDirectiveName) -> Ordering
fn cmp(&self, other: &SvelteDirectiveName) -> 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 SvelteDirectiveName
impl PartialEq for SvelteDirectiveName
§impl PartialOrd for SvelteDirectiveName
impl PartialOrd for SvelteDirectiveName
§impl TryFrom<&str> for SvelteDirectiveName
impl TryFrom<&str> for SvelteDirectiveName
§type Error = SvelteNameError
type Error = SvelteNameError
The type returned in the event of a conversion error.
§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