pub struct PartitionError {
pub flat_graph: Box<DfirGraph>,
pub diagnostic: Diagnostic,
}Expand description
The error returned by partition_graph when partitioning fails.
This hands back the original flat graph alongside the diagnostic, so callers can visualize the graph to diagnose the cycle that prevented partitioning.
Fields§
§flat_graph: Box<DfirGraph>The pristine, un-partitioned flat graph (returned so it can still be rendered).
Boxed because a DfirGraph is large (hundreds of bytes) and this keeps the
Err variant of partition_graph’s result small; the allocation only happens
on the (cold) failure path.
diagnostic: DiagnosticThe diagnostic explaining why partitioning failed (names the offending cycle).
Trait Implementations§
Source§impl Debug for PartitionError
impl Debug for PartitionError
Auto Trait Implementations§
impl !RefUnwindSafe for PartitionError
impl !Send for PartitionError
impl !Sync for PartitionError
impl !UnwindSafe for PartitionError
impl Freeze for PartitionError
impl Unpin for PartitionError
impl UnsafeUnpin for PartitionError
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> 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