Struct rustc_data_structures::unify::UnificationTable
source · [−]pub struct UnificationTable<S>where
S: UnificationStoreBase,{
values: S,
}
Expand description
Table of unification keys and their values. You must define a key type K
that implements the UnifyKey
trait. Unification tables can be used in two-modes:
- in-place (
UnificationTable<InPlace<K>>
orInPlaceUnificationTable<K>
):- This is the standard mutable mode, where the array is modified in place.
- To do backtracking, you can employ the
snapshot
androllback_to
methods.
- persistent (
UnificationTable<Persistent<K>>
orPersistentUnificationTable<K>
):- In this mode, we use a persistent vector to store the data, so that cloning the table is an O(1) operation.
- This implies that ordinary operations are quite a bit slower though.
- Requires the
persistent
feature be selected in your Cargo.toml file.
Fields
values: S
Indicates the current value of each key.
Auto Trait Implementations
impl<S> RefUnwindSafe for UnificationTable<S>where
S: RefUnwindSafe,
impl<S> Send for UnificationTable<S>where
S: Send,
impl<S> Sync for UnificationTable<S>where
S: Sync,
impl<S> Unpin for UnificationTable<S>where
S: Unpin,
impl<S> UnwindSafe for UnificationTable<S>where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> Erased for T
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.