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 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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)