pub enum ResolveResult<'ns> {
Unbound,
Bound(Namespace<'ns>),
Unknown(Vec<u8>),
}
Expand description
Result of prefix resolution which creates by NsReader::resolve_attribute
,
NsReader::resolve_element
, NsReader::read_resolved_event
and
NsReader::read_resolved_event_into
methods.
Variants§
Unbound
Qualified name does not contain prefix, and resolver does not define default namespace, so name is not bound to any namespace
Bound(Namespace<'ns>)
Prefix
resolved to the specified namespace
Unknown(Vec<u8>)
Specified prefix was not found in scope
Trait Implementations§
Source§impl<'ns> Clone for ResolveResult<'ns>
impl<'ns> Clone for ResolveResult<'ns>
Source§fn clone(&self) -> ResolveResult<'ns>
fn clone(&self) -> ResolveResult<'ns>
Returns a copy 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<'ns> Debug for ResolveResult<'ns>
impl<'ns> Debug for ResolveResult<'ns>
Source§impl<'ns> Hash for ResolveResult<'ns>
impl<'ns> Hash for ResolveResult<'ns>
Source§impl<'ns> PartialEq for ResolveResult<'ns>
impl<'ns> PartialEq for ResolveResult<'ns>
Source§impl<'ns> TryFrom<ResolveResult<'ns>> for Option<Namespace<'ns>>
impl<'ns> TryFrom<ResolveResult<'ns>> for Option<Namespace<'ns>>
Source§fn try_from(result: ResolveResult<'ns>) -> Result<Self, NamespaceError>
fn try_from(result: ResolveResult<'ns>) -> Result<Self, NamespaceError>
Try to convert this result to an optional namespace and returns
NamespaceError::UnknownPrefix
if this result represents unknown prefix
Source§type Error = NamespaceError
type Error = NamespaceError
The type returned in the event of a conversion error.
impl<'ns> Eq for ResolveResult<'ns>
impl<'ns> StructuralPartialEq for ResolveResult<'ns>
Auto Trait Implementations§
impl<'ns> Freeze for ResolveResult<'ns>
impl<'ns> RefUnwindSafe for ResolveResult<'ns>
impl<'ns> Send for ResolveResult<'ns>
impl<'ns> Sync for ResolveResult<'ns>
impl<'ns> Unpin for ResolveResult<'ns>
impl<'ns> UnwindSafe for ResolveResult<'ns>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)