Struct GrpcClient

Source
pub struct GrpcClient<S> { /* private fields */ }

Implementations§

Source§

impl<S> GrpcClient<S>

Source

pub fn new(endpoint: Endpoint, signer: Option<Arc<S>>) -> M10Result<Self>

Source

pub fn new_with_access_token( endpoint: Endpoint, signer: Option<Arc<S>>, access_token: Option<&str>, ) -> M10Result<Self>

Source

pub async fn connect( endpoint: Endpoint, signer: Option<Arc<S>>, ) -> M10Result<Self>

Trait Implementations§

Source§

impl<S> Clone for GrpcClient<S>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<S: Signer> M10CoreClient for GrpcClient<S>

Source§

type Signer = S

Source§

fn signer(&self) -> M10Result<Arc<S>>

Source§

fn set_signer(&mut self, signer: Arc<Self::Signer>)

Source§

fn create_transaction<'life0, 'async_trait>( &'life0 self, payload: RequestEnvelope, ) -> Pin<Box<dyn Future<Output = M10Result<TransactionResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn bulk_create_transactions<'life0, 'async_trait>( &'life0 self, payload: BulkTransactions, ) -> Pin<Box<dyn Future<Output = M10Result<BulkTransactionsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_block_height<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = M10Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_offline_key<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_account<'life0, 'async_trait>( &'life0 self, id: AccountId, ) -> Pin<Box<dyn Future<Output = M10Result<Account>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_indexed_account<'life0, 'async_trait>( &'life0 self, id: AccountId, ) -> Pin<Box<dyn Future<Output = M10Result<IndexedAccount>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_account_info<'life0, 'async_trait>( &'life0 self, id: AccountId, ) -> Pin<Box<dyn Future<Output = M10Result<AccountInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_raw_account_info<'life0, 'async_trait>( &'life0 self, id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<AccountInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_accounts<'life0, 'async_trait>( &'life0 self, filter: PageBuilder<Vec<u8>, NameOrOwnerFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<Account>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_transfer<'life0, 'async_trait>( &'life0 self, tx_id: TxId, ) -> Pin<Box<dyn Future<Output = M10Result<Transfer>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_raw_transfer<'life0, 'async_trait>( &'life0 self, tx_id: TxId, ) -> Pin<Box<dyn Future<Output = M10Result<FinalizedTransfer>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_enhanced_transfer<'life0, 'async_trait>( &'life0 self, tx_id: TxId, ) -> Pin<Box<dyn Future<Output = M10Result<ExpandedTransfer>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_enhanced_transfers<'life0, 'async_trait>( &'life0 self, filter: TxnFilter<TransferFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<ExpandedTransfer>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_transfers<'life0, 'async_trait>( &'life0 self, filter: TxnFilter<TransferFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<Transfer>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_raw_transfers<'life0, 'async_trait>( &'life0 self, filter: TxnFilter<TransferFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<FinalizedTransfers>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_action<'life0, 'async_trait>( &'life0 self, tx_id: TxId, ) -> Pin<Box<dyn Future<Output = M10Result<Action>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_actions<'life0, 'async_trait>( &'life0 self, filter: TxnFilter<ActionsFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<Action>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_transactions<'life0, 'async_trait>( &'life0 self, filter: TxnFilter<ContextFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<Transaction>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn group_transactions<'life0, 'async_trait>( &'life0 self, filter: TxnFilter<GroupingFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<Vec<Transaction>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_bank<'life0, 'async_trait>( &'life0 self, id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<Bank>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_banks<'life0, 'async_trait>( &'life0 self, builder: PageBuilder<Vec<u8>>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<Bank>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_role<'life0, 'async_trait>( &'life0 self, id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<Role>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_roles<'life0, 'async_trait>( &'life0 self, builder: PageBuilder<Vec<u8>, NameFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<Role>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_role_binding<'life0, 'async_trait>( &'life0 self, id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<RoleBinding>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_role_bindings<'life0, 'async_trait>( &'life0 self, builder: PageBuilder<Vec<u8>, NameFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<RoleBinding>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_account_set<'life0, 'async_trait>( &'life0 self, id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<AccountSet>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_account_sets<'life0, 'async_trait>( &'life0 self, builder: PageBuilder<Vec<u8>, NameOrOwnerFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<AccountSet>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_account_metadata<'life0, 'async_trait>( &'life0 self, id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<AccountMetadata>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_account_metadata<'life0, 'async_trait>( &'life0 self, builder: PageBuilder<Vec<u8>, NameOrOwnerFilter>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<AccountMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observe_accounts<'life0, 'async_trait>( &'life0 self, filter: AccountFilter, ) -> Pin<Box<dyn Future<Output = M10Result<Pin<Box<dyn Stream<Item = M10Result<Vec<AccountUpdate>>> + Send + Sync + 'static>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observe_transfers<'life0, 'async_trait>( &'life0 self, filter: AccountFilter, ) -> Pin<Box<dyn Future<Output = M10Result<Pin<Box<dyn Stream<Item = M10Result<Vec<Transfer>>> + Send + Sync + 'static>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observe_transactions<'life0, 'async_trait>( &'life0 self, filter: AccountFilter, ) -> Pin<Box<dyn Future<Output = M10Result<Pin<Box<dyn Stream<Item = M10Result<FinalizedTransactions>> + Send + Sync + 'static>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observe_actions<'life0, 'async_trait>( &'life0 self, filter: AccountFilter<NamedAction>, ) -> Pin<Box<dyn Future<Output = M10Result<Pin<Box<dyn Stream<Item = M10Result<Vec<Action>>> + Send + Sync + 'static>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observe_raw_actions<'life0, 'async_trait>( &'life0 self, filter: AccountFilter<NamedAction>, ) -> Pin<Box<dyn Future<Output = M10Result<Pin<Box<dyn Stream<Item = M10Result<FinalizedTransactions>> + Send + Sync + 'static>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observe_resources<'life0, 'async_trait>( &'life0 self, request: ObserveResourcesRequest, ) -> Pin<Box<dyn Future<Output = M10Result<Pin<Box<dyn Stream<Item = M10Result<FinalizedTransactions>> + Send + Sync + 'static>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn observe_metrics<'life0, 'async_trait>( &'life0 self, filter: AccountFilter, ) -> Pin<Box<dyn Future<Output = M10Result<Pin<Box<dyn Stream<Item = M10Result<TransactionMetrics>> + Send + Sync + 'static>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn signed_transaction<'life0, 'async_trait>( &'life0 self, data: Data, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<SignedRequest<TransactionRequestPayload>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn transfer<'life0, 'async_trait>( &'life0 self, data: CreateTransfer, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn create_account<'life0, 'async_trait>( &'life0 self, data: CreateLedgerAccount, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<(TxId, AccountId)>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn initiate_transfer<'life0, 'async_trait>( &'life0 self, data: CreateTransfer, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn commit_transfer<'life0, 'async_trait>( &'life0 self, tx_id: TxId, accept: bool, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn freeze_account<'life0, 'async_trait>( &'life0 self, account_id: AccountId, frozen: bool, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn set_account_limit<'life0, 'async_trait>( &'life0 self, account_id: AccountId, limit: u64, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn set_account_instrument<'life0, 'async_trait>( &'life0 self, account_id: AccountId, code: String, decimals: u32, description: Option<String>, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn action<'life0, 'async_trait>( &'life0 self, data: InvokeAction, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn documents<'life0, 'async_trait>( &'life0 self, data: DocumentOperations, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn create_token<'life0, 'async_trait>( &'life0 self, account: AccountId, value: u64, address: Option<Vec<u8>>, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<(TxId, Option<OfflineToken>)>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn redeem_token<'life0, 'async_trait>( &'life0 self, token: RedeemableToken, account_id: AccountId, context_id: Vec<u8>, ) -> Pin<Box<dyn Future<Output = M10Result<TxId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn enhance_transfers<'life0, 'async_trait>( &'life0 self, transfers: Vec<FinalizedTransfer>, ) -> Pin<Box<dyn Future<Output = M10Result<Vec<EnhancedTransfer>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn enhance_transfer<'life0, 'async_trait>( &'life0 self, transfer: FinalizedTransfer, ) -> Pin<Box<dyn Future<Output = M10Result<EnhancedTransfer>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Source§

fn enhance_transfer_step<'life0, 'life1, 'async_trait>( &'life0 self, transfer_step: &'life1 TransferStep, ) -> Pin<Box<dyn Future<Output = M10Result<EnhancedTransferStep>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Auto Trait Implementations§

§

impl<S> !Freeze for GrpcClient<S>

§

impl<S> !RefUnwindSafe for GrpcClient<S>

§

impl<S> Send for GrpcClient<S>
where S: Sync + Send,

§

impl<S> Sync for GrpcClient<S>
where S: Sync + Send,

§

impl<S> Unpin for GrpcClient<S>

§

impl<S> !UnwindSafe for GrpcClient<S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> IntoResult<T> for T

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,