[−][src]Trait esl01_dag::nameset::NameSetQuery
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.
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.