pub enum SubscriptionKind {
NewHeads,
Logs,
NewPendingTransactions,
Syncing,
}
eth
and serde
only.Expand description
Subscription kind.
Variants§
NewHeads
New block headers subscription.
Fires a notification each time a new header is appended to the chain, including chain reorganizations. In case of a chain reorganization the subscription will emit all new headers for the new chain. Therefore the subscription can emit multiple headers on the same height.
Logs
Logs subscription.
Returns logs that are included in new imported blocks and match the given filter criteria. In case of a chain reorganization previous sent logs that are on the old chain will be resent with the removed property set to true. Logs from transactions that ended up in the new chain are emitted. Therefore, a subscription can emit logs for the same transaction multiple times.
NewPendingTransactions
New Pending Transactions subscription.
Returns the hash or full tx for all transactions that are added to the pending state and are signed with a key that is available in the node. When a transaction that was previously part of the canonical chain isn’t part of the new canonical chain after a reorganization its again emitted.
Syncing
Node syncing status subscription.
Indicates when the node starts or stops synchronizing. The result can either be a boolean indicating that the synchronization has started (true), finished (false) or an object with various progress indicators.
Trait Implementations§
Source§impl Clone for SubscriptionKind
impl Clone for SubscriptionKind
Source§fn clone(&self) -> SubscriptionKind
fn clone(&self) -> SubscriptionKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SubscriptionKind
impl Debug for SubscriptionKind
Source§impl<'de> Deserialize<'de> for SubscriptionKind
impl<'de> Deserialize<'de> for SubscriptionKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubscriptionKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubscriptionKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Hash for SubscriptionKind
impl Hash for SubscriptionKind
Source§impl PartialEq for SubscriptionKind
impl PartialEq for SubscriptionKind
Source§impl Serialize for SubscriptionKind
impl Serialize for SubscriptionKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for SubscriptionKind
impl Eq for SubscriptionKind
impl StructuralPartialEq for SubscriptionKind
Auto Trait Implementations§
impl Freeze for SubscriptionKind
impl RefUnwindSafe for SubscriptionKind
impl Send for SubscriptionKind
impl Sync for SubscriptionKind
impl Unpin for SubscriptionKind
impl UnwindSafe for SubscriptionKind
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> 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)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more