pub struct PostedMessage {
pub authenticated_signer: Option<Owner>,
pub grant: Amount,
pub refund_grant_to: Option<Account>,
pub kind: MessageKind,
pub index: u32,
pub message: Message,
}
Expand description
A message together with kind, authentication and grant information.
Fields§
§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 message being sent.
index: u32
The index of the message in the sending block.
message: Message
The message itself.
Implementations§
Source§impl PostedMessage
impl PostedMessage
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 index(&self, ctx: &Context<'_>) -> Result<&u32>
pub async fn message(&self, ctx: &Context<'_>) -> Result<&Message>
Source§impl PostedMessage
impl PostedMessage
pub fn is_skippable(&self) -> bool
pub fn is_protected(&self) -> bool
pub fn is_tracked(&self) -> bool
pub fn is_bouncing(&self) -> bool
Trait Implementations§
Source§impl Clone for PostedMessage
impl Clone for PostedMessage
Source§fn clone(&self) -> PostedMessage
fn clone(&self) -> PostedMessage
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 PostedMessage
impl ContainerType for PostedMessage
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 PostedMessage
impl Debug for PostedMessage
Source§impl<'de> Deserialize<'de> for PostedMessage
impl<'de> Deserialize<'de> for PostedMessage
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 PostedMessage
impl Hash for PostedMessage
Source§impl OutputType for PostedMessage
impl OutputType for PostedMessage
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 PostedMessage
impl PartialEq for PostedMessage
Source§impl Serialize for PostedMessage
impl Serialize for PostedMessage
impl Eq for PostedMessage
impl ObjectType for PostedMessage
impl StructuralPartialEq for PostedMessage
Auto Trait Implementations§
impl Freeze for PostedMessage
impl RefUnwindSafe for PostedMessage
impl Send for PostedMessage
impl Sync for PostedMessage
impl Unpin for PostedMessage
impl UnwindSafe for PostedMessage
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<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
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
.