pub struct GrpcClient { /* private fields */ }
Implementations§
Source§impl GrpcClient
impl GrpcClient
pub fn new( network: ValidatorPublicNetworkConfig, options: NodeOptions, ) -> Result<Self, GrpcError>
Trait Implementations§
Source§impl Clone for GrpcClient
impl Clone for GrpcClient
Source§fn clone(&self) -> GrpcClient
fn clone(&self) -> GrpcClient
Returns a copy 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 moreSource§impl From<GrpcClient> for Client
impl From<GrpcClient> for Client
Source§fn from(client: GrpcClient) -> Self
fn from(client: GrpcClient) -> Self
Converts to this type from the input type.
Source§impl MassClient for GrpcClient
impl MassClient for GrpcClient
fn send<'life0, 'async_trait>(
&'life0 self,
requests: Vec<RpcMessage>,
max_in_flight: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RpcMessage>, MassClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl ValidatorNode for GrpcClient
impl ValidatorNode for GrpcClient
type NotificationStream = Pin<Box<dyn Stream<Item = Notification> + Send>>
Source§async fn handle_block_proposal(
&self,
proposal: BlockProposal,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_block_proposal( &self, proposal: BlockProposal, ) -> Result<ChainInfoResponse, NodeError>
Proposes a new block.
Source§async fn handle_lite_certificate(
&self,
certificate: LiteCertificate<'_>,
delivery: CrossChainMessageDelivery,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_lite_certificate( &self, certificate: LiteCertificate<'_>, delivery: CrossChainMessageDelivery, ) -> Result<ChainInfoResponse, NodeError>
Processes a certificate without a value.
Source§async fn handle_certificate(
&self,
certificate: Certificate,
blobs: Vec<Blob>,
delivery: CrossChainMessageDelivery,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_certificate( &self, certificate: Certificate, blobs: Vec<Blob>, delivery: CrossChainMessageDelivery, ) -> Result<ChainInfoResponse, NodeError>
Processes a certificate.
Source§async fn handle_chain_info_query(
&self,
query: ChainInfoQuery,
) -> Result<ChainInfoResponse, NodeError>
async fn handle_chain_info_query( &self, query: ChainInfoQuery, ) -> Result<ChainInfoResponse, NodeError>
Handles information queries for this chain.
Source§async fn subscribe(
&self,
chains: Vec<ChainId>,
) -> Result<Self::NotificationStream, NodeError>
async fn subscribe( &self, chains: Vec<ChainId>, ) -> Result<Self::NotificationStream, NodeError>
Subscribes to receiving notifications for a collection of chains.
Source§async fn get_version_info(&self) -> Result<VersionInfo, NodeError>
async fn get_version_info(&self) -> Result<VersionInfo, NodeError>
Gets the version info for this validator node.
Source§async fn get_genesis_config_hash(&self) -> Result<CryptoHash, NodeError>
async fn get_genesis_config_hash(&self) -> Result<CryptoHash, NodeError>
Gets the network’s genesis config hash.
async fn download_blob_content( &self, blob_id: BlobId, ) -> Result<BlobContent, NodeError>
async fn download_certificate_value( &self, hash: CryptoHash, ) -> Result<HashedCertificateValue, NodeError>
async fn download_certificate( &self, hash: CryptoHash, ) -> Result<Certificate, NodeError>
Source§async fn download_certificates(
&self,
hashes: Vec<CryptoHash>,
) -> Result<Vec<Certificate>, NodeError>
async fn download_certificates( &self, hashes: Vec<CryptoHash>, ) -> Result<Vec<Certificate>, NodeError>
Requests a batch of certificates from the validator.
Source§async fn blob_last_used_by(
&self,
blob_id: BlobId,
) -> Result<CryptoHash, NodeError>
async fn blob_last_used_by( &self, blob_id: BlobId, ) -> Result<CryptoHash, NodeError>
Returns the hash of the
Certificate
that last used a blob.Auto Trait Implementations§
impl !Freeze for GrpcClient
impl !RefUnwindSafe for GrpcClient
impl Send for GrpcClient
impl Sync for GrpcClient
impl Unpin for GrpcClient
impl !UnwindSafe for GrpcClient
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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
Source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.