pub enum Ident {
Prefixed(Box<PrefixedIdent>),
Unprefixed(Box<UnprefixedIdent>),
Url(Box<Url>),
}
Expand description
An identifier, either prefixed, unprefixed, or a valid URL.
Variants§
Implementations§
source§impl Ident
impl Ident
sourcepub fn as_prefixed(&self) -> Option<&PrefixedIdent>
pub fn as_prefixed(&self) -> Option<&PrefixedIdent>
Return a reference to the PrefixedIdent
if the identifier is one, or None
.
sourcepub fn as_prefixed_mut(&mut self) -> Option<&mut PrefixedIdent>
pub fn as_prefixed_mut(&mut self) -> Option<&mut PrefixedIdent>
Return a mutable reference to the PrefixedIdent
if the identifier is one, or None
.
sourcepub fn as_unprefixed(&self) -> Option<&UnprefixedIdent>
pub fn as_unprefixed(&self) -> Option<&UnprefixedIdent>
Return a reference to the UnprefixedIdent
if the identifier is one, or None
.
sourcepub fn as_unprefixed_mut(&mut self) -> Option<&mut UnprefixedIdent>
pub fn as_unprefixed_mut(&mut self) -> Option<&mut UnprefixedIdent>
Return a mutable reference to the UnprefixedIdent
if the identifier is one, or None
.
sourcepub fn as_url(&self) -> Option<&Url>
pub fn as_url(&self) -> Option<&Url>
Return a reference to the Url
if the identifier is one, or None
.
sourcepub fn as_url_mut(&mut self) -> Option<&mut Url>
pub fn as_url_mut(&mut self) -> Option<&mut Url>
Return a mutable reference to the Url
if the identifier is one, or None
.
Trait Implementations§
source§impl AsMut<Ident> for ClassIdent
impl AsMut<Ident> for ClassIdent
source§impl AsMut<Ident> for InstanceIdent
impl AsMut<Ident> for InstanceIdent
source§impl AsMut<Ident> for NamespaceIdent
impl AsMut<Ident> for NamespaceIdent
source§impl AsMut<Ident> for RelationIdent
impl AsMut<Ident> for RelationIdent
source§impl AsMut<Ident> for SubsetIdent
impl AsMut<Ident> for SubsetIdent
source§impl AsMut<Ident> for SynonymTypeIdent
impl AsMut<Ident> for SynonymTypeIdent
source§impl AsRef<Ident> for ClassIdent
impl AsRef<Ident> for ClassIdent
source§impl AsRef<Ident> for InstanceIdent
impl AsRef<Ident> for InstanceIdent
source§impl AsRef<Ident> for NamespaceIdent
impl AsRef<Ident> for NamespaceIdent
source§impl AsRef<Ident> for RelationIdent
impl AsRef<Ident> for RelationIdent
source§impl AsRef<Ident> for SubsetIdent
impl AsRef<Ident> for SubsetIdent
source§impl AsRef<Ident> for SynonymTypeIdent
impl AsRef<Ident> for SynonymTypeIdent
source§impl From<ClassIdent> for Ident
impl From<ClassIdent> for Ident
source§fn from(id: ClassIdent) -> Self
fn from(id: ClassIdent) -> Self
Converts to this type from the input type.
source§impl From<Ident> for ClassIdent
impl From<Ident> for ClassIdent
source§impl From<Ident> for InstanceIdent
impl From<Ident> for InstanceIdent
source§impl From<Ident> for NamespaceIdent
impl From<Ident> for NamespaceIdent
source§impl From<Ident> for RelationIdent
impl From<Ident> for RelationIdent
source§impl From<Ident> for SubsetIdent
impl From<Ident> for SubsetIdent
source§impl From<Ident> for SynonymTypeIdent
impl From<Ident> for SynonymTypeIdent
source§impl From<InstanceIdent> for Ident
impl From<InstanceIdent> for Ident
source§fn from(id: InstanceIdent) -> Self
fn from(id: InstanceIdent) -> Self
Converts to this type from the input type.
source§impl From<NamespaceIdent> for Ident
impl From<NamespaceIdent> for Ident
source§fn from(id: NamespaceIdent) -> Self
fn from(id: NamespaceIdent) -> Self
Converts to this type from the input type.
source§impl From<PrefixedIdent> for Ident
impl From<PrefixedIdent> for Ident
source§fn from(id: PrefixedIdent) -> Self
fn from(id: PrefixedIdent) -> Self
Converts to this type from the input type.
source§impl From<RelationIdent> for Ident
impl From<RelationIdent> for Ident
source§fn from(id: RelationIdent) -> Self
fn from(id: RelationIdent) -> Self
Converts to this type from the input type.
source§impl From<SubsetIdent> for Ident
impl From<SubsetIdent> for Ident
source§fn from(id: SubsetIdent) -> Self
fn from(id: SubsetIdent) -> Self
Converts to this type from the input type.
source§impl From<SynonymTypeIdent> for Ident
impl From<SynonymTypeIdent> for Ident
source§fn from(id: SynonymTypeIdent) -> Self
fn from(id: SynonymTypeIdent) -> Self
Converts to this type from the input type.
source§impl From<UnprefixedIdent> for Ident
impl From<UnprefixedIdent> for Ident
source§fn from(id: UnprefixedIdent) -> Self
fn from(id: UnprefixedIdent) -> Self
Converts to this type from the input type.
source§impl<'i> FromPair<'i> for Ident
impl<'i> FromPair<'i> for Ident
source§unsafe fn from_pair_unchecked(
pair: Pair<'i, Rule>,
cache: &Cache
) -> Result<Self, SyntaxError>
unsafe fn from_pair_unchecked( pair: Pair<'i, Rule>, cache: &Cache ) -> Result<Self, SyntaxError>
Create a new instance from a
Pair
without checking the rule. Read moresource§impl Ord for Ident
impl Ord for Ident
source§impl PartialEq<Ident> for Ident
impl PartialEq<Ident> for Ident
source§impl PartialOrd<Ident> for Ident
impl PartialOrd<Ident> for Ident
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Ident
impl StructuralEq for Ident
impl StructuralPartialEq for Ident
Auto Trait Implementations§
impl RefUnwindSafe for Ident
impl Send for Ident
impl Sync for Ident
impl Unpin for Ident
impl UnwindSafe for Ident
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