pub struct ExecutionOutput<T> { /* private fields */ }Expand description
Output value paired with the receipt for its execution.
Implementations§
Source§impl<T> ExecutionOutput<T>
impl<T> ExecutionOutput<T>
Sourcepub const fn new(output: T, receipt: ExecutionReceipt) -> Self
pub const fn new(output: T, receipt: ExecutionReceipt) -> Self
Creates an output/receipt pair.
Sourcepub const fn receipt(&self) -> &ExecutionReceipt
pub const fn receipt(&self) -> &ExecutionReceipt
Borrows the execution receipt.
Sourcepub fn into_parts(self) -> (T, ExecutionReceipt)
pub fn into_parts(self) -> (T, ExecutionReceipt)
Splits the output and receipt without cloning either value.
Sourcepub fn into_output(self) -> T
pub fn into_output(self) -> T
Returns only the algorithm output.
Sourcepub fn map<U>(self, map: impl FnOnce(T) -> U) -> ExecutionOutput<U>
pub fn map<U>(self, map: impl FnOnce(T) -> U) -> ExecutionOutput<U>
Maps the output while preserving its execution receipt.
Trait Implementations§
Source§impl<T: Clone> Clone for ExecutionOutput<T>
impl<T: Clone> Clone for ExecutionOutput<T>
Source§fn clone(&self) -> ExecutionOutput<T>
fn clone(&self) -> ExecutionOutput<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for ExecutionOutput<T>
impl<T: Debug> Debug for ExecutionOutput<T>
Source§impl<T: PartialEq> PartialEq for ExecutionOutput<T>
impl<T: PartialEq> PartialEq for ExecutionOutput<T>
Source§fn eq(&self, other: &ExecutionOutput<T>) -> bool
fn eq(&self, other: &ExecutionOutput<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T> StructuralPartialEq for ExecutionOutput<T>
Auto Trait Implementations§
impl<T> Freeze for ExecutionOutput<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExecutionOutput<T>where
T: RefUnwindSafe,
impl<T> Send for ExecutionOutput<T>where
T: Send,
impl<T> Sync for ExecutionOutput<T>where
T: Sync,
impl<T> Unpin for ExecutionOutput<T>where
T: Unpin,
impl<T> UnsafeUnpin for ExecutionOutput<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ExecutionOutput<T>where
T: 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