Struct jormungandr::watch_client::WatchClient
source · pub struct WatchClient {
tip_receiver: Receiver<Header>,
block_sender: Arc<Sender<Block>>,
request_tx: MessageBox<RequestMsg>,
}
Fields§
§tip_receiver: Receiver<Header>
§block_sender: Arc<Sender<Block>>
§request_tx: MessageBox<RequestMsg>
Implementations§
source§impl WatchClient
impl WatchClient
pub fn new( current_tip: Header, blockchain: Blockchain ) -> (WatchClient, MessageProcessor)
pub fn into_server(self) -> Server<Self>
Trait Implementations§
source§impl Clone for WatchClient
impl Clone for WatchClient
source§fn clone(&self) -> WatchClient
fn clone(&self) -> WatchClient
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 Watch for WatchClient
impl Watch for WatchClient
type BlockSubscriptionStream = MapErr<BroadcastStream<Block>, fn(_: <BroadcastStream<Block> as TryStream>::Error) -> Error>
type TipSubscriptionStream = Map<WatchStream<Header>, fn(_: <WatchStream<Header> as Stream>::Item) -> Result<<WatchStream<Header> as Stream>::Item, Error>>
type SyncMultiverseStream = MapErr<ReplyStream<Block, Error>, fn(_: <ReplyStream<Block, Error> as TryStream>::Error) -> Error>
fn block_subscription<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self::BlockSubscriptionStream, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn tip_subscription<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self::TipSubscriptionStream, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn sync_multiverse<'life0, 'async_trait>( &'life0 self, from: BlockIds ) -> Pin<Box<dyn Future<Output = Result<Self::SyncMultiverseStream, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for WatchClient
impl Send for WatchClient
impl Sync for WatchClient
impl Unpin for WatchClient
impl !UnwindSafe for WatchClient
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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> 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
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