pub struct PublicOverlayClient { /* private fields */ }Implementations§
Source§impl PublicOverlayClient
impl PublicOverlayClient
pub fn new( network: Network, overlay: PublicOverlay, config: PublicOverlayClientConfig, ) -> Self
pub fn config(&self) -> &PublicOverlayClientConfig
pub fn neighbours(&self) -> &Neighbours
pub fn update_validator_set<T: ValidatorSetPeers>(&self, vset: &T)
pub fn get_broadcast_targets(&self) -> Arc<Vec<Validator>>
pub fn validators_resolver(&self) -> &ValidatorsResolver
pub fn overlay(&self) -> &PublicOverlay
pub fn network(&self) -> &Network
pub async fn send<R>(&self, data: R) -> Result<(), Error>
pub async fn send_to_validator( &self, validator: Validator, data: Request, ) -> Result<(), Error>
pub async fn send_raw( &self, neighbour: Neighbour, req: Request, ) -> Result<(), Error>
pub async fn query<R, A>(&self, data: R) -> Result<QueryResponse<A>, Error>
pub async fn query_raw<A>( &self, neighbour: Neighbour, req: Request, ) -> Result<QueryResponse<A>, Error>
Trait Implementations§
Source§impl Clone for PublicOverlayClient
impl Clone for PublicOverlayClient
Source§fn clone(&self) -> PublicOverlayClient
fn clone(&self) -> PublicOverlayClient
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 Freeze for PublicOverlayClient
impl !RefUnwindSafe for PublicOverlayClient
impl Send for PublicOverlayClient
impl Sync for PublicOverlayClient
impl Unpin for PublicOverlayClient
impl !UnwindSafe for PublicOverlayClient
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 more