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: DrainOrder) -> impl Iterator<Item = Directory>
fn drain(self, order: DrainOrder) -> impl Iterator<Item = Directory>
Drains the graph, returning node weights in the chosen DrainOrder.
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.
Source§impl DirectoryGraph
impl DirectoryGraph
Sourcepub fn with_recalculated_sizes(self) -> Self
Available on crate feature compat-accept-bigger-sizes only.
pub fn with_recalculated_sizes(self) -> Self
compat-accept-bigger-sizes only.Returns a new DirectoryGraph for which all sizes have been recomputed. If there’s any change, it’ll cause referencing Directories to also have different digests. Data migration code to remove size calculation introduced in cl/12216 and cl/31479.
Trait Implementations§
Source§impl Default for DirectoryGraph
impl Default for DirectoryGraph
Source§fn default() -> DirectoryGraph
fn default() -> DirectoryGraph
Auto Trait Implementations§
impl Freeze for DirectoryGraph
impl RefUnwindSafe for DirectoryGraph
impl Send for DirectoryGraph
impl Sync for DirectoryGraph
impl Unpin for DirectoryGraph
impl UnsafeUnpin 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
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>
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>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].