pub struct OidTree { /* private fields */ }Expand description
Implementations§
Source§impl OidTree
impl OidTree
Sourcepub fn walk_oid(&self, start: NodeId, oid: &Oid) -> (NodeId, bool)
pub fn walk_oid(&self, start: NodeId, oid: &Oid) -> (NodeId, bool)
Walk the tree from start following arcs in oid.
Returns (last_matched_node, true) if all arcs matched, or
(deepest_matched_node, false) if the walk stopped early.
Sourcepub fn subtree(&self, start: NodeId) -> SubtreeIter<'_> ⓘ
pub fn subtree(&self, start: NodeId) -> SubtreeIter<'_> ⓘ
Depth-first iterator over a subtree rooted at start.
Sourcepub fn all_nodes(&self) -> SubtreeIter<'_> ⓘ
pub fn all_nodes(&self) -> SubtreeIter<'_> ⓘ
Depth-first iterator over all nodes (excluding root).
Sourcepub fn longest_prefix(&self, oid: &Oid) -> NodeId
pub fn longest_prefix(&self, oid: &Oid) -> NodeId
Find the deepest node matching a prefix of oid, starting from root.
Sourcepub fn longest_prefix_from(&self, start: NodeId, oid: &Oid) -> NodeId
pub fn longest_prefix_from(&self, start: NodeId, oid: &Oid) -> NodeId
Find the deepest node matching a prefix of oid, starting from start.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OidTree
impl RefUnwindSafe for OidTree
impl Send for OidTree
impl Sync for OidTree
impl Unpin for OidTree
impl UnsafeUnpin for OidTree
impl UnwindSafe for OidTree
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more