pub struct RawExecutionOutcome<Message, Grant = Resources> {
pub authenticated_signer: Option<Owner>,
pub refund_grant_to: Option<Account>,
pub messages: Vec<RawOutgoingMessage<Message, Grant>>,
pub events: Vec<(StreamName, Vec<u8>, Vec<u8>)>,
pub subscribe: Vec<(ChannelName, ChainId)>,
pub unsubscribe: Vec<(ChannelName, ChainId)>,
}
Expand description
Externally visible results of an execution. These results are meant in the context of the application that created them.
Fields§
§authenticated_signer: Option<Owner>
The signer who created the messages.
refund_grant_to: Option<Account>
Where to send a refund for the unused part of each grant after execution, if any.
messages: Vec<RawOutgoingMessage<Message, Grant>>
Sends messages to the given destinations, possibly forwarding the authenticated signer and including grant with the refund policy described above.
events: Vec<(StreamName, Vec<u8>, Vec<u8>)>
Events recorded by contracts’ emit
calls.
subscribe: Vec<(ChannelName, ChainId)>
Subscribe chains to channels.
unsubscribe: Vec<(ChannelName, ChainId)>
Unsubscribe chains to channels.
Implementations§
Source§impl<Message, Grant> RawExecutionOutcome<Message, Grant>
impl<Message, Grant> RawExecutionOutcome<Message, Grant>
pub fn with_authenticated_signer( self, authenticated_signer: Option<Owner>, ) -> Self
pub fn with_refund_grant_to(self, refund_grant_to: Option<Account>) -> Self
Sourcepub fn with_message(self, message: RawOutgoingMessage<Message, Grant>) -> Self
pub fn with_message(self, message: RawOutgoingMessage<Message, Grant>) -> Self
Adds a message
to this RawExecutionOutcome
.
Source§impl<Message> RawExecutionOutcome<Message, Resources>
impl<Message> RawExecutionOutcome<Message, Resources>
pub fn into_priced( self, policy: &ResourceControlPolicy, ) -> Result<RawExecutionOutcome<Message, Amount>, ArithmeticError>
Trait Implementations§
Source§impl<Message, Grant> Debug for RawExecutionOutcome<Message, Grant>
impl<Message, Grant> Debug for RawExecutionOutcome<Message, Grant>
Auto Trait Implementations§
impl<Message, Grant> Freeze for RawExecutionOutcome<Message, Grant>
impl<Message, Grant> RefUnwindSafe for RawExecutionOutcome<Message, Grant>where
Grant: RefUnwindSafe,
Message: RefUnwindSafe,
impl<Message, Grant> Send for RawExecutionOutcome<Message, Grant>
impl<Message, Grant> Sync for RawExecutionOutcome<Message, Grant>
impl<Message, Grant> Unpin for RawExecutionOutcome<Message, Grant>
impl<Message, Grant> UnwindSafe for RawExecutionOutcome<Message, Grant>where
Grant: UnwindSafe,
Message: 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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.