pub struct VmClient<T> { /* private fields */ }
Implementations§
source§impl<T> VmClient<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> VmClient<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
) -> VmClient<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.
pub async fn initialize(
&mut self,
request: impl IntoRequest<InitializeRequest>
) -> Result<Response<InitializeResponse>, Status>
pub async fn set_state(
&mut self,
request: impl IntoRequest<SetStateRequest>
) -> Result<Response<SetStateResponse>, Status>
pub async fn shutdown(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<Empty>, Status>
pub async fn create_handlers(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<CreateHandlersResponse>, Status>
pub async fn create_static_handlers(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<CreateStaticHandlersResponse>, Status>
pub async fn connected(
&mut self,
request: impl IntoRequest<ConnectedRequest>
) -> Result<Response<Empty>, Status>
pub async fn disconnected(
&mut self,
request: impl IntoRequest<DisconnectedRequest>
) -> Result<Response<Empty>, Status>
pub async fn build_block(
&mut self,
request: impl IntoRequest<BuildBlockRequest>
) -> Result<Response<BuildBlockResponse>, Status>
pub async fn parse_block(
&mut self,
request: impl IntoRequest<ParseBlockRequest>
) -> Result<Response<ParseBlockResponse>, Status>
pub async fn get_block(
&mut self,
request: impl IntoRequest<GetBlockRequest>
) -> Result<Response<GetBlockResponse>, Status>
pub async fn set_preference(
&mut self,
request: impl IntoRequest<SetPreferenceRequest>
) -> Result<Response<Empty>, Status>
pub async fn health(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<HealthResponse>, Status>
pub async fn version(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<VersionResponse>, Status>
pub async fn app_request(
&mut self,
request: impl IntoRequest<AppRequestMsg>
) -> Result<Response<Empty>, Status>
pub async fn app_request_failed(
&mut self,
request: impl IntoRequest<AppRequestFailedMsg>
) -> Result<Response<Empty>, Status>
pub async fn app_response(
&mut self,
request: impl IntoRequest<AppResponseMsg>
) -> Result<Response<Empty>, Status>
pub async fn app_gossip(
&mut self,
request: impl IntoRequest<AppGossipMsg>
) -> Result<Response<Empty>, Status>
pub async fn gather(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<GatherResponse>, Status>
pub async fn cross_chain_app_request(
&mut self,
request: impl IntoRequest<CrossChainAppRequestMsg>
) -> Result<Response<Empty>, Status>
pub async fn cross_chain_app_request_failed(
&mut self,
request: impl IntoRequest<CrossChainAppRequestFailedMsg>
) -> Result<Response<Empty>, Status>
pub async fn cross_chain_app_response(
&mut self,
request: impl IntoRequest<CrossChainAppResponseMsg>
) -> Result<Response<Empty>, Status>
pub async fn get_ancestors(
&mut self,
request: impl IntoRequest<GetAncestorsRequest>
) -> Result<Response<GetAncestorsResponse>, Status>
pub async fn batched_parse_block(
&mut self,
request: impl IntoRequest<BatchedParseBlockRequest>
) -> Result<Response<BatchedParseBlockResponse>, Status>
pub async fn verify_height_index(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<VerifyHeightIndexResponse>, Status>
pub async fn get_block_id_at_height(
&mut self,
request: impl IntoRequest<GetBlockIdAtHeightRequest>
) -> Result<Response<GetBlockIdAtHeightResponse>, Status>
pub async fn state_sync_enabled(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<StateSyncEnabledResponse>, Status>
pub async fn get_ongoing_sync_state_summary(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<GetOngoingSyncStateSummaryResponse>, Status>
pub async fn get_last_state_summary(
&mut self,
request: impl IntoRequest<Empty>
) -> Result<Response<GetLastStateSummaryResponse>, Status>
pub async fn parse_state_summary(
&mut self,
request: impl IntoRequest<ParseStateSummaryRequest>
) -> Result<Response<ParseStateSummaryResponse>, Status>
pub async fn get_state_summary(
&mut self,
request: impl IntoRequest<GetStateSummaryRequest>
) -> Result<Response<GetStateSummaryResponse>, Status>
pub async fn block_verify(
&mut self,
request: impl IntoRequest<BlockVerifyRequest>
) -> Result<Response<BlockVerifyResponse>, Status>
pub async fn block_accept(
&mut self,
request: impl IntoRequest<BlockAcceptRequest>
) -> Result<Response<Empty>, Status>
pub async fn block_reject(
&mut self,
request: impl IntoRequest<BlockRejectRequest>
) -> Result<Response<Empty>, Status>
pub async fn state_summary_accept(
&mut self,
request: impl IntoRequest<StateSummaryAcceptRequest>
) -> Result<Response<StateSummaryAcceptResponse>, Status>
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for VmClient<T>where
T: RefUnwindSafe,
impl<T> Send for VmClient<T>where
T: Send,
impl<T> Sync for VmClient<T>where
T: Sync,
impl<T> Unpin for VmClient<T>where
T: Unpin,
impl<T> UnwindSafe for VmClient<T>where
T: UnwindSafe,
Blanket Implementations§
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