Struct linera_chain::data_types::OutgoingMessage
source · pub struct OutgoingMessage {
pub destination: Destination,
pub authenticated_signer: Option<Owner>,
pub grant: Amount,
pub refund_grant_to: Option<Account>,
pub kind: MessageKind,
pub message: Message,
}
Expand description
A message together with routing information.
Fields§
§destination: Destination
The destination of the message.
authenticated_signer: Option<Owner>
The user authentication carried by the message, if any.
grant: Amount
A grant to pay for the message execution.
refund_grant_to: Option<Account>
Where to send a refund for the unused part of the grant after execution, if any.
kind: MessageKind
The kind of event being sent.
message: Message
The message itself.
Implementations§
source§impl OutgoingMessage
impl OutgoingMessage
pub async fn destination(&self, ctx: &Context<'_>) -> Result<&Destination>
pub async fn authenticated_signer( &self, ctx: &Context<'_> ) -> Result<&Option<Owner>>
pub async fn grant(&self, ctx: &Context<'_>) -> Result<&Amount>
pub async fn refund_grant_to( &self, ctx: &Context<'_> ) -> Result<&Option<Account>>
pub async fn kind(&self, ctx: &Context<'_>) -> Result<&MessageKind>
pub async fn message(&self, ctx: &Context<'_>) -> Result<&Message>
source§impl OutgoingMessage
impl OutgoingMessage
sourcepub fn has_destination(&self, medium: &Medium, recipient: ChainId) -> bool
pub fn has_destination(&self, medium: &Medium, recipient: ChainId) -> bool
Returns whether this message is sent via the given medium to the specified recipient. If the medium is a channel, does not verify that the recipient is actually subscribed to that channel.
Trait Implementations§
source§impl Clone for OutgoingMessage
impl Clone for OutgoingMessage
source§fn clone(&self) -> OutgoingMessage
fn clone(&self) -> OutgoingMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ContainerType for OutgoingMessage
impl ContainerType for OutgoingMessage
source§async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
async fn resolve_field(&self, ctx: &Context<'_>) -> ServerResult<Option<Value>>
Resolves a field value and outputs it as a json 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>
Collect all the fields of the container that are queried in the
selection set. Read more
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
Find the GraphQL entity with the given name from the parameter. Read more
source§impl Debug for OutgoingMessage
impl Debug for OutgoingMessage
source§impl<'de> Deserialize<'de> for OutgoingMessage
impl<'de> Deserialize<'de> for OutgoingMessage
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for OutgoingMessage
impl Hash for OutgoingMessage
source§impl OutputType for OutgoingMessage
impl OutputType for OutgoingMessage
source§fn create_type_info(registry: &mut Registry) -> String
fn create_type_info(registry: &mut Registry) -> String
Create type information in the registry and return qualified typename.
source§async fn resolve(
&self,
ctx: &ContextSelectionSet<'_>,
_field: &Positioned<Field>
) -> ServerResult<Value>
async fn resolve( &self, ctx: &ContextSelectionSet<'_>, _field: &Positioned<Field> ) -> ServerResult<Value>
Resolve an output value to
async_graphql::Value
.source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
source§impl PartialEq for OutgoingMessage
impl PartialEq for OutgoingMessage
source§fn eq(&self, other: &OutgoingMessage) -> bool
fn eq(&self, other: &OutgoingMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for OutgoingMessage
impl Serialize for OutgoingMessage
impl Eq for OutgoingMessage
impl ObjectType for OutgoingMessage
impl StructuralPartialEq for OutgoingMessage
Auto Trait Implementations§
impl Freeze for OutgoingMessage
impl RefUnwindSafe for OutgoingMessage
impl Send for OutgoingMessage
impl Sync for OutgoingMessage
impl Unpin for OutgoingMessage
impl UnwindSafe for OutgoingMessage
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key
and return true
if they are equal.