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
convert from one order to the other.
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
Sourcepub fn drain(self, order: DirectoryOrder) -> impl Iterator<Item = Directory>
pub fn drain(self, order: DirectoryOrder) -> impl Iterator<Item = Directory>
Drains the graph, returning node weights in the chosen DirectoryOrder.
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§
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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::Request