pub enum PubSubItem {
Response(Response),
Notification(EthNotification),
}
Expand description
An item received over an Ethereum pubsub transport.
Ethereum pubsub uses a non-standard JSON-RPC notification format. An item received over a pubsub transport may be a JSON-RPC response or an Ethereum-style notification.
Variants§
Response(Response)
A Response
to a JSON-RPC request.
Notification(EthNotification)
An Ethereum-style notification.
Trait Implementations§
Source§impl Clone for PubSubItem
impl Clone for PubSubItem
Source§fn clone(&self) -> PubSubItem
fn clone(&self) -> PubSubItem
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 moreSource§impl Debug for PubSubItem
impl Debug for PubSubItem
Source§impl<'de> Deserialize<'de> for PubSubItem
impl<'de> Deserialize<'de> for PubSubItem
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<EthNotification> for PubSubItem
impl From<EthNotification> for PubSubItem
Source§fn from(notification: EthNotification) -> Self
fn from(notification: EthNotification) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PubSubItem
impl RefUnwindSafe for PubSubItem
impl Send for PubSubItem
impl Sync for PubSubItem
impl Unpin for PubSubItem
impl UnwindSafe for PubSubItem
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> 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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<'de, T> RpcBorrow<'de> for T
impl<T> RpcRecv for T
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: 72 bytes
Size for each variant:
Response
: 72 bytesNotification
: 64 bytes