[][src]Trait esl01_dag::nameset::NameSetQuery

pub trait NameSetQuery: Any + Debug + Send + Sync {
    fn iter(&self) -> Result<Box<dyn NameIter>>;
fn as_any(&self) -> &dyn Any; fn iter_rev(&self) -> Result<Box<dyn NameIter>> { ... }
fn count(&self) -> Result<usize> { ... }
fn first(&self) -> Result<Option<VertexName>> { ... }
fn last(&self) -> Result<Option<VertexName>> { ... }
fn is_empty(&self) -> Result<bool> { ... }
fn contains(&self, name: &VertexName) -> Result<bool> { ... }
fn is_topo_sorted(&self) -> bool { ... }
fn is_all(&self) -> bool { ... } }

Read-only queries required by NameSet: Iteration, length and contains.

Types implementating this trait should rewrite methods to use fast paths when possible.

Required methods

fn iter(&self) -> Result<Box<dyn NameIter>>

Iterate through the set in defined order.

fn as_any(&self) -> &dyn Any

For downcasting.

Loading content...

Provided methods

fn iter_rev(&self) -> Result<Box<dyn NameIter>>

Iterate through the set in the reversed order.

fn count(&self) -> Result<usize>

Number of names in this set.

fn first(&self) -> Result<Option<VertexName>>

The first name in the set.

fn last(&self) -> Result<Option<VertexName>>

The last name in the set.

fn is_empty(&self) -> Result<bool>

Test if this set is empty.

fn contains(&self, name: &VertexName) -> Result<bool>

Test if this set contains a given name.

fn is_topo_sorted(&self) -> bool

Returns true if this set is known topologically sorted (head first, root last).

fn is_all(&self) -> bool

Returns true if this set is an "all" set.

An "all" set will return X when intersection with X. Otherwise it's not different from a normal set.

Loading content...

Implementors

impl NameSetQuery for DagSet[src]

impl NameSetQuery for DifferenceSet[src]

impl NameSetQuery for IntersectionSet[src]

impl NameSetQuery for LazySet[src]

impl NameSetQuery for SortedSet[src]

impl NameSetQuery for StaticSet[src]

impl NameSetQuery for UnionSet[src]

Loading content...