Skip to main content

MapExecution

Enum MapExecution 

Source
pub enum MapExecution<K: HashWork, V, Old: Work, New: Work> {
    Changed {
        map: OwnedMap<K, V, New>,
        previous: Old,
    },
    Foreign {
        map: OwnedMap<K, V, Old>,
        requested: New,
    },
}
Expand description

Owning execution transfer, preserving both inputs on account mismatch. No table allocation, key traversal or account-owner clone is performed.

Variants§

§

Changed

Same allocation and account under the requested execution.

Fields

§map: OwnedMap<K, V, New>

Existing table, now using the requested execution.

§previous: Old

Previous execution, moved without cloning.

§

Foreign

Different accounts cannot exchange retained allocation charges.

Fields

§map: OwnedMap<K, V, Old>

Original unchanged table and execution.

§requested: New

Requested execution, returned unchanged.

Auto Trait Implementations§

§

impl<K, V, Old, New> !Freeze for MapExecution<K, V, Old, New>

§

impl<K, V, Old, New> RefUnwindSafe for MapExecution<K, V, Old, New>
where OwnedMap<K, V, New>: RefUnwindSafe, Old: RefUnwindSafe, OwnedMap<K, V, Old>: RefUnwindSafe, New: RefUnwindSafe,

§

impl<K, V, Old, New> Send for MapExecution<K, V, Old, New>
where OwnedMap<K, V, New>: Send, Old: Send, OwnedMap<K, V, Old>: Send, New: Send,

§

impl<K, V, Old, New> Sync for MapExecution<K, V, Old, New>
where OwnedMap<K, V, New>: Sync, Old: Sync, OwnedMap<K, V, Old>: Sync, New: Sync,

§

impl<K, V, Old, New> Unpin for MapExecution<K, V, Old, New>
where OwnedMap<K, V, New>: Unpin, Old: Unpin, OwnedMap<K, V, Old>: Unpin, New: Unpin,

§

impl<K, V, Old, New> UnsafeUnpin for MapExecution<K, V, Old, New>
where OwnedMap<K, V, New>: UnsafeUnpin, Old: UnsafeUnpin, OwnedMap<K, V, Old>: UnsafeUnpin, New: UnsafeUnpin,

§

impl<K, V, Old, New> UnwindSafe for MapExecution<K, V, Old, New>
where OwnedMap<K, V, New>: UnwindSafe, Old: UnwindSafe, OwnedMap<K, V, 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.