pub struct SubFullBlocks<N: Network> { /* private fields */ }pubsub only.Expand description
A builder type for subscribing to full blocks i.e alloy_network_primitives::BlockResponse,
and not just alloy_network_primitives::HeaderResponse.
By default this subscribes to block with tx hashes only. Use SubFullBlocks::full to
subscribe to blocks with full transactions.
Implementations§
Source§impl<N: Network> SubFullBlocks<N>
impl<N: Network> SubFullBlocks<N>
Sourcepub const fn new(
sub: GetSubscription<(SubscriptionKind,), N::HeaderResponse>,
client: WeakClient,
) -> Self
pub const fn new( sub: GetSubscription<(SubscriptionKind,), N::HeaderResponse>, client: WeakClient, ) -> Self
Create a new SubFullBlocks subscription with the given super::GetSubscription.
By default, this subscribes to block with tx hashes only. Use SubFullBlocks::full to
subscribe to blocks with full transactions.
Sourcepub fn channel_size(self, size: usize) -> Self
pub fn channel_size(self, size: usize) -> Self
Set the channel size
Sourcepub async fn into_stream(
self,
) -> TransportResult<impl Stream<Item = TransportResult<N::BlockResponse>> + Unpin>
pub async fn into_stream( self, ) -> TransportResult<impl Stream<Item = TransportResult<N::BlockResponse>> + Unpin>
Subscribe to the inner stream of headers and map them to block responses.
Trait Implementations§
Auto Trait Implementations§
impl<N> Freeze for SubFullBlocks<N>
impl<N> !RefUnwindSafe for SubFullBlocks<N>
impl<N> Send for SubFullBlocks<N>
impl<N> !Sync for SubFullBlocks<N>
impl<N> Unpin for SubFullBlocks<N>
impl<N> !UnwindSafe for SubFullBlocks<N>
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
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>
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>
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes