Enum regalloc2::moves::MoveVecWithScratch
source · pub enum MoveVecWithScratch<T> {
NoScratch(MoveVec<T>),
Scratch(MoveVec<T>),
}
Expand description
A list of moves to be performance in sequence, like a
MoveVec<T>
, except that an unchosen scratch space may occur as
well, represented by Allocation::none()
.
Variants§
Implementations§
source§impl<T> MoveVecWithScratch<T>
impl<T> MoveVecWithScratch<T>
sourcepub fn with_scratch(self, scratch: Allocation) -> MoveVec<T>
pub fn with_scratch(self, scratch: Allocation) -> MoveVec<T>
Fills in the scratch space, if needed, with the given
register/allocation and returns a final list of moves. The
scratch register must not occur anywhere in the parallel-move
problem given to the resolver that produced this
MoveVecWithScratch
.
sourcepub fn without_scratch(self) -> Option<MoveVec<T>>
pub fn without_scratch(self) -> Option<MoveVec<T>>
Unwrap without a scratch register.
sourcepub fn needs_scratch(&self) -> bool
pub fn needs_scratch(&self) -> bool
Do we need a scratch register?
Trait Implementations§
source§impl<T: Clone> Clone for MoveVecWithScratch<T>
impl<T: Clone> Clone for MoveVecWithScratch<T>
source§fn clone(&self) -> MoveVecWithScratch<T>
fn clone(&self) -> MoveVecWithScratch<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for MoveVecWithScratch<T>where
T: Freeze,
impl<T> RefUnwindSafe for MoveVecWithScratch<T>where
T: RefUnwindSafe,
impl<T> Send for MoveVecWithScratch<T>where
T: Send,
impl<T> Sync for MoveVecWithScratch<T>where
T: Sync,
impl<T> Unpin for MoveVecWithScratch<T>where
T: Unpin,
impl<T> UnwindSafe for MoveVecWithScratch<T>where
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)