[−][src]Struct libquilt::resolver::OrderResolver
A utility for interactively imposing a linear order on a graggle with no cycles.
You will usually create this struct using CycleResolver::into_order_resolver
,
which will ensure that there are no cycles remaining.
Methods
impl<'a> OrderResolver<'a>
[src]
pub fn ordered_nodes(&self) -> &[NodeId]
[src]
Returns a slice containing the nodes that have already been put in order.
pub fn candidates<'b>(
&'b self
) -> impl Iterator<Item = CandidateChain<'a>> + 'b
[src]
&'b self
) -> impl Iterator<Item = CandidateChain<'a>> + 'b
Returns an iterator over the current set of candidates.
Each of the returned values represents a node (or sequence of nodes) that could go next in the output.
pub fn choose(&mut self, next: &NodeId)
[src]
Chooses a node to go next in the ordered output.
The chosen node must be a valid choice, meaning that there cannot be an edge from the
chosen node to a node that has not yet been chosen. If the chosen node was taken from the
head of one of the chains returned by OrderResolver::candidates
, it is guaranteed to be
a valid choice.
Panics
Panics if the chosen node is not a valid choice.
pub fn delete(&mut self, u: &NodeId)
[src]
Deletes a node, instead of including it in the ordered output.
The chosen node must be valid in the sense described in OrderResolver::choose
.
Panics
Panics if the chosen node is not a valid choice.
pub fn is_finished(&self) -> bool
[src]
Returns true if the entire graggle has already been put in order.
pub fn changes(&self) -> Changes
[src]
Assuming that the entire graggle has already been put in order, returns a Changes
that,
when applied to the graggle, will turn it from the original graggle into the linear order that
we have just created (and which can be retrieved by OrderResolver::ordered_nodes
).
Auto Trait Implementations
impl<'a> Send for OrderResolver<'a>
impl<'a> Sync for OrderResolver<'a>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self