pub struct MsgClient<T> { /* private fields */ }
Expand description
Msg defines the staking Msg service.
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
sourcepub async fn create_validator(
&mut self,
request: impl IntoRequest<MsgCreateValidator>
) -> Result<Response<MsgCreateValidatorResponse>, Status>
pub async fn create_validator( &mut self, request: impl IntoRequest<MsgCreateValidator> ) -> Result<Response<MsgCreateValidatorResponse>, Status>
CreateValidator defines a method for creating a new validator.
sourcepub async fn edit_validator(
&mut self,
request: impl IntoRequest<MsgEditValidator>
) -> Result<Response<MsgEditValidatorResponse>, Status>
pub async fn edit_validator( &mut self, request: impl IntoRequest<MsgEditValidator> ) -> Result<Response<MsgEditValidatorResponse>, Status>
EditValidator defines a method for editing an existing validator.
sourcepub async fn delegate(
&mut self,
request: impl IntoRequest<MsgDelegate>
) -> Result<Response<MsgDelegateResponse>, Status>
pub async fn delegate( &mut self, request: impl IntoRequest<MsgDelegate> ) -> Result<Response<MsgDelegateResponse>, Status>
Delegate defines a method for performing a delegation of coins from a delegator to a validator.
sourcepub async fn begin_redelegate(
&mut self,
request: impl IntoRequest<MsgBeginRedelegate>
) -> Result<Response<MsgBeginRedelegateResponse>, Status>
pub async fn begin_redelegate( &mut self, request: impl IntoRequest<MsgBeginRedelegate> ) -> Result<Response<MsgBeginRedelegateResponse>, Status>
BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator.
sourcepub async fn undelegate(
&mut self,
request: impl IntoRequest<MsgUndelegate>
) -> Result<Response<MsgUndelegateResponse>, Status>
pub async fn undelegate( &mut self, request: impl IntoRequest<MsgUndelegate> ) -> Result<Response<MsgUndelegateResponse>, Status>
Undelegate defines a method for performing an undelegation from a delegate and a validator.
sourcepub async fn cancel_unbonding_delegation(
&mut self,
request: impl IntoRequest<MsgCancelUnbondingDelegation>
) -> Result<Response<MsgCancelUnbondingDelegationResponse>, Status>
pub async fn cancel_unbonding_delegation( &mut self, request: impl IntoRequest<MsgCancelUnbondingDelegation> ) -> Result<Response<MsgCancelUnbondingDelegationResponse>, Status>
CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation and delegate back to previous validator.
Since: cosmos-sdk 0.46
sourcepub async fn update_params(
&mut self,
request: impl IntoRequest<MsgUpdateParams>
) -> Result<Response<MsgUpdateParamsResponse>, Status>
pub async fn update_params( &mut self, request: impl IntoRequest<MsgUpdateParams> ) -> Result<Response<MsgUpdateParamsResponse>, Status>
UpdateParams defines an operation for updating the x/staking module parameters. Since: cosmos-sdk 0.47
Trait Implementations§
Auto Trait Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
T
in a tonic::Request