pub enum BfsError {
StartElementNotContained,
VisitedTooSmall {
needed: usize,
actual: usize,
},
QueueTooSmall {
needed: usize,
actual: usize,
},
StartIndexOutOfBounds {
index: usize,
bound: usize,
},
NeighborIndexOutOfBounds {
index: usize,
bound: usize,
},
}Expand description
Error returned when caller-provided BFS scratch cannot support traversal.
§Performance
perf: unspecified; errors are returned only before traversal starts.
Variants§
StartElementNotContained
The start element is not valid and visible in the topology view.
VisitedTooSmall
The visited scratch slice is smaller than graph.element_bound().
QueueTooSmall
The queue scratch slice is smaller than graph.element_bound().
StartIndexOutOfBounds
The start element maps outside graph.element_bound().
Fields
NeighborIndexOutOfBounds
Traversal observed a successor or predecessor element whose dense index
is at or past graph.element_bound(). Indicates the topology view
violated its
ElementSuccessors or
ElementPredecessors
contract: an expanded element ID must map below the element bound that
was in effect when traversal started.
Trait Implementations§
impl Copy for BfsError
impl Eq for BfsError
Source§impl Error for BfsError
impl Error for BfsError
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()
impl StructuralPartialEq for BfsError
Auto Trait Implementations§
impl Freeze for BfsError
impl RefUnwindSafe for BfsError
impl Send for BfsError
impl Sync for BfsError
impl Unpin for BfsError
impl UnsafeUnpin for BfsError
impl UnwindSafe for BfsError
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