pub enum BoundedGraphError<Ix: IndexType = DefaultIx> {
EdgeRejected {
source: NodeIndex<Ix>,
target: NodeIndex<Ix>,
source_rejected: bool,
target_rejected: bool,
},
NodeNotFound {
source: Option<NodeIndex<Ix>>,
target: Option<NodeIndex<Ix>>,
},
}Expand description
Error type for bounded graph operations.
Variants§
EdgeRejected
One or both nodes rejected the edge.
The node indices indicate which nodes were involved in the rejection.
If source_rejected is true, the source node rejected adding the outgoing edge.
If target_rejected is true, the target node rejected adding the incoming edge.
NodeNotFound
One or both nodes do not exist in the graph.
source is Some if the source node doesn’t exist.
target is Some if the target node doesn’t exist.
Implementations§
Source§impl<Ix: IndexType> BoundedGraphError<Ix>
impl<Ix: IndexType> BoundedGraphError<Ix>
Sourcepub fn source_rejected(source: NodeIndex<Ix>, target: NodeIndex<Ix>) -> Self
pub fn source_rejected(source: NodeIndex<Ix>, target: NodeIndex<Ix>) -> Self
Creates an error indicating the source node rejected the edge.
Sourcepub fn target_rejected(source: NodeIndex<Ix>, target: NodeIndex<Ix>) -> Self
pub fn target_rejected(source: NodeIndex<Ix>, target: NodeIndex<Ix>) -> Self
Creates an error indicating the target node rejected the edge.
Sourcepub fn both_rejected(source: NodeIndex<Ix>, target: NodeIndex<Ix>) -> Self
pub fn both_rejected(source: NodeIndex<Ix>, target: NodeIndex<Ix>) -> Self
Creates an error indicating both nodes rejected the edge.
Trait Implementations§
Source§impl<Ix: Clone + IndexType> Clone for BoundedGraphError<Ix>
impl<Ix: Clone + IndexType> Clone for BoundedGraphError<Ix>
Source§fn clone(&self) -> BoundedGraphError<Ix>
fn clone(&self) -> BoundedGraphError<Ix>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Ix: IndexType> Display for BoundedGraphError<Ix>
impl<Ix: IndexType> Display for BoundedGraphError<Ix>
Source§impl<Ix: IndexType> Error for BoundedGraphError<Ix>
impl<Ix: IndexType> Error for BoundedGraphError<Ix>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl<Ix: IndexType> From<BoundedGraphError<Ix>> for BoundedAcyclicGraphError<Ix>
impl<Ix: IndexType> From<BoundedGraphError<Ix>> for BoundedAcyclicGraphError<Ix>
Source§fn from(err: BoundedGraphError<Ix>) -> Self
fn from(err: BoundedGraphError<Ix>) -> Self
Converts to this type from the input type.
impl<Ix: Eq + IndexType> Eq for BoundedGraphError<Ix>
impl<Ix: IndexType> StructuralPartialEq for BoundedGraphError<Ix>
Auto Trait Implementations§
impl<Ix> Freeze for BoundedGraphError<Ix>where
Ix: Freeze,
impl<Ix> RefUnwindSafe for BoundedGraphError<Ix>where
Ix: RefUnwindSafe,
impl<Ix> Send for BoundedGraphError<Ix>where
Ix: Send,
impl<Ix> Sync for BoundedGraphError<Ix>where
Ix: Sync,
impl<Ix> Unpin for BoundedGraphError<Ix>where
Ix: Unpin,
impl<Ix> UnwindSafe for BoundedGraphError<Ix>where
Ix: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.