pub struct StateClient<T> { /* private fields */ }Implementations§
Source§impl StateClient<Channel>
impl StateClient<Channel>
Source§impl<T> StateClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> StateClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StateClient<InterceptedService<T, F>>where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_gzip(self) -> Self
pub fn send_gzip(self) -> Self
Compress requests with gzip.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_gzip(self) -> Self
pub fn accept_gzip(self) -> Self
Enable decompressing responses with gzip.
pub async fn echo( &mut self, request: impl IntoRequest<EchoRequest>, ) -> Result<Response<EchoResponse>, Status>
pub async fn preverify( &mut self, request: impl IntoRequest<PreverifyRequest>, ) -> Result<Response<PreverifyResponse>, Status>
pub async fn execute_state_transition( &mut self, request: impl IntoRequest<ExecuteStateTransitionRequest>, ) -> Result<Response<ExecuteStateTransitionResponse>, Status>
pub async fn verify_state_transition( &mut self, request: impl IntoRequest<VerifyStateTransitionRequest>, ) -> Result<Response<VerifyStateTransitionResponse>, Status>
pub async fn accept( &mut self, request: impl IntoRequest<StateTransitionRequest>, ) -> Result<Response<StateTransitionResponse>, Status>
pub async fn finalize( &mut self, request: impl IntoRequest<StateTransitionRequest>, ) -> Result<Response<StateTransitionResponse>, Status>
pub async fn revert( &mut self, request: impl IntoRequest<RevertRequest>, ) -> Result<Response<RevertResponse>, Status>
pub async fn persist( &mut self, request: impl IntoRequest<PersistRequest>, ) -> Result<Response<PersistResponse>, Status>
pub async fn get_provisioners( &mut self, request: impl IntoRequest<GetProvisionersRequest>, ) -> Result<Response<GetProvisionersResponse>, Status>
pub async fn get_state_root( &mut self, request: impl IntoRequest<GetStateRootRequest>, ) -> Result<Response<GetStateRootResponse>, Status>
pub async fn get_notes_owned_by( &mut self, request: impl IntoRequest<GetNotesOwnedByRequest>, ) -> Result<Response<GetNotesOwnedByResponse>, Status>
Sourcepub async fn get_notes(
&mut self,
request: impl IntoRequest<GetNotesRequest>,
) -> Result<Response<Streaming<GetNotesResponse>>, Status>
pub async fn get_notes( &mut self, request: impl IntoRequest<GetNotesRequest>, ) -> Result<Response<Streaming<GetNotesResponse>>, Status>
Streams notes from a given block height, optionally filtered by the given view key. If the view key is not present, all notes will be streamed.
pub async fn get_anchor( &mut self, request: impl IntoRequest<GetAnchorRequest>, ) -> Result<Response<GetAnchorResponse>, Status>
pub async fn get_opening( &mut self, request: impl IntoRequest<GetOpeningRequest>, ) -> Result<Response<GetOpeningResponse>, Status>
pub async fn get_stake( &mut self, request: impl IntoRequest<GetStakeRequest>, ) -> Result<Response<GetStakeResponse>, Status>
pub async fn find_existing_nullifiers( &mut self, request: impl IntoRequest<FindExistingNullifiersRequest>, ) -> Result<Response<FindExistingNullifiersResponse>, Status>
Trait Implementations§
Source§impl<T: Clone> Clone for StateClient<T>
impl<T: Clone> Clone for StateClient<T>
Source§fn clone(&self) -> StateClient<T>
fn clone(&self) -> StateClient<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for StateClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for StateClient<T>where
T: RefUnwindSafe,
impl<T> Send for StateClient<T>where
T: Send,
impl<T> Sync for StateClient<T>where
T: Sync,
impl<T> Unpin for StateClient<T>where
T: Unpin,
impl<T> UnwindSafe for StateClient<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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§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