Skip to main content

VecExecution

Enum VecExecution 

Source
pub enum VecExecution<T, Old: Work, New: Work> {
    Changed {
        values: OwnedVec<T, New>,
        previous: Old,
    },
    Foreign {
        values: OwnedVec<T, Old>,
        requested: New,
    },
}
Expand description

Ownership-preserving vector execution transfer, including both inputs on mismatch. Layout, elements, capacity and retained charges are unchanged.

Variants§

§

Changed

Same allocation, now mutated under the requested current execution.

Fields

§values: OwnedVec<T, New>

Transferred vector.

§previous: Old

Previous work, without replaying charges.

§

Foreign

Different accounts cannot exchange allocation charges.

Fields

§values: OwnedVec<T, Old>

Unchanged original vector.

§requested: New

Unused requested work.

Auto Trait Implementations§

§

impl<T, Old, New> !Freeze for VecExecution<T, Old, New>

§

impl<T, Old, New> RefUnwindSafe for VecExecution<T, Old, New>

§

impl<T, Old, New> Send for VecExecution<T, Old, New>
where OwnedVec<T, New>: Send, Old: Send, OwnedVec<T, Old>: Send, New: Send,

§

impl<T, Old, New> Sync for VecExecution<T, Old, New>
where OwnedVec<T, New>: Sync, Old: Sync, OwnedVec<T, Old>: Sync, New: Sync,

§

impl<T, Old, New> Unpin for VecExecution<T, Old, New>
where OwnedVec<T, New>: Unpin, Old: Unpin, OwnedVec<T, Old>: Unpin, New: Unpin,

§

impl<T, Old, New> UnsafeUnpin for VecExecution<T, Old, New>
where OwnedVec<T, New>: UnsafeUnpin, Old: UnsafeUnpin, OwnedVec<T, Old>: UnsafeUnpin, New: UnsafeUnpin,

§

impl<T, Old, New> UnwindSafe for VecExecution<T, Old, New>
where OwnedVec<T, New>: UnwindSafe, Old: UnwindSafe, OwnedVec<T, Old>: UnwindSafe, New: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.