pub struct DirectoryGraph {
graph: DiGraph<Directory, ()>,
root_idx: NodeIndex,
}Expand description
This represents a full (and validated) graph of Directory nodes.
It can be constructed using DirectoryGraphBuilder, and is normally used to
receive in one or the other insertion order, validate, and then drain in
Leaves-To-Root order.
If you just want to validate an order without keeping the results,
RootToLeavesValidator or LeavesToRootValidator can be used.
Fields§
§graph: DiGraph<Directory, ()>§root_idx: NodeIndexImplementations§
Source§impl DirectoryGraph
impl DirectoryGraph
Sourcefn drain(self, order: DirectoryOrder) -> impl Iterator<Item = Directory>
fn drain(self, order: DirectoryOrder) -> impl Iterator<Item = Directory>
Drains the graph, returning node weights in the chosen DirectoryOrder.
Sourcepub fn drain_leaves_to_root(self) -> impl Iterator<Item = Directory>
pub fn drain_leaves_to_root(self) -> impl Iterator<Item = Directory>
Drains the graph in Leaves-To-Root Order.
Sourcepub fn drain_root_to_leaves(self) -> impl Iterator<Item = Directory>
pub fn drain_root_to_leaves(self) -> impl Iterator<Item = Directory>
Drains the graph in Root-To-Leaves Order.
pub fn root(&self) -> &Directory
Trait Implementations§
Source§impl Default for DirectoryGraph
impl Default for DirectoryGraph
Source§fn default() -> DirectoryGraph
fn default() -> DirectoryGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DirectoryGraph
impl RefUnwindSafe for DirectoryGraph
impl Send for DirectoryGraph
impl Sync for DirectoryGraph
impl Unpin for DirectoryGraph
impl UnwindSafe for DirectoryGraph
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request