Skip to main content

ItemSettlement

Enum ItemSettlement 

Source
pub enum ItemSettlement<Item, Accepted, Rejection, Prerequisite> {
    Accepted(Accepted),
    Rejected {
        item: Item,
        reason: Rejection,
    },
    Blocked {
        item: Item,
        prerequisite: Prerequisite,
    },
    Corrupt {
        item: Item,
        fault: InterpreterFault,
    },
}
Expand description

Total settlement of one statically selected action item.

Rejection and dependency blocking retain the complete original item. Interpreter corruption does the same. Accepted items are consumed and leave only the capability’s promised receipt. Whether an item was attempted at all belongs to SettledItem, so a concrete interpreter cannot fabricate that product-level fact.

Variants§

§

Accepted(Accepted)

The capability consumed the item and returned its promised receipt.

§

Rejected

The capability lawfully rejected the complete item.

Fields

§item: Item
§reason: Rejection
§

Blocked

A declared prerequisite did not commit, so the item remains untouched.

Fields

§item: Item
§prerequisite: Prerequisite
§

Corrupt

The interpreter violated its contract while the item remained owned.

Fields

§item: Item

Trait Implementations§

Source§

impl<Item, Accepted, Rejection, Prerequisite> ClassifySettlement for ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Source§

fn settlement_status(&self) -> SettlementStatus

Inspect every member without consuming or rewriting the settlement.
Source§

impl<Item: Clone, Accepted: Clone, Rejection: Clone, Prerequisite: Clone> Clone for ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Source§

fn clone(&self) -> ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Item: Debug, Accepted: Debug, Rejection: Debug, Prerequisite: Debug> Debug for ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Item: PartialEq, Accepted: PartialEq, Rejection: PartialEq, Prerequisite: PartialEq> PartialEq for ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Source§

fn eq( &self, other: &ItemSettlement<Item, Accepted, Rejection, Prerequisite>, ) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Item: Copy, Accepted: Copy, Rejection: Copy, Prerequisite: Copy> Copy for ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Source§

impl<Item: Eq, Accepted: Eq, Rejection: Eq, Prerequisite: Eq> Eq for ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Source§

impl<Item, Accepted, Rejection, Prerequisite> StructuralPartialEq for ItemSettlement<Item, Accepted, Rejection, Prerequisite>

Auto Trait Implementations§

§

impl<Item, Accepted, Rejection, Prerequisite> Freeze for ItemSettlement<Item, Accepted, Rejection, Prerequisite>
where Accepted: Freeze, Item: Freeze, Rejection: Freeze, Prerequisite: Freeze,

§

impl<Item, Accepted, Rejection, Prerequisite> RefUnwindSafe for ItemSettlement<Item, Accepted, Rejection, Prerequisite>
where Accepted: RefUnwindSafe, Item: RefUnwindSafe, Rejection: RefUnwindSafe, Prerequisite: RefUnwindSafe,

§

impl<Item, Accepted, Rejection, Prerequisite> Send for ItemSettlement<Item, Accepted, Rejection, Prerequisite>
where Accepted: Send, Item: Send, Rejection: Send, Prerequisite: Send,

§

impl<Item, Accepted, Rejection, Prerequisite> Sync for ItemSettlement<Item, Accepted, Rejection, Prerequisite>
where Accepted: Sync, Item: Sync, Rejection: Sync, Prerequisite: Sync,

§

impl<Item, Accepted, Rejection, Prerequisite> Unpin for ItemSettlement<Item, Accepted, Rejection, Prerequisite>
where Accepted: Unpin, Item: Unpin, Rejection: Unpin, Prerequisite: Unpin,

§

impl<Item, Accepted, Rejection, Prerequisite> UnsafeUnpin for ItemSettlement<Item, Accepted, Rejection, Prerequisite>
where Accepted: UnsafeUnpin, Item: UnsafeUnpin, Rejection: UnsafeUnpin, Prerequisite: UnsafeUnpin,

§

impl<Item, Accepted, Rejection, Prerequisite> UnwindSafe for ItemSettlement<Item, Accepted, Rejection, Prerequisite>
where Accepted: UnwindSafe, Item: UnwindSafe, Rejection: UnwindSafe, Prerequisite: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

Source§

type Error = Infallible

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

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

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.