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