pub struct PostedMessage {
pub authenticated_signer: Option<AccountOwner>,
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<AccountOwner>The user authentication carried by the message, if any.
grant: AmountA 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: MessageKindThe kind of message being sent.
index: u32The index of the message in the sending block.
message: MessageThe message itself.
Implementations§
Source§impl PostedMessage
impl PostedMessage
Sourcepub fn estimated_size(&self) -> usize
pub fn estimated_size(&self) -> usize
Returns a rough estimate of the serialized size in bytes.
Source§impl PostedMessage
impl PostedMessage
pub async fn authenticated_signer( &self, ctx: &Context<'_>, ) -> Result<&Option<AccountOwner>>
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
Sourcepub fn is_skippable(&self) -> bool
pub fn is_skippable(&self) -> bool
Returns whether this message can be skipped.
Sourcepub fn is_protected(&self) -> bool
pub fn is_protected(&self) -> bool
Returns whether this message is protected.
Sourcepub fn is_tracked(&self) -> bool
pub fn is_tracked(&self) -> bool
Returns whether this message is tracked.
Sourcepub fn is_bouncing(&self) -> bool
pub fn is_bouncing(&self) -> bool
Returns whether this message is bouncing.
Trait Implementations§
Source§impl Allocative for PostedMessage
impl Allocative for PostedMessage
Source§impl Clone for PostedMessage
impl Clone for PostedMessage
Source§fn clone(&self) -> PostedMessage
fn clone(&self) -> PostedMessage
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 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
impl Eq for PostedMessage
Source§impl Hash for PostedMessage
impl Hash for PostedMessage
impl ObjectType 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 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 UnsafeUnpin for PostedMessage
impl UnwindSafe for PostedMessage
Blanket Implementations§
impl<_INNER> AutoTraits for _INNER
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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 moreimpl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
impl<T> Post for Twhere
T: Send + 'static,
Source§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.