pub struct Action {
pub sender: AccountNumber,
pub service: AccountNumber,
pub method: MethodNumber,
pub rawData: Hex<Vec<u8>>,
}Expand description
A synchronous call
An Action represents a synchronous call between services. It is the argument to crate::native_raw::call and can be fetched using crate::native_raw::getCurrentAction.
Transactions also contains actions requested by the transaction authorizers.
Fields§
§sender: AccountNumberAccount sending the action
service: AccountNumberService to execute the action
method: MethodNumberService method to execute
rawData: Hex<Vec<u8>>Data for the method
Implementations§
Source§impl Action
impl Action
pub async fn sender(&self, ctx: &Context<'_>) -> Result<&AccountNumber>
pub async fn service(&self, ctx: &Context<'_>) -> Result<&AccountNumber>
pub async fn method(&self, ctx: &Context<'_>) -> Result<&MethodNumber>
pub async fn rawData(&self, ctx: &Context<'_>) -> Result<&Hex<Vec<u8>>>
Trait Implementations§
Source§impl ActionGroup for Action
impl ActionGroup for Action
Source§impl ContainerType for Action
impl ContainerType for Action
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<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
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 InputType for Action
impl InputType for Action
Source§type RawValueType = Action
type RawValueType = Action
The raw type used for validator. Read more
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§fn parse(value: Option<Value>) -> InputValueResult<Self>
fn parse(value: Option<Value>) -> InputValueResult<Self>
Parse from
Value. None represents undefined.Source§fn as_raw_value(&self) -> Option<&Self::RawValueType>
fn as_raw_value(&self) -> Option<&Self::RawValueType>
Returns a reference to the raw value.
Source§fn qualified_type_name() -> String
fn qualified_type_name() -> String
Qualified typename.
Source§impl OutputType for Action
impl OutputType for Action
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<'a> Unpack<'a> for Action
impl<'a> Unpack<'a> for Action
Source§fn unpack(src: &'a [u8], pos: &mut u32) -> Result<Self>
fn unpack(src: &'a [u8], pos: &mut u32) -> Result<Self>
Convert from fracpack format. Also verifies the integrity of the data. Read more
Source§fn verify(src: &'a [u8], pos: &mut u32) -> Result<()>
fn verify(src: &'a [u8], pos: &mut u32) -> Result<()>
Verify the integrity of fracpack data. You don’t need to call this if
using [Pack::unpack] since it verifies integrity during unpack.
impl Eq for Action
impl InputObjectType for Action
impl ObjectType for Action
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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<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.