MsgClient

Struct MsgClient 

pub struct MsgClient<T> { /* private fields */ }
Expand description

Msg defines the Msg service.

Implementations§

§

impl MsgClient<Channel>

pub async fn connect<D>(dst: D) -> Result<MsgClient<Channel>, Error>
where D: TryInto<Endpoint>, <D as TryInto<Endpoint>>::Error: Into<Box<dyn Error + Sync + Send>>,

Attempt to create a new client by connecting to a given endpoint.

§

impl<T> MsgClient<T>
where T: GrpcService<Body>, <T as GrpcService<Body>>::Error: Into<Box<dyn Error + Sync + Send>>, <T as GrpcService<Body>>::ResponseBody: Body<Data = Bytes> + Send + 'static, <<T as GrpcService<Body>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Sync + Send>> + Send,

pub fn new(inner: T) -> MsgClient<T>

pub fn with_origin(inner: T, origin: Uri) -> MsgClient<T>

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> MsgClient<InterceptedService<T, F>>
where F: Interceptor, <T as GrpcService<Body>>::ResponseBody: Default, T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>, <T as Service<Request<Body>>>::Error: Into<Box<dyn Error + Sync + Send>> + Send + Sync,

pub fn send_compressed(self, encoding: CompressionEncoding) -> MsgClient<T>

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

pub fn accept_compressed(self, encoding: CompressionEncoding) -> MsgClient<T>

Enable decompressing responses.

pub fn max_decoding_message_size(self, limit: usize) -> MsgClient<T>

Limits the maximum size of a decoded message.

Default: 4MB

pub fn max_encoding_message_size(self, limit: usize) -> MsgClient<T>

Limits the maximum size of an encoded message.

Default: usize::MAX

pub async fn proposed_operations( &mut self, request: impl IntoRequest<MsgProposedOperations>, ) -> Result<Response<MsgProposedOperationsResponse>, Status>

ProposedOperations is a temporary message used by block proposers for matching orders as part of the ABCI++ workaround.

pub async fn place_order( &mut self, request: impl IntoRequest<MsgPlaceOrder>, ) -> Result<Response<MsgPlaceOrderResponse>, Status>

PlaceOrder allows accounts to place orders on the orderbook.

pub async fn cancel_order( &mut self, request: impl IntoRequest<MsgCancelOrder>, ) -> Result<Response<MsgCancelOrderResponse>, Status>

CancelOrder allows accounts to cancel existing orders on the orderbook.

pub async fn batch_cancel( &mut self, request: impl IntoRequest<MsgBatchCancel>, ) -> Result<Response<MsgBatchCancelResponse>, Status>

BatchCancel allows accounts to cancel a batch of orders on the orderbook.

pub async fn create_clob_pair( &mut self, request: impl IntoRequest<MsgCreateClobPair>, ) -> Result<Response<MsgCreateClobPairResponse>, Status>

CreateClobPair creates a new clob pair.

pub async fn update_clob_pair( &mut self, request: impl IntoRequest<MsgUpdateClobPair>, ) -> Result<Response<MsgUpdateClobPairResponse>, Status>

UpdateClobPair sets the status of a clob pair. Should return an error if the authority is not in the clob keeper’s set of authorities, if the ClobPair id is not found in state, or if the update includes an unsupported status transition.

pub async fn update_equity_tier_limit_configuration( &mut self, request: impl IntoRequest<MsgUpdateEquityTierLimitConfiguration>, ) -> Result<Response<MsgUpdateEquityTierLimitConfigurationResponse>, Status>

UpdateEquityTierLimitConfiguration updates the equity tier limit configuration in state.

pub async fn update_block_rate_limit_configuration( &mut self, request: impl IntoRequest<MsgUpdateBlockRateLimitConfiguration>, ) -> Result<Response<MsgUpdateBlockRateLimitConfigurationResponse>, Status>

UpdateBlockRateLimitConfiguration updates the block rate limit configuration in state.

pub async fn update_liquidations_config( &mut self, request: impl IntoRequest<MsgUpdateLiquidationsConfig>, ) -> Result<Response<MsgUpdateLiquidationsConfigResponse>, Status>

UpdateLiquidationsConfig updates the liquidations configuration in state.

Trait Implementations§

§

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

§

fn clone(&self) -> MsgClient<T>

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
§

impl<T> Debug for MsgClient<T>
where T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for MsgClient<T>

§

impl<T> RefUnwindSafe for MsgClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for MsgClient<T>
where T: Send,

§

impl<T> Sync for MsgClient<T>
where T: Sync,

§

impl<T> Unpin for MsgClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for MsgClient<T>
where T: UnwindSafe,

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

§

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

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

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

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

§

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
§

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
§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> Ungil for T
where T: Send,