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> Snapshots<T> for VecLog<T>
[src]
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]
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]ⓘ
[src]
pub fn actions_since_snapshot(&self, snapshot: &Snapshot) -> &[T]ⓘ
[src]Returns the slice of actions that were taken since the snapshot began.
pub fn start_snapshot(&mut self) -> Snapshot
[src]
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]
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.
impl<T> UndoLogs<T> for VecLog<T>
[src]
impl<T> UndoLogs<T> for VecLog<T>
[src]pub fn num_open_snapshots(&self) -> usize
[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]
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
fn in_snapshot(&self) -> bool
[src]
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]
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,
T: RefUnwindSafe,
impl<T> Send for VecLog<T> where
T: Send,
T: Send,
impl<T> Sync for VecLog<T> where
T: Sync,
T: Sync,
impl<T> Unpin for VecLog<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for VecLog<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[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]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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<V, T> VZip<V> for T where
V: MultiLane<T>,
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]
T: ?Sized,