Skip to main content

BorrowingGraph

Trait BorrowingGraph 

Source
pub trait BorrowingGraph {
    // Required methods
    fn len(&self) -> usize;
    fn neighbors(&self, key: u32) -> &[u32];

    // Provided method
    fn is_empty(&self) -> bool { ... }
}

Required Methods§

Source

fn len(&self) -> usize

Get the number of nodes in the graph.

Source

fn neighbors(&self, key: u32) -> &[u32]

Borrow the neighbors of a graph node, identified by the index.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true if the graph is empty.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§