Struct rustc_ap_rustc_data_structures::undo_log::VecLog[][src]

pub struct VecLog<T> { /* fields omitted */ }
Expand description

A basic undo log.

Trait Implementations

impl<T> Clone for VecLog<T> where
    T: Clone
[src]

pub fn clone(&self) -> VecLog<T>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T> Debug for VecLog<T> where
    T: Debug
[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl<T> Default for VecLog<T>[src]

pub fn default() -> VecLog<T>[src]

Returns the “default value” for a type. Read more

impl<T> Index<usize> for VecLog<T>[src]

type Output = T

The returned type after indexing.

pub fn index(&self, key: usize) -> &T[src]

Performs the indexing (container[index]) operation. Read more

impl<T> Snapshots<T> for VecLog<T>[src]

type Snapshot = Snapshot

pub fn has_changes(
    &self,
    snapshot: &<VecLog<T> as Snapshots<T>>::Snapshot
) -> bool
[src]

Returns true if self has made any changes since snapshot started.

pub fn actions_since_snapshot(&self, snapshot: &Snapshot) -> &[T]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the slice of actions that were taken since the snapshot began.

pub fn start_snapshot(&mut self) -> Snapshot[src]

Starts a new snapshot. That snapshot must eventually either be committed via a call to commit or rollback via rollback_to. Snapshots can be nested (i.e., you can start a snapshot whilst another snapshot is in progress) but you must then commit or rollback the inner snapshot before attempting to commit or rollback the outer snapshot. Read more

pub fn rollback_to<R>(&mut self, values: impl FnOnce() -> R, snapshot: Snapshot) where
    R: Rollback<T>, 
[src]

Rollback (undo) the changes made to storage since the snapshot.

pub fn commit(&mut self, snapshot: Snapshot)[src]

Commit: keep the changes that have been made since the snapshot began

impl<T> UndoLogs<T> for VecLog<T>[src]

pub fn num_open_snapshots(&self) -> usize[src]

How many open snapshots this undo log currently has

pub fn push(&mut self, undo: T)[src]

Pushes a new “undo item” onto the undo log. This method is invoked when some action is taken (e.g., a variable is unified). It records the info needed to reverse that action should an enclosing snapshot be rolleod back. Read more

pub fn clear(&mut self)[src]

Removes all items from the undo log.

fn in_snapshot(&self) -> bool[src]

True if a snapshot has started, false otherwise

fn extend<I>(&mut self, undos: I) where
    I: IntoIterator<Item = T>, 
[src]

Extends the undo log with many undos.

Auto Trait Implementations

impl<T> RefUnwindSafe for VecLog<T> where
    T: RefUnwindSafe

impl<T> Send for VecLog<T> where
    T: Send

impl<T> Sync for VecLog<T> where
    T: Sync

impl<T> Unpin for VecLog<T> where
    T: Unpin

impl<T> UnwindSafe for VecLog<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]