pub struct WorkQueue<T: Idx> { /* fields omitted */ }
A work queue is a handy data structure for tracking work left to
do. (For example, basic blocks left to process.) It is basically a
de-duplicating queue; so attempting to insert X if X is already
enqueued has no effect. This implementation assumes that the
elements are dense indices, so it can allocate the queue to size
and also use a bit set to track occupancy.
Create a new work queue with all the elements from (0..len).
Create a new work queue that starts empty, where elements range from (0..len).
Attempt to enqueue element
in the work queue. Returns false if it was already present.
Attempt to pop an element from the work queue.
True if nothing is enqueued.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more