[][src]Trait handlegraph::pathhandlegraph::embedded_paths::GraphPathNames

pub trait GraphPathNames: Sized {
    type PathName: Iterator<Item = u8>;
    fn get_path_id(self, name: &[u8]) -> Option<PathId>;
fn get_path_name(self, id: PathId) -> Option<Self::PathName>; fn get_path_name_vec(self, id: PathId) -> Option<Vec<u8>> { ... }
fn has_path(self, name: &[u8]) -> bool { ... } }

Trait for retrieving the PathId for a path by name, and vice versa.

Names are represented as an iterator over u8s for flexibility in underlying storage.

Associated Types

type PathName: Iterator<Item = u8>[src]

The iterator on the name of a path.

Loading content...

Required methods

fn get_path_id(self, name: &[u8]) -> Option<PathId>[src]

Returns the PathId that the provided name points to, if there exists a path with that name.

fn get_path_name(self, id: PathId) -> Option<Self::PathName>[src]

Returns an iterator that produced the name of the path id, if that path exists in the graph.

Loading content...

Provided methods

fn get_path_name_vec(self, id: PathId) -> Option<Vec<u8>>[src]

Convenience method for retrieving a path name as a Vec<u8>.

fn has_path(self, name: &[u8]) -> bool[src]

Convenience method for checking whether a path exists by name.

Loading content...

Implementors

impl<'a> GraphPathNames for &'a HashGraph[src]

type PathName = Copied<Iter<'a, u8>>

impl<'a> GraphPathNames for &'a PackedGraph[src]

type PathName = IterView<'a, u8>

Loading content...