pub struct MsgClient<T> { /* private fields */ }
Available on crate features
cosmwasm
and grpc
only.Implementations§
Source§impl<T> MsgClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> MsgClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MsgClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn store_code( &mut self, request: impl IntoRequest<MsgStoreCode>, ) -> Result<Response<MsgStoreCodeResponse>, Status>
pub async fn instantiate_contract( &mut self, request: impl IntoRequest<MsgInstantiateContract>, ) -> Result<Response<MsgInstantiateContractResponse>, Status>
pub async fn instantiate_contract2( &mut self, request: impl IntoRequest<MsgInstantiateContract2>, ) -> Result<Response<MsgInstantiateContract2Response>, Status>
pub async fn execute_contract( &mut self, request: impl IntoRequest<MsgExecuteContract>, ) -> Result<Response<MsgExecuteContractResponse>, Status>
pub async fn migrate_contract( &mut self, request: impl IntoRequest<MsgMigrateContract>, ) -> Result<Response<MsgMigrateContractResponse>, Status>
pub async fn update_admin( &mut self, request: impl IntoRequest<MsgUpdateAdmin>, ) -> Result<Response<MsgUpdateAdminResponse>, Status>
pub async fn clear_admin( &mut self, request: impl IntoRequest<MsgClearAdmin>, ) -> Result<Response<MsgClearAdminResponse>, Status>
pub async fn update_instantiate_config( &mut self, request: impl IntoRequest<MsgUpdateInstantiateConfig>, ) -> Result<Response<MsgUpdateInstantiateConfigResponse>, Status>
pub async fn update_params( &mut self, request: impl IntoRequest<MsgUpdateParams>, ) -> Result<Response<MsgUpdateParamsResponse>, Status>
pub async fn sudo_contract( &mut self, request: impl IntoRequest<MsgSudoContract>, ) -> Result<Response<MsgSudoContractResponse>, Status>
pub async fn pin_codes( &mut self, request: impl IntoRequest<MsgPinCodes>, ) -> Result<Response<MsgPinCodesResponse>, Status>
pub async fn unpin_codes( &mut self, request: impl IntoRequest<MsgUnpinCodes>, ) -> Result<Response<MsgUnpinCodesResponse>, Status>
pub async fn store_and_instantiate_contract( &mut self, request: impl IntoRequest<MsgStoreAndInstantiateContract>, ) -> Result<Response<MsgStoreAndInstantiateContractResponse>, Status>
pub async fn remove_code_upload_params_addresses( &mut self, request: impl IntoRequest<MsgRemoveCodeUploadParamsAddresses>, ) -> Result<Response<MsgRemoveCodeUploadParamsAddressesResponse>, Status>
pub async fn add_code_upload_params_addresses( &mut self, request: impl IntoRequest<MsgAddCodeUploadParamsAddresses>, ) -> Result<Response<MsgAddCodeUploadParamsAddressesResponse>, Status>
pub async fn store_and_migrate_contract( &mut self, request: impl IntoRequest<MsgStoreAndMigrateContract>, ) -> Result<Response<MsgStoreAndMigrateContractResponse>, Status>
pub async fn update_contract_label( &mut self, request: impl IntoRequest<MsgUpdateContractLabel>, ) -> Result<Response<MsgUpdateContractLabelResponse>, Status>
Trait Implementations§
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§
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<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request