Struct dae_parser::local_map::LocalMap
source · [−]Expand description
A map for looking up elements of type T
in the document by ID.
Tuple Fields
0: HashMap<&'a str, &'a T>
Implementations
sourceimpl<'a, T: ?Sized> LocalMap<'a, T>
impl<'a, T: ?Sized> LocalMap<'a, T>
sourcepub fn get_name(&self, n: &NameRef<T>) -> Option<&'a T>
pub fn get_name(&self, n: &NameRef<T>) -> Option<&'a T>
Look up an element by ID, in a NameRef
.
sourcepub fn get_raw(&self, url: &Url) -> Option<&'a T>
pub fn get_raw(&self, url: &Url) -> Option<&'a T>
Look up an element by URL reference.
This is a local map, meaning that it does not support references to URLs which are not
of the special form #ref
, referring to an element with ID ref
in the same document.
sourcepub fn get(&self, url: &UrlRef<T>) -> Option<&'a T>
pub fn get(&self, url: &UrlRef<T>) -> Option<&'a T>
Look up an element by URL reference.
This is a simple wrapper around get_raw
,
but it has better type safety, since it ensures that the reference is a reference to a T
.
This is a local map, meaning that it does not support references to URLs which are not
of the special form #ref
, referring to an element with ID ref
in the same document.
Trait Implementations
Auto Trait Implementations
impl<'a, T: ?Sized> RefUnwindSafe for LocalMap<'a, T>where
T: RefUnwindSafe,
impl<'a, T: ?Sized> Send for LocalMap<'a, T>where
T: Sync,
impl<'a, T: ?Sized> Sync for LocalMap<'a, T>where
T: Sync,
impl<'a, T: ?Sized> Unpin for LocalMap<'a, T>
impl<'a, T: ?Sized> UnwindSafe for LocalMap<'a, T>where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more