pub struct Path { /* private fields */ }Expand description
A sequence of package indices, understood as an absolute path.
Implementations§
Source§impl Path
impl Path
pub fn new(idx: Pack) -> Self
Sourcepub fn of_idx(ctx: &Ctx, idx: Pack) -> Self
pub fn of_idx(ctx: &Ctx, idx: Pack) -> Self
Constructs the path corresponding to a package in the context.
pub fn iter<'me>(&'me self) -> impl Iterator<Item = Pack> + 'me
pub fn iter_pref<'me>(&'me self) -> impl Iterator<Item = Pack> + 'me
pub fn len(&self) -> usize
pub fn pref_len(&self) -> usize
pub fn push(&mut self, idx: Pack)
pub fn pop(&mut self) -> Option<Pack>
pub fn last(&self) -> Pack
pub fn first(&self) -> Pack
Sourcepub fn resolve_etype(ctx: &mut PathCtx<'_>, s: impl AsRef<str>) -> Res<Class>
pub fn resolve_etype(ctx: &mut PathCtx<'_>, s: impl AsRef<str>) -> Res<Class>
Resolves the value of an eType XML attribute.
This function handles forward referencing, hence the mutable context.
pub fn display(&self, ctx: &PackMap<Pack>) -> String
pub fn display_sep(&self, ctx: &PackMap<Pack>) -> String
Trait Implementations§
Source§impl Ord for Path
impl Ord for Path
Source§impl PartialOrd for Path
impl PartialOrd for Path
impl Eq for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnwindSafe for Path
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