pub struct GetSubscription<P, R>{ /* private fields */ }Available on crate feature
pubsub only.Expand description
A general-purpose subscription request builder
This struct allows configuring subscription parameters and channel size before initiating a request to subscribe to Ethereum events.
Implementations§
Source§impl<P, R> GetSubscription<P, R>
impl<P, R> GetSubscription<P, R>
Sourcepub fn new(client: WeakClient, call: RpcCall<P, B256>) -> Self
pub fn new(client: WeakClient, call: RpcCall<P, B256>) -> Self
Creates a new GetSubscription instance
Sourcepub const fn channel_size(self, size: usize) -> Self
pub const fn channel_size(self, size: usize) -> Self
Set the channel_size for the subscription stream.
Trait Implementations§
Source§impl<P, R> Debug for GetSubscription<P, R>
impl<P, R> Debug for GetSubscription<P, R>
Source§impl<P, R> IntoFuture for GetSubscription<P, R>
impl<P, R> IntoFuture for GetSubscription<P, R>
Source§type Output = Result<Subscription<R>, RpcError<TransportErrorKind>>
type Output = Result<Subscription<R>, RpcError<TransportErrorKind>>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <GetSubscription<P, R> as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <GetSubscription<P, R> as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<P, R> Freeze for GetSubscription<P, R>where
P: Freeze,
impl<P, R> !RefUnwindSafe for GetSubscription<P, R>
impl<P, R> Send for GetSubscription<P, R>
impl<P, R> !Sync for GetSubscription<P, R>
impl<P, R> Unpin for GetSubscription<P, R>
impl<P, R> UnsafeUnpin for GetSubscription<P, R>where
P: UnsafeUnpin,
impl<P, R> !UnwindSafe for GetSubscription<P, R>
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> 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> 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>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.