pub enum NamespaceIdent {
Prefix(NamespacePrefix),
Namespace(Namespace),
}
Expand description
Identifies a namespace by either it’s known prefix or by the namespace directly.
Variants§
Prefix(NamespacePrefix)
Uses a namespace prefix to refer to a specific namespace in the schema.
Namespace(Namespace)
Uses the full namespace to refer to a specific namespace in the schema.
Implementations§
Source§impl NamespaceIdent
impl NamespaceIdent
Sourcepub fn prefix<X>(value: X) -> Selfwhere
NamespacePrefix: From<X>,
pub fn prefix<X>(value: X) -> Selfwhere
NamespacePrefix: From<X>,
Creates a new NamespaceIdent::Prefix
instance from the passed value
.
Sourcepub fn namespace<X>(value: X) -> Self
pub fn namespace<X>(value: X) -> Self
Creates a new NamespaceIdent::Namespace
instance from the passed value
.
Trait Implementations§
Source§impl Clone for NamespaceIdent
impl Clone for NamespaceIdent
Source§fn clone(&self) -> NamespaceIdent
fn clone(&self) -> NamespaceIdent
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 moreSource§impl Debug for NamespaceIdent
impl Debug for NamespaceIdent
Source§impl From<Namespace> for NamespaceIdent
impl From<Namespace> for NamespaceIdent
Source§impl From<NamespacePrefix> for NamespaceIdent
impl From<NamespacePrefix> for NamespaceIdent
Source§fn from(value: NamespacePrefix) -> Self
fn from(value: NamespacePrefix) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NamespaceIdent
impl RefUnwindSafe for NamespaceIdent
impl Send for NamespaceIdent
impl Sync for NamespaceIdent
impl Unpin for NamespaceIdent
impl UnwindSafe for NamespaceIdent
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