pub struct BlockBody {
pub transactions: Vec<Transaction>,
pub messages: Vec<Vec<OutgoingMessage>>,
pub previous_message_blocks: BTreeMap<ChainId, (CryptoHash, BlockHeight)>,
pub previous_event_blocks: BTreeMap<StreamId, (CryptoHash, BlockHeight)>,
pub oracle_responses: Vec<Vec<OracleResponse>>,
pub events: Vec<Vec<Event>>,
pub blobs: Vec<Vec<Blob>>,
pub operation_results: Vec<OperationResult>,
}Expand description
The body of a block containing all the data included in the block.
Fields§
§transactions: Vec<Transaction>The transactions to execute in this block. Each transaction can be either incoming messages or an operation.
messages: Vec<Vec<OutgoingMessage>>The list of outgoing messages for each transaction.
previous_message_blocks: BTreeMap<ChainId, (CryptoHash, BlockHeight)>The hashes and heights of previous blocks that sent messages to the same recipients.
previous_event_blocks: BTreeMap<StreamId, (CryptoHash, BlockHeight)>The hashes and heights of previous blocks that published events to the same channels.
oracle_responses: Vec<Vec<OracleResponse>>The record of oracle responses for each transaction.
events: Vec<Vec<Event>>The list of events produced by each transaction.
blobs: Vec<Vec<Blob>>The list of blobs produced by each transaction.
operation_results: Vec<OperationResult>The execution result for each operation.
Implementations§
Source§impl BlockBody
impl BlockBody
pub async fn messages( &self, ctx: &Context<'_>, ) -> Result<&Vec<Vec<OutgoingMessage>>>
pub async fn previous_message_blocks( &self, ctx: &Context<'_>, ) -> Result<&BTreeMap<ChainId, (CryptoHash, BlockHeight)>>
pub async fn previous_event_blocks( &self, ctx: &Context<'_>, ) -> Result<&BTreeMap<StreamId, (CryptoHash, BlockHeight)>>
pub async fn oracle_responses( &self, ctx: &Context<'_>, ) -> Result<&Vec<Vec<OracleResponse>>>
pub async fn events(&self, ctx: &Context<'_>) -> Result<&Vec<Vec<Event>>>
pub async fn blobs(&self, ctx: &Context<'_>) -> Result<&Vec<Vec<Blob>>>
pub async fn operation_results( &self, ctx: &Context<'_>, ) -> Result<&Vec<OperationResult>>
Source§impl BlockBody
impl BlockBody
Sourcepub fn operations(&self) -> impl Iterator<Item = &Operation>
pub fn operations(&self) -> impl Iterator<Item = &Operation>
Returns all operations in this block body.
Sourcepub fn incoming_bundles(&self) -> impl Iterator<Item = &IncomingBundle>
pub fn incoming_bundles(&self) -> impl Iterator<Item = &IncomingBundle>
Returns all incoming bundles in this block body.
Trait Implementations§
Source§impl Allocative for BlockBody
impl Allocative for BlockBody
Source§impl ContainerType for BlockBody
impl ContainerType for BlockBody
Source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async_graphql::Value. Read moreSource§fn collect_all_fields<'a>(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>,
) -> Result<(), ServerError>
fn collect_all_fields<'a>( &'a self, ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>, fields: &mut Fields<'a>, ) -> Result<(), ServerError>
Source§fn find_entity(
&self,
_: &ContextBase<'_, &Positioned<Field>>,
_params: &ConstValue,
) -> impl Future<Output = Result<Option<ConstValue>, ServerError>> + Send
fn find_entity( &self, _: &ContextBase<'_, &Positioned<Field>>, _params: &ConstValue, ) -> impl Future<Output = Result<Option<ConstValue>, ServerError>> + Send
Source§impl<'de> Deserialize<'de> for BlockBody
impl<'de> Deserialize<'de> for BlockBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl OutputType for BlockBody
impl OutputType for BlockBody
Source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>,
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>
async_graphql::Value.Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
impl Eq for BlockBody
impl ObjectType for BlockBody
impl StructuralPartialEq for BlockBody
Auto Trait Implementations§
impl Freeze for BlockBody
impl RefUnwindSafe for BlockBody
impl Send for BlockBody
impl Sync for BlockBody
impl Unpin for BlockBody
impl UnsafeUnpin for BlockBody
impl UnwindSafe for BlockBody
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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.