diff --git a/.lock b/.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/alloy_json_rpc/all.html b/alloy_json_rpc/all.html new file mode 100644 index 000000000000..46c1bf2816d7 --- /dev/null +++ b/alloy_json_rpc/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Traits

Functions

Type Aliases

\ No newline at end of file diff --git a/alloy_json_rpc/common/enum.Id.html b/alloy_json_rpc/common/enum.Id.html new file mode 100644 index 000000000000..fdde9103917e --- /dev/null +++ b/alloy_json_rpc/common/enum.Id.html @@ -0,0 +1,54 @@ +Id in alloy_json_rpc::common - Rust +
pub enum Id {
+    Number(u64),
+    String(String),
+    None,
+}
Expand description

A JSON-RPC 2.0 ID object. This may be a number, a string, or null.

+

Ordering

+

This type implements PartialOrd, Ord, PartialEq, and Eq so +that it can be used as a key in a BTreeMap or an item in a +BTreeSet. The ordering is as follows:

+
    +
  1. Numbers are less than strings.
  2. +
  3. Strings are less than null.
  4. +
  5. Null is equal to null.
  6. +
+

Hash

+

This type implements Hash so that it can be used as a key in a +HashMap or an item in a HashSet.

+

Variants§

§

Number(u64)

A number.

+
§

String(String)

A string.

+
§

None

Null.

+

Implementations§

source§

impl Id

source

pub const fn is_number(&self) -> bool

Returns true if the ID is a number.

+
source

pub const fn is_string(&self) -> bool

Returns true if the ID is a string.

+
source

pub const fn is_none(&self) -> bool

Returns true if the ID is None.

+
source

pub const fn as_number(&self) -> Option<u64>

Returns the ID as a number, if it is one.

+
source

pub fn as_string(&self) -> Option<&str>

Returns the ID as a string, if it is one.

+

Trait Implementations§

source§

impl Clone for Id

source§

fn clone(&self) -> Id

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Id

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Id

source§

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 Display for Id

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Id

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Id

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Id

source§

fn eq(&self, other: &Id) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Id

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for Id

source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Id

source§

impl StructuralEq for Id

source§

impl StructuralPartialEq for Id

Auto Trait Implementations§

§

impl RefUnwindSafe for Id

§

impl Send for Id

§

impl Sync for Id

§

impl Unpin for Id

§

impl UnwindSafe for Id

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + '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: 32 bytes

Size for each variant:

  • Number: 8 bytes
  • String: 24 bytes
  • None: 0 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/common/index.html b/alloy_json_rpc/common/index.html new file mode 100644 index 000000000000..1271d77b44f2 --- /dev/null +++ b/alloy_json_rpc/common/index.html @@ -0,0 +1,2 @@ +alloy_json_rpc::common - Rust +

Module alloy_json_rpc::common

source ·

Enums

  • A JSON-RPC 2.0 ID object. This may be a number, a string, or null.
\ No newline at end of file diff --git a/alloy_json_rpc/common/sidebar-items.js b/alloy_json_rpc/common/sidebar-items.js new file mode 100644 index 000000000000..f06c11be6387 --- /dev/null +++ b/alloy_json_rpc/common/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Id"]}; \ No newline at end of file diff --git a/alloy_json_rpc/enum.Id.html b/alloy_json_rpc/enum.Id.html new file mode 100644 index 000000000000..d852fc07ed9a --- /dev/null +++ b/alloy_json_rpc/enum.Id.html @@ -0,0 +1,54 @@ +Id in alloy_json_rpc - Rust +

Enum alloy_json_rpc::Id

source ·
pub enum Id {
+    Number(u64),
+    String(String),
+    None,
+}
Expand description

A JSON-RPC 2.0 ID object. This may be a number, a string, or null.

+

Ordering

+

This type implements PartialOrd, Ord, PartialEq, and Eq so +that it can be used as a key in a BTreeMap or an item in a +BTreeSet. The ordering is as follows:

+
    +
  1. Numbers are less than strings.
  2. +
  3. Strings are less than null.
  4. +
  5. Null is equal to null.
  6. +
+

Hash

+

This type implements Hash so that it can be used as a key in a +HashMap or an item in a HashSet.

+

Variants§

§

Number(u64)

A number.

+
§

String(String)

A string.

+
§

None

Null.

+

Implementations§

source§

impl Id

source

pub const fn is_number(&self) -> bool

Returns true if the ID is a number.

+
source

pub const fn is_string(&self) -> bool

Returns true if the ID is a string.

+
source

pub const fn is_none(&self) -> bool

Returns true if the ID is None.

+
source

pub const fn as_number(&self) -> Option<u64>

Returns the ID as a number, if it is one.

+
source

pub fn as_string(&self) -> Option<&str>

Returns the ID as a string, if it is one.

+

Trait Implementations§

source§

impl Clone for Id

source§

fn clone(&self) -> Id

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Id

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Id

source§

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 Display for Id

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Id

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Id

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Id

source§

fn eq(&self, other: &Id) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Id

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for Id

source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Id

source§

impl StructuralEq for Id

source§

impl StructuralPartialEq for Id

Auto Trait Implementations§

§

impl RefUnwindSafe for Id

§

impl Send for Id

§

impl Sync for Id

§

impl Unpin for Id

§

impl UnwindSafe for Id

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + '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: 32 bytes

Size for each variant:

  • Number: 8 bytes
  • String: 24 bytes
  • None: 0 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/enum.PubSubItem.html b/alloy_json_rpc/enum.PubSubItem.html new file mode 100644 index 000000000000..cf9db7941324 --- /dev/null +++ b/alloy_json_rpc/enum.PubSubItem.html @@ -0,0 +1,25 @@ +PubSubItem in alloy_json_rpc - Rust +
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

source§

fn clone(&self) -> PubSubItem

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PubSubItem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PubSubItem

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + '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: 80 bytes

Size for each variant:

  • Response: 80 bytes
  • Notification: 56 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/enum.RequestPacket.html b/alloy_json_rpc/enum.RequestPacket.html new file mode 100644 index 000000000000..23b081294794 --- /dev/null +++ b/alloy_json_rpc/enum.RequestPacket.html @@ -0,0 +1,29 @@ +RequestPacket in alloy_json_rpc - Rust +
pub enum RequestPacket {
+    Single(SerializedRequest),
+    Batch(Vec<SerializedRequest>),
+}
Expand description

A RequestPacket is a SerializedRequest or a batch of serialized +request.

+

Variants§

§

Single(SerializedRequest)

A single request.

+
§

Batch(Vec<SerializedRequest>)

A batch of requests.

+

Implementations§

source§

impl RequestPacket

source

pub fn with_capacity(capacity: usize) -> Self

Create a new empty packet with the given capacity.

+
source

pub fn serialize(self) -> Result<Box<RawValue>>

Serialize the packet as a boxed RawValue.

+
source

pub fn subscription_request_ids(&self) -> HashSet<&Id>

Get the request IDs of all subscription requests in the packet.

+
source

pub fn len(&self) -> usize

Get the number of requests in the packet.

+
source

pub fn is_empty(&self) -> bool

Check if the packet is empty.

+
source

pub fn push(&mut self, req: SerializedRequest)

Push a request into the packet.

+

Trait Implementations§

source§

impl Clone for RequestPacket

source§

fn clone(&self) -> RequestPacket

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RequestPacket

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SerializedRequest> for RequestPacket

source§

fn from(req: SerializedRequest) -> Self

Converts to this type from the input type.
source§

impl FromIterator<SerializedRequest> for RequestPacket

source§

fn from_iter<T: IntoIterator<Item = SerializedRequest>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Serialize for RequestPacket

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

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: 64 bytes

Size for each variant:

  • Single: 64 bytes
  • Batch: 32 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/enum.ResponsePacket.html b/alloy_json_rpc/enum.ResponsePacket.html new file mode 100644 index 000000000000..42c5e878106c --- /dev/null +++ b/alloy_json_rpc/enum.ResponsePacket.html @@ -0,0 +1,52 @@ +ResponsePacket in alloy_json_rpc - Rust +
pub enum ResponsePacket<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    Single(Response<Payload, ErrData>),
+    Batch(Vec<Response<Payload, ErrData>>),
+}
Expand description

A ResponsePacket is a Response or a batch of responses.

+

Variants§

§

Single(Response<Payload, ErrData>)

A single response.

+
§

Batch(Vec<Response<Payload, ErrData>>)

A batch of responses.

+

Implementations§

source§

impl ResponsePacket<&RawValue, &RawValue>

source

pub fn into_owned(self) -> ResponsePacket

Convert this borrowed response packet into an owned packet by copying +the data from the deserializer (if necessary).

+
source§

impl<Payload, ErrData> ResponsePacket<Payload, ErrData>

source

pub fn responses_by_ids( + &self, + ids: &HashSet<Id> +) -> Vec<&Response<Payload, ErrData>>

Find responses by a list of IDs.

+

This is intended to be used in conjunction with +RequestPacket::subscription_request_ids to identify subscription +responses.

+
Note
+
    +
  • Responses are not guaranteed to be in the same order.
  • +
  • Responses are not guaranteed to be in the set.
  • +
  • If the packet contains duplicate IDs, both will be found.
  • +
+

Trait Implementations§

source§

impl<Payload: Clone, ErrData: Clone> Clone for ResponsePacket<Payload, ErrData>

source§

fn clone(&self) -> ResponsePacket<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Payload: Debug, ErrData: Debug> Debug for ResponsePacket<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, Payload, ErrData> Deserialize<'de> for ResponsePacket<Payload, ErrData>
where + Payload: Deserialize<'de>, + ErrData: Deserialize<'de>,

source§

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<Payload, ErrData> From<Vec<Response<Payload, ErrData>>> for ResponsePacket<Payload, ErrData>

source§

fn from(value: Vec<Response<Payload, ErrData>>) -> Self

Converts to this type from the input type.
source§

impl<Payload, ErrData> FromIterator<Response<Payload, ErrData>> for ResponsePacket<Payload, ErrData>

source§

fn from_iter<T: IntoIterator<Item = Response<Payload, ErrData>>>( + iter: T +) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

§

impl<Payload, ErrData> RefUnwindSafe for ResponsePacket<Payload, ErrData>
where + ErrData: RefUnwindSafe, + Payload: RefUnwindSafe,

§

impl<Payload, ErrData> Send for ResponsePacket<Payload, ErrData>
where + ErrData: Send, + Payload: Send,

§

impl<Payload, ErrData> Sync for ResponsePacket<Payload, ErrData>
where + ErrData: Sync, + Payload: Sync,

§

impl<Payload, ErrData> Unpin for ResponsePacket<Payload, ErrData>
where + ErrData: Unpin, + Payload: Unpin,

§

impl<Payload, ErrData> UnwindSafe for ResponsePacket<Payload, ErrData>
where + ErrData: UnwindSafe, + Payload: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/enum.ResponsePayload.html b/alloy_json_rpc/enum.ResponsePayload.html new file mode 100644 index 000000000000..a8e1cc3d1cee --- /dev/null +++ b/alloy_json_rpc/enum.ResponsePayload.html @@ -0,0 +1,79 @@ +ResponsePayload in alloy_json_rpc - Rust +
pub enum ResponsePayload<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    Success(Payload),
+    Failure(ErrorPayload<ErrData>),
+}
Expand description

A JSONRPC-2.0 response payload.

+

This enum covers both the success and error cases of a JSONRPC-2.0 +response. It is used to represent the result and error fields of a +response object.

+

Note

+

This type does not implement Serialize or Deserialize directly. It is +deserialized as part of the Response type.

+

Variants§

§

Success(Payload)

A successful response payload.

+
§

Failure(ErrorPayload<ErrData>)

An error response payload.

+

Implementations§

source§

impl ResponsePayload<&RawValue, &RawValue>

source

pub fn into_owned(self) -> ResponsePayload

Convert this borrowed response payload into an owned payload by copying +the data from the deserializer (if necessary).

+
source§

impl<Payload, ErrData> ResponsePayload<Payload, ErrData>

source

pub const fn as_success(&self) -> Option<&Payload>

Fallible conversion to the succesful payload.

+
source

pub const fn as_error(&self) -> Option<&ErrorPayload<ErrData>>

Fallible conversion to the error object.

+
source

pub const fn is_success(&self) -> bool

Returns true if the response payload is a success.

+
source

pub const fn is_error(&self) -> bool

Returns true if the response payload is an error.

+
source§

impl<'a, Payload, ErrData> ResponsePayload<Payload, ErrData>
where + Payload: AsRef<RawValue> + 'a,

source

pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the success payload, borrowing from the payload +if necessary.

+
Returns
+
    +
  • None if the payload is an error
  • +
  • Some(Ok(T)) if the payload is a success and can be deserialized
  • +
  • Some(Err(serde_json::Error)) if the payload is a success and can’t be deserialized as +T
  • +
+
source

pub fn deserialize_success<T: DeserializeOwned>( + self +) -> Result<ResponsePayload<T, ErrData>, Self>

Deserialize a Success payload, if possible, transforming this type.

+
Returns
+
    +
  • Ok(ResponsePayload<T>) if the payload is an error, or if the payload is a success and +can be deserialized as T
  • +
  • Err(self) if the payload is a success and can’t be deserialized
  • +
+
source§

impl<'a, Payload, Data> ResponsePayload<Payload, Data>
where + Data: Borrow<RawValue> + 'a,

source

pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the error payload, borrowing from the payload if +necessary.

+
Returns
+
    +
  • None if the payload is a success
  • +
  • Some(Ok(T)) if the payload is an error and can be deserialized
  • +
  • Some(Err(serde_json::Error)) if the payload is an error and can’t be deserialized as T
  • +
+
source

pub fn deserialize_error<T: DeserializeOwned>( + self +) -> Result<ResponsePayload<Payload, T>, Self>

Deserialize an Error payload, if possible, transforming this type.

+
Returns
+
    +
  • Ok(ResponsePayload<Payload, T>) if the payload is an error, or if the payload is an +error and can be deserialized as T.
  • +
  • Err(self) if the payload is an error and can’t be deserialized.
  • +
+

Trait Implementations§

source§

impl<Payload: Clone, ErrData: Clone> Clone for ResponsePayload<Payload, ErrData>

source§

fn clone(&self) -> ResponsePayload<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Payload: Debug, ErrData: Debug> Debug for ResponsePayload<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Payload, ErrData> RefUnwindSafe for ResponsePayload<Payload, ErrData>
where + ErrData: RefUnwindSafe, + Payload: RefUnwindSafe,

§

impl<Payload, ErrData> Send for ResponsePayload<Payload, ErrData>
where + ErrData: Send, + Payload: Send,

§

impl<Payload, ErrData> Sync for ResponsePayload<Payload, ErrData>
where + ErrData: Sync, + Payload: Sync,

§

impl<Payload, ErrData> Unpin for ResponsePayload<Payload, ErrData>
where + ErrData: Unpin, + Payload: Unpin,

§

impl<Payload, ErrData> UnwindSafe for ResponsePayload<Payload, ErrData>
where + ErrData: UnwindSafe, + Payload: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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.

\ No newline at end of file diff --git a/alloy_json_rpc/enum.RpcError.html b/alloy_json_rpc/enum.RpcError.html new file mode 100644 index 000000000000..3aef2eb1af30 --- /dev/null +++ b/alloy_json_rpc/enum.RpcError.html @@ -0,0 +1,54 @@ +RpcError in alloy_json_rpc - Rust +
pub enum RpcError<E, ErrResp = Box<RawValue>> {
+    ErrorResp(ErrorPayload<ErrResp>),
+    SerError(Error),
+    DeserError {
+        err: Error,
+        text: String,
+    },
+    Transport(E),
+}
Expand description

An RPC error.

+

Variants§

§

ErrorResp(ErrorPayload<ErrResp>)

Server returned an error response.

+
§

SerError(Error)

Tuple Fields

§0: Error

The underlying serde_json error.

+

JSON serialization error.

+
§

DeserError

Fields

§err: Error

The underlying serde_json error.

+
§text: String

For deser errors, the text that failed to deserialize.

+

JSON deserialization error.

+
§

Transport(E)

Tuple Fields

§0: E

The underlying transport error.

+

Transport error.

+

This variant is used when the error occurs during communication.

+

Implementations§

source§

impl<E, ErrResp> RpcError<E, ErrResp>
where + ErrResp: RpcReturn,

source

pub const fn err_resp(err: ErrorPayload<ErrResp>) -> Self

Instantiate a new TransportError from an error response.

+
source§

impl<E, ErrResp> RpcError<E, ErrResp>

source

pub const fn ser_err(err: Error) -> Self

Instantiate a new TransportError from a serde_json::Error. This +should be called when the error occurs during serialization.

+
source

pub fn deser_err(err: Error, text: impl AsRef<str>) -> Self

Instantiate a new TransportError from a serde_json::Error and the +text. This should be called when the error occurs during +deserialization.

+
source

pub const fn is_ser_error(&self) -> bool

Check if the error is a serialization error.

+
source

pub const fn is_deser_error(&self) -> bool

Check if the error is a deserialization error.

+
source

pub const fn is_transport_error(&self) -> bool

Check if the error is a transport error.

+
source

pub const fn is_error_resp(&self) -> bool

Check if the error is an error response.

+
source

pub const fn as_error_resp(&self) -> Option<&ErrorPayload<ErrResp>>

Fallible conversion to an error response.

+

Trait Implementations§

source§

impl<E: Debug, ErrResp: Debug> Debug for RpcError<E, ErrResp>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<E, ErrResp> Display for RpcError<E, ErrResp>
where + ErrorPayload<ErrResp>: Display, + E: Display,

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<E, ErrResp> Error for RpcError<E, ErrResp>
where + E: Error + 'static, + Self: Debug + Display,

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl<E, ErrResp> From<E> for RpcError<E, ErrResp>

source§

fn from(source: E) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<E, ErrResp = Box<RawValue>> !RefUnwindSafe for RpcError<E, ErrResp>

§

impl<E, ErrResp> Send for RpcError<E, ErrResp>
where + E: Send, + ErrResp: Send,

§

impl<E, ErrResp> Sync for RpcError<E, ErrResp>
where + E: Sync, + ErrResp: Sync,

§

impl<E, ErrResp> Unpin for RpcError<E, ErrResp>
where + E: Unpin, + ErrResp: Unpin,

§

impl<E, ErrResp = Box<RawValue>> !UnwindSafe for RpcError<E, ErrResp>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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.

\ No newline at end of file diff --git a/alloy_json_rpc/error/enum.RpcError.html b/alloy_json_rpc/error/enum.RpcError.html new file mode 100644 index 000000000000..761c683b0af4 --- /dev/null +++ b/alloy_json_rpc/error/enum.RpcError.html @@ -0,0 +1,54 @@ +RpcError in alloy_json_rpc::error - Rust +
pub enum RpcError<E, ErrResp = Box<RawValue>> {
+    ErrorResp(ErrorPayload<ErrResp>),
+    SerError(Error),
+    DeserError {
+        err: Error,
+        text: String,
+    },
+    Transport(E),
+}
Expand description

An RPC error.

+

Variants§

§

ErrorResp(ErrorPayload<ErrResp>)

Server returned an error response.

+
§

SerError(Error)

Tuple Fields

§0: Error

The underlying serde_json error.

+

JSON serialization error.

+
§

DeserError

Fields

§err: Error

The underlying serde_json error.

+
§text: String

For deser errors, the text that failed to deserialize.

+

JSON deserialization error.

+
§

Transport(E)

Tuple Fields

§0: E

The underlying transport error.

+

Transport error.

+

This variant is used when the error occurs during communication.

+

Implementations§

source§

impl<E, ErrResp> RpcError<E, ErrResp>
where + ErrResp: RpcReturn,

source

pub const fn err_resp(err: ErrorPayload<ErrResp>) -> Self

Instantiate a new TransportError from an error response.

+
source§

impl<E, ErrResp> RpcError<E, ErrResp>

source

pub const fn ser_err(err: Error) -> Self

Instantiate a new TransportError from a serde_json::Error. This +should be called when the error occurs during serialization.

+
source

pub fn deser_err(err: Error, text: impl AsRef<str>) -> Self

Instantiate a new TransportError from a serde_json::Error and the +text. This should be called when the error occurs during +deserialization.

+
source

pub const fn is_ser_error(&self) -> bool

Check if the error is a serialization error.

+
source

pub const fn is_deser_error(&self) -> bool

Check if the error is a deserialization error.

+
source

pub const fn is_transport_error(&self) -> bool

Check if the error is a transport error.

+
source

pub const fn is_error_resp(&self) -> bool

Check if the error is an error response.

+
source

pub const fn as_error_resp(&self) -> Option<&ErrorPayload<ErrResp>>

Fallible conversion to an error response.

+

Trait Implementations§

source§

impl<E: Debug, ErrResp: Debug> Debug for RpcError<E, ErrResp>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<E, ErrResp> Display for RpcError<E, ErrResp>
where + ErrorPayload<ErrResp>: Display, + E: Display,

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<E, ErrResp> Error for RpcError<E, ErrResp>
where + E: Error + 'static, + Self: Debug + Display,

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl<E, ErrResp> From<E> for RpcError<E, ErrResp>

source§

fn from(source: E) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<E, ErrResp = Box<RawValue>> !RefUnwindSafe for RpcError<E, ErrResp>

§

impl<E, ErrResp> Send for RpcError<E, ErrResp>
where + E: Send, + ErrResp: Send,

§

impl<E, ErrResp> Sync for RpcError<E, ErrResp>
where + E: Sync, + ErrResp: Sync,

§

impl<E, ErrResp> Unpin for RpcError<E, ErrResp>
where + E: Unpin, + ErrResp: Unpin,

§

impl<E, ErrResp = Box<RawValue>> !UnwindSafe for RpcError<E, ErrResp>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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.

\ No newline at end of file diff --git a/alloy_json_rpc/error/index.html b/alloy_json_rpc/error/index.html new file mode 100644 index 000000000000..4db0dfd2f13f --- /dev/null +++ b/alloy_json_rpc/error/index.html @@ -0,0 +1,2 @@ +alloy_json_rpc::error - Rust +

Module alloy_json_rpc::error

source ·

Enums

\ No newline at end of file diff --git a/alloy_json_rpc/error/sidebar-items.js b/alloy_json_rpc/error/sidebar-items.js new file mode 100644 index 000000000000..2a6da0cdbd09 --- /dev/null +++ b/alloy_json_rpc/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["RpcError"]}; \ No newline at end of file diff --git a/alloy_json_rpc/fn.transform_response.html b/alloy_json_rpc/fn.transform_response.html new file mode 100644 index 000000000000..b5424eae3ee6 --- /dev/null +++ b/alloy_json_rpc/fn.transform_response.html @@ -0,0 +1,6 @@ +transform_response in alloy_json_rpc - Rust +
pub fn transform_response<T, E, ErrResp>(
+    response: Response<T, ErrResp>
+) -> Result<T, RpcError<E, ErrResp>>
where + ErrResp: RpcReturn,
Expand description

Transform a transport response into an RpcResult, discarding the Id.

+
\ No newline at end of file diff --git a/alloy_json_rpc/fn.transform_result.html b/alloy_json_rpc/fn.transform_result.html new file mode 100644 index 000000000000..27da0cf210e2 --- /dev/null +++ b/alloy_json_rpc/fn.transform_result.html @@ -0,0 +1,6 @@ +transform_result in alloy_json_rpc - Rust +
pub fn transform_result<T, E, ErrResp>(
+    response: Result<Response<T, ErrResp>, E>
+) -> Result<T, RpcError<E, ErrResp>>
where + ErrResp: RpcReturn,
Expand description

Transform a transport outcome into an RpcResult, discarding the Id.

+
\ No newline at end of file diff --git a/alloy_json_rpc/fn.try_deserialize_ok.html b/alloy_json_rpc/fn.try_deserialize_ok.html new file mode 100644 index 000000000000..2c850aa92ec7 --- /dev/null +++ b/alloy_json_rpc/fn.try_deserialize_ok.html @@ -0,0 +1,8 @@ +try_deserialize_ok in alloy_json_rpc - Rust +
pub fn try_deserialize_ok<'a, J, T, E, ErrResp>(
+    result: RpcResult<J, E, ErrResp>
+) -> RpcResult<T, E, ErrResp>
where + J: Borrow<RawValue> + 'a, + T: RpcReturn, + ErrResp: RpcReturn,
Expand description

Attempt to deserialize the Ok(_) variant of an RpcResult.

+
\ No newline at end of file diff --git a/alloy_json_rpc/index.html b/alloy_json_rpc/index.html new file mode 100644 index 000000000000..b2d3e09fb134 --- /dev/null +++ b/alloy_json_rpc/index.html @@ -0,0 +1,74 @@ +alloy_json_rpc - Rust +

Crate alloy_json_rpc

source ·
Expand description

Alloy JSON-RPC data types.

+

This crate provides data types for use with the JSON-RPC 2.0 protocol. It +does not provide any functionality for actually sending or receiving +JSON-RPC data.

+

If you find yourself importing this crate, and you are not implementing a +JSON-RPC client or transport, you are likely at the wrong layer of +abstraction. If you want to use a JSON-RPC client, consider using the +alloy-transports crate.

+

Usage

+

This crate models the JSON-RPC 2.0 protocol data-types. It is intended to +be used to build JSON-RPC clients or servers. Most users will not need to +import this crate.

+

This crate provides the following low-level data types:

+ +

For client-side Rust ergonomics, we want to map responses to Results. +To that end, we provide the following types:

+
    +
  • RpcError - An error that can occur during JSON-RPC communication. This type aggregates +errors that are common to all transports, such as (de)serialization, error responses, and +includes a generic transport error.
  • +
  • RpcResult - A result modeling an Rpc outcome as Result<T, RpcError<E>>.
  • +
+

We recommend that transport implementors use RpcResult as the return +type for their transport methods, parameterized by their transport error +type. This will allow them to return either a successful response or an +error.

+

Note On (De)Serialization

+

Request, Response, and similar types are generic over the +actual data being passed to and from the RPC. We can achieve partial +(de)serialization by making them generic over a serde_json::RawValue.

+
    +
  • For Request - PartiallySerializedRequest is a Request<Box<RawValue>. It represents a +Request whose parameters have been serialized. SerializedRequest, on the other hand is a +request that has been totally serialized. For client-development purposes, its Id and +method have been preserved.
  • +
  • For Response - BorrowedResponse is a Response<&RawValue>. It represents a Response +whose Id and return status (success or failure) have been deserialized, but whose payload +has not.
  • +
+

Allowing partial serialization lets us include many unlike Request +objects in collections (e.g. in a batch request). This is useful for +implementing a client.

+

Allowing partial deserialization lets learn request status, and associate +the raw response data with the corresponding client request before doing +full deserialization work. This is useful for implementing a client.

+

In general, partially deserialized responses can be further deserialized. +E.g. an BorrowedRpcResult may have success responses deserialized +with crate::try_deserialize_ok::<U>, which will transform it to an +RpcResult<U>.

+

Modules

Structs

Enums

Traits

  • An object that can be used as a JSON-RPC parameter and return value.
  • An object that can be used as a JSON-RPC parameter.
  • An object that can be used as a JSON-RPC return value.

Functions

Type Aliases

  • A ErrorPayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.
  • A Response that has been partially deserialized, borrowing its contents +from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.
  • A BorrowedResponsePacket is a ResponsePacket that has been partially +deserialized, borrowing its contents from the deserializer. This is used +primarily for intermediate deserialization. Most users will not require it.
  • A ResponsePayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.
  • A partially deserialized RpcResult, borrowing from the deserializer.
  • A Request that has been partially serialized. The request parameters +have been serialized, and are represented as a boxed RawValue. This is +useful for collections containing many requests, as it erases the Param +type. It can be created with Request::box_params().
  • The result of a JSON-RPC request.
\ No newline at end of file diff --git a/alloy_json_rpc/notification/enum.PubSubItem.html b/alloy_json_rpc/notification/enum.PubSubItem.html new file mode 100644 index 000000000000..15fec2f2ffb8 --- /dev/null +++ b/alloy_json_rpc/notification/enum.PubSubItem.html @@ -0,0 +1,25 @@ +PubSubItem in alloy_json_rpc::notification - Rust +
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

source§

fn clone(&self) -> PubSubItem

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PubSubItem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PubSubItem

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + '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: 80 bytes

Size for each variant:

  • Response: 80 bytes
  • Notification: 56 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/notification/index.html b/alloy_json_rpc/notification/index.html new file mode 100644 index 000000000000..d478ad943d92 --- /dev/null +++ b/alloy_json_rpc/notification/index.html @@ -0,0 +1,5 @@ +alloy_json_rpc::notification - Rust +

Structs

  • An ethereum-style notification, not to be confused with a JSON-RPC +notification.

Enums

  • 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.
\ No newline at end of file diff --git a/alloy_json_rpc/notification/sidebar-items.js b/alloy_json_rpc/notification/sidebar-items.js new file mode 100644 index 000000000000..37c6317d12d1 --- /dev/null +++ b/alloy_json_rpc/notification/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["PubSubItem"],"struct":["EthNotification"]}; \ No newline at end of file diff --git a/alloy_json_rpc/notification/struct.EthNotification.html b/alloy_json_rpc/notification/struct.EthNotification.html new file mode 100644 index 000000000000..7fb8e17b5632 --- /dev/null +++ b/alloy_json_rpc/notification/struct.EthNotification.html @@ -0,0 +1,34 @@ +EthNotification in alloy_json_rpc::notification - Rust +
pub struct EthNotification<T = Box<RawValue>> {
+    pub subscription: U256,
+    pub result: T,
+}
Expand description

An ethereum-style notification, not to be confused with a JSON-RPC +notification.

+

Fields§

§subscription: U256

The subscription ID.

+
§result: T

The notification payload.

+

Trait Implementations§

source§

impl<T: Clone> Clone for EthNotification<T>

source§

fn clone(&self) -> EthNotification<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for EthNotification<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, T> Deserialize<'de> for EthNotification<T>
where + T: Deserialize<'de>,

source§

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<T> Serialize for EthNotification<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for EthNotification<T>
where + T: RefUnwindSafe,

§

impl<T> Send for EthNotification<T>
where + T: Send,

§

impl<T> Sync for EthNotification<T>
where + T: Sync,

§

impl<T> Unpin for EthNotification<T>
where + T: Unpin,

§

impl<T> UnwindSafe for EthNotification<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/packet/enum.RequestPacket.html b/alloy_json_rpc/packet/enum.RequestPacket.html new file mode 100644 index 000000000000..e3aeafad2dc3 --- /dev/null +++ b/alloy_json_rpc/packet/enum.RequestPacket.html @@ -0,0 +1,29 @@ +RequestPacket in alloy_json_rpc::packet - Rust +
pub enum RequestPacket {
+    Single(SerializedRequest),
+    Batch(Vec<SerializedRequest>),
+}
Expand description

A RequestPacket is a SerializedRequest or a batch of serialized +request.

+

Variants§

§

Single(SerializedRequest)

A single request.

+
§

Batch(Vec<SerializedRequest>)

A batch of requests.

+

Implementations§

source§

impl RequestPacket

source

pub fn with_capacity(capacity: usize) -> Self

Create a new empty packet with the given capacity.

+
source

pub fn serialize(self) -> Result<Box<RawValue>>

Serialize the packet as a boxed RawValue.

+
source

pub fn subscription_request_ids(&self) -> HashSet<&Id>

Get the request IDs of all subscription requests in the packet.

+
source

pub fn len(&self) -> usize

Get the number of requests in the packet.

+
source

pub fn is_empty(&self) -> bool

Check if the packet is empty.

+
source

pub fn push(&mut self, req: SerializedRequest)

Push a request into the packet.

+

Trait Implementations§

source§

impl Clone for RequestPacket

source§

fn clone(&self) -> RequestPacket

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RequestPacket

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SerializedRequest> for RequestPacket

source§

fn from(req: SerializedRequest) -> Self

Converts to this type from the input type.
source§

impl FromIterator<SerializedRequest> for RequestPacket

source§

fn from_iter<T: IntoIterator<Item = SerializedRequest>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Serialize for RequestPacket

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

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: 64 bytes

Size for each variant:

  • Single: 64 bytes
  • Batch: 32 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/packet/enum.ResponsePacket.html b/alloy_json_rpc/packet/enum.ResponsePacket.html new file mode 100644 index 000000000000..46fee827fba9 --- /dev/null +++ b/alloy_json_rpc/packet/enum.ResponsePacket.html @@ -0,0 +1,52 @@ +ResponsePacket in alloy_json_rpc::packet - Rust +
pub enum ResponsePacket<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    Single(Response<Payload, ErrData>),
+    Batch(Vec<Response<Payload, ErrData>>),
+}
Expand description

A ResponsePacket is a Response or a batch of responses.

+

Variants§

§

Single(Response<Payload, ErrData>)

A single response.

+
§

Batch(Vec<Response<Payload, ErrData>>)

A batch of responses.

+

Implementations§

source§

impl ResponsePacket<&RawValue, &RawValue>

source

pub fn into_owned(self) -> ResponsePacket

Convert this borrowed response packet into an owned packet by copying +the data from the deserializer (if necessary).

+
source§

impl<Payload, ErrData> ResponsePacket<Payload, ErrData>

source

pub fn responses_by_ids( + &self, + ids: &HashSet<Id> +) -> Vec<&Response<Payload, ErrData>>

Find responses by a list of IDs.

+

This is intended to be used in conjunction with +RequestPacket::subscription_request_ids to identify subscription +responses.

+
Note
+
    +
  • Responses are not guaranteed to be in the same order.
  • +
  • Responses are not guaranteed to be in the set.
  • +
  • If the packet contains duplicate IDs, both will be found.
  • +
+

Trait Implementations§

source§

impl<Payload: Clone, ErrData: Clone> Clone for ResponsePacket<Payload, ErrData>

source§

fn clone(&self) -> ResponsePacket<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Payload: Debug, ErrData: Debug> Debug for ResponsePacket<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, Payload, ErrData> Deserialize<'de> for ResponsePacket<Payload, ErrData>
where + Payload: Deserialize<'de>, + ErrData: Deserialize<'de>,

source§

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<Payload, ErrData> From<Vec<Response<Payload, ErrData>>> for ResponsePacket<Payload, ErrData>

source§

fn from(value: Vec<Response<Payload, ErrData>>) -> Self

Converts to this type from the input type.
source§

impl<Payload, ErrData> FromIterator<Response<Payload, ErrData>> for ResponsePacket<Payload, ErrData>

source§

fn from_iter<T: IntoIterator<Item = Response<Payload, ErrData>>>( + iter: T +) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

§

impl<Payload, ErrData> RefUnwindSafe for ResponsePacket<Payload, ErrData>
where + ErrData: RefUnwindSafe, + Payload: RefUnwindSafe,

§

impl<Payload, ErrData> Send for ResponsePacket<Payload, ErrData>
where + ErrData: Send, + Payload: Send,

§

impl<Payload, ErrData> Sync for ResponsePacket<Payload, ErrData>
where + ErrData: Sync, + Payload: Sync,

§

impl<Payload, ErrData> Unpin for ResponsePacket<Payload, ErrData>
where + ErrData: Unpin, + Payload: Unpin,

§

impl<Payload, ErrData> UnwindSafe for ResponsePacket<Payload, ErrData>
where + ErrData: UnwindSafe, + Payload: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/packet/index.html b/alloy_json_rpc/packet/index.html new file mode 100644 index 000000000000..9c2968b52b0d --- /dev/null +++ b/alloy_json_rpc/packet/index.html @@ -0,0 +1,5 @@ +alloy_json_rpc::packet - Rust +

Module alloy_json_rpc::packet

source ·

Enums

Type Aliases

\ No newline at end of file diff --git a/alloy_json_rpc/packet/sidebar-items.js b/alloy_json_rpc/packet/sidebar-items.js new file mode 100644 index 000000000000..5847bca7a73c --- /dev/null +++ b/alloy_json_rpc/packet/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["RequestPacket","ResponsePacket"],"type":["BorrowedResponsePacket"]}; \ No newline at end of file diff --git a/alloy_json_rpc/packet/type.BorrowedResponsePacket.html b/alloy_json_rpc/packet/type.BorrowedResponsePacket.html new file mode 100644 index 000000000000..2c96d5ebe58c --- /dev/null +++ b/alloy_json_rpc/packet/type.BorrowedResponsePacket.html @@ -0,0 +1,13 @@ +BorrowedResponsePacket in alloy_json_rpc::packet - Rust +
pub type BorrowedResponsePacket<'a> = ResponsePacket<&'a RawValue, &'a RawValue>;
Expand description

A BorrowedResponsePacket is a ResponsePacket that has been partially +deserialized, borrowing its contents from the deserializer. This is used +primarily for intermediate deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

enum BorrowedResponsePacket<'a> {
+    Single(Response<&'a RawValue, &'a RawValue>),
+    Batch(Vec<Response<&'a RawValue, &'a RawValue>>),
+}

Variants§

§

Single(Response<&'a RawValue, &'a RawValue>)

A single response.

+
§

Batch(Vec<Response<&'a RawValue, &'a RawValue>>)

A batch of responses.

+

Implementations§

source§

impl BorrowedResponsePacket<'_>

source

pub fn into_owned(self) -> ResponsePacket

Convert this borrowed response packet into an owned packet by copying +the data from the deserializer (if necessary).

+

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: 80 bytes

Size for each variant:

  • Single: 80 bytes
  • Batch: 32 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/request/index.html b/alloy_json_rpc/request/index.html new file mode 100644 index 000000000000..c29645d6961c --- /dev/null +++ b/alloy_json_rpc/request/index.html @@ -0,0 +1,6 @@ +alloy_json_rpc::request - Rust +

Module alloy_json_rpc::request

source ·

Structs

  • A JSON-RPC 2.0 request object.
  • RequestMeta contains the Id and method name of a request.
  • A JSON-RPC 2.0 request object that has been serialized, with its Id and +method preserved.

Type Aliases

\ No newline at end of file diff --git a/alloy_json_rpc/request/sidebar-items.js b/alloy_json_rpc/request/sidebar-items.js new file mode 100644 index 000000000000..21a61f1a8a20 --- /dev/null +++ b/alloy_json_rpc/request/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["Request","RequestMeta","SerializedRequest"],"type":["PartiallySerializedRequest"]}; \ No newline at end of file diff --git a/alloy_json_rpc/request/struct.Request.html b/alloy_json_rpc/request/struct.Request.html new file mode 100644 index 000000000000..dcf56397898a --- /dev/null +++ b/alloy_json_rpc/request/struct.Request.html @@ -0,0 +1,56 @@ +Request in alloy_json_rpc::request - Rust +
pub struct Request<Params> {
+    pub meta: RequestMeta,
+    pub params: Params,
+}
Expand description

A JSON-RPC 2.0 request object.

+

This is a generic type that can be used to represent any JSON-RPC request. +The Params type parameter is used to represent the parameters of the +request, and the method field is used to represent the method name.

+

Note

+

The value of method should be known at compile time.

+

Fields§

§meta: RequestMeta

The request metadata (ID and method).

+
§params: Params

The request parameters.

+

Implementations§

source§

impl<Params> Request<Params>
where + Params: RpcParam,

source

pub fn box_params(self) -> PartiallySerializedRequest

Serialize the request parameters as a boxed RawValue.

+
Panics
+

If serialization of the params fails.

+
source

pub fn serialize(self) -> Result<SerializedRequest>

Serialize the request, including the request parameters.

+
source§

impl<Params> Request<&Params>
where + Params: Clone,

source

pub fn into_owned_params(self) -> Request<Params>

Clone the request, including the request parameters.

+
source§

impl<'a, Params> Request<Params>
where + Params: AsRef<RawValue> + 'a,

source

pub fn try_params_as<T: DeserializeOwned>(&self) -> Result<T>

Attempt to deserialize the params.

+

To borrow from the params via the deserializer, use +Request::try_borrow_params_as.

+
Returns
+
    +
  • Ok(T) if the params can be deserialized as T
  • +
  • Err(e) if the params cannot be deserialized as T
  • +
+
source

pub fn try_borrow_params_as<T: Deserialize<'a>>(&'a self) -> Result<T>

Attempt to deserialize the params, borrowing from the params

+
Returns
+
    +
  • Ok(T) if the params can be deserialized as T
  • +
  • Err(e) if the params cannot be deserialized as T
  • +
+

Trait Implementations§

source§

impl<Params: Clone> Clone for Request<Params>

source§

fn clone(&self) -> Request<Params>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Params: Debug> Debug for Request<Params>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Params> Serialize for Request<Params>
where + Params: RpcParam,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Params> TryFrom<Request<Params>> for SerializedRequest
where + Params: RpcParam,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Request<Params>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<Params> RefUnwindSafe for Request<Params>
where + Params: RefUnwindSafe,

§

impl<Params> Send for Request<Params>
where + Params: Send,

§

impl<Params> Sync for Request<Params>
where + Params: Sync,

§

impl<Params> Unpin for Request<Params>
where + Params: Unpin,

§

impl<Params> UnwindSafe for Request<Params>
where + Params: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/request/struct.RequestMeta.html b/alloy_json_rpc/request/struct.RequestMeta.html new file mode 100644 index 000000000000..dd94029e7848 --- /dev/null +++ b/alloy_json_rpc/request/struct.RequestMeta.html @@ -0,0 +1,20 @@ +RequestMeta in alloy_json_rpc::request - Rust +
pub struct RequestMeta {
+    pub method: &'static str,
+    pub id: Id,
+}
Expand description

RequestMeta contains the Id and method name of a request.

+

Fields§

§method: &'static str

The method name.

+
§id: Id

The request ID.

+

Trait Implementations§

source§

impl Clone for RequestMeta

source§

fn clone(&self) -> RequestMeta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RequestMeta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 48 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/request/struct.SerializedRequest.html b/alloy_json_rpc/request/struct.SerializedRequest.html new file mode 100644 index 000000000000..ee1a409d1e65 --- /dev/null +++ b/alloy_json_rpc/request/struct.SerializedRequest.html @@ -0,0 +1,38 @@ +SerializedRequest in alloy_json_rpc::request - Rust +
pub struct SerializedRequest {
+    meta: RequestMeta,
+    request: Box<RawValue>,
+}
Expand description

A JSON-RPC 2.0 request object that has been serialized, with its Id and +method preserved.

+

This struct is used to represent a request that has been serialized, but +not yet sent. It is used by RPC clients to build batch requests and manage +in-flight requests.

+

Fields§

§meta: RequestMeta§request: Box<RawValue>

Implementations§

source§

impl SerializedRequest

source

pub const fn meta(&self) -> &RequestMeta

Get the request metadata (ID and Method)

+
source

pub const fn id(&self) -> &Id

Get the request ID.

+
source

pub const fn method(&self) -> &'static str

Get the request method.

+
source

pub const fn serialized(&self) -> &RawValue

Get the serialized request.

+
source

pub fn decompose(self) -> (RequestMeta, Box<RawValue>)

Consumes the serialized request, returning the underlying +RequestMeta and the RawValue.

+
source

pub fn take_request(self) -> Box<RawValue>

Take the serialized request, consuming the SerializedRequest.

+
source

pub fn params(&self) -> Option<&RawValue>

Get a reference to the serialized request’s params.

+

This partially deserializes the request, and should be avoided if +possible.

+
source

pub fn params_hash(&self) -> B256

Get the hash of the serialized request’s params.

+

This partially deserializes the request, and should be avoided if +possible.

+

Trait Implementations§

source§

impl Clone for SerializedRequest

source§

fn clone(&self) -> SerializedRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SerializedRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SerializedRequest> for RequestPacket

source§

fn from(req: SerializedRequest) -> Self

Converts to this type from the input type.
source§

impl FromIterator<SerializedRequest> for RequestPacket

source§

fn from_iter<T: IntoIterator<Item = SerializedRequest>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Serialize for SerializedRequest

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Params> TryFrom<Request<Params>> for SerializedRequest
where + Params: RpcParam,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Request<Params>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/request/type.PartiallySerializedRequest.html b/alloy_json_rpc/request/type.PartiallySerializedRequest.html new file mode 100644 index 000000000000..7e273d256a70 --- /dev/null +++ b/alloy_json_rpc/request/type.PartiallySerializedRequest.html @@ -0,0 +1,12 @@ +PartiallySerializedRequest in alloy_json_rpc::request - Rust +
pub type PartiallySerializedRequest = Request<Box<RawValue>>;
Expand description

A Request that has been partially serialized. The request parameters +have been serialized, and are represented as a boxed RawValue. This is +useful for collections containing many requests, as it erases the Param +type. It can be created with Request::box_params().

+

See the top-level docs for more info.

+

Aliased Type§

struct PartiallySerializedRequest {
+    pub meta: RequestMeta,
+    pub params: Box<RawValue>,
+}

Fields§

§meta: RequestMeta

The request metadata (ID and method).

+
§params: Box<RawValue>

The request parameters.

+

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: 64 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/response/error/index.html b/alloy_json_rpc/response/error/index.html new file mode 100644 index 000000000000..5beb2b30cea7 --- /dev/null +++ b/alloy_json_rpc/response/error/index.html @@ -0,0 +1,4 @@ +alloy_json_rpc::response::error - Rust +

Structs

Type Aliases

  • A ErrorPayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.
\ No newline at end of file diff --git a/alloy_json_rpc/response/error/sidebar-items.js b/alloy_json_rpc/response/error/sidebar-items.js new file mode 100644 index 000000000000..f9eb56d29de6 --- /dev/null +++ b/alloy_json_rpc/response/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ErrorPayload"],"type":["BorrowedErrorPayload"]}; \ No newline at end of file diff --git a/alloy_json_rpc/response/error/struct.ErrorPayload.html b/alloy_json_rpc/response/error/struct.ErrorPayload.html new file mode 100644 index 000000000000..334fc586e9e9 --- /dev/null +++ b/alloy_json_rpc/response/error/struct.ErrorPayload.html @@ -0,0 +1,55 @@ +ErrorPayload in alloy_json_rpc::response::error - Rust +
pub struct ErrorPayload<ErrData = Box<RawValue>> {
+    pub code: i64,
+    pub message: String,
+    pub data: Option<ErrData>,
+}
Expand description

A JSONRPC-2.0 error object.

+

This response indicates that the server received and handled the request, +but that there was an error in the processing of it. The error should be +included in the message field of the response payload.

+

Fields§

§code: i64

The error code.

+
§message: String

The error message (if any).

+
§data: Option<ErrData>

The error data (if any).

+

Implementations§

source§

impl ErrorPayload<&RawValue>

source

pub fn into_owned(self) -> ErrorPayload

Convert this borrowed error payload into an owned payload by copying +the data from the deserializer (if necessary).

+
source§

impl<'a, Data> ErrorPayload<Data>
where + Data: Borrow<RawValue> + 'a,

source

pub fn try_data_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Deserialize the error’s data field, borrowing from the data field if +necessary.

+
Returns
+
    +
  • None if the error has no data field.
  • +
  • Some(Ok(data)) if the error has a data field that can be deserialized.
  • +
  • Some(Err(err)) if the error has a data field that can’t be deserialized.
  • +
+
source

pub fn deser_data<T: DeserializeOwned>(self) -> Result<ErrorPayload<T>, Self>

Attempt to deserialize the data field.

+
Returns
+
    +
  • Ok(ErrorPayload<T>) if the data field can be deserialized
  • +
  • Err(self) if the data field can’t be deserialized, or if there is no data field.
  • +
+

Trait Implementations§

source§

impl<ErrData: Clone> Clone for ErrorPayload<ErrData>

source§

fn clone(&self) -> ErrorPayload<ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<ErrData: Debug> Debug for ErrorPayload<ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, ErrData: Deserialize<'de>> Deserialize<'de> for ErrorPayload<ErrData>

source§

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<ErrData> Display for ErrorPayload<ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<ErrData> Serialize for ErrorPayload<ErrData>
where + ErrData: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<ErrData> RefUnwindSafe for ErrorPayload<ErrData>
where + ErrData: RefUnwindSafe,

§

impl<ErrData> Send for ErrorPayload<ErrData>
where + ErrData: Send,

§

impl<ErrData> Sync for ErrorPayload<ErrData>
where + ErrData: Sync,

§

impl<ErrData> Unpin for ErrorPayload<ErrData>
where + ErrData: Unpin,

§

impl<ErrData> UnwindSafe for ErrorPayload<ErrData>
where + ErrData: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/response/error/type.BorrowedErrorPayload.html b/alloy_json_rpc/response/error/type.BorrowedErrorPayload.html new file mode 100644 index 000000000000..7177c8a53b8c --- /dev/null +++ b/alloy_json_rpc/response/error/type.BorrowedErrorPayload.html @@ -0,0 +1,15 @@ +BorrowedErrorPayload in alloy_json_rpc::response::error - Rust +
pub type BorrowedErrorPayload<'a> = ErrorPayload<&'a RawValue>;
Expand description

A ErrorPayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

struct BorrowedErrorPayload<'a> {
+    pub code: i64,
+    pub message: String,
+    pub data: Option<&'a RawValue>,
+}

Fields§

§code: i64

The error code.

+
§message: String

The error message (if any).

+
§data: Option<&'a RawValue>

The error data (if any).

+

Implementations§

source§

impl BorrowedErrorPayload<'_>

source

pub fn into_owned(self) -> ErrorPayload

Convert this borrowed error payload into an owned payload by copying +the data from the deserializer (if necessary).

+

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: 48 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/response/index.html b/alloy_json_rpc/response/index.html new file mode 100644 index 000000000000..3fe63f37248a --- /dev/null +++ b/alloy_json_rpc/response/index.html @@ -0,0 +1,4 @@ +alloy_json_rpc::response - Rust +

Re-exports

Modules

Structs

Type Aliases

  • A Response that has been partially deserialized, borrowing its contents +from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.
\ No newline at end of file diff --git a/alloy_json_rpc/response/payload/enum.ResponsePayload.html b/alloy_json_rpc/response/payload/enum.ResponsePayload.html new file mode 100644 index 000000000000..81df611a3c78 --- /dev/null +++ b/alloy_json_rpc/response/payload/enum.ResponsePayload.html @@ -0,0 +1,79 @@ +ResponsePayload in alloy_json_rpc::response::payload - Rust +
pub enum ResponsePayload<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    Success(Payload),
+    Failure(ErrorPayload<ErrData>),
+}
Expand description

A JSONRPC-2.0 response payload.

+

This enum covers both the success and error cases of a JSONRPC-2.0 +response. It is used to represent the result and error fields of a +response object.

+

Note

+

This type does not implement Serialize or Deserialize directly. It is +deserialized as part of the Response type.

+

Variants§

§

Success(Payload)

A successful response payload.

+
§

Failure(ErrorPayload<ErrData>)

An error response payload.

+

Implementations§

source§

impl ResponsePayload<&RawValue, &RawValue>

source

pub fn into_owned(self) -> ResponsePayload

Convert this borrowed response payload into an owned payload by copying +the data from the deserializer (if necessary).

+
source§

impl<Payload, ErrData> ResponsePayload<Payload, ErrData>

source

pub const fn as_success(&self) -> Option<&Payload>

Fallible conversion to the succesful payload.

+
source

pub const fn as_error(&self) -> Option<&ErrorPayload<ErrData>>

Fallible conversion to the error object.

+
source

pub const fn is_success(&self) -> bool

Returns true if the response payload is a success.

+
source

pub const fn is_error(&self) -> bool

Returns true if the response payload is an error.

+
source§

impl<'a, Payload, ErrData> ResponsePayload<Payload, ErrData>
where + Payload: AsRef<RawValue> + 'a,

source

pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the success payload, borrowing from the payload +if necessary.

+
Returns
+
    +
  • None if the payload is an error
  • +
  • Some(Ok(T)) if the payload is a success and can be deserialized
  • +
  • Some(Err(serde_json::Error)) if the payload is a success and can’t be deserialized as +T
  • +
+
source

pub fn deserialize_success<T: DeserializeOwned>( + self +) -> Result<ResponsePayload<T, ErrData>, Self>

Deserialize a Success payload, if possible, transforming this type.

+
Returns
+
    +
  • Ok(ResponsePayload<T>) if the payload is an error, or if the payload is a success and +can be deserialized as T
  • +
  • Err(self) if the payload is a success and can’t be deserialized
  • +
+
source§

impl<'a, Payload, Data> ResponsePayload<Payload, Data>
where + Data: Borrow<RawValue> + 'a,

source

pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the error payload, borrowing from the payload if +necessary.

+
Returns
+
    +
  • None if the payload is a success
  • +
  • Some(Ok(T)) if the payload is an error and can be deserialized
  • +
  • Some(Err(serde_json::Error)) if the payload is an error and can’t be deserialized as T
  • +
+
source

pub fn deserialize_error<T: DeserializeOwned>( + self +) -> Result<ResponsePayload<Payload, T>, Self>

Deserialize an Error payload, if possible, transforming this type.

+
Returns
+
    +
  • Ok(ResponsePayload<Payload, T>) if the payload is an error, or if the payload is an +error and can be deserialized as T.
  • +
  • Err(self) if the payload is an error and can’t be deserialized.
  • +
+

Trait Implementations§

source§

impl<Payload: Clone, ErrData: Clone> Clone for ResponsePayload<Payload, ErrData>

source§

fn clone(&self) -> ResponsePayload<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Payload: Debug, ErrData: Debug> Debug for ResponsePayload<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Payload, ErrData> RefUnwindSafe for ResponsePayload<Payload, ErrData>
where + ErrData: RefUnwindSafe, + Payload: RefUnwindSafe,

§

impl<Payload, ErrData> Send for ResponsePayload<Payload, ErrData>
where + ErrData: Send, + Payload: Send,

§

impl<Payload, ErrData> Sync for ResponsePayload<Payload, ErrData>
where + ErrData: Sync, + Payload: Sync,

§

impl<Payload, ErrData> Unpin for ResponsePayload<Payload, ErrData>
where + ErrData: Unpin, + Payload: Unpin,

§

impl<Payload, ErrData> UnwindSafe for ResponsePayload<Payload, ErrData>
where + ErrData: UnwindSafe, + Payload: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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.

\ No newline at end of file diff --git a/alloy_json_rpc/response/payload/index.html b/alloy_json_rpc/response/payload/index.html new file mode 100644 index 000000000000..ec8faa4099c1 --- /dev/null +++ b/alloy_json_rpc/response/payload/index.html @@ -0,0 +1,4 @@ +alloy_json_rpc::response::payload - Rust +

Enums

Type Aliases

  • A ResponsePayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.
\ No newline at end of file diff --git a/alloy_json_rpc/response/payload/sidebar-items.js b/alloy_json_rpc/response/payload/sidebar-items.js new file mode 100644 index 000000000000..d0c926e5fea1 --- /dev/null +++ b/alloy_json_rpc/response/payload/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ResponsePayload"],"type":["BorrowedResponsePayload"]}; \ No newline at end of file diff --git a/alloy_json_rpc/response/payload/type.BorrowedResponsePayload.html b/alloy_json_rpc/response/payload/type.BorrowedResponsePayload.html new file mode 100644 index 000000000000..8bfd3bc06e68 --- /dev/null +++ b/alloy_json_rpc/response/payload/type.BorrowedResponsePayload.html @@ -0,0 +1,13 @@ +BorrowedResponsePayload in alloy_json_rpc::response::payload - Rust +
pub type BorrowedResponsePayload<'a> = ResponsePayload<&'a RawValue, &'a RawValue>;
Expand description

A ResponsePayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

enum BorrowedResponsePayload<'a> {
+    Success(&'a RawValue),
+    Failure(ErrorPayload<&'a RawValue>),
+}

Variants§

§

Success(&'a RawValue)

A successful response payload.

+
§

Failure(ErrorPayload<&'a RawValue>)

An error response payload.

+

Implementations§

source§

impl BorrowedResponsePayload<'_>

source

pub fn into_owned(self) -> ResponsePayload

Convert this borrowed response payload into an owned payload by copying +the data from the deserializer (if necessary).

+

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: 48 bytes

Size for each variant:

  • Success: 24 bytes
  • Failure: 48 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/response/sidebar-items.js b/alloy_json_rpc/response/sidebar-items.js new file mode 100644 index 000000000000..29a4fdc5915a --- /dev/null +++ b/alloy_json_rpc/response/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["error","payload"],"struct":["Response"],"type":["BorrowedResponse"]}; \ No newline at end of file diff --git a/alloy_json_rpc/response/struct.Response.html b/alloy_json_rpc/response/struct.Response.html new file mode 100644 index 000000000000..87b2bd758c23 --- /dev/null +++ b/alloy_json_rpc/response/struct.Response.html @@ -0,0 +1,76 @@ +Response in alloy_json_rpc::response - Rust +
pub struct Response<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    pub id: Id,
+    pub payload: ResponsePayload<Payload, ErrData>,
+}
Expand description

A JSONRPC-2.0 response object containing a ResponsePayload.

+

This object is used to represent a JSONRPC-2.0 response. It may contain +either a successful result or an error. The id field is used to match +the response to the request that it is responding to, and should be +mirrored from the response.

+

Fields§

§id: Id

The ID of the request that this response is responding to.

+
§payload: ResponsePayload<Payload, ErrData>

The response payload.

+

Implementations§

source§

impl Response<&RawValue, &RawValue>

source

pub fn into_owned(self) -> Response

Convert this borrowed response to an owned response by copying the data +from the deserializer (if necessary).

+
source§

impl<Payload, ErrData> Response<Payload, ErrData>

source

pub const fn is_success(&self) -> bool

Returns true if the response is a success.

+
source

pub const fn is_error(&self) -> bool

Returns true if the response is an error.

+
source§

impl<'a, Payload, ErrData> Response<Payload, ErrData>
where + Payload: AsRef<RawValue> + 'a,

source

pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the success payload, borrowing from the payload +if necessary.

+

See ResponsePayload::try_success_as.

+
source

pub fn deser_success<T: DeserializeOwned>( + self +) -> Result<Response<T, ErrData>, Self>

Attempt to deserialize the Success payload, transforming this type.

+
Returns
+
    +
  • Ok(Response<T, ErrData>) if the payload is a success and can be deserialized as T, or if +the payload is an error.
  • +
  • Err(self) if the payload is a success and can’t be deserialized.
  • +
+
source§

impl<'a, Payload, ErrData> Response<Payload, ErrData>
where + ErrData: Borrow<RawValue> + 'a,

source

pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the error payload, borrowing from the payload if +necesary.

+

See ResponsePayload::try_error_as.

+
source

pub fn deser_err<T: DeserializeOwned>( + self +) -> Result<Response<Payload, T>, Self>

Attempt to deserialize the Error payload, transforming this type.

+
Returns
+
    +
  • Ok(Response<Payload, T>) if the payload is an error and can be deserialized as T, or +if the payload is a success.
  • +
  • Err(self) if the payload is an error and can’t be deserialized.
  • +
+

Trait Implementations§

source§

impl<Payload: Clone, ErrData: Clone> Clone for Response<Payload, ErrData>

source§

fn clone(&self) -> Response<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Payload: Debug, ErrData: Debug> Debug for Response<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, Payload, ErrData> Deserialize<'de> for Response<Payload, ErrData>
where + Payload: Deserialize<'de>, + ErrData: Deserialize<'de>,

source§

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<Payload, ErrData> FromIterator<Response<Payload, ErrData>> for ResponsePacket<Payload, ErrData>

source§

fn from_iter<T: IntoIterator<Item = Response<Payload, ErrData>>>( + iter: T +) -> Self

Creates a value from an iterator. Read more
source§

impl<Payload, ErrData> Serialize for Response<Payload, ErrData>
where + Payload: Serialize, + ErrData: Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<Payload, ErrData> RefUnwindSafe for Response<Payload, ErrData>
where + ErrData: RefUnwindSafe, + Payload: RefUnwindSafe,

§

impl<Payload, ErrData> Send for Response<Payload, ErrData>
where + ErrData: Send, + Payload: Send,

§

impl<Payload, ErrData> Sync for Response<Payload, ErrData>
where + ErrData: Sync, + Payload: Sync,

§

impl<Payload, ErrData> Unpin for Response<Payload, ErrData>
where + ErrData: Unpin, + Payload: Unpin,

§

impl<Payload, ErrData> UnwindSafe for Response<Payload, ErrData>
where + ErrData: UnwindSafe, + Payload: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/response/type.BorrowedResponse.html b/alloy_json_rpc/response/type.BorrowedResponse.html new file mode 100644 index 000000000000..23d2ff6d749d --- /dev/null +++ b/alloy_json_rpc/response/type.BorrowedResponse.html @@ -0,0 +1,13 @@ +BorrowedResponse in alloy_json_rpc::response - Rust +
pub type BorrowedResponse<'a> = Response<&'a RawValue, &'a RawValue>;
Expand description

A Response that has been partially deserialized, borrowing its contents +from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

struct BorrowedResponse<'a> {
+    pub id: Id,
+    pub payload: ResponsePayload<&'a RawValue, &'a RawValue>,
+}

Fields§

§id: Id

The ID of the request that this response is responding to.

+
§payload: ResponsePayload<&'a RawValue, &'a RawValue>

The response payload.

+

Implementations§

source§

impl BorrowedResponse<'_>

source

pub fn into_owned(self) -> Response

Convert this borrowed response to an owned response by copying the data +from the deserializer (if necessary).

+

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: 80 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/result/fn.transform_response.html b/alloy_json_rpc/result/fn.transform_response.html new file mode 100644 index 000000000000..9c7b90fce668 --- /dev/null +++ b/alloy_json_rpc/result/fn.transform_response.html @@ -0,0 +1,6 @@ +transform_response in alloy_json_rpc::result - Rust +
pub fn transform_response<T, E, ErrResp>(
+    response: Response<T, ErrResp>
+) -> Result<T, RpcError<E, ErrResp>>
where + ErrResp: RpcReturn,
Expand description

Transform a transport response into an RpcResult, discarding the Id.

+
\ No newline at end of file diff --git a/alloy_json_rpc/result/fn.transform_result.html b/alloy_json_rpc/result/fn.transform_result.html new file mode 100644 index 000000000000..5d36fc0cfcec --- /dev/null +++ b/alloy_json_rpc/result/fn.transform_result.html @@ -0,0 +1,6 @@ +transform_result in alloy_json_rpc::result - Rust +
pub fn transform_result<T, E, ErrResp>(
+    response: Result<Response<T, ErrResp>, E>
+) -> Result<T, RpcError<E, ErrResp>>
where + ErrResp: RpcReturn,
Expand description

Transform a transport outcome into an RpcResult, discarding the Id.

+
\ No newline at end of file diff --git a/alloy_json_rpc/result/fn.try_deserialize_ok.html b/alloy_json_rpc/result/fn.try_deserialize_ok.html new file mode 100644 index 000000000000..08cf90785dc2 --- /dev/null +++ b/alloy_json_rpc/result/fn.try_deserialize_ok.html @@ -0,0 +1,8 @@ +try_deserialize_ok in alloy_json_rpc::result - Rust +
pub fn try_deserialize_ok<'a, J, T, E, ErrResp>(
+    result: RpcResult<J, E, ErrResp>
+) -> RpcResult<T, E, ErrResp>
where + J: Borrow<RawValue> + 'a, + T: RpcReturn, + ErrResp: RpcReturn,
Expand description

Attempt to deserialize the Ok(_) variant of an RpcResult.

+
\ No newline at end of file diff --git a/alloy_json_rpc/result/index.html b/alloy_json_rpc/result/index.html new file mode 100644 index 000000000000..5dcd7c04d727 --- /dev/null +++ b/alloy_json_rpc/result/index.html @@ -0,0 +1,2 @@ +alloy_json_rpc::result - Rust +

Module alloy_json_rpc::result

source ·

Functions

Type Aliases

\ No newline at end of file diff --git a/alloy_json_rpc/result/sidebar-items.js b/alloy_json_rpc/result/sidebar-items.js new file mode 100644 index 000000000000..f05778e16f36 --- /dev/null +++ b/alloy_json_rpc/result/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["transform_response","transform_result","try_deserialize_ok"],"type":["BorrowedRpcResult","RpcResult"]}; \ No newline at end of file diff --git a/alloy_json_rpc/result/type.BorrowedRpcResult.html b/alloy_json_rpc/result/type.BorrowedRpcResult.html new file mode 100644 index 000000000000..ea5827a79882 --- /dev/null +++ b/alloy_json_rpc/result/type.BorrowedRpcResult.html @@ -0,0 +1,8 @@ +BorrowedRpcResult in alloy_json_rpc::result - Rust +
pub type BorrowedRpcResult<'a, E> = RpcResult<&'a RawValue, E, &'a RawValue>;
Expand description

A partially deserialized RpcResult, borrowing from the deserializer.

+

Aliased Type§

enum BorrowedRpcResult<'a, E> {
+    Ok(&'a RawValue),
+    Err(RpcError<E, &'a RawValue>),
+}

Variants§

§1.0.0

Ok(&'a RawValue)

Contains the success value

+
§1.0.0

Err(RpcError<E, &'a RawValue>)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_json_rpc/result/type.RpcResult.html b/alloy_json_rpc/result/type.RpcResult.html new file mode 100644 index 000000000000..1886578cadd6 --- /dev/null +++ b/alloy_json_rpc/result/type.RpcResult.html @@ -0,0 +1,19 @@ +RpcResult in alloy_json_rpc::result - Rust +

Type Alias alloy_json_rpc::result::RpcResult

source ·
pub type RpcResult<T, E, ErrResp = Box<RawValue>> = Result<T, RpcError<E, ErrResp>>;
Expand description

The result of a JSON-RPC request.

+

Either a success response, an error response, or a non-response error. The +non-response error is intended to be used for errors returned by a +transport, or serde errors.

+

The common cases are:

+
    +
  • Ok(T) - The server returned a succesful response.
  • +
  • Err(RpcError::ErrorResponse(ErrResp)) - The server returned an error response.
  • +
  • Err(RpcError::SerError(E)) - A serialization error occurred.
  • +
  • Err(RpcError::DeserError { err: E, text: String }) - A deserialization error occurred.
  • +
  • Err(RpcError::TransportError(E)) - Some client-side or communication error occurred.
  • +
+

Aliased Type§

enum RpcResult<T, E, ErrResp = Box<RawValue>> {
+    Ok(T),
+    Err(RpcError<E, ErrResp>),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(RpcError<E, ErrResp>)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_json_rpc/sidebar-items.js b/alloy_json_rpc/sidebar-items.js new file mode 100644 index 000000000000..f8e3a2dc09ad --- /dev/null +++ b/alloy_json_rpc/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Id","PubSubItem","RequestPacket","ResponsePacket","ResponsePayload","RpcError"],"fn":["transform_response","transform_result","try_deserialize_ok"],"mod":["common","error","notification","packet","request","response","result"],"struct":["ErrorPayload","EthNotification","Request","RequestMeta","Response","SerializedRequest"],"trait":["RpcObject","RpcParam","RpcReturn"],"type":["BorrowedErrorPayload","BorrowedResponse","BorrowedResponsePacket","BorrowedResponsePayload","BorrowedRpcResult","PartiallySerializedRequest","RpcResult"]}; \ No newline at end of file diff --git a/alloy_json_rpc/struct.ErrorPayload.html b/alloy_json_rpc/struct.ErrorPayload.html new file mode 100644 index 000000000000..fb34a3019dd1 --- /dev/null +++ b/alloy_json_rpc/struct.ErrorPayload.html @@ -0,0 +1,55 @@ +ErrorPayload in alloy_json_rpc - Rust +
pub struct ErrorPayload<ErrData = Box<RawValue>> {
+    pub code: i64,
+    pub message: String,
+    pub data: Option<ErrData>,
+}
Expand description

A JSONRPC-2.0 error object.

+

This response indicates that the server received and handled the request, +but that there was an error in the processing of it. The error should be +included in the message field of the response payload.

+

Fields§

§code: i64

The error code.

+
§message: String

The error message (if any).

+
§data: Option<ErrData>

The error data (if any).

+

Implementations§

source§

impl ErrorPayload<&RawValue>

source

pub fn into_owned(self) -> ErrorPayload

Convert this borrowed error payload into an owned payload by copying +the data from the deserializer (if necessary).

+
source§

impl<'a, Data> ErrorPayload<Data>
where + Data: Borrow<RawValue> + 'a,

source

pub fn try_data_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Deserialize the error’s data field, borrowing from the data field if +necessary.

+
Returns
+
    +
  • None if the error has no data field.
  • +
  • Some(Ok(data)) if the error has a data field that can be deserialized.
  • +
  • Some(Err(err)) if the error has a data field that can’t be deserialized.
  • +
+
source

pub fn deser_data<T: DeserializeOwned>(self) -> Result<ErrorPayload<T>, Self>

Attempt to deserialize the data field.

+
Returns
+
    +
  • Ok(ErrorPayload<T>) if the data field can be deserialized
  • +
  • Err(self) if the data field can’t be deserialized, or if there is no data field.
  • +
+

Trait Implementations§

source§

impl<ErrData: Clone> Clone for ErrorPayload<ErrData>

source§

fn clone(&self) -> ErrorPayload<ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<ErrData: Debug> Debug for ErrorPayload<ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, ErrData: Deserialize<'de>> Deserialize<'de> for ErrorPayload<ErrData>

source§

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<ErrData> Display for ErrorPayload<ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<ErrData> Serialize for ErrorPayload<ErrData>
where + ErrData: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<ErrData> RefUnwindSafe for ErrorPayload<ErrData>
where + ErrData: RefUnwindSafe,

§

impl<ErrData> Send for ErrorPayload<ErrData>
where + ErrData: Send,

§

impl<ErrData> Sync for ErrorPayload<ErrData>
where + ErrData: Sync,

§

impl<ErrData> Unpin for ErrorPayload<ErrData>
where + ErrData: Unpin,

§

impl<ErrData> UnwindSafe for ErrorPayload<ErrData>
where + ErrData: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/struct.EthNotification.html b/alloy_json_rpc/struct.EthNotification.html new file mode 100644 index 000000000000..39dc08f487c9 --- /dev/null +++ b/alloy_json_rpc/struct.EthNotification.html @@ -0,0 +1,34 @@ +EthNotification in alloy_json_rpc - Rust +
pub struct EthNotification<T = Box<RawValue>> {
+    pub subscription: U256,
+    pub result: T,
+}
Expand description

An ethereum-style notification, not to be confused with a JSON-RPC +notification.

+

Fields§

§subscription: U256

The subscription ID.

+
§result: T

The notification payload.

+

Trait Implementations§

source§

impl<T: Clone> Clone for EthNotification<T>

source§

fn clone(&self) -> EthNotification<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for EthNotification<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, T> Deserialize<'de> for EthNotification<T>
where + T: Deserialize<'de>,

source§

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<T> Serialize for EthNotification<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for EthNotification<T>
where + T: RefUnwindSafe,

§

impl<T> Send for EthNotification<T>
where + T: Send,

§

impl<T> Sync for EthNotification<T>
where + T: Sync,

§

impl<T> Unpin for EthNotification<T>
where + T: Unpin,

§

impl<T> UnwindSafe for EthNotification<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/struct.Request.html b/alloy_json_rpc/struct.Request.html new file mode 100644 index 000000000000..36aba36c4b6c --- /dev/null +++ b/alloy_json_rpc/struct.Request.html @@ -0,0 +1,56 @@ +Request in alloy_json_rpc - Rust +

Struct alloy_json_rpc::Request

source ·
pub struct Request<Params> {
+    pub meta: RequestMeta,
+    pub params: Params,
+}
Expand description

A JSON-RPC 2.0 request object.

+

This is a generic type that can be used to represent any JSON-RPC request. +The Params type parameter is used to represent the parameters of the +request, and the method field is used to represent the method name.

+

Note

+

The value of method should be known at compile time.

+

Fields§

§meta: RequestMeta

The request metadata (ID and method).

+
§params: Params

The request parameters.

+

Implementations§

source§

impl<Params> Request<Params>
where + Params: RpcParam,

source

pub fn box_params(self) -> PartiallySerializedRequest

Serialize the request parameters as a boxed RawValue.

+
Panics
+

If serialization of the params fails.

+
source

pub fn serialize(self) -> Result<SerializedRequest>

Serialize the request, including the request parameters.

+
source§

impl<Params> Request<&Params>
where + Params: Clone,

source

pub fn into_owned_params(self) -> Request<Params>

Clone the request, including the request parameters.

+
source§

impl<'a, Params> Request<Params>
where + Params: AsRef<RawValue> + 'a,

source

pub fn try_params_as<T: DeserializeOwned>(&self) -> Result<T>

Attempt to deserialize the params.

+

To borrow from the params via the deserializer, use +Request::try_borrow_params_as.

+
Returns
+
    +
  • Ok(T) if the params can be deserialized as T
  • +
  • Err(e) if the params cannot be deserialized as T
  • +
+
source

pub fn try_borrow_params_as<T: Deserialize<'a>>(&'a self) -> Result<T>

Attempt to deserialize the params, borrowing from the params

+
Returns
+
    +
  • Ok(T) if the params can be deserialized as T
  • +
  • Err(e) if the params cannot be deserialized as T
  • +
+

Trait Implementations§

source§

impl<Params: Clone> Clone for Request<Params>

source§

fn clone(&self) -> Request<Params>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Params: Debug> Debug for Request<Params>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Params> Serialize for Request<Params>
where + Params: RpcParam,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Params> TryFrom<Request<Params>> for SerializedRequest
where + Params: RpcParam,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Request<Params>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<Params> RefUnwindSafe for Request<Params>
where + Params: RefUnwindSafe,

§

impl<Params> Send for Request<Params>
where + Params: Send,

§

impl<Params> Sync for Request<Params>
where + Params: Sync,

§

impl<Params> Unpin for Request<Params>
where + Params: Unpin,

§

impl<Params> UnwindSafe for Request<Params>
where + Params: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/struct.RequestMeta.html b/alloy_json_rpc/struct.RequestMeta.html new file mode 100644 index 000000000000..cbb851b7aac0 --- /dev/null +++ b/alloy_json_rpc/struct.RequestMeta.html @@ -0,0 +1,20 @@ +RequestMeta in alloy_json_rpc - Rust +
pub struct RequestMeta {
+    pub method: &'static str,
+    pub id: Id,
+}
Expand description

RequestMeta contains the Id and method name of a request.

+

Fields§

§method: &'static str

The method name.

+
§id: Id

The request ID.

+

Trait Implementations§

source§

impl Clone for RequestMeta

source§

fn clone(&self) -> RequestMeta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RequestMeta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 48 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/struct.Response.html b/alloy_json_rpc/struct.Response.html new file mode 100644 index 000000000000..d0280781f74f --- /dev/null +++ b/alloy_json_rpc/struct.Response.html @@ -0,0 +1,76 @@ +Response in alloy_json_rpc - Rust +
pub struct Response<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    pub id: Id,
+    pub payload: ResponsePayload<Payload, ErrData>,
+}
Expand description

A JSONRPC-2.0 response object containing a ResponsePayload.

+

This object is used to represent a JSONRPC-2.0 response. It may contain +either a successful result or an error. The id field is used to match +the response to the request that it is responding to, and should be +mirrored from the response.

+

Fields§

§id: Id

The ID of the request that this response is responding to.

+
§payload: ResponsePayload<Payload, ErrData>

The response payload.

+

Implementations§

source§

impl Response<&RawValue, &RawValue>

source

pub fn into_owned(self) -> Response

Convert this borrowed response to an owned response by copying the data +from the deserializer (if necessary).

+
source§

impl<Payload, ErrData> Response<Payload, ErrData>

source

pub const fn is_success(&self) -> bool

Returns true if the response is a success.

+
source

pub const fn is_error(&self) -> bool

Returns true if the response is an error.

+
source§

impl<'a, Payload, ErrData> Response<Payload, ErrData>
where + Payload: AsRef<RawValue> + 'a,

source

pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the success payload, borrowing from the payload +if necessary.

+

See ResponsePayload::try_success_as.

+
source

pub fn deser_success<T: DeserializeOwned>( + self +) -> Result<Response<T, ErrData>, Self>

Attempt to deserialize the Success payload, transforming this type.

+
Returns
+
    +
  • Ok(Response<T, ErrData>) if the payload is a success and can be deserialized as T, or if +the payload is an error.
  • +
  • Err(self) if the payload is a success and can’t be deserialized.
  • +
+
source§

impl<'a, Payload, ErrData> Response<Payload, ErrData>
where + ErrData: Borrow<RawValue> + 'a,

source

pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the error payload, borrowing from the payload if +necesary.

+

See ResponsePayload::try_error_as.

+
source

pub fn deser_err<T: DeserializeOwned>( + self +) -> Result<Response<Payload, T>, Self>

Attempt to deserialize the Error payload, transforming this type.

+
Returns
+
    +
  • Ok(Response<Payload, T>) if the payload is an error and can be deserialized as T, or +if the payload is a success.
  • +
  • Err(self) if the payload is an error and can’t be deserialized.
  • +
+

Trait Implementations§

source§

impl<Payload: Clone, ErrData: Clone> Clone for Response<Payload, ErrData>

source§

fn clone(&self) -> Response<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Payload: Debug, ErrData: Debug> Debug for Response<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, Payload, ErrData> Deserialize<'de> for Response<Payload, ErrData>
where + Payload: Deserialize<'de>, + ErrData: Deserialize<'de>,

source§

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<Payload, ErrData> FromIterator<Response<Payload, ErrData>> for ResponsePacket<Payload, ErrData>

source§

fn from_iter<T: IntoIterator<Item = Response<Payload, ErrData>>>( + iter: T +) -> Self

Creates a value from an iterator. Read more
source§

impl<Payload, ErrData> Serialize for Response<Payload, ErrData>
where + Payload: Serialize, + ErrData: Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<Payload, ErrData> RefUnwindSafe for Response<Payload, ErrData>
where + ErrData: RefUnwindSafe, + Payload: RefUnwindSafe,

§

impl<Payload, ErrData> Send for Response<Payload, ErrData>
where + ErrData: Send, + Payload: Send,

§

impl<Payload, ErrData> Sync for Response<Payload, ErrData>
where + ErrData: Sync, + Payload: Sync,

§

impl<Payload, ErrData> Unpin for Response<Payload, ErrData>
where + ErrData: Unpin, + Payload: Unpin,

§

impl<Payload, ErrData> UnwindSafe for Response<Payload, ErrData>
where + ErrData: UnwindSafe, + Payload: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

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.

\ No newline at end of file diff --git a/alloy_json_rpc/struct.SerializedRequest.html b/alloy_json_rpc/struct.SerializedRequest.html new file mode 100644 index 000000000000..e2dac064d7bc --- /dev/null +++ b/alloy_json_rpc/struct.SerializedRequest.html @@ -0,0 +1,38 @@ +SerializedRequest in alloy_json_rpc - Rust +
pub struct SerializedRequest {
+    meta: RequestMeta,
+    request: Box<RawValue>,
+}
Expand description

A JSON-RPC 2.0 request object that has been serialized, with its Id and +method preserved.

+

This struct is used to represent a request that has been serialized, but +not yet sent. It is used by RPC clients to build batch requests and manage +in-flight requests.

+

Fields§

§meta: RequestMeta§request: Box<RawValue>

Implementations§

source§

impl SerializedRequest

source

pub const fn meta(&self) -> &RequestMeta

Get the request metadata (ID and Method)

+
source

pub const fn id(&self) -> &Id

Get the request ID.

+
source

pub const fn method(&self) -> &'static str

Get the request method.

+
source

pub const fn serialized(&self) -> &RawValue

Get the serialized request.

+
source

pub fn decompose(self) -> (RequestMeta, Box<RawValue>)

Consumes the serialized request, returning the underlying +RequestMeta and the RawValue.

+
source

pub fn take_request(self) -> Box<RawValue>

Take the serialized request, consuming the SerializedRequest.

+
source

pub fn params(&self) -> Option<&RawValue>

Get a reference to the serialized request’s params.

+

This partially deserializes the request, and should be avoided if +possible.

+
source

pub fn params_hash(&self) -> B256

Get the hash of the serialized request’s params.

+

This partially deserializes the request, and should be avoided if +possible.

+

Trait Implementations§

source§

impl Clone for SerializedRequest

source§

fn clone(&self) -> SerializedRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SerializedRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SerializedRequest> for RequestPacket

source§

fn from(req: SerializedRequest) -> Self

Converts to this type from the input type.
source§

impl FromIterator<SerializedRequest> for RequestPacket

source§

fn from_iter<T: IntoIterator<Item = SerializedRequest>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Serialize for SerializedRequest

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Params> TryFrom<Request<Params>> for SerializedRequest
where + Params: RpcParam,

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Request<Params>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/trait.RpcObject.html b/alloy_json_rpc/trait.RpcObject.html new file mode 100644 index 000000000000..829fdd1f7d5b --- /dev/null +++ b/alloy_json_rpc/trait.RpcObject.html @@ -0,0 +1,7 @@ +RpcObject in alloy_json_rpc - Rust +
pub trait RpcObject: RpcParam + RpcReturn { }
Expand description

An object that can be used as a JSON-RPC parameter and return value.

+

This marker trait is blanket-implemented for every qualifying type. It is +used to indicate that a type can be used as both a JSON-RPC parameter and +return value.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> RpcObject for T
where + T: RpcParam + RpcReturn,

\ No newline at end of file diff --git a/alloy_json_rpc/trait.RpcParam.html b/alloy_json_rpc/trait.RpcParam.html new file mode 100644 index 000000000000..05fb6cefa971 --- /dev/null +++ b/alloy_json_rpc/trait.RpcParam.html @@ -0,0 +1,6 @@ +RpcParam in alloy_json_rpc - Rust +
pub trait RpcParam: Serialize + Clone + Send + Sync + Unpin { }
Expand description

An object that can be used as a JSON-RPC parameter.

+

This marker trait is blanket-implemented for every qualifying type. It is +used to indicate that a type can be used as a JSON-RPC parameter.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> RpcParam for T
where + T: Serialize + Clone + Send + Sync + Unpin,

\ No newline at end of file diff --git a/alloy_json_rpc/trait.RpcReturn.html b/alloy_json_rpc/trait.RpcReturn.html new file mode 100644 index 000000000000..eb383e83c2a6 --- /dev/null +++ b/alloy_json_rpc/trait.RpcReturn.html @@ -0,0 +1,10 @@ +RpcReturn in alloy_json_rpc - Rust +
pub trait RpcReturn: DeserializeOwned + Send + Sync + Unpin + 'static { }
Expand description

An object that can be used as a JSON-RPC return value.

+

This marker trait is blanket-implemented for every qualifying type. It is +used to indicate that a type can be used as a JSON-RPC return value.

+

Note

+

We add the 'static lifetime bound to indicate that the type can’t borrow. +This is a simplification that makes it easier to use the types in client +code. It is not suitable for use in server code.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + 'static,

\ No newline at end of file diff --git a/alloy_json_rpc/type.BorrowedErrorPayload.html b/alloy_json_rpc/type.BorrowedErrorPayload.html new file mode 100644 index 000000000000..5964c4bd2a45 --- /dev/null +++ b/alloy_json_rpc/type.BorrowedErrorPayload.html @@ -0,0 +1,15 @@ +BorrowedErrorPayload in alloy_json_rpc - Rust +
pub type BorrowedErrorPayload<'a> = ErrorPayload<&'a RawValue>;
Expand description

A ErrorPayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

struct BorrowedErrorPayload<'a> {
+    pub code: i64,
+    pub message: String,
+    pub data: Option<&'a RawValue>,
+}

Fields§

§code: i64

The error code.

+
§message: String

The error message (if any).

+
§data: Option<&'a RawValue>

The error data (if any).

+

Implementations§

source§

impl BorrowedErrorPayload<'_>

source

pub fn into_owned(self) -> ErrorPayload

Convert this borrowed error payload into an owned payload by copying +the data from the deserializer (if necessary).

+

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: 48 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/type.BorrowedResponse.html b/alloy_json_rpc/type.BorrowedResponse.html new file mode 100644 index 000000000000..d49dc416dc1b --- /dev/null +++ b/alloy_json_rpc/type.BorrowedResponse.html @@ -0,0 +1,13 @@ +BorrowedResponse in alloy_json_rpc - Rust +
pub type BorrowedResponse<'a> = Response<&'a RawValue, &'a RawValue>;
Expand description

A Response that has been partially deserialized, borrowing its contents +from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

struct BorrowedResponse<'a> {
+    pub id: Id,
+    pub payload: ResponsePayload<&'a RawValue, &'a RawValue>,
+}

Fields§

§id: Id

The ID of the request that this response is responding to.

+
§payload: ResponsePayload<&'a RawValue, &'a RawValue>

The response payload.

+

Implementations§

source§

impl BorrowedResponse<'_>

source

pub fn into_owned(self) -> Response

Convert this borrowed response to an owned response by copying the data +from the deserializer (if necessary).

+

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: 80 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/type.BorrowedResponsePacket.html b/alloy_json_rpc/type.BorrowedResponsePacket.html new file mode 100644 index 000000000000..aaeb3edfdca6 --- /dev/null +++ b/alloy_json_rpc/type.BorrowedResponsePacket.html @@ -0,0 +1,13 @@ +BorrowedResponsePacket in alloy_json_rpc - Rust +
pub type BorrowedResponsePacket<'a> = ResponsePacket<&'a RawValue, &'a RawValue>;
Expand description

A BorrowedResponsePacket is a ResponsePacket that has been partially +deserialized, borrowing its contents from the deserializer. This is used +primarily for intermediate deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

enum BorrowedResponsePacket<'a> {
+    Single(Response<&'a RawValue, &'a RawValue>),
+    Batch(Vec<Response<&'a RawValue, &'a RawValue>>),
+}

Variants§

§

Single(Response<&'a RawValue, &'a RawValue>)

A single response.

+
§

Batch(Vec<Response<&'a RawValue, &'a RawValue>>)

A batch of responses.

+

Implementations§

source§

impl BorrowedResponsePacket<'_>

source

pub fn into_owned(self) -> ResponsePacket

Convert this borrowed response packet into an owned packet by copying +the data from the deserializer (if necessary).

+

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: 80 bytes

Size for each variant:

  • Single: 80 bytes
  • Batch: 32 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/type.BorrowedResponsePayload.html b/alloy_json_rpc/type.BorrowedResponsePayload.html new file mode 100644 index 000000000000..139e45715467 --- /dev/null +++ b/alloy_json_rpc/type.BorrowedResponsePayload.html @@ -0,0 +1,13 @@ +BorrowedResponsePayload in alloy_json_rpc - Rust +
pub type BorrowedResponsePayload<'a> = ResponsePayload<&'a RawValue, &'a RawValue>;
Expand description

A ResponsePayload that has been partially deserialized, borrowing its +contents from the deserializer. This is used primarily for intermediate +deserialization. Most users will not require it.

+

See the top-level docs for more info.

+

Aliased Type§

enum BorrowedResponsePayload<'a> {
+    Success(&'a RawValue),
+    Failure(ErrorPayload<&'a RawValue>),
+}

Variants§

§

Success(&'a RawValue)

A successful response payload.

+
§

Failure(ErrorPayload<&'a RawValue>)

An error response payload.

+

Implementations§

source§

impl BorrowedResponsePayload<'_>

source

pub fn into_owned(self) -> ResponsePayload

Convert this borrowed response payload into an owned payload by copying +the data from the deserializer (if necessary).

+

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: 48 bytes

Size for each variant:

  • Success: 24 bytes
  • Failure: 48 bytes
\ No newline at end of file diff --git a/alloy_json_rpc/type.BorrowedRpcResult.html b/alloy_json_rpc/type.BorrowedRpcResult.html new file mode 100644 index 000000000000..7b2bc5e0e00e --- /dev/null +++ b/alloy_json_rpc/type.BorrowedRpcResult.html @@ -0,0 +1,8 @@ +BorrowedRpcResult in alloy_json_rpc - Rust +
pub type BorrowedRpcResult<'a, E> = RpcResult<&'a RawValue, E, &'a RawValue>;
Expand description

A partially deserialized RpcResult, borrowing from the deserializer.

+

Aliased Type§

enum BorrowedRpcResult<'a, E> {
+    Ok(&'a RawValue),
+    Err(RpcError<E, &'a RawValue>),
+}

Variants§

§1.0.0

Ok(&'a RawValue)

Contains the success value

+
§1.0.0

Err(RpcError<E, &'a RawValue>)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_json_rpc/type.PartiallySerializedRequest.html b/alloy_json_rpc/type.PartiallySerializedRequest.html new file mode 100644 index 000000000000..951887519ae1 --- /dev/null +++ b/alloy_json_rpc/type.PartiallySerializedRequest.html @@ -0,0 +1,12 @@ +PartiallySerializedRequest in alloy_json_rpc - Rust +
pub type PartiallySerializedRequest = Request<Box<RawValue>>;
Expand description

A Request that has been partially serialized. The request parameters +have been serialized, and are represented as a boxed RawValue. This is +useful for collections containing many requests, as it erases the Param +type. It can be created with Request::box_params().

+

See the top-level docs for more info.

+

Aliased Type§

struct PartiallySerializedRequest {
+    pub meta: RequestMeta,
+    pub params: Box<RawValue>,
+}

Fields§

§meta: RequestMeta

The request metadata (ID and method).

+
§params: Box<RawValue>

The request parameters.

+

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: 64 bytes

\ No newline at end of file diff --git a/alloy_json_rpc/type.RpcResult.html b/alloy_json_rpc/type.RpcResult.html new file mode 100644 index 000000000000..caa027654bab --- /dev/null +++ b/alloy_json_rpc/type.RpcResult.html @@ -0,0 +1,19 @@ +RpcResult in alloy_json_rpc - Rust +

Type Alias alloy_json_rpc::RpcResult

source ·
pub type RpcResult<T, E, ErrResp = Box<RawValue>> = Result<T, RpcError<E, ErrResp>>;
Expand description

The result of a JSON-RPC request.

+

Either a success response, an error response, or a non-response error. The +non-response error is intended to be used for errors returned by a +transport, or serde errors.

+

The common cases are:

+
    +
  • Ok(T) - The server returned a succesful response.
  • +
  • Err(RpcError::ErrorResponse(ErrResp)) - The server returned an error response.
  • +
  • Err(RpcError::SerError(E)) - A serialization error occurred.
  • +
  • Err(RpcError::DeserError { err: E, text: String }) - A deserialization error occurred.
  • +
  • Err(RpcError::TransportError(E)) - Some client-side or communication error occurred.
  • +
+

Aliased Type§

enum RpcResult<T, E, ErrResp = Box<RawValue>> {
+    Ok(T),
+    Err(RpcError<E, ErrResp>),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(RpcError<E, ErrResp>)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_networks/all.html b/alloy_networks/all.html new file mode 100644 index 000000000000..8d6e2a3da2ca --- /dev/null +++ b/alloy_networks/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Traits

\ No newline at end of file diff --git a/alloy_networks/index.html b/alloy_networks/index.html new file mode 100644 index 000000000000..56cf4fa5bbc8 --- /dev/null +++ b/alloy_networks/index.html @@ -0,0 +1,53 @@ +alloy_networks - Rust +

Crate alloy_networks

source ·
Expand description

alloy-networks

+

Ethereum blockchain RPC behavior abstraction.

+

This crate contains a simple abstraction of the RPC behavior of an +Ethereum-like blockchain. It is intended to be used by the Alloy client to +provide a consistent interface to the rest of the library, regardless of +changes the underlying blockchain makes to the RPC interface.

+

Core Model

+

This crate handles abstracting RPC types. It does not handle the actual +networking. The core model is as follows:

+
    +
  • Transaction - A trait that defines an abstract interface for EVM-like +transactions.
  • +
  • Network - A trait that defines the RPC types for a given blockchain. +Providers are parameterized by a Network type, and use the associated +types to define the input and output types of the RPC methods.
  • +
  • TODO: More!!!
  • +
+

Usage

+

This crate is not intended to be used directly. It is used by the +alloy-providers library to modify the input and output types of the RPC +methods.

+

This crate will primarily be used by blockchain maintainers to add bespoke RPC +types to the Alloy provider. This is done by implementing the Network trait, +and then parameterizing the Provider type with the new network type.

+

For example, to add a new network called Foo:

+ +
// Foo must be a ZST. It is a compile error to use a non-ZST type.
+struct Foo;
+
+impl Network for Foo {
+    type Transaction = FooTransaction;
+    type Block = FooBlock;
+    type Header = FooHeader;
+    type Receipt = FooReceipt;
+
+    // etc.
+}
+

The user may then instantiate a Provider<Foo> and use it as normal. This +allows the user to use the same API for all networks, regardless of the +underlying RPC types.

+

Note: If you need to also add custom methods to your network, you should +make an extension trait for Provider<N> as follows:

+ +
#[async_trait]
+trait FooProviderExt: Provider<Foo> {
+    async fn custom_foo_method(&self) -> RpcResult<Something, TransportError>;
+
+    async fn another_custom_method(&self) -> RpcResult<Something, TransportError>;
+}
+

Traits

  • Captures getters and setters common across EIP-1559 transactions across all networks
  • Captures type info for network-specific RPC requests/responses.
  • Captures getters and setters common across receipts across all networks
  • Captures getters and setters common across transactions and +transaction-like objects across all networks.
\ No newline at end of file diff --git a/alloy_networks/sidebar-items.js b/alloy_networks/sidebar-items.js new file mode 100644 index 000000000000..5f289ed69595 --- /dev/null +++ b/alloy_networks/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"trait":["Eip1559Transaction","Network","Receipt","Transaction"]}; \ No newline at end of file diff --git a/alloy_networks/trait.Eip1559Transaction.html b/alloy_networks/trait.Eip1559Transaction.html new file mode 100644 index 000000000000..e4fc8f7d3c87 --- /dev/null +++ b/alloy_networks/trait.Eip1559Transaction.html @@ -0,0 +1,3 @@ +Eip1559Transaction in alloy_networks - Rust +
pub trait Eip1559Transaction: Transaction { }
Expand description

Captures getters and setters common across EIP-1559 transactions across all networks

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_networks/trait.Network.html b/alloy_networks/trait.Network.html new file mode 100644 index 000000000000..71e36b9fbd91 --- /dev/null +++ b/alloy_networks/trait.Network.html @@ -0,0 +1,10 @@ +Network in alloy_networks - Rust +
pub trait Network: Sized + Send + Sync + 'static {
+    type TransactionRequest: Transaction;
+    type Receipt: Receipt;
+    type TransactionResponse: Transaction;
+}
Expand description

Captures type info for network-specific RPC requests/responses.

+

Required Associated Types§

source

type TransactionRequest: Transaction

The JSON body of a transaction request.

+
source

type Receipt: Receipt

The JSON body of a transaction receipt.

+
source

type TransactionResponse: Transaction

The JSON body of a transaction response.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_networks/trait.Receipt.html b/alloy_networks/trait.Receipt.html new file mode 100644 index 000000000000..ca9b68714dff --- /dev/null +++ b/alloy_networks/trait.Receipt.html @@ -0,0 +1,3 @@ +Receipt in alloy_networks - Rust +
pub trait Receipt: RpcObject + 'static { }
Expand description

Captures getters and setters common across receipts across all networks

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_networks/trait.Transaction.html b/alloy_networks/trait.Transaction.html new file mode 100644 index 000000000000..c447af9d72ea --- /dev/null +++ b/alloy_networks/trait.Transaction.html @@ -0,0 +1,8 @@ +Transaction in alloy_networks - Rust +
pub trait Transaction: Encodable + Decodable + RpcObject + Clone + Sized + 'static {
+    // Required method
+    fn set_gas(&mut self, gas: U256);
+}
Expand description

Captures getters and setters common across transactions and +transaction-like objects across all networks.

+

Required Methods§

source

fn set_gas(&mut self, gas: U256)

Sets the gas price of the transaction.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_providers/all.html b/alloy_providers/all.html new file mode 100644 index 000000000000..13fa02c421bc --- /dev/null +++ b/alloy_providers/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Traits

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/alloy_providers/builder/index.html b/alloy_providers/builder/index.html new file mode 100644 index 000000000000..3a7d53dc57f1 --- /dev/null +++ b/alloy_providers/builder/index.html @@ -0,0 +1,2 @@ +alloy_providers::builder - Rust +

Structs

Traits

\ No newline at end of file diff --git a/alloy_providers/builder/sidebar-items.js b/alloy_providers/builder/sidebar-items.js new file mode 100644 index 000000000000..d3db2ba11b37 --- /dev/null +++ b/alloy_providers/builder/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ProviderBuilder","Stack"],"trait":["ProviderLayer"]}; \ No newline at end of file diff --git a/alloy_providers/builder/struct.ProviderBuilder.html b/alloy_providers/builder/struct.ProviderBuilder.html new file mode 100644 index 000000000000..7465dcb6811e --- /dev/null +++ b/alloy_providers/builder/struct.ProviderBuilder.html @@ -0,0 +1,68 @@ +ProviderBuilder in alloy_providers::builder - Rust +
pub struct ProviderBuilder<L, N = (), T = ()> {
+    layer: L,
+    transport: PhantomData<T>,
+    network: PhantomData<N>,
+}
Expand description

A builder for constructing a Provider from various layers.

+

This type is similar to tower::ServiceBuilder, with extra complication +around maintaining the network and transport types.

+

Fields§

§layer: L§transport: PhantomData<T>§network: PhantomData<N>

Implementations§

source§

impl<L, N, T> ProviderBuilder<L, N, T>

source

pub fn layer<Inner>(self, layer: Inner) -> ProviderBuilder<Stack<T, Inner, L>>

Add a layer to the stack being built. This is similar to +tower::ServiceBuilder::layer.

+
Note:
+

Layers are added in outer-to-inner order, as in +tower::ServiceBuilder. The first layer added will be the first to +see the request.

+
source

pub fn network<Net: Network>(self) -> ProviderBuilder<L, Net, T>

Change the network.

+

By default, the network is invalid, and contains the unit type (). +This method MUST be called before the provider is built. The client +and provider methods only exist when the network is valid.

+ +
builder.network::<Arbitrum>()
+
source

pub fn client(self, client: RpcClient<T>) -> L::Provider
where + L: ProviderLayer<NetworkRpcClient<N, T>, N, T>, + T: Transport + Clone, + N: Network,

Finish the layer stack by providing a root RpcClient, outputting +the final Provider type with all stack components.

+

This is a convenience function for +ProviderBuilder::provider<NetworkRpcClient>.

+
source

pub fn provider<P>(self, provider: P) -> L::Provider
where + L: ProviderLayer<P, N, T>, + P: Provider<N, T>, + T: Transport, + N: Network,

Finish the layer stack by providing a root Provider, outputting +the final Provider type with all stack components.

+

Auto Trait Implementations§

§

impl<L, N, T> RefUnwindSafe for ProviderBuilder<L, N, T>
where + L: RefUnwindSafe, + N: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<L, N, T> Send for ProviderBuilder<L, N, T>
where + L: Send, + N: Send, + T: Send,

§

impl<L, N, T> Sync for ProviderBuilder<L, N, T>
where + L: Sync, + N: Sync, + T: Sync,

§

impl<L, N, T> Unpin for ProviderBuilder<L, N, T>
where + L: Unpin, + N: Unpin, + T: Unpin,

§

impl<L, N, T> UnwindSafe for ProviderBuilder<L, N, T>
where + L: UnwindSafe, + N: UnwindSafe, + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_providers/builder/struct.Stack.html b/alloy_providers/builder/struct.Stack.html new file mode 100644 index 000000000000..358634555e0f --- /dev/null +++ b/alloy_providers/builder/struct.Stack.html @@ -0,0 +1,41 @@ +Stack in alloy_providers::builder - Rust +
pub struct Stack<T, Inner, Outer> {
+    inner: Inner,
+    outer: Outer,
+    _pd: PhantomData<fn() -> T>,
+}

Fields§

§inner: Inner§outer: Outer§_pd: PhantomData<fn() -> T>

Implementations§

source§

impl<T, Inner, Outer> Stack<T, Inner, Outer>

source

pub fn new(inner: Inner, outer: Outer) -> Self

Create a new Stack.

+

Trait Implementations§

source§

impl<P, N, T, Inner, Outer> ProviderLayer<P, N, T> for Stack<T, Inner, Outer>
where + T: Transport, + N: Network, + P: Provider<N, T>, + Inner: ProviderLayer<P, N, T>, + Outer: ProviderLayer<Inner::Provider, N, T>,

§

type Provider = <Outer as ProviderLayer<<Inner as ProviderLayer<P, N, T>>::Provider, N, T>>::Provider

source§

fn layer(&self, provider: P) -> Self::Provider

Auto Trait Implementations§

§

impl<T, Inner, Outer> RefUnwindSafe for Stack<T, Inner, Outer>
where + Inner: RefUnwindSafe, + Outer: RefUnwindSafe,

§

impl<T, Inner, Outer> Send for Stack<T, Inner, Outer>
where + Inner: Send, + Outer: Send,

§

impl<T, Inner, Outer> Sync for Stack<T, Inner, Outer>
where + Inner: Sync, + Outer: Sync,

§

impl<T, Inner, Outer> Unpin for Stack<T, Inner, Outer>
where + Inner: Unpin, + Outer: Unpin,

§

impl<T, Inner, Outer> UnwindSafe for Stack<T, Inner, Outer>
where + Inner: UnwindSafe, + Outer: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_providers/builder/trait.ProviderLayer.html b/alloy_providers/builder/trait.ProviderLayer.html new file mode 100644 index 000000000000..de15a84a669d --- /dev/null +++ b/alloy_providers/builder/trait.ProviderLayer.html @@ -0,0 +1,13 @@ +ProviderLayer in alloy_providers::builder - Rust +
pub trait ProviderLayer<P: Provider<N, T>, N: Network, T: Transport> {
+    type Provider: Provider<N, T>;
+
+    // Required method
+    fn layer(&self, inner: P) -> Self::Provider;
+}
Expand description

A layering abstraction in the vein of tower::Layer

+

Required Associated Types§

Required Methods§

source

fn layer(&self, inner: P) -> Self::Provider

Implementors§

source§

impl<P, N, T, Inner, Outer> ProviderLayer<P, N, T> for Stack<T, Inner, Outer>
where + T: Transport, + N: Network, + P: Provider<N, T>, + Inner: ProviderLayer<P, N, T>, + Outer: ProviderLayer<Inner::Provider, N, T>,

§

type Provider = <Outer as ProviderLayer<<Inner as ProviderLayer<P, N, T>>::Provider, N, T>>::Provider

\ No newline at end of file diff --git a/alloy_providers/index.html b/alloy_providers/index.html new file mode 100644 index 000000000000..d378eda95f73 --- /dev/null +++ b/alloy_providers/index.html @@ -0,0 +1,21 @@ +alloy_providers - Rust +

Crate alloy_providers

source ·
Expand description

alloy-providers

+

Ethereum JSON-RPC providers.

+

This crate contains the Provider trait, which exposes Ethereum JSON-RPC +methods. Providers in alloy are similar to ethers.js Providers. They manage an +RpcClient and allow other parts of the program to easily make RPC calls.

+

Unlike an ethers.js Provider, an alloy Provider is network-aware. It is +parameterized with a Network from [alloy-networks]. This allows the Provider +to expose a consistent interface to the rest of the program, while adjusting +request and response types to match the underlying blockchain.

+

Providers can be composed via stacking. For example, a Provider that tracks +the nonce for a given address can be stacked onto a Provider that signs +transactions to create a Provider that can send signed transactions with +correct nonces.

+

The ProviderBuilder struct can quickly create a stacked provider, similar to +tower::ServiceBuilder.

+

Usage

+

TODO :)

+

Modules

Structs

Traits

  • Provider is parameterized with a network and a transport. The default +transport is type-erased, but you can do Provider<N, Http>.
  • A layering abstraction in the vein of tower::Layer
\ No newline at end of file diff --git a/alloy_providers/provider/enum.ClientError.html b/alloy_providers/provider/enum.ClientError.html new file mode 100644 index 000000000000..f46b98b2eafb --- /dev/null +++ b/alloy_providers/provider/enum.ClientError.html @@ -0,0 +1,29 @@ +ClientError in alloy_providers::provider - Rust +
pub enum ClientError {
+    ParseError,
+    UnsupportedBlockIdError,
+}

Variants§

§

ParseError

§

UnsupportedBlockIdError

Trait Implementations§

source§

impl Debug for ClientError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ClientError

source§

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 Display for ClientError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ClientError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Serialize for ClientError

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> RpcReturn for T
where + T: DeserializeOwned + Send + Sync + Unpin + '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: 1 byte

Size for each variant:

  • ParseError: 0 bytes
  • UnsupportedBlockIdError: 0 bytes
\ No newline at end of file diff --git a/alloy_providers/provider/index.html b/alloy_providers/provider/index.html new file mode 100644 index 000000000000..5b8e31899ef3 --- /dev/null +++ b/alloy_providers/provider/index.html @@ -0,0 +1,7 @@ +alloy_providers::provider - Rust +
Expand description

Alloy main Provider abstraction.

+

Structs

  • An abstract provider for interacting with the Ethereum JSON RPC +API. Must be instantiated +with a transport which implements the [Transport] trait.

Enums

Traits

  • Temporary Provider trait to be used until the new Provider trait with +the Network abstraction is stable. +Once the new Provider trait is stable, this trait will be removed.
\ No newline at end of file diff --git a/alloy_providers/provider/sidebar-items.js b/alloy_providers/provider/sidebar-items.js new file mode 100644 index 000000000000..bcd531856b0e --- /dev/null +++ b/alloy_providers/provider/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ClientError"],"struct":["Provider"],"trait":["TempProvider"]}; \ No newline at end of file diff --git a/alloy_providers/provider/struct.Provider.html b/alloy_providers/provider/struct.Provider.html new file mode 100644 index 000000000000..2b1e819ff9a7 --- /dev/null +++ b/alloy_providers/provider/struct.Provider.html @@ -0,0 +1,221 @@ +Provider in alloy_providers::provider - Rust +
pub struct Provider<T: Transport = BoxTransport> {
+    inner: RpcClient<T>,
+    from: Option<Address>,
+}
Expand description

An abstract provider for interacting with the Ethereum JSON RPC +API. Must be instantiated +with a transport which implements the [Transport] trait.

+

Fields§

§inner: RpcClient<T>§from: Option<Address>

Implementations§

source§

impl<T: Transport + Clone + Send + Sync> Provider<T>

source

pub fn new(transport: T) -> Self

source

pub fn new_with_client(client: RpcClient<T>) -> Self

source

pub fn with_sender(self, from: Address) -> Self

source

pub fn inner(&self) -> &RpcClient<T>

Trait Implementations§

source§

impl<T: Debug + Transport> Debug for Provider<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Transport + Clone + Send + Sync> TempProvider for Provider<T>

source§

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the transaction count of the corresponding address.

+
source§

fn get_block_number<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the last block number available. +Gets the last block number available.

+
source§

fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the balance of the account at the specified tag, which defaults to latest.

+
source§

fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a block by its [BlockHash], with full transactions or only hashes.

+
source§

fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a block by BlockNumberOrTag, with full transactions or only hashes.

+
source§

fn get_chain_id<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the chain ID.

+
source§

fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the specified storage value from [Address].

+
source§

fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the bytecode located at the corresponding [Address].

+
source§

fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a Transaction by its [TxHash].

+
source§

fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Retrieves a Vec<Log> with the given Filter.

+
source§

fn get_accounts<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the accounts in the remote node. This is usually empty unless you’re using a local +node.

+
source§

fn get_gas_price<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the current gas price.

+
source§

fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a TransactionReceipt if it exists, by its [TxHash].

+
source§

fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] +) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Returns a collection of historical gas information FeeHistory which +can be used to calculate the EIP1559 fields maxFeePerGas and maxPriorityFeePerGas.

+
source§

fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the selected block BlockNumberOrTag receipts.

+
source§

fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets an uncle block through the tag BlockId and index [U64].

+
source§

fn syncing<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets syncing info.

+
source§

fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Execute a smart contract call with CallRequest without publishing a transaction.

+
source§

fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Estimate the gas needed for a transaction.

+
source§

fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes +) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Sends an already-signed transaction.

+
source§

fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> +) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Estimates the EIP1559 maxFeePerGas and maxPriorityFeePerGas fields. +Receives an optional EstimatorFunction that can be used to modify +how to estimate these fees.

+
source§

fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Parity trace transaction.

+
source§

fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P +) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where + P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: 'async_trait, + 'life0: 'async_trait,

Sends a raw request with the methods and params specified to the internal connection, +and returns the result.

+
source§

fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions +) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Available on crate feature anvil only.
source§

fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a block by either its hash, tag, or number, with full transactions or only hashes.
source§

impl<'a> TryFrom<&'a String> for Provider<Http<Client>>

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from(value: &'a String) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&str> for Provider<Http<Client>>

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from(url: &str) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<String> for Provider<Http<Client>>

§

type Error = ClientError

The type returned in the event of a conversion error.
source§

fn try_from(value: String) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Provider<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Provider<T>

§

impl<T> Sync for Provider<T>

§

impl<T> Unpin for Provider<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Provider<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_providers/provider/trait.TempProvider.html b/alloy_providers/provider/trait.TempProvider.html new file mode 100644 index 000000000000..45e60f507a9a --- /dev/null +++ b/alloy_providers/provider/trait.TempProvider.html @@ -0,0 +1,1204 @@ +TempProvider in alloy_providers::provider - Rust +
pub trait TempProvider: Send + Sync {
+
Show 29 methods // Required methods + fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> + ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_block_number<'life0, 'async_trait>( + &'life0 self + ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> + ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool + ) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool + ) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_chain_id<'life0, 'async_trait>( + &'life0 self + ) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> + ) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId + ) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash + ) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter + ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_accounts<'life0, 'async_trait>( + &'life0 self + ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_gas_price<'life0, 'async_trait>( + &'life0 self + ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash + ) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] + ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait; + fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag + ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 + ) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn syncing<'life0, 'async_trait>( + &'life0 self + ) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> + ) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> + ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes + ) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> + ) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str + ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> + ) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> + ) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash + ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions + ) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag + ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait; + fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P + ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>> + where P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: Sync + 'async_trait, + 'life0: 'async_trait; + + // Provided method + fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool + ) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>> + where Self: 'async_trait, + 'life0: 'async_trait { ... } +
}
Expand description

Temporary Provider trait to be used until the new Provider trait with +the Network abstraction is stable. +Once the new Provider trait is stable, this trait will be removed.

+

Required Methods§

source

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the transaction count of the corresponding address.

+
source

fn get_block_number<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the last block number available.

+
source

fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the balance of the account at the specified tag, which defaults to latest.

+
source

fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a block by its [BlockHash], with full transactions or only hashes.

+
source

fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a block by BlockNumberOrTag, with full transactions or only hashes.

+
source

fn get_chain_id<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the chain ID.

+
source

fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the specified storage value from [Address].

+
source

fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the bytecode located at the corresponding [Address].

+
source

fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a Transaction by its [TxHash].

+
source

fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Retrieves a Vec<Log> with the given Filter.

+
source

fn get_accounts<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the accounts in the remote node. This is usually empty unless you’re using a local +node.

+
source

fn get_gas_price<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the current gas price.

+
source

fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a TransactionReceipt if it exists, by its [TxHash].

+
source

fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] +) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Returns a collection of historical gas information FeeHistory which +can be used to calculate the EIP1559 fields maxFeePerGas and maxPriorityFeePerGas.

+
source

fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets the selected block BlockNumberOrTag receipts.

+
source

fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets an uncle block through the tag BlockId and index [U64].

+
source

fn syncing<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets syncing info.

+
source

fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Execute a smart contract call with CallRequest without publishing a transaction.

+
source

fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Estimate the gas needed for a transaction.

+
source

fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes +) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Sends an already-signed transaction.

+
source

fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> +) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Estimates the EIP1559 maxFeePerGas and maxPriorityFeePerGas fields. +Receives an optional EstimatorFunction that can be used to modify +how to estimate these fees.

+
source

fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Available on crate feature anvil only.
source

fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source

fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source

fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Parity trace transaction.

+
source

fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions +) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source

fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source

fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P +) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where + P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: Sync + 'async_trait, + 'life0: 'async_trait,

Provided Methods§

source

fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Gets a block by either its hash, tag, or number, with full transactions or only hashes.

+

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: 'a + TempProvider + ?Sized + Sync> TempProvider for &'a T
where + &'a T: Send + Sync,

source§

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_number<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_chain_id<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_accounts<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_gas_price<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] +) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn syncing<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes +) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> +) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Available on crate feature anvil only.
source§

fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions +) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P +) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where + P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: Sync + 'async_trait, + 'life0: 'async_trait,

source§

impl<'a, T: 'a + TempProvider + ?Sized + Sync> TempProvider for &'a mut T
where + &'a mut T: Send + Sync,

source§

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_number<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_chain_id<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_accounts<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_gas_price<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] +) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn syncing<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes +) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> +) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Available on crate feature anvil only.
source§

fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions +) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P +) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where + P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: Sync + 'async_trait, + 'life0: 'async_trait,

source§

impl<T: TempProvider + ?Sized + Sync> TempProvider for Box<T>
where + Box<T>: Send + Sync,

source§

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_number<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_chain_id<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_accounts<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_gas_price<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] +) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn syncing<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes +) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> +) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Available on crate feature anvil only.
source§

fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions +) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P +) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where + P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: Sync + 'async_trait, + 'life0: 'async_trait,

source§

impl<T: TempProvider + ?Sized + Sync> TempProvider for Rc<T>
where + Rc<T>: Send + Sync,

source§

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_number<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_chain_id<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_accounts<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_gas_price<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] +) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn syncing<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes +) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> +) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Available on crate feature anvil only.
source§

fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions +) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P +) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where + P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: Sync + 'async_trait, + 'life0: 'async_trait,

source§

impl<T: TempProvider + ?Sized + Sync> TempProvider for Arc<T>
where + Arc<T>: Send + Sync,

source§

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_number<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_balance<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block<'life0, 'async_trait>( + &'life0 self, + id: BlockId, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: BlockHash, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( + &'life0 self, + number: BlockNumberOrTag, + full: bool +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_chain_id<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U64>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_storage_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + key: StorageKey, + tag: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<StorageValue>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_code_at<'life0, 'async_trait>( + &'life0 self, + address: Address, + tag: BlockId +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_by_hash<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Transaction>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_logs<'life0, 'async_trait>( + &'life0 self, + filter: Filter +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_accounts<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Address>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_gas_price<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_transaction_receipt<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Option<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( + &'life0 self, + block_count: U256, + last_block: BlockNumberOrTag, + reward_percentiles: &'life1 [f64] +) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn get_block_receipts<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<TransactionReceipt>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn get_uncle<'life0, 'async_trait>( + &'life0 self, + tag: BlockId, + idx: U64 +) -> Pin<Box<dyn Future<Output = TransportResult<Option<Block>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn syncing<'life0, 'async_trait>( + &'life0 self +) -> Pin<Box<dyn Future<Output = TransportResult<SyncStatus>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn call<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<Bytes>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_gas<'life0, 'async_trait>( + &'life0 self, + tx: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'async_trait>( + &'life0 self, + tx: Bytes +) -> Pin<Box<dyn Future<Output = TransportResult<TxHash>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( + &'life0 self, + estimator: Option<EstimatorFunction> +) -> Pin<Box<dyn Future<Output = TransportResult<(U256, U256)>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn set_code<'life0, 'async_trait>( + &'life0 self, + address: Address, + code: &'static str +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Available on crate feature anvil only.
source§

fn get_proof<'life0, 'async_trait>( + &'life0 self, + address: Address, + keys: Vec<StorageKey>, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<EIP1186AccountProofResponse>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn create_access_list<'life0, 'async_trait>( + &'life0 self, + request: CallRequest, + block: Option<BlockId> +) -> Pin<Box<dyn Future<Output = TransportResult<AccessListWithGasUsed>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn debug_trace_transaction<'life0, 'async_trait>( + &'life0 self, + hash: TxHash, + trace_options: GethDebugTracingOptions +) -> Pin<Box<dyn Future<Output = TransportResult<GethTrace>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn trace_block<'life0, 'async_trait>( + &'life0 self, + block: BlockNumberOrTag +) -> Pin<Box<dyn Future<Output = TransportResult<Vec<LocalizedTransactionTrace>>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

source§

fn raw_request<'life0, 'async_trait, P, R>( + &'life0 self, + method: &'static str, + params: P +) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where + P: Serialize + Send + Sync + Clone + 'async_trait, + R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static + 'async_trait, + Self: Sync + 'async_trait, + 'life0: 'async_trait,

Implementors§

source§

impl<T: Transport + Clone + Send + Sync> TempProvider for Provider<T>

\ No newline at end of file diff --git a/alloy_providers/sidebar-items.js b/alloy_providers/sidebar-items.js new file mode 100644 index 000000000000..542077843776 --- /dev/null +++ b/alloy_providers/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["builder","provider","utils"],"struct":["NetworkRpcClient","ProviderBuilder","Stack"],"trait":["Provider","ProviderLayer"]}; \ No newline at end of file diff --git a/alloy_providers/struct.NetworkRpcClient.html b/alloy_providers/struct.NetworkRpcClient.html new file mode 100644 index 000000000000..238a32455dcf --- /dev/null +++ b/alloy_providers/struct.NetworkRpcClient.html @@ -0,0 +1,91 @@ +NetworkRpcClient in alloy_providers - Rust +
pub struct NetworkRpcClient<N: Network, T: Transport = BoxTransport> {
+    pub network: PhantomData<fn() -> N>,
+    pub client: RpcClient<T>,
+}
Expand description

A network-wrapped RPC client.

+

This type allows you to specify (at the type-level) that the RPC client is +for a specific network. This helps avoid accidentally using the wrong +connection to access a network.

+

Fields§

§network: PhantomData<fn() -> N>§client: RpcClient<T>

Methods from Deref<Target = RpcClient<T>>§

source

pub fn make_request<Params>( + &self, + method: &'static str, + params: Params +) -> Request<Params>
where + Params: RpcParam,

Build a JsonRpcRequest with the given method and params.

+

This function reserves an ID for the request, however the request +is not sent. To send a request, use RpcClient::prepare and await +the returned RpcCall.

+
source

pub fn is_local(&self) -> bool

true if the client believes the transport is local.

+

This can be used to optimize remote API usage, or to change program +behavior on local endpoints. When the client is instantiated by parsing +a URL or other external input, this value is set on a best-efforts +basis and may be incorrect.

+
source

pub fn next_id(&self) -> Id

Reserve a request ID u64.

+
source

pub fn prepare<Params, Resp>( + &self, + method: &'static str, + params: Params +) -> RpcCall<T, Params, Resp>
where + Params: RpcParam, + Resp: RpcReturn,

Prepare an RpcCall.

+

This function reserves an ID for the request, however the request +is not sent. To send a request, await the returned RpcCall.

+
Note:
+

Serialization is done lazily. It will not be performed until the call +is awaited. This means that if a serializer error occurs, it will not +be caught until the call is awaited.

+
source

pub async fn get_watcher(&self, id: Uint<256, 4>) -> Receiver<Box<RawValue>>

Get a [broadcast::Receiver] for the given subscription ID.

+
source

pub fn new_batch(&self) -> BatchRequest<'_, Http<T>>

Create a new BatchRequest builder.

+

Trait Implementations§

source§

impl<N: Debug + Network, T: Debug + Transport> Debug for NetworkRpcClient<N, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<N, T> Deref for NetworkRpcClient<N, T>
where + N: Network, + T: Transport,

§

type Target = RpcClient<T>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<N, T> From<NetworkRpcClient<N, T>> for RpcClient<T>
where + N: Network, + T: Transport,

source§

fn from(client: NetworkRpcClient<N, T>) -> Self

Converts to this type from the input type.
source§

impl<N, T> From<RpcClient<T>> for NetworkRpcClient<N, T>
where + N: Network, + T: Transport,

source§

fn from(client: RpcClient<T>) -> Self

Converts to this type from the input type.
source§

impl<N: Network, T: Transport + Clone> Provider<N, T> for NetworkRpcClient<N, T>

source§

fn client(&self) -> &NetworkRpcClient<N, T>

Return a reference to the inner RpcClient.
source§

fn inner(&self) -> &dyn Provider<N, T>

Return a reference to the inner Provider. Read more
source§

fn estimate_gas<'life0, 'life1, 'async_trait>( + &'life0 self, + tx: &'life1 <N as Network>::TransactionRequest +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Get the transaction count for an address. Used for finding the +appropriate nonce. Read more
source§

fn send_transaction<'life0, 'life1, 'async_trait>( + &'life0 self, + tx: &'life1 N::TransactionRequest +) -> Pin<Box<dyn Future<Output = TransportResult<N::Receipt>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Send a transaction to the network. Read more
source§

fn raw_client(&self) -> &RpcClient<T>

source§

fn populate_gas<'life0, 'life1, 'async_trait>( + &'life0 self, + tx: &'life1 mut N::TransactionRequest +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Auto Trait Implementations§

§

impl<N, T> RefUnwindSafe for NetworkRpcClient<N, T>
where + T: RefUnwindSafe,

§

impl<N, T> Send for NetworkRpcClient<N, T>

§

impl<N, T> Sync for NetworkRpcClient<N, T>

§

impl<N, T> Unpin for NetworkRpcClient<N, T>
where + T: Unpin,

§

impl<N, T> UnwindSafe for NetworkRpcClient<N, T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_providers/struct.ProviderBuilder.html b/alloy_providers/struct.ProviderBuilder.html new file mode 100644 index 000000000000..880a5b5c52d4 --- /dev/null +++ b/alloy_providers/struct.ProviderBuilder.html @@ -0,0 +1,68 @@ +ProviderBuilder in alloy_providers - Rust +
pub struct ProviderBuilder<L, N = (), T = ()> {
+    layer: L,
+    transport: PhantomData<T>,
+    network: PhantomData<N>,
+}
Expand description

A builder for constructing a Provider from various layers.

+

This type is similar to tower::ServiceBuilder, with extra complication +around maintaining the network and transport types.

+

Fields§

§layer: L§transport: PhantomData<T>§network: PhantomData<N>

Implementations§

source§

impl<L, N, T> ProviderBuilder<L, N, T>

source

pub fn layer<Inner>(self, layer: Inner) -> ProviderBuilder<Stack<T, Inner, L>>

Add a layer to the stack being built. This is similar to +tower::ServiceBuilder::layer.

+
Note:
+

Layers are added in outer-to-inner order, as in +tower::ServiceBuilder. The first layer added will be the first to +see the request.

+
source

pub fn network<Net: Network>(self) -> ProviderBuilder<L, Net, T>

Change the network.

+

By default, the network is invalid, and contains the unit type (). +This method MUST be called before the provider is built. The client +and provider methods only exist when the network is valid.

+ +
builder.network::<Arbitrum>()
+
source

pub fn client(self, client: RpcClient<T>) -> L::Provider
where + L: ProviderLayer<NetworkRpcClient<N, T>, N, T>, + T: Transport + Clone, + N: Network,

Finish the layer stack by providing a root RpcClient, outputting +the final Provider type with all stack components.

+

This is a convenience function for +ProviderBuilder::provider<NetworkRpcClient>.

+
source

pub fn provider<P>(self, provider: P) -> L::Provider
where + L: ProviderLayer<P, N, T>, + P: Provider<N, T>, + T: Transport, + N: Network,

Finish the layer stack by providing a root Provider, outputting +the final Provider type with all stack components.

+

Auto Trait Implementations§

§

impl<L, N, T> RefUnwindSafe for ProviderBuilder<L, N, T>
where + L: RefUnwindSafe, + N: RefUnwindSafe, + T: RefUnwindSafe,

§

impl<L, N, T> Send for ProviderBuilder<L, N, T>
where + L: Send, + N: Send, + T: Send,

§

impl<L, N, T> Sync for ProviderBuilder<L, N, T>
where + L: Sync, + N: Sync, + T: Sync,

§

impl<L, N, T> Unpin for ProviderBuilder<L, N, T>
where + L: Unpin, + N: Unpin, + T: Unpin,

§

impl<L, N, T> UnwindSafe for ProviderBuilder<L, N, T>
where + L: UnwindSafe, + N: UnwindSafe, + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_providers/struct.Stack.html b/alloy_providers/struct.Stack.html new file mode 100644 index 000000000000..bec53aa534a1 --- /dev/null +++ b/alloy_providers/struct.Stack.html @@ -0,0 +1,41 @@ +Stack in alloy_providers - Rust +

Struct alloy_providers::Stack

source ·
pub struct Stack<T, Inner, Outer> {
+    inner: Inner,
+    outer: Outer,
+    _pd: PhantomData<fn() -> T>,
+}

Fields§

§inner: Inner§outer: Outer§_pd: PhantomData<fn() -> T>

Implementations§

source§

impl<T, Inner, Outer> Stack<T, Inner, Outer>

source

pub fn new(inner: Inner, outer: Outer) -> Self

Create a new Stack.

+

Trait Implementations§

source§

impl<P, N, T, Inner, Outer> ProviderLayer<P, N, T> for Stack<T, Inner, Outer>
where + T: Transport, + N: Network, + P: Provider<N, T>, + Inner: ProviderLayer<P, N, T>, + Outer: ProviderLayer<Inner::Provider, N, T>,

§

type Provider = <Outer as ProviderLayer<<Inner as ProviderLayer<P, N, T>>::Provider, N, T>>::Provider

source§

fn layer(&self, provider: P) -> Self::Provider

Auto Trait Implementations§

§

impl<T, Inner, Outer> RefUnwindSafe for Stack<T, Inner, Outer>
where + Inner: RefUnwindSafe, + Outer: RefUnwindSafe,

§

impl<T, Inner, Outer> Send for Stack<T, Inner, Outer>
where + Inner: Send, + Outer: Send,

§

impl<T, Inner, Outer> Sync for Stack<T, Inner, Outer>
where + Inner: Sync, + Outer: Sync,

§

impl<T, Inner, Outer> Unpin for Stack<T, Inner, Outer>
where + Inner: Unpin, + Outer: Unpin,

§

impl<T, Inner, Outer> UnwindSafe for Stack<T, Inner, Outer>
where + Inner: UnwindSafe, + Outer: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_providers/trait.Provider.html b/alloy_providers/trait.Provider.html new file mode 100644 index 000000000000..8f0d26f1d1b8 --- /dev/null +++ b/alloy_providers/trait.Provider.html @@ -0,0 +1,69 @@ +Provider in alloy_providers - Rust +
pub trait Provider<N: Network, T: Transport = BoxTransport>: Send + Sync {
+    // Required methods
+    fn client(&self) -> &NetworkRpcClient<N, T>;
+    fn inner(&self) -> &dyn Provider<N, T>;
+
+    // Provided methods
+    fn raw_client(&self) -> &RpcClient<T> { ... }
+    fn estimate_gas<'life0, 'life1, 'async_trait>(
+        &'life0 self,
+        tx: &'life1 N::TransactionRequest
+    ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait,
+             'life1: 'async_trait { ... }
+    fn get_transaction_count<'life0, 'async_trait>(
+        &'life0 self,
+        address: Address
+    ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait { ... }
+    fn send_transaction<'life0, 'life1, 'async_trait>(
+        &'life0 self,
+        tx: &'life1 N::TransactionRequest
+    ) -> Pin<Box<dyn Future<Output = TransportResult<N::Receipt>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait,
+             'life1: 'async_trait { ... }
+    fn populate_gas<'life0, 'life1, 'async_trait>(
+        &'life0 self,
+        tx: &'life1 mut N::TransactionRequest
+    ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait,
+             'life1: 'async_trait { ... }
+}
Expand description

Provider is parameterized with a network and a transport. The default +transport is type-erased, but you can do Provider<N, Http>.

+

Required Methods§

source

fn client(&self) -> &NetworkRpcClient<N, T>

Return a reference to the inner RpcClient.

+
source

fn inner(&self) -> &dyn Provider<N, T>

Return a reference to the inner Provider.

+

Providers are object safe now :)

+

Provided Methods§

source

fn raw_client(&self) -> &RpcClient<T>

source

fn estimate_gas<'life0, 'life1, 'async_trait>( + &'life0 self, + tx: &'life1 N::TransactionRequest +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source

fn get_transaction_count<'life0, 'async_trait>( + &'life0 self, + address: Address +) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait,

Get the transaction count for an address. Used for finding the +appropriate nonce.

+

TODO: block number/hash/tag

+
source

fn send_transaction<'life0, 'life1, 'async_trait>( + &'life0 self, + tx: &'life1 N::TransactionRequest +) -> Pin<Box<dyn Future<Output = TransportResult<N::Receipt>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Send a transaction to the network.

+

The transaction type is defined by the network.

+
source

fn populate_gas<'life0, 'life1, 'async_trait>( + &'life0 self, + tx: &'life1 mut N::TransactionRequest +) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Implementors§

source§

impl<N: Network, T: Transport + Clone> Provider<N, T> for NetworkRpcClient<N, T>

\ No newline at end of file diff --git a/alloy_providers/trait.ProviderLayer.html b/alloy_providers/trait.ProviderLayer.html new file mode 100644 index 000000000000..7b0f5a4618ea --- /dev/null +++ b/alloy_providers/trait.ProviderLayer.html @@ -0,0 +1,13 @@ +ProviderLayer in alloy_providers - Rust +
pub trait ProviderLayer<P: Provider<N, T>, N: Network, T: Transport> {
+    type Provider: Provider<N, T>;
+
+    // Required method
+    fn layer(&self, inner: P) -> Self::Provider;
+}
Expand description

A layering abstraction in the vein of tower::Layer

+

Required Associated Types§

Required Methods§

source

fn layer(&self, inner: P) -> Self::Provider

Implementors§

source§

impl<P, N, T, Inner, Outer> ProviderLayer<P, N, T> for Stack<T, Inner, Outer>
where + T: Transport, + N: Network, + P: Provider<N, T>, + Inner: ProviderLayer<P, N, T>, + Outer: ProviderLayer<Inner::Provider, N, T>,

§

type Provider = <Outer as ProviderLayer<<Inner as ProviderLayer<P, N, T>>::Provider, N, T>>::Provider

\ No newline at end of file diff --git a/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE.html b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE.html new file mode 100644 index 000000000000..9e0898cf41d4 --- /dev/null +++ b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE.html @@ -0,0 +1,3 @@ +EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE in alloy_providers::utils - Rust +
pub const EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE: u64 = 3_000_000_000;
Expand description

The default max priority fee per gas, used in case the base fee is within a threshold.

+
\ No newline at end of file diff --git a/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_PAST_BLOCKS.html b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_PAST_BLOCKS.html new file mode 100644 index 000000000000..e1795f250c16 --- /dev/null +++ b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_PAST_BLOCKS.html @@ -0,0 +1,3 @@ +EIP1559_FEE_ESTIMATION_PAST_BLOCKS in alloy_providers::utils - Rust +
pub const EIP1559_FEE_ESTIMATION_PAST_BLOCKS: u64 = 10;
Expand description

The number of blocks from the past for which the fee rewards are fetched for fee estimation.

+
\ No newline at end of file diff --git a/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER.html b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER.html new file mode 100644 index 000000000000..95268d2cd325 --- /dev/null +++ b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER.html @@ -0,0 +1,4 @@ +EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER in alloy_providers::utils - Rust +
pub const EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER: u64 = 100_000_000_000;
Expand description

The threshold for base fee below which we use the default priority fee, and beyond which we +estimate an appropriate value for priority fee.

+
\ No newline at end of file diff --git a/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE.html b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE.html new file mode 100644 index 000000000000..6a9f0c38f19a --- /dev/null +++ b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE.html @@ -0,0 +1,3 @@ +EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE in alloy_providers::utils - Rust +
pub const EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE: f64 = 5.0;
Expand description

The default percentile of gas premiums that are fetched for fee estimation.

+
\ No newline at end of file diff --git a/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE.html b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE.html new file mode 100644 index 000000000000..866fbb838457 --- /dev/null +++ b/alloy_providers/utils/constant.EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE.html @@ -0,0 +1,4 @@ +EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE in alloy_providers::utils - Rust +
pub const EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE: i64 = 200;
Expand description

The threshold max change/difference (in %) at which we will ignore the fee history values +under it.

+
\ No newline at end of file diff --git a/alloy_providers/utils/fn.base_fee_surged.html b/alloy_providers/utils/fn.base_fee_surged.html new file mode 100644 index 000000000000..2f7fc8adbc66 --- /dev/null +++ b/alloy_providers/utils/fn.base_fee_surged.html @@ -0,0 +1,2 @@ +base_fee_surged in alloy_providers::utils - Rust +
fn base_fee_surged(base_fee_per_gas: U256) -> U256
\ No newline at end of file diff --git a/alloy_providers/utils/fn.eip1559_default_estimator.html b/alloy_providers/utils/fn.eip1559_default_estimator.html new file mode 100644 index 000000000000..635c427defed --- /dev/null +++ b/alloy_providers/utils/fn.eip1559_default_estimator.html @@ -0,0 +1,6 @@ +eip1559_default_estimator in alloy_providers::utils - Rust +
pub fn eip1559_default_estimator(
+    base_fee_per_gas: U256,
+    rewards: Vec<Vec<U256>>
+) -> (U256, U256)
Expand description

The default EIP-1559 fee estimator which is based on the work by MyCrypto

+
\ No newline at end of file diff --git a/alloy_providers/utils/fn.estimate_priority_fee.html b/alloy_providers/utils/fn.estimate_priority_fee.html new file mode 100644 index 000000000000..0eabe3f1fcb8 --- /dev/null +++ b/alloy_providers/utils/fn.estimate_priority_fee.html @@ -0,0 +1,2 @@ +estimate_priority_fee in alloy_providers::utils - Rust +
fn estimate_priority_fee(rewards: Vec<Vec<U256>>) -> U256
\ No newline at end of file diff --git a/alloy_providers/utils/index.html b/alloy_providers/utils/index.html new file mode 100644 index 000000000000..4e56a96ef02c --- /dev/null +++ b/alloy_providers/utils/index.html @@ -0,0 +1,5 @@ +alloy_providers::utils - Rust +

Module alloy_providers::utils

source ·
Expand description

Provider-related utilities.

+

Constants

Functions

Type Aliases

\ No newline at end of file diff --git a/alloy_providers/utils/sidebar-items.js b/alloy_providers/utils/sidebar-items.js new file mode 100644 index 000000000000..f109c9ffd520 --- /dev/null +++ b/alloy_providers/utils/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE","EIP1559_FEE_ESTIMATION_PAST_BLOCKS","EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER","EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE","EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE"],"fn":["base_fee_surged","eip1559_default_estimator","estimate_priority_fee"],"type":["EstimatorFunction"]}; \ No newline at end of file diff --git a/alloy_providers/utils/type.EstimatorFunction.html b/alloy_providers/utils/type.EstimatorFunction.html new file mode 100644 index 000000000000..73359d09bcf3 --- /dev/null +++ b/alloy_providers/utils/type.EstimatorFunction.html @@ -0,0 +1,3 @@ +EstimatorFunction in alloy_providers::utils - Rust +
pub type EstimatorFunction = fn(_: U256, _: Vec<Vec<U256>>) -> (U256, U256);
Expand description

An estimator function for EIP1559 fees.

+

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: 8 bytes

\ No newline at end of file diff --git a/alloy_pubsub/all.html b/alloy_pubsub/all.html new file mode 100644 index 000000000000..98e14089b9db --- /dev/null +++ b/alloy_pubsub/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Traits

\ No newline at end of file diff --git a/alloy_pubsub/connect/index.html b/alloy_pubsub/connect/index.html new file mode 100644 index 000000000000..0de463a4e69c --- /dev/null +++ b/alloy_pubsub/connect/index.html @@ -0,0 +1,2 @@ +alloy_pubsub::connect - Rust +

Module alloy_pubsub::connect

source ·

Traits

  • Configuration objects that contain connection details for a backend.
\ No newline at end of file diff --git a/alloy_pubsub/connect/sidebar-items.js b/alloy_pubsub/connect/sidebar-items.js new file mode 100644 index 000000000000..23ec4eb25401 --- /dev/null +++ b/alloy_pubsub/connect/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"trait":["PubSubConnect"]}; \ No newline at end of file diff --git a/alloy_pubsub/connect/trait.PubSubConnect.html b/alloy_pubsub/connect/trait.PubSubConnect.html new file mode 100644 index 000000000000..b1a402f49f01 --- /dev/null +++ b/alloy_pubsub/connect/trait.PubSubConnect.html @@ -0,0 +1,28 @@ +PubSubConnect in alloy_pubsub::connect - Rust +
pub trait PubSubConnect: Sized + Send + Sync + 'static {
+    // Required methods
+    fn is_local(&self) -> bool;
+    fn connect<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, ConnectionHandle, TransportError>;
+
+    // Provided methods
+    fn try_reconnect<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, ConnectionHandle, TransportError> { ... }
+    fn into_service(self) -> Pbf<'static, PubSubFrontend, TransportError> { ... }
+}
Expand description

Configuration objects that contain connection details for a backend.

+

Implementers should contain configuration options for the underlying +transport.

+

Required Methods§

source

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.

+
source

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it.

+

This function MUST create a long-lived task containing a +ConnectionInterface, and return the corresponding handle.

+

Provided Methods§

source

fn try_reconnect<'a: 'b, 'b>( + &'a self +) -> Pbf<'b, ConnectionHandle, TransportError>

Attempt to reconnect the transport.

+

Override this to add custom reconnection logic to your connector. This +will be used by the internal pubsub connection managers in the event the +connection fails.

+
source

fn into_service(self) -> Pbf<'static, PubSubFrontend, TransportError>

Convert the configuration object into a service with a running backend.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_pubsub/frontend/index.html b/alloy_pubsub/frontend/index.html new file mode 100644 index 000000000000..126f72ab20be --- /dev/null +++ b/alloy_pubsub/frontend/index.html @@ -0,0 +1,3 @@ +alloy_pubsub::frontend - Rust +

Module alloy_pubsub::frontend

source ·

Structs

\ No newline at end of file diff --git a/alloy_pubsub/frontend/sidebar-items.js b/alloy_pubsub/frontend/sidebar-items.js new file mode 100644 index 000000000000..48b82de3a345 --- /dev/null +++ b/alloy_pubsub/frontend/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["PubSubFrontend"]}; \ No newline at end of file diff --git a/alloy_pubsub/frontend/struct.PubSubFrontend.html b/alloy_pubsub/frontend/struct.PubSubFrontend.html new file mode 100644 index 000000000000..e6892f7954e8 --- /dev/null +++ b/alloy_pubsub/frontend/struct.PubSubFrontend.html @@ -0,0 +1,77 @@ +PubSubFrontend in alloy_pubsub::frontend - Rust +
pub struct PubSubFrontend {
+    tx: UnboundedSender<PubSubInstruction>,
+}
Expand description

A PubSubFrontend is Transport composed of a channel to a running +PubSub service.

+

Fields§

§tx: UnboundedSender<PubSubInstruction>

Implementations§

source§

impl PubSubFrontend

source

pub(crate) const fn new(tx: UnboundedSender<PubSubInstruction>) -> Self

Create a new frontend.

+
source

pub async fn get_subscription( + &self, + id: U256 +) -> Result<Receiver<Box<RawValue>>, TransportError>

Get the subscription ID for a local ID.

+
source

pub async fn unsubscribe(&self, id: U256) -> Result<(), TransportError>

Unsubscribe from a subscription.

+
source

pub fn send( + &self, + req: SerializedRequest +) -> Pin<Box<dyn Future<Output = Result<Response, TransportError>> + Send>>

Send a request.

+
source

pub fn send_packet( + &self, + req: RequestPacket +) -> Pin<Box<dyn Future<Output = Result<ResponsePacket, TransportError>> + Send>>

Send a packet of requests, by breaking it up into individual requests.

+

Once all responses are received, we return a single response packet. +This is a bit annoying

+

Trait Implementations§

source§

impl Clone for PubSubFrontend

source§

fn clone(&self) -> PubSubFrontend

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PubSubFrontend

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Service<RequestPacket> for &PubSubFrontend

§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<<&PubSubFrontend as Service<RequestPacket>>::Response, <&PubSubFrontend as Service<RequestPacket>>::Error>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more
source§

impl Service<RequestPacket> for PubSubFrontend

§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T, Request> ServiceExt<Request> for T
where + T: Service<Request> + ?Sized,

§

fn ready(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_and(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

👎Deprecated since 0.4.6: please use the ServiceExt::ready method instead
Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_oneshot(self) -> ReadyOneshot<Self, Request>
where + Self: Sized,

Yields the service when it is ready to accept a request.
§

fn oneshot(self, req: Request) -> Oneshot<Self, Request>
where + Self: Sized,

Consume this Service, calling with the providing request once it is ready.
§

fn call_all<S>(self, reqs: S) -> CallAll<Self, S>
where + Self: Sized, + Self::Error: Into<Box<dyn Error + Sync + Send>>, + S: Stream<Item = Request>,

Process all requests from the given Stream, and produce a Stream of their responses. Read more
§

fn and_then<F>(self, f: F) -> AndThen<Self, F>
where + Self: Sized, + F: Clone,

Executes a new future after this service’s future resolves. This does +not alter the behaviour of the poll_ready method. Read more
§

fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Response) -> Response + Clone,

Maps this service’s response value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Error + Clone,

Maps this service’s error value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Result<Response, Error> + Clone,

Maps this service’s result type (Result<Self::Response, Self::Error>) +to a different value, regardless of whether the future succeeds or +fails. Read more
§

fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
where + Self: Sized, + F: FnMut(NewRequest) -> Request,

Composes a function in front of the service. Read more
§

fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Fut + Clone, + Fut: Future<Output = Result<Response, Error>>,

Composes an asynchronous function after this service. Read more
§

fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
where + Self: Sized, + F: FnMut(Self::Future) -> Fut, + Error: From<Self::Error>, + Fut: Future<Output = Result<Response, Error>>,

Composes a function that transforms futures produced by the service. Read more
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
where + Self: Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Send trait object. Read more
§

fn boxed_clone(self) -> BoxCloneService<Request, Self::Response, Self::Error>
where + Self: Clone + Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Clone + Send trait object. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> Transport for T
where + T: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = RpcError<TransportErrorKind>, Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>> + Send + Sync + 'static,

§

fn boxed(self) -> BoxTransport
where + Self: Sized + Clone + Send + Sync + 'static,

Convert this transport into a boxed trait object.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 8 bytes

\ No newline at end of file diff --git a/alloy_pubsub/handle/index.html b/alloy_pubsub/handle/index.html new file mode 100644 index 000000000000..dfd1eb8870a5 --- /dev/null +++ b/alloy_pubsub/handle/index.html @@ -0,0 +1,3 @@ +alloy_pubsub::handle - Rust +

Module alloy_pubsub::handle

source ·

Structs

\ No newline at end of file diff --git a/alloy_pubsub/handle/sidebar-items.js b/alloy_pubsub/handle/sidebar-items.js new file mode 100644 index 000000000000..69e5274cb197 --- /dev/null +++ b/alloy_pubsub/handle/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ConnectionHandle","ConnectionInterface"]}; \ No newline at end of file diff --git a/alloy_pubsub/handle/struct.ConnectionHandle.html b/alloy_pubsub/handle/struct.ConnectionHandle.html new file mode 100644 index 000000000000..4b7fe35040c6 --- /dev/null +++ b/alloy_pubsub/handle/struct.ConnectionHandle.html @@ -0,0 +1,33 @@ +ConnectionHandle in alloy_pubsub::handle - Rust +
pub struct ConnectionHandle {
+    pub(crate) to_socket: UnboundedSender<Box<RawValue>>,
+    pub(crate) from_socket: UnboundedReceiver<PubSubItem>,
+    pub(crate) error: Receiver<()>,
+    pub(crate) shutdown: Sender<()>,
+}
Expand description

A handle to a backend. Communicates to a ConnectionInterface on the +backend.

+

The backend SHOULD shut down when the handle is dropped (as indicated by +the shutdown channel).

+

Fields§

§to_socket: UnboundedSender<Box<RawValue>>

Outbound channel to server.

+
§from_socket: UnboundedReceiver<PubSubItem>

Inbound channel from remote server via WS.

+
§error: Receiver<()>

Notification from the backend of a terminal error.

+
§shutdown: Sender<()>

Notify the backend of intentional shutdown.

+

Implementations§

source§

impl ConnectionHandle

source

pub fn new() -> (Self, ConnectionInterface)

Create a new connection handle.

+
source

pub fn shutdown(self)

Shutdown the backend.

+

Trait Implementations§

source§

impl Debug for ConnectionHandle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

\ No newline at end of file diff --git a/alloy_pubsub/handle/struct.ConnectionInterface.html b/alloy_pubsub/handle/struct.ConnectionInterface.html new file mode 100644 index 000000000000..af551100063c --- /dev/null +++ b/alloy_pubsub/handle/struct.ConnectionInterface.html @@ -0,0 +1,36 @@ +ConnectionInterface in alloy_pubsub::handle - Rust +
pub struct ConnectionInterface {
+    pub(crate) from_frontend: UnboundedReceiver<Box<RawValue>>,
+    pub(crate) to_frontend: UnboundedSender<PubSubItem>,
+    pub(crate) error: Sender<()>,
+    pub(crate) shutdown: Receiver<()>,
+}
Expand description

The reciprocal of ConnectionHandle.

+

Fields§

§from_frontend: UnboundedReceiver<Box<RawValue>>

Inbound channel from frontend.

+
§to_frontend: UnboundedSender<PubSubItem>

Channel of responses to the frontend

+
§error: Sender<()>

Notifies the frontend of a terminal error.

+
§shutdown: Receiver<()>

Causes local shutdown when sender is triggered or dropped.

+

Implementations§

source§

impl ConnectionInterface

source

pub fn send_to_frontend( + &self, + item: PubSubItem +) -> Result<(), SendError<PubSubItem>>

Send a pubsub item to the frontend.

+
source

pub async fn recv_from_frontend(&mut self) -> Option<Box<RawValue>>

Receive a request from the frontend. Ensures that if the frontend has +dropped or issued a shutdown instruction, the backend sees no more +requests.

+
source

pub fn close_with_error(self)

Close the interface, sending an error to the frontend.

+

Trait Implementations§

source§

impl Debug for ConnectionInterface

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

\ No newline at end of file diff --git a/alloy_pubsub/index.html b/alloy_pubsub/index.html new file mode 100644 index 000000000000..e7311e1ba320 --- /dev/null +++ b/alloy_pubsub/index.html @@ -0,0 +1,41 @@ +alloy_pubsub - Rust +

Crate alloy_pubsub

source ·
Expand description

alloy-pubsub

+

Publish-subscribe Alloy provider.

+

Overview

+

PubSub services, unlike regular RPC services, are long-lived and +bidirectional. They are used to subscribe to events on the server, and +receive notifications when those events occur.

+

The PubSub system here consists of 3 logical parts:

+
    +
  • The frontend is the part of the system that the user interacts with. +It exposes a simple API that allows the user to issue requests and manage +subscriptions.
  • +
  • The service is an intermediate layer that manages request/response +mappings, subscription aliasing, and backend lifecycle events. Running +PubSubConnect::into_service will spawn a long-lived service task.
  • +
  • The backend is an actively running connection to the server. Users +should NEVER instantiate a backend directly. Instead, they should use +PubSubConnect::into_service for some connection object.
  • +
+

This crate provides the following:

+
    +
  • PubSubConnect: A trait for instantiating a PubSub service by connecting +to some backend. Implementors of this trait are responsible for +the precise connection details, and for spawning the backend task. +Users should ALWAYS call PubSubConnect::into_service to get a running +service with a running backend.
  • +
  • ConnectionHandle: A handle to a running backend. This type is +returned by PubSubConnect::connect, and owned by the service. +Dropping the handle will shut down the backend.
  • +
  • ConnectionInterface: The reciprocal of ConnectionHandle. This type +is owned by the backend, and is used to communicate with the +service. Dropping the interface will notify the service of a +terminal error.
  • +
  • PubSubFrontend: The frontend. A handle to a running PubSub +service. It is used to issue requests and subscription lifecycle +instructions to the service.
  • +
+

Modules

Structs

Traits

  • Configuration objects that contain connection details for a backend.
\ No newline at end of file diff --git a/alloy_pubsub/ix/enum.PubSubInstruction.html b/alloy_pubsub/ix/enum.PubSubInstruction.html new file mode 100644 index 000000000000..a64770196c74 --- /dev/null +++ b/alloy_pubsub/ix/enum.PubSubInstruction.html @@ -0,0 +1,26 @@ +PubSubInstruction in alloy_pubsub::ix - Rust +
pub(crate) enum PubSubInstruction {
+    Request(InFlight),
+    GetSub(U256, Sender<Receiver<Box<RawValue>>>),
+    Unsubscribe(U256),
+}
Expand description

Instructions for the pubsub service.

+

Variants§

§

Request(InFlight)

Send a request.

+
§

GetSub(U256, Sender<Receiver<Box<RawValue>>>)

Get the subscription ID for a local ID.

+
§

Unsubscribe(U256)

Unsubscribe from a subscription.

+

Trait Implementations§

source§

impl Debug for PubSubInstruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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:

  • Request: 72 bytes
  • GetSub: 48 bytes
  • Unsubscribe: 40 bytes
\ No newline at end of file diff --git a/alloy_pubsub/ix/index.html b/alloy_pubsub/ix/index.html new file mode 100644 index 000000000000..09f62f0b19ba --- /dev/null +++ b/alloy_pubsub/ix/index.html @@ -0,0 +1,2 @@ +alloy_pubsub::ix - Rust +

Module alloy_pubsub::ix

source ·

Enums

\ No newline at end of file diff --git a/alloy_pubsub/ix/sidebar-items.js b/alloy_pubsub/ix/sidebar-items.js new file mode 100644 index 000000000000..269deb120966 --- /dev/null +++ b/alloy_pubsub/ix/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["PubSubInstruction"]}; \ No newline at end of file diff --git a/alloy_pubsub/managers/active_sub/index.html b/alloy_pubsub/managers/active_sub/index.html new file mode 100644 index 000000000000..520c2f19b1de --- /dev/null +++ b/alloy_pubsub/managers/active_sub/index.html @@ -0,0 +1,2 @@ +alloy_pubsub::managers::active_sub - Rust +

Structs

\ No newline at end of file diff --git a/alloy_pubsub/managers/active_sub/sidebar-items.js b/alloy_pubsub/managers/active_sub/sidebar-items.js new file mode 100644 index 000000000000..18a28de07394 --- /dev/null +++ b/alloy_pubsub/managers/active_sub/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ActiveSubscription"]}; \ No newline at end of file diff --git a/alloy_pubsub/managers/active_sub/struct.ActiveSubscription.html b/alloy_pubsub/managers/active_sub/struct.ActiveSubscription.html new file mode 100644 index 000000000000..2e45d759da97 --- /dev/null +++ b/alloy_pubsub/managers/active_sub/struct.ActiveSubscription.html @@ -0,0 +1,41 @@ +ActiveSubscription in alloy_pubsub::managers::active_sub - Rust +
pub(crate) struct ActiveSubscription {
+    pub(crate) local_id: B256,
+    pub(crate) request: SerializedRequest,
+    pub(crate) tx: Sender<Box<RawValue>>,
+}
Expand description

An active subscription.

+

Fields§

§local_id: B256

Cached hash of the request, used for sorting and equality.

+
§request: SerializedRequest

The serialized subscription request.

+
§tx: Sender<Box<RawValue>>

The channel via which notifications are broadcast.

+

Implementations§

source§

impl ActiveSubscription

source

pub(crate) fn new(request: SerializedRequest) -> (Self, Receiver<Box<RawValue>>)

Create a new active subscription.

+
source

pub(crate) const fn request(&self) -> &SerializedRequest

Serialize the request as a boxed RawValue.

+

This is used to (re-)send the request over the transport.

+
source

pub(crate) fn notify(&mut self, notification: Box<RawValue>)

Notify the subscription channel of a new value, if any receiver exists. +If no receiver exists, the notification is dropped.

+

Trait Implementations§

source§

impl Clone for ActiveSubscription

source§

fn clone(&self) -> ActiveSubscription

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ActiveSubscription

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for ActiveSubscription

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for ActiveSubscription

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for ActiveSubscription

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for ActiveSubscription

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Eq for ActiveSubscription

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 104 bytes

\ No newline at end of file diff --git a/alloy_pubsub/managers/in_flight/index.html b/alloy_pubsub/managers/in_flight/index.html new file mode 100644 index 000000000000..f8f25fd4e8cb --- /dev/null +++ b/alloy_pubsub/managers/in_flight/index.html @@ -0,0 +1,2 @@ +alloy_pubsub::managers::in_flight - Rust +

Structs

  • InFlight 🔒
    An in-flight JSON-RPC request.
\ No newline at end of file diff --git a/alloy_pubsub/managers/in_flight/sidebar-items.js b/alloy_pubsub/managers/in_flight/sidebar-items.js new file mode 100644 index 000000000000..0188e4d99a9d --- /dev/null +++ b/alloy_pubsub/managers/in_flight/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["InFlight"]}; \ No newline at end of file diff --git a/alloy_pubsub/managers/in_flight/struct.InFlight.html b/alloy_pubsub/managers/in_flight/struct.InFlight.html new file mode 100644 index 000000000000..7884dde184f2 --- /dev/null +++ b/alloy_pubsub/managers/in_flight/struct.InFlight.html @@ -0,0 +1,35 @@ +InFlight in alloy_pubsub::managers::in_flight - Rust +
pub(crate) struct InFlight {
+    pub(crate) request: SerializedRequest,
+    pub(crate) tx: Sender<Result<Response, TransportError>>,
+}
Expand description

An in-flight JSON-RPC request.

+

This struct contains the request that was sent, as well as a channel to +receive the response on.

+

Fields§

§request: SerializedRequest

The request

+
§tx: Sender<Result<Response, TransportError>>

The channel to send the response on.

+

Implementations§

source§

impl InFlight

source

pub(crate) fn new( + request: SerializedRequest +) -> (Self, Receiver<Result<Response, TransportError>>)

Create a new in-flight request.

+
source

pub(crate) const fn method(&self) -> &'static str

Get the method

+
source

pub(crate) const fn request(&self) -> &SerializedRequest

Get a reference to the serialized request.

+

This is used to (re-)send the request over the transport.

+
source

pub(crate) fn fulfill(self, resp: Response) -> Option<(U256, Self)>

Fulfill the request with a response. This consumes the in-flight +request. If the request is a subscription and the response is not an +error, the subscription ID and the in-flight request are returned.

+

Trait Implementations§

source§

impl Debug for InFlight

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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

\ No newline at end of file diff --git a/alloy_pubsub/managers/index.html b/alloy_pubsub/managers/index.html new file mode 100644 index 000000000000..ed294287306b --- /dev/null +++ b/alloy_pubsub/managers/index.html @@ -0,0 +1,2 @@ +alloy_pubsub::managers - Rust +

Module alloy_pubsub::managers

source ·

Modules

\ No newline at end of file diff --git a/alloy_pubsub/managers/req/index.html b/alloy_pubsub/managers/req/index.html new file mode 100644 index 000000000000..a4dab732daf6 --- /dev/null +++ b/alloy_pubsub/managers/req/index.html @@ -0,0 +1,2 @@ +alloy_pubsub::managers::req - Rust +

Module alloy_pubsub::managers::req

source ·

Structs

\ No newline at end of file diff --git a/alloy_pubsub/managers/req/sidebar-items.js b/alloy_pubsub/managers/req/sidebar-items.js new file mode 100644 index 000000000000..d27a0a70c459 --- /dev/null +++ b/alloy_pubsub/managers/req/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["RequestManager"]}; \ No newline at end of file diff --git a/alloy_pubsub/managers/req/struct.RequestManager.html b/alloy_pubsub/managers/req/struct.RequestManager.html new file mode 100644 index 000000000000..c2998c447f8a --- /dev/null +++ b/alloy_pubsub/managers/req/struct.RequestManager.html @@ -0,0 +1,31 @@ +RequestManager in alloy_pubsub::managers::req - Rust +
pub(crate) struct RequestManager {
+    reqs: BTreeMap<Id, InFlight>,
+}
Expand description

Manages in-flight requests.

+

Fields§

§reqs: BTreeMap<Id, InFlight>

Implementations§

source§

impl RequestManager

source

pub(crate) fn len(&self) -> usize

Get the number of in-flight requests.

+
source

pub(crate) fn iter(&self) -> impl Iterator<Item = (&Id, &InFlight)>

Get an iterator over the in-flight requests.

+
source

pub(crate) fn insert(&mut self, in_flight: InFlight)

Insert a new in-flight request.

+
source

pub(crate) fn handle_response( + &mut self, + resp: Response +) -> Option<(U256, InFlight)>

Handle a response by sending the payload to the waiter.

+

If the request created a new subscription, this function returns the +subscription ID and the in-flight request for conversion to an +ActiveSubscription.

+

Trait Implementations§

source§

impl Debug for RequestManager

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RequestManager

source§

fn default() -> RequestManager

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_pubsub/managers/sidebar-items.js b/alloy_pubsub/managers/sidebar-items.js new file mode 100644 index 000000000000..478de6df51b8 --- /dev/null +++ b/alloy_pubsub/managers/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["active_sub","in_flight","req","sub"]}; \ No newline at end of file diff --git a/alloy_pubsub/managers/sub/index.html b/alloy_pubsub/managers/sub/index.html new file mode 100644 index 000000000000..ae1dabadc461 --- /dev/null +++ b/alloy_pubsub/managers/sub/index.html @@ -0,0 +1,2 @@ +alloy_pubsub::managers::sub - Rust +

Module alloy_pubsub::managers::sub

source ·

Structs

\ No newline at end of file diff --git a/alloy_pubsub/managers/sub/sidebar-items.js b/alloy_pubsub/managers/sub/sidebar-items.js new file mode 100644 index 000000000000..4d020440be07 --- /dev/null +++ b/alloy_pubsub/managers/sub/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["SubscriptionManager"]}; \ No newline at end of file diff --git a/alloy_pubsub/managers/sub/struct.SubscriptionManager.html b/alloy_pubsub/managers/sub/struct.SubscriptionManager.html new file mode 100644 index 000000000000..9ec128550732 --- /dev/null +++ b/alloy_pubsub/managers/sub/struct.SubscriptionManager.html @@ -0,0 +1,43 @@ +SubscriptionManager in alloy_pubsub::managers::sub - Rust +
pub(crate) struct SubscriptionManager {
+    local_to_sub: BiBTreeMap<B256, ActiveSubscription>,
+    local_to_server: BiBTreeMap<B256, U256>,
+}

Fields§

§local_to_sub: BiBTreeMap<B256, ActiveSubscription>

The subscriptions.

+
§local_to_server: BiBTreeMap<B256, U256>

Tracks the CURRENT server id for a subscription.

+

Implementations§

source§

impl SubscriptionManager

source

pub(crate) fn iter(&self) -> impl Iterator<Item = (&B256, &ActiveSubscription)>

Get an iterator over the subscriptions.

+
source

pub(crate) fn len(&self) -> usize

Get the number of subscriptions.

+
source

fn insert( + &mut self, + request: SerializedRequest, + server_id: U256 +) -> Receiver<Box<RawValue>>

Insert a subscription.

+
source

pub(crate) fn upsert( + &mut self, + request: SerializedRequest, + server_id: U256 +) -> Receiver<Box<RawValue>>

Insert or update the server_id for a subscription.

+
source

pub(crate) fn local_id_for(&self, server_id: U256) -> Option<B256>

De-alias an alias, getting the original ID.

+
source

pub(crate) fn drop_server_ids(&mut self)

Drop all server_ids.

+
source

fn change_server_id(&mut self, local_id: B256, server_id: U256)

Change the server_id of a subscription.

+
source

pub(crate) fn remove_sub(&mut self, local_id: B256)

Remove a subscription by its local_id.

+
source

pub(crate) fn notify(&mut self, notification: EthNotification)

Notify the subscription channel of a new value, if the sub is known, +and if any receiver exists. If the sub id is unknown, or no receiver +exists, the notification is dropped.

+
source

pub(crate) fn get_rx(&self, local_id: B256) -> Option<Receiver<Box<RawValue>>>

Get a receiver for a subscription.

+

Trait Implementations§

source§

impl Debug for SubscriptionManager

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SubscriptionManager

source§

fn default() -> SubscriptionManager

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 96 bytes

\ No newline at end of file diff --git a/alloy_pubsub/service/index.html b/alloy_pubsub/service/index.html new file mode 100644 index 000000000000..a85530dd98fd --- /dev/null +++ b/alloy_pubsub/service/index.html @@ -0,0 +1,3 @@ +alloy_pubsub::service - Rust +

Module alloy_pubsub::service

source ·

Structs

  • The service contains the backend handle, a subscription manager, and the +configuration details required to reconnect.
\ No newline at end of file diff --git a/alloy_pubsub/service/sidebar-items.js b/alloy_pubsub/service/sidebar-items.js new file mode 100644 index 000000000000..8165110bbc6d --- /dev/null +++ b/alloy_pubsub/service/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["PubSubService"]}; \ No newline at end of file diff --git a/alloy_pubsub/service/struct.PubSubService.html b/alloy_pubsub/service/struct.PubSubService.html new file mode 100644 index 000000000000..09451dbf5a8d --- /dev/null +++ b/alloy_pubsub/service/struct.PubSubService.html @@ -0,0 +1,61 @@ +PubSubService in alloy_pubsub::service - Rust +
pub(crate) struct PubSubService<T> {
+    pub(crate) handle: ConnectionHandle,
+    pub(crate) connector: T,
+    pub(crate) reqs: UnboundedReceiver<PubSubInstruction>,
+    pub(crate) subs: SubscriptionManager,
+    pub(crate) in_flights: RequestManager,
+}
Expand description

The service contains the backend handle, a subscription manager, and the +configuration details required to reconnect.

+

Fields§

§handle: ConnectionHandle

The backend handle.

+
§connector: T

The configuration details required to reconnect.

+
§reqs: UnboundedReceiver<PubSubInstruction>

The inbound requests.

+
§subs: SubscriptionManager

The subscription manager.

+
§in_flights: RequestManager

The request manager.

+

Implementations§

source§

impl<T> PubSubService<T>
where + T: PubSubConnect,

source

pub(crate) async fn connect( + connector: T +) -> Result<PubSubFrontend, TransportError>

Create a new service from a connector.

+
source

async fn get_new_backend(&mut self) -> Result<ConnectionHandle, TransportError>

Reconnect by dropping the backend and creating a new one.

+
source

async fn reconnect(&mut self) -> TransportResult<()>

Reconnect the backend, re-issue pending requests, and re-start active +subscriptions.

+
source

fn dispatch_request(&mut self, brv: Box<RawValue>) -> TransportResult<()>

Dispatch a request to the socket.

+
source

fn service_request(&mut self, in_flight: InFlight) -> TransportResult<()>

Service a request.

+
source

fn service_get_sub( + &mut self, + local_id: U256, + tx: Sender<Receiver<Box<RawValue>>> +) -> TransportResult<()>

Service a GetSub instruction.

+

If the subscription exists, the waiter is sent a broadcast receiver. If +the subscription does not exist, the waiter is sent nothing, and the +tx is dropped. This notifies the waiter that the subscription does +not exist.

+
source

fn service_unsubscribe(&mut self, local_id: U256) -> TransportResult<()>

Service an unsubscribe instruction.

+
source

fn service_ix(&mut self, ix: PubSubInstruction) -> TransportResult<()>

Service an instruction

+
source

fn handle_item(&mut self, item: PubSubItem) -> TransportResult<()>

Handle an item from the backend.

+
source

fn handle_sub_response( + &mut self, + in_flight: InFlight, + server_id: U256 +) -> TransportResult<()>

Rewrite the subscription id and insert into the subscriptions manager

+
source

pub(crate) fn spawn(self)

Spawn the service.

+

Trait Implementations§

source§

impl<T: Debug> Debug for PubSubService<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for PubSubService<T>

§

impl<T> Send for PubSubService<T>
where + T: Send,

§

impl<T> Sync for PubSubService<T>
where + T: Sync,

§

impl<T> Unpin for PubSubService<T>
where + T: Unpin,

§

impl<T> !UnwindSafe for PubSubService<T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_pubsub/sidebar-items.js b/alloy_pubsub/sidebar-items.js new file mode 100644 index 000000000000..f29806ff0628 --- /dev/null +++ b/alloy_pubsub/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["connect","frontend","handle","ix","managers","service"],"struct":["ConnectionHandle","ConnectionInterface","PubSubFrontend"],"trait":["PubSubConnect"]}; \ No newline at end of file diff --git a/alloy_pubsub/struct.ConnectionHandle.html b/alloy_pubsub/struct.ConnectionHandle.html new file mode 100644 index 000000000000..d0a67b8b05ca --- /dev/null +++ b/alloy_pubsub/struct.ConnectionHandle.html @@ -0,0 +1,33 @@ +ConnectionHandle in alloy_pubsub - Rust +
pub struct ConnectionHandle {
+    pub(crate) to_socket: UnboundedSender<Box<RawValue>>,
+    pub(crate) from_socket: UnboundedReceiver<PubSubItem>,
+    pub(crate) error: Receiver<()>,
+    pub(crate) shutdown: Sender<()>,
+}
Expand description

A handle to a backend. Communicates to a ConnectionInterface on the +backend.

+

The backend SHOULD shut down when the handle is dropped (as indicated by +the shutdown channel).

+

Fields§

§to_socket: UnboundedSender<Box<RawValue>>

Outbound channel to server.

+
§from_socket: UnboundedReceiver<PubSubItem>

Inbound channel from remote server via WS.

+
§error: Receiver<()>

Notification from the backend of a terminal error.

+
§shutdown: Sender<()>

Notify the backend of intentional shutdown.

+

Implementations§

source§

impl ConnectionHandle

source

pub fn new() -> (Self, ConnectionInterface)

Create a new connection handle.

+
source

pub fn shutdown(self)

Shutdown the backend.

+

Trait Implementations§

source§

impl Debug for ConnectionHandle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

\ No newline at end of file diff --git a/alloy_pubsub/struct.ConnectionInterface.html b/alloy_pubsub/struct.ConnectionInterface.html new file mode 100644 index 000000000000..ea077ec5c6da --- /dev/null +++ b/alloy_pubsub/struct.ConnectionInterface.html @@ -0,0 +1,36 @@ +ConnectionInterface in alloy_pubsub - Rust +
pub struct ConnectionInterface {
+    pub(crate) from_frontend: UnboundedReceiver<Box<RawValue>>,
+    pub(crate) to_frontend: UnboundedSender<PubSubItem>,
+    pub(crate) error: Sender<()>,
+    pub(crate) shutdown: Receiver<()>,
+}
Expand description

The reciprocal of ConnectionHandle.

+

Fields§

§from_frontend: UnboundedReceiver<Box<RawValue>>

Inbound channel from frontend.

+
§to_frontend: UnboundedSender<PubSubItem>

Channel of responses to the frontend

+
§error: Sender<()>

Notifies the frontend of a terminal error.

+
§shutdown: Receiver<()>

Causes local shutdown when sender is triggered or dropped.

+

Implementations§

source§

impl ConnectionInterface

source

pub fn send_to_frontend( + &self, + item: PubSubItem +) -> Result<(), SendError<PubSubItem>>

Send a pubsub item to the frontend.

+
source

pub async fn recv_from_frontend(&mut self) -> Option<Box<RawValue>>

Receive a request from the frontend. Ensures that if the frontend has +dropped or issued a shutdown instruction, the backend sees no more +requests.

+
source

pub fn close_with_error(self)

Close the interface, sending an error to the frontend.

+

Trait Implementations§

source§

impl Debug for ConnectionInterface

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

\ No newline at end of file diff --git a/alloy_pubsub/struct.PubSubFrontend.html b/alloy_pubsub/struct.PubSubFrontend.html new file mode 100644 index 000000000000..00aee77c7f86 --- /dev/null +++ b/alloy_pubsub/struct.PubSubFrontend.html @@ -0,0 +1,77 @@ +PubSubFrontend in alloy_pubsub - Rust +
pub struct PubSubFrontend {
+    tx: UnboundedSender<PubSubInstruction>,
+}
Expand description

A PubSubFrontend is Transport composed of a channel to a running +PubSub service.

+

Fields§

§tx: UnboundedSender<PubSubInstruction>

Implementations§

source§

impl PubSubFrontend

source

pub(crate) const fn new(tx: UnboundedSender<PubSubInstruction>) -> Self

Create a new frontend.

+
source

pub async fn get_subscription( + &self, + id: U256 +) -> Result<Receiver<Box<RawValue>>, TransportError>

Get the subscription ID for a local ID.

+
source

pub async fn unsubscribe(&self, id: U256) -> Result<(), TransportError>

Unsubscribe from a subscription.

+
source

pub fn send( + &self, + req: SerializedRequest +) -> Pin<Box<dyn Future<Output = Result<Response, TransportError>> + Send>>

Send a request.

+
source

pub fn send_packet( + &self, + req: RequestPacket +) -> Pin<Box<dyn Future<Output = Result<ResponsePacket, TransportError>> + Send>>

Send a packet of requests, by breaking it up into individual requests.

+

Once all responses are received, we return a single response packet. +This is a bit annoying

+

Trait Implementations§

source§

impl Clone for PubSubFrontend

source§

fn clone(&self) -> PubSubFrontend

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PubSubFrontend

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Service<RequestPacket> for &PubSubFrontend

§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<<&PubSubFrontend as Service<RequestPacket>>::Response, <&PubSubFrontend as Service<RequestPacket>>::Error>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more
source§

impl Service<RequestPacket> for PubSubFrontend

§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T, Request> ServiceExt<Request> for T
where + T: Service<Request> + ?Sized,

§

fn ready(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_and(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

👎Deprecated since 0.4.6: please use the ServiceExt::ready method instead
Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_oneshot(self) -> ReadyOneshot<Self, Request>
where + Self: Sized,

Yields the service when it is ready to accept a request.
§

fn oneshot(self, req: Request) -> Oneshot<Self, Request>
where + Self: Sized,

Consume this Service, calling with the providing request once it is ready.
§

fn call_all<S>(self, reqs: S) -> CallAll<Self, S>
where + Self: Sized, + Self::Error: Into<Box<dyn Error + Sync + Send>>, + S: Stream<Item = Request>,

Process all requests from the given Stream, and produce a Stream of their responses. Read more
§

fn and_then<F>(self, f: F) -> AndThen<Self, F>
where + Self: Sized, + F: Clone,

Executes a new future after this service’s future resolves. This does +not alter the behaviour of the poll_ready method. Read more
§

fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Response) -> Response + Clone,

Maps this service’s response value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Error + Clone,

Maps this service’s error value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Result<Response, Error> + Clone,

Maps this service’s result type (Result<Self::Response, Self::Error>) +to a different value, regardless of whether the future succeeds or +fails. Read more
§

fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
where + Self: Sized, + F: FnMut(NewRequest) -> Request,

Composes a function in front of the service. Read more
§

fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Fut + Clone, + Fut: Future<Output = Result<Response, Error>>,

Composes an asynchronous function after this service. Read more
§

fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
where + Self: Sized, + F: FnMut(Self::Future) -> Fut, + Error: From<Self::Error>, + Fut: Future<Output = Result<Response, Error>>,

Composes a function that transforms futures produced by the service. Read more
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
where + Self: Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Send trait object. Read more
§

fn boxed_clone(self) -> BoxCloneService<Request, Self::Response, Self::Error>
where + Self: Clone + Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Clone + Send trait object. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> Transport for T
where + T: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = RpcError<TransportErrorKind>, Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>> + Send + Sync + 'static,

§

fn boxed(self) -> BoxTransport
where + Self: Sized + Clone + Send + Sync + 'static,

Convert this transport into a boxed trait object.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 8 bytes

\ No newline at end of file diff --git a/alloy_pubsub/trait.PubSubConnect.html b/alloy_pubsub/trait.PubSubConnect.html new file mode 100644 index 000000000000..915922f516cd --- /dev/null +++ b/alloy_pubsub/trait.PubSubConnect.html @@ -0,0 +1,28 @@ +PubSubConnect in alloy_pubsub - Rust +
pub trait PubSubConnect: Sized + Send + Sync + 'static {
+    // Required methods
+    fn is_local(&self) -> bool;
+    fn connect<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, ConnectionHandle, TransportError>;
+
+    // Provided methods
+    fn try_reconnect<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, ConnectionHandle, TransportError> { ... }
+    fn into_service(self) -> Pbf<'static, PubSubFrontend, TransportError> { ... }
+}
Expand description

Configuration objects that contain connection details for a backend.

+

Implementers should contain configuration options for the underlying +transport.

+

Required Methods§

source

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.

+
source

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it.

+

This function MUST create a long-lived task containing a +ConnectionInterface, and return the corresponding handle.

+

Provided Methods§

source

fn try_reconnect<'a: 'b, 'b>( + &'a self +) -> Pbf<'b, ConnectionHandle, TransportError>

Attempt to reconnect the transport.

+

Override this to add custom reconnection logic to your connector. This +will be used by the internal pubsub connection managers in the event the +connection fails.

+
source

fn into_service(self) -> Pbf<'static, PubSubFrontend, TransportError>

Convert the configuration object into a service with a running backend.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_rpc_client/all.html b/alloy_rpc_client/all.html new file mode 100644 index 000000000000..1e3866bbcd47 --- /dev/null +++ b/alloy_rpc_client/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Type Aliases

\ No newline at end of file diff --git a/alloy_rpc_client/batch/enum.BatchFuture.html b/alloy_rpc_client/batch/enum.BatchFuture.html new file mode 100644 index 000000000000..2f117e770775 --- /dev/null +++ b/alloy_rpc_client/batch/enum.BatchFuture.html @@ -0,0 +1,152 @@ +BatchFuture in alloy_rpc_client::batch - Rust +
pub enum BatchFuture<Conn>
where + Conn: Transport,
{ + Prepared { + transport: Conn, + requests: RequestPacket, + channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>, + }, + SerError(Option<TransportError>), + AwaitingResponse { + channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>, + fut: Conn::Future, + }, + Complete, +}

Variants§

§

Prepared

Fields

§transport: Conn
§requests: RequestPacket
§channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>
§

SerError(Option<TransportError>)

§

AwaitingResponse

Fields

§channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>
§fut: Conn::Future
§

Complete

Implementations§

source§

impl<Conn> BatchFuture<Conn>
where + Conn: Transport,

source

pub(crate) fn project<'pin>( + self: Pin<&'pin mut Self> +) -> CallStateProj<'pin, Conn>

source§

impl<T> BatchFuture<T>
where + T: Transport + Clone,

source

fn poll_prepared( + self: Pin<&mut Self>, + cx: &mut Context<'_> +) -> Poll<<Self as Future>::Output>

source

fn poll_awaiting_response( + self: Pin<&mut Self>, + cx: &mut Context<'_> +) -> Poll<<Self as Future>::Output>

source

fn poll_ser_error( + self: Pin<&mut Self>, + _cx: &mut Context<'_> +) -> Poll<<Self as Future>::Output>

Trait Implementations§

source§

impl<Conn> Debug for BatchFuture<Conn>
where + Conn: Transport + Debug, + Conn::Future: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Future for BatchFuture<T>
where + T: Transport + Clone,

§

type Output = Result<(), RpcError<TransportErrorKind>>

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more
source§

impl<'pin, Conn> Unpin for BatchFuture<Conn>
where + Conn: Transport, + __BatchFuture<'pin, Conn>: Unpin,

Auto Trait Implementations§

§

impl<Conn> !RefUnwindSafe for BatchFuture<Conn>

§

impl<Conn> Send for BatchFuture<Conn>

§

impl<Conn> !Sync for BatchFuture<Conn>

§

impl<Conn> !UnwindSafe for BatchFuture<Conn>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<F> FutureExt for F
where + F: Future + ?Sized,

§

fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll() on !Unpin types.
§

fn or<F>(self, other: F) -> Or<Self, F>
where + Self: Sized, + F: Future<Output = Self::Output>,

Returns the result of self or other future, preferring self if both are ready. Read more
§

impl<T> FutureExt for T
where + T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where + F: FnOnce(Self::Output) -> U, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where + Self::Output: Into<U>, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where + F: FnOnce(Self::Output) -> Fut, + Fut: Future, + Self: Sized,

Chain on a computation for when a future finished, passing the result of +the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where + B: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the left-hand variant +of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where + A: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the right-hand variant +of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where + Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where + Self::Output: Future, + Self: Sized,

Flatten the execution of this future when the output of this +future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where + Self::Output: Stream, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Fuse a future such that poll will never again be called once it has +completed. This method can be used to turn any Future into a +FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + F: FnOnce(&Self::Output), + Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where + Self: Sized + UnwindSafe,

Available on crate feature std only.
Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where + Self: Sized, + Self::Output: Clone,

Available on crate feature std only.
Create a cloneable handle to this future where all handles will resolve +to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where + Self: Sized,

Available on crate features channel and std only.
Turn this future into a future that yields () on completion and sends +its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where + Self: Sized + Send + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where + Self: Sized + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where + Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where + Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where + Self: Sized,

Evaluates and consumes the future, returning the resulting output if +the future is ready after the first call to Future::poll. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<F> IntoFuture for F
where + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where + F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( + self: Pin<&mut F>, + cx: &mut Context<'_> +) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where + Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where + Self::Ok: Sink<Item, Error = Self::Error>, + Self: Sized,

Available on crate feature sink only.
Flattens the execution of this future when the successful result of this +future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where + F: FnOnce(Self::Ok) -> T, + Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where + F: FnOnce(Self::Ok) -> T, + E: FnOnce(Self::Error) -> T, + Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where + F: FnOnce(Self::Error) -> E, + Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where + Self: Sized, + Self::Error: Into<E>,

Maps this future’s Error to a new error type +using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where + Self: Sized, + Self::Ok: Into<U>,

Maps this future’s Ok to a new type +using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where + F: FnOnce(Self::Ok) -> Fut, + Fut: TryFuture<Error = Self::Error>, + Self: Sized,

Executes another future after this one resolves successfully. The +success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where + F: FnOnce(Self::Error) -> Fut, + Fut: TryFuture<Ok = Self::Ok>, + Self: Sized,

Executes another future if this one resolves to an error. The +error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where + F: FnOnce(&Self::Ok), + Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where + F: FnOnce(&Self::Error), + Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where + Self::Ok: TryFuture<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where + Self::Ok: TryStream<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s +Ok type as its +Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where + Self: Sized,

Wraps a [TryFuture] into a type that implements +Future. Read more
§

fn try_poll_unpin( + &mut self, + cx: &mut Context<'_> +) -> Poll<Result<Self::Ok, Self::Error>>
where + Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin +future types.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/batch/enum.CallStateProj.html b/alloy_rpc_client/batch/enum.CallStateProj.html new file mode 100644 index 000000000000..b238868b1975 --- /dev/null +++ b/alloy_rpc_client/batch/enum.CallStateProj.html @@ -0,0 +1,35 @@ +CallStateProj in alloy_rpc_client::batch - Rust +
pub(crate) enum CallStateProj<'pin, Conn>
where + Conn: Transport, + BatchFuture<Conn>: 'pin,
{ + Prepared { + transport: &'pin mut Conn, + requests: &'pin mut RequestPacket, + channels: &'pin mut HashMap<Id, Sender<TransportResult<Box<RawValue>>>>, + }, + SerError(&'pin mut Option<TransportError>), + AwaitingResponse { + channels: &'pin mut HashMap<Id, Sender<TransportResult<Box<RawValue>>>>, + fut: Pin<&'pin mut Conn::Future>, + }, + Complete, +}

Variants§

§

Prepared

Fields

§transport: &'pin mut Conn
§requests: &'pin mut RequestPacket
§channels: &'pin mut HashMap<Id, Sender<TransportResult<Box<RawValue>>>>
§

SerError(&'pin mut Option<TransportError>)

§

AwaitingResponse

Fields

§channels: &'pin mut HashMap<Id, Sender<TransportResult<Box<RawValue>>>>
§fut: Pin<&'pin mut Conn::Future>
§

Complete

Auto Trait Implementations§

§

impl<'pin, Conn> !RefUnwindSafe for CallStateProj<'pin, Conn>

§

impl<'pin, Conn> Send for CallStateProj<'pin, Conn>

§

impl<'pin, Conn> !Sync for CallStateProj<'pin, Conn>

§

impl<'pin, Conn> Unpin for CallStateProj<'pin, Conn>

§

impl<'pin, Conn> !UnwindSafe for CallStateProj<'pin, Conn>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

Size for each variant:

  • Prepared: 24 bytes
  • SerError: 8 bytes
  • AwaitingResponse: 16 bytes
  • Complete: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_client/batch/index.html b/alloy_rpc_client/batch/index.html new file mode 100644 index 000000000000..5f65161e5e76 --- /dev/null +++ b/alloy_rpc_client/batch/index.html @@ -0,0 +1,3 @@ +alloy_rpc_client::batch - Rust +

Module alloy_rpc_client::batch

source ·

Structs

  • A batch JSON-RPC request, used to bundle requests into a single transport +call.
  • Awaits a single response for a request that has been included in a batch.

Enums

Type Aliases

\ No newline at end of file diff --git a/alloy_rpc_client/batch/sidebar-items.js b/alloy_rpc_client/batch/sidebar-items.js new file mode 100644 index 000000000000..23f8987a3f95 --- /dev/null +++ b/alloy_rpc_client/batch/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["BatchFuture","CallStateProj"],"struct":["BatchRequest","Waiter"],"type":["Channel","ChannelMap"]}; \ No newline at end of file diff --git a/alloy_rpc_client/batch/struct.BatchRequest.html b/alloy_rpc_client/batch/struct.BatchRequest.html new file mode 100644 index 000000000000..aee3d0802cec --- /dev/null +++ b/alloy_rpc_client/batch/struct.BatchRequest.html @@ -0,0 +1,49 @@ +BatchRequest in alloy_rpc_client::batch - Rust +
pub struct BatchRequest<'a, T> {
+    transport: &'a RpcClient<T>,
+    requests: RequestPacket,
+    channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>,
+}
Expand description

A batch JSON-RPC request, used to bundle requests into a single transport +call.

+

Fields§

§transport: &'a RpcClient<T>

The transport via which the batch will be sent.

+
§requests: RequestPacket

The requests to be sent.

+
§channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>

The channels to send the responses through.

+

Implementations§

source§

impl<'a, T> BatchRequest<'a, T>

source

pub fn new(transport: &'a RpcClient<T>) -> Self

Create a new batch request.

+
source

fn push_raw( + &mut self, + request: SerializedRequest +) -> Receiver<TransportResult<Box<RawValue>>>

source

fn push<Params: RpcParam, Resp: RpcReturn>( + &mut self, + request: Request<Params> +) -> Result<Waiter<Resp>, TransportError>

source§

impl<'a, Conn> BatchRequest<'a, Conn>
where + Conn: Transport + Clone,

source

pub fn add_call<Params: RpcParam, Resp: RpcReturn>( + &mut self, + method: &'static str, + params: &Params +) -> Result<Waiter<Resp>, TransportError>

Add a call to the batch.

+
Errors
+

If the request cannot be serialized, this will return an error.

+
source

pub fn send(self) -> BatchFuture<Conn>

Send the batch future via its connection.

+

Trait Implementations§

source§

impl<'a, T: Debug> Debug for BatchRequest<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T> IntoFuture for BatchRequest<'a, T>
where + T: Transport + Clone,

§

type Output = <BatchFuture<T> as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = BatchFuture<T>

Which kind of future are we turning this into?
source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more

Auto Trait Implementations§

§

impl<'a, T> !RefUnwindSafe for BatchRequest<'a, T>

§

impl<'a, T> Send for BatchRequest<'a, T>
where + T: Sync,

§

impl<'a, T> Sync for BatchRequest<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for BatchRequest<'a, T>

§

impl<'a, T> !UnwindSafe for BatchRequest<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_client/batch/struct.Waiter.html b/alloy_rpc_client/batch/struct.Waiter.html new file mode 100644 index 000000000000..ff94e0915355 --- /dev/null +++ b/alloy_rpc_client/batch/struct.Waiter.html @@ -0,0 +1,126 @@ +Waiter in alloy_rpc_client::batch - Rust +
pub struct Waiter<Resp> {
+    rx: Receiver<TransportResult<Box<RawValue>>>,
+    _resp: PhantomData<fn() -> Resp>,
+}
Expand description

Awaits a single response for a request that has been included in a batch.

+

Fields§

§rx: Receiver<TransportResult<Box<RawValue>>>§_resp: PhantomData<fn() -> Resp>

Trait Implementations§

source§

impl<Resp: Debug> Debug for Waiter<Resp>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Resp> From<Receiver<Result<Box<RawValue>, RpcError<TransportErrorKind>>>> for Waiter<Resp>

source§

fn from(rx: Receiver<TransportResult<Box<RawValue>>>) -> Self

Converts to this type from the input type.
source§

impl<Resp> Future for Waiter<Resp>
where + Resp: RpcReturn,

§

type Output = Result<Resp, RpcError<TransportErrorKind>>

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more

Auto Trait Implementations§

§

impl<Resp> !RefUnwindSafe for Waiter<Resp>

§

impl<Resp> Send for Waiter<Resp>

§

impl<Resp> Sync for Waiter<Resp>

§

impl<Resp> Unpin for Waiter<Resp>

§

impl<Resp> !UnwindSafe for Waiter<Resp>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<F> FutureExt for F
where + F: Future + ?Sized,

§

fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll() on !Unpin types.
§

fn or<F>(self, other: F) -> Or<Self, F>
where + Self: Sized, + F: Future<Output = Self::Output>,

Returns the result of self or other future, preferring self if both are ready. Read more
§

impl<T> FutureExt for T
where + T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where + F: FnOnce(Self::Output) -> U, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where + Self::Output: Into<U>, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where + F: FnOnce(Self::Output) -> Fut, + Fut: Future, + Self: Sized,

Chain on a computation for when a future finished, passing the result of +the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where + B: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the left-hand variant +of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where + A: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the right-hand variant +of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where + Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where + Self::Output: Future, + Self: Sized,

Flatten the execution of this future when the output of this +future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where + Self::Output: Stream, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Fuse a future such that poll will never again be called once it has +completed. This method can be used to turn any Future into a +FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + F: FnOnce(&Self::Output), + Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where + Self: Sized + UnwindSafe,

Available on crate feature std only.
Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where + Self: Sized, + Self::Output: Clone,

Available on crate feature std only.
Create a cloneable handle to this future where all handles will resolve +to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where + Self: Sized,

Available on crate features channel and std only.
Turn this future into a future that yields () on completion and sends +its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where + Self: Sized + Send + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where + Self: Sized + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where + Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where + Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where + Self: Sized,

Evaluates and consumes the future, returning the resulting output if +the future is ready after the first call to Future::poll. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<F> IntoFuture for F
where + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where + F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( + self: Pin<&mut F>, + cx: &mut Context<'_> +) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where + Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where + Self::Ok: Sink<Item, Error = Self::Error>, + Self: Sized,

Available on crate feature sink only.
Flattens the execution of this future when the successful result of this +future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where + F: FnOnce(Self::Ok) -> T, + Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where + F: FnOnce(Self::Ok) -> T, + E: FnOnce(Self::Error) -> T, + Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where + F: FnOnce(Self::Error) -> E, + Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where + Self: Sized, + Self::Error: Into<E>,

Maps this future’s Error to a new error type +using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where + Self: Sized, + Self::Ok: Into<U>,

Maps this future’s Ok to a new type +using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where + F: FnOnce(Self::Ok) -> Fut, + Fut: TryFuture<Error = Self::Error>, + Self: Sized,

Executes another future after this one resolves successfully. The +success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where + F: FnOnce(Self::Error) -> Fut, + Fut: TryFuture<Ok = Self::Ok>, + Self: Sized,

Executes another future if this one resolves to an error. The +error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where + F: FnOnce(&Self::Ok), + Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where + F: FnOnce(&Self::Error), + Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where + Self::Ok: TryFuture<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where + Self::Ok: TryStream<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s +Ok type as its +Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where + Self: Sized,

Wraps a [TryFuture] into a type that implements +Future. Read more
§

fn try_poll_unpin( + &mut self, + cx: &mut Context<'_> +) -> Poll<Result<Self::Ok, Self::Error>>
where + Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin +future types.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 8 bytes

\ No newline at end of file diff --git a/alloy_rpc_client/batch/type.Channel.html b/alloy_rpc_client/batch/type.Channel.html new file mode 100644 index 000000000000..71ff4eba8c99 --- /dev/null +++ b/alloy_rpc_client/batch/type.Channel.html @@ -0,0 +1,4 @@ +Channel in alloy_rpc_client::batch - Rust +

Type Alias alloy_rpc_client::batch::Channel

source ·
pub(crate) type Channel = Sender<TransportResult<Box<RawValue>>>;

Aliased Type§

struct Channel {
+    inner: Arc<Inner<Result<Box<RawValue>, RpcError<TransportErrorKind>>>>,
+}

Fields§

§inner: Arc<Inner<Result<Box<RawValue>, RpcError<TransportErrorKind>>>>

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: 8 bytes

\ No newline at end of file diff --git a/alloy_rpc_client/batch/type.ChannelMap.html b/alloy_rpc_client/batch/type.ChannelMap.html new file mode 100644 index 000000000000..258b0fb2d571 --- /dev/null +++ b/alloy_rpc_client/batch/type.ChannelMap.html @@ -0,0 +1,4 @@ +ChannelMap in alloy_rpc_client::batch - Rust +
pub(crate) type ChannelMap = HashMap<Id, Sender<TransportResult<Box<RawValue>>>>;

Aliased Type§

struct ChannelMap {
+    base: HashMap<Id, Sender<Result<Box<RawValue>, RpcError<TransportErrorKind>>>, RandomState>,
+}

Fields§

§base: HashMap<Id, Sender<Result<Box<RawValue>, RpcError<TransportErrorKind>>>, RandomState>

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_client/builder/index.html b/alloy_rpc_client/builder/index.html new file mode 100644 index 000000000000..92601c947541 --- /dev/null +++ b/alloy_rpc_client/builder/index.html @@ -0,0 +1,2 @@ +alloy_rpc_client::builder - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_client/builder/sidebar-items.js b/alloy_rpc_client/builder/sidebar-items.js new file mode 100644 index 000000000000..de86eee1595d --- /dev/null +++ b/alloy_rpc_client/builder/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["ClientBuilder"]}; \ No newline at end of file diff --git a/alloy_rpc_client/builder/struct.ClientBuilder.html b/alloy_rpc_client/builder/struct.ClientBuilder.html new file mode 100644 index 000000000000..551724ab240b --- /dev/null +++ b/alloy_rpc_client/builder/struct.ClientBuilder.html @@ -0,0 +1,81 @@ +ClientBuilder in alloy_rpc_client::builder - Rust +
pub struct ClientBuilder<L> {
+    pub(crate) builder: ServiceBuilder<L>,
+}
Expand description

A builder for the transport RpcClient.

+

This is a wrapper around [tower::ServiceBuilder]. It allows you to +configure middleware layers that will be applied to the transport, and has +some shortcuts for common layers and transports.

+

A builder accumulates Layers, and then is finished via the +ClientBuilder::connect method, which produces an RPC client.

+

Fields§

§builder: ServiceBuilder<L>

Implementations§

source§

impl<L> ClientBuilder<L>

source

pub fn layer<M>(self, layer: M) -> ClientBuilder<Stack<M, L>>

Add a middleware layer to the stack.

+

This is a wrapper around [tower::ServiceBuilder::layer]. Layers that +are added first will be called with the request first.

+
source

pub fn transport<T>(self, transport: T, is_local: bool) -> RpcClient<L::Service>
where + L: Layer<T>, + T: Transport, + L::Service: Transport,

Create a new RpcClient with the given transport and the configured +layers.

+
source

pub fn reqwest_http(self, url: Url) -> RpcClient<L::Service>
where + L: Layer<Http<Client>>, + L::Service: Transport,

Available on crate feature reqwest only.

Convenience function to create a new RpcClient with a reqwest +HTTP transport.

+
source

pub fn hyper_http(self, url: Url) -> RpcClient<L::Service>
where + L: Layer<Http<Client<HttpConnector>>>, + L::Service: Transport,

Available on non-WebAssembly and crate feature hyper only.

Convenience function to create a new RpcClient with a [hyper] +HTTP transport.

+
source

pub async fn pubsub<C>( + self, + pubsub_connect: C +) -> Result<RpcClient<L::Service>, TransportError>
where + C: PubSubConnect, + L: Layer<PubSubFrontend>, + L::Service: Transport,

Available on crate feature pubsub only.

Connect a pubsub transport, producing an RpcClient with the provided +connection.

+
source

pub async fn ws( + self, + ws_connect: WsConnect +) -> Result<RpcClient<L::Service>, TransportError>
where + L: Layer<PubSubFrontend>, + L::Service: Transport,

Available on crate feature ws only.

Connect a WS transport, producing an RpcClient with the provided +connection

+
source

pub async fn connect<C>( + self, + connect: C +) -> Result<RpcClient<L::Service>, TransportError>
where + C: TransportConnect, + L: Layer<C::Transport>, + L::Service: Transport,

Connect a transport, producing an RpcClient with the provided +connection.

+
source

pub async fn connect_boxed<C>( + self, + connect: C +) -> Result<RpcClient<L::Service>, TransportError>
where + C: BoxTransportConnect, + L: Layer<BoxTransport>, + L::Service: Transport,

Connect a transport, producing an RpcClient with a [BoxTransport] +connection.

+

Trait Implementations§

source§

impl<L: Debug> Debug for ClientBuilder<L>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ClientBuilder<Identity>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<L> RefUnwindSafe for ClientBuilder<L>
where + L: RefUnwindSafe,

§

impl<L> Send for ClientBuilder<L>
where + L: Send,

§

impl<L> Sync for ClientBuilder<L>
where + L: Sync,

§

impl<L> Unpin for ClientBuilder<L>
where + L: Unpin,

§

impl<L> UnwindSafe for ClientBuilder<L>
where + L: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/call/enum.CallState.html b/alloy_rpc_client/call/enum.CallState.html new file mode 100644 index 000000000000..eb3f84d7ea36 --- /dev/null +++ b/alloy_rpc_client/call/enum.CallState.html @@ -0,0 +1,150 @@ +CallState in alloy_rpc_client::call - Rust +
enum CallState<Params, Conn>
where + Params: RpcParam, + Conn: Transport + Clone,
{ + Prepared { + request: Option<Request<Params>>, + connection: Conn, + }, + AwaitingResponse { + fut: <Conn as Service<RequestPacket>>::Future, + }, + Complete, +}
Expand description

The states of the RpcCall future.

+

Variants§

§

Prepared

Fields

§request: Option<Request<Params>>
§connection: Conn
§

AwaitingResponse

Fields

§fut: <Conn as Service<RequestPacket>>::Future
§

Complete

Implementations§

source§

impl<Params, Conn> CallState<Params, Conn>
where + Params: RpcParam, + Conn: Transport + Clone,

source

fn project<'pin>(self: Pin<&'pin mut Self>) -> CallStateProj<'pin, Params, Conn>

source§

impl<Params, Conn> CallState<Params, Conn>
where + Conn: Transport + Clone, + Params: RpcParam,

source

fn poll_prepared( + self: Pin<&mut Self>, + cx: &mut Context<'_> +) -> Poll<<Self as Future>::Output>

source

fn poll_awaiting( + self: Pin<&mut Self>, + cx: &mut Context<'_> +) -> Poll<<Self as Future>::Output>

Trait Implementations§

source§

impl<Params, Conn> Debug for CallState<Params, Conn>
where + Params: RpcParam, + Conn: Transport + Clone,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Params, Conn> Future for CallState<Params, Conn>
where + Conn: Transport + Clone, + Params: RpcParam,

§

type Output = Result<Box<RawValue>, RpcError<TransportErrorKind>>

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more
source§

impl<'pin, Params, Conn> Unpin for CallState<Params, Conn>
where + Params: RpcParam, + Conn: Transport + Clone, + __CallState<'pin, Params, Conn>: Unpin,

Auto Trait Implementations§

§

impl<Params, Conn> !RefUnwindSafe for CallState<Params, Conn>

§

impl<Params, Conn> Send for CallState<Params, Conn>

§

impl<Params, Conn> !Sync for CallState<Params, Conn>

§

impl<Params, Conn> !UnwindSafe for CallState<Params, Conn>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<F> FutureExt for F
where + F: Future + ?Sized,

§

fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll() on !Unpin types.
§

fn or<F>(self, other: F) -> Or<Self, F>
where + Self: Sized, + F: Future<Output = Self::Output>,

Returns the result of self or other future, preferring self if both are ready. Read more
§

impl<T> FutureExt for T
where + T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where + F: FnOnce(Self::Output) -> U, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where + Self::Output: Into<U>, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where + F: FnOnce(Self::Output) -> Fut, + Fut: Future, + Self: Sized,

Chain on a computation for when a future finished, passing the result of +the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where + B: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the left-hand variant +of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where + A: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the right-hand variant +of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where + Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where + Self::Output: Future, + Self: Sized,

Flatten the execution of this future when the output of this +future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where + Self::Output: Stream, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Fuse a future such that poll will never again be called once it has +completed. This method can be used to turn any Future into a +FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + F: FnOnce(&Self::Output), + Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where + Self: Sized + UnwindSafe,

Available on crate feature std only.
Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where + Self: Sized, + Self::Output: Clone,

Available on crate feature std only.
Create a cloneable handle to this future where all handles will resolve +to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where + Self: Sized,

Available on crate features channel and std only.
Turn this future into a future that yields () on completion and sends +its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where + Self: Sized + Send + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where + Self: Sized + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where + Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where + Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where + Self: Sized,

Evaluates and consumes the future, returning the resulting output if +the future is ready after the first call to Future::poll. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<F> IntoFuture for F
where + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where + F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( + self: Pin<&mut F>, + cx: &mut Context<'_> +) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where + Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where + Self::Ok: Sink<Item, Error = Self::Error>, + Self: Sized,

Available on crate feature sink only.
Flattens the execution of this future when the successful result of this +future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where + F: FnOnce(Self::Ok) -> T, + Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where + F: FnOnce(Self::Ok) -> T, + E: FnOnce(Self::Error) -> T, + Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where + F: FnOnce(Self::Error) -> E, + Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where + Self: Sized, + Self::Error: Into<E>,

Maps this future’s Error to a new error type +using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where + Self: Sized, + Self::Ok: Into<U>,

Maps this future’s Ok to a new type +using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where + F: FnOnce(Self::Ok) -> Fut, + Fut: TryFuture<Error = Self::Error>, + Self: Sized,

Executes another future after this one resolves successfully. The +success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where + F: FnOnce(Self::Error) -> Fut, + Fut: TryFuture<Ok = Self::Ok>, + Self: Sized,

Executes another future if this one resolves to an error. The +error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where + F: FnOnce(&Self::Ok), + Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where + F: FnOnce(&Self::Error), + Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where + Self::Ok: TryFuture<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where + Self::Ok: TryStream<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s +Ok type as its +Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where + Self: Sized,

Wraps a [TryFuture] into a type that implements +Future. Read more
§

fn try_poll_unpin( + &mut self, + cx: &mut Context<'_> +) -> Poll<Result<Self::Ok, Self::Error>>
where + Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin +future types.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/call/enum.CallStateProj.html b/alloy_rpc_client/call/enum.CallStateProj.html new file mode 100644 index 000000000000..e28e1bb64dc4 --- /dev/null +++ b/alloy_rpc_client/call/enum.CallStateProj.html @@ -0,0 +1,33 @@ +CallStateProj in alloy_rpc_client::call - Rust +
enum CallStateProj<'pin, Params, Conn>
where + Params: RpcParam, + Conn: Transport + Clone, + CallState<Params, Conn>: 'pin,
{ + Prepared { + request: &'pin mut Option<Request<Params>>, + connection: &'pin mut Conn, + }, + AwaitingResponse { + fut: Pin<&'pin mut <Conn as Service<RequestPacket>>::Future>, + }, + Complete, +}

Variants§

§

Prepared

Fields

§request: &'pin mut Option<Request<Params>>
§connection: &'pin mut Conn
§

AwaitingResponse

Fields

§fut: Pin<&'pin mut <Conn as Service<RequestPacket>>::Future>
§

Complete

Auto Trait Implementations§

§

impl<'pin, Params, Conn> !RefUnwindSafe for CallStateProj<'pin, Params, Conn>

§

impl<'pin, Params, Conn> Send for CallStateProj<'pin, Params, Conn>

§

impl<'pin, Params, Conn> !Sync for CallStateProj<'pin, Params, Conn>

§

impl<'pin, Params, Conn> Unpin for CallStateProj<'pin, Params, Conn>

§

impl<'pin, Params, Conn> !UnwindSafe for CallStateProj<'pin, Params, Conn>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • Prepared: 16 bytes
  • AwaitingResponse: 8 bytes
  • Complete: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_client/call/index.html b/alloy_rpc_client/call/index.html new file mode 100644 index 000000000000..7d7107daa629 --- /dev/null +++ b/alloy_rpc_client/call/index.html @@ -0,0 +1,2 @@ +alloy_rpc_client::call - Rust +

Module alloy_rpc_client::call

source ·

Structs

  • A prepared, but unsent, RPC call.

Enums

\ No newline at end of file diff --git a/alloy_rpc_client/call/sidebar-items.js b/alloy_rpc_client/call/sidebar-items.js new file mode 100644 index 000000000000..440ebd933984 --- /dev/null +++ b/alloy_rpc_client/call/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["CallState","CallStateProj"],"struct":["RpcCall"]}; \ No newline at end of file diff --git a/alloy_rpc_client/call/struct.RpcCall.html b/alloy_rpc_client/call/struct.RpcCall.html new file mode 100644 index 000000000000..c74b5090a5ec --- /dev/null +++ b/alloy_rpc_client/call/struct.RpcCall.html @@ -0,0 +1,166 @@ +RpcCall in alloy_rpc_client::call - Rust +
pub struct RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam,
{ + state: CallState<Params, Conn>, + _pd: PhantomData<fn() -> Resp>, +}
Expand description

A prepared, but unsent, RPC call.

+

This is a future that will send the request when polled. It contains a +[Request], a [Transport], and knowledge of its expected response +type. Upon awaiting, it will send the request and wait for the response. It +will then deserialize the response into the expected type.

+

Errors are captured in the [RpcResult] type. Rpc Calls will result in +either a successful response of the Resp type, an error response, or a +transport error.

+

Note:

+

Serializing the request is done lazily. The request is not serialized until +the future is polled. This differs from the behavior of +crate::BatchRequest, which serializes greedily. This is because the +batch request must immediately erase the Param type to allow batching of +requests with different Param types, while the RpcCall may do so lazily.

+

Fields§

§state: CallState<Params, Conn>§_pd: PhantomData<fn() -> Resp>

Implementations§

source§

impl<Conn, Params, Resp> RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam,

source

pub(crate) fn project<'pin>( + self: Pin<&'pin mut Self> +) -> __RpcCallProjection<'pin, Conn, Params, Resp>

source

pub(crate) fn project_ref<'pin>( + self: Pin<&'pin Self> +) -> __RpcCallProjectionRef<'pin, Conn, Params, Resp>

source§

impl<Conn, Params, Resp> RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam,

source

pub fn params(&mut self) -> &mut Params

Get a mutable reference to the params of the request.

+

This is useful for modifying the params after the request has been +prepared.

+
source§

impl<Conn, Params, Resp> RpcCall<Conn, &Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam + Clone,

source

pub fn into_owned_params(self) -> RpcCall<Conn, Params, Resp>

Convert this call into one with owned params, by cloning the params.

+
source§

impl<'a, Conn, Params, Resp> RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam + 'a, + Resp: RpcReturn,

source

pub fn boxed(self) -> RpcFut<'a, Resp>

Convert this future into a boxed, pinned future, erasing its type.

+

Trait Implementations§

source§

impl<Conn, Params, Resp: Debug> Debug for RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone + Debug, + Params: RpcParam + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Conn, Params, Resp> Future for RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam, + Resp: RpcReturn,

§

type Output = Result<Resp, RpcError<TransportErrorKind>>

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more
source§

impl<'pin, Conn, Params, Resp> Unpin for RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam, + __RpcCall<'pin, Conn, Params, Resp>: Unpin,

Auto Trait Implementations§

§

impl<Conn, Params, Resp> !RefUnwindSafe for RpcCall<Conn, Params, Resp>

§

impl<Conn, Params, Resp> Send for RpcCall<Conn, Params, Resp>

§

impl<Conn, Params, Resp> !Sync for RpcCall<Conn, Params, Resp>

§

impl<Conn, Params, Resp> !UnwindSafe for RpcCall<Conn, Params, Resp>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<F> FutureExt for F
where + F: Future + ?Sized,

§

fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll() on !Unpin types.
§

fn or<F>(self, other: F) -> Or<Self, F>
where + Self: Sized, + F: Future<Output = Self::Output>,

Returns the result of self or other future, preferring self if both are ready. Read more
§

impl<T> FutureExt for T
where + T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where + F: FnOnce(Self::Output) -> U, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where + Self::Output: Into<U>, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where + F: FnOnce(Self::Output) -> Fut, + Fut: Future, + Self: Sized,

Chain on a computation for when a future finished, passing the result of +the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where + B: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the left-hand variant +of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where + A: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the right-hand variant +of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where + Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where + Self::Output: Future, + Self: Sized,

Flatten the execution of this future when the output of this +future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where + Self::Output: Stream, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Fuse a future such that poll will never again be called once it has +completed. This method can be used to turn any Future into a +FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + F: FnOnce(&Self::Output), + Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where + Self: Sized + UnwindSafe,

Available on crate feature std only.
Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where + Self: Sized, + Self::Output: Clone,

Available on crate feature std only.
Create a cloneable handle to this future where all handles will resolve +to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where + Self: Sized,

Available on crate features channel and std only.
Turn this future into a future that yields () on completion and sends +its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where + Self: Sized + Send + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where + Self: Sized + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where + Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where + Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where + Self: Sized,

Evaluates and consumes the future, returning the resulting output if +the future is ready after the first call to Future::poll. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<F> IntoFuture for F
where + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where + F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( + self: Pin<&mut F>, + cx: &mut Context<'_> +) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where + Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where + Self::Ok: Sink<Item, Error = Self::Error>, + Self: Sized,

Available on crate feature sink only.
Flattens the execution of this future when the successful result of this +future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where + F: FnOnce(Self::Ok) -> T, + Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where + F: FnOnce(Self::Ok) -> T, + E: FnOnce(Self::Error) -> T, + Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where + F: FnOnce(Self::Error) -> E, + Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where + Self: Sized, + Self::Error: Into<E>,

Maps this future’s Error to a new error type +using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where + Self: Sized, + Self::Ok: Into<U>,

Maps this future’s Ok to a new type +using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where + F: FnOnce(Self::Ok) -> Fut, + Fut: TryFuture<Error = Self::Error>, + Self: Sized,

Executes another future after this one resolves successfully. The +success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where + F: FnOnce(Self::Error) -> Fut, + Fut: TryFuture<Ok = Self::Ok>, + Self: Sized,

Executes another future if this one resolves to an error. The +error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where + F: FnOnce(&Self::Ok), + Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where + F: FnOnce(&Self::Error), + Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where + Self::Ok: TryFuture<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where + Self::Ok: TryStream<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s +Ok type as its +Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where + Self: Sized,

Wraps a [TryFuture] into a type that implements +Future. Read more
§

fn try_poll_unpin( + &mut self, + cx: &mut Context<'_> +) -> Poll<Result<Self::Ok, Self::Error>>
where + Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin +future types.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/client/index.html b/alloy_rpc_client/client/index.html new file mode 100644 index 000000000000..6019f613e0ee --- /dev/null +++ b/alloy_rpc_client/client/index.html @@ -0,0 +1,2 @@ +alloy_rpc_client::client - Rust +

Modules

Structs

\ No newline at end of file diff --git a/alloy_rpc_client/client/pubsub_impl/index.html b/alloy_rpc_client/client/pubsub_impl/index.html new file mode 100644 index 000000000000..ad127e94b276 --- /dev/null +++ b/alloy_rpc_client/client/pubsub_impl/index.html @@ -0,0 +1,2 @@ +alloy_rpc_client::client::pubsub_impl - Rust +
Available on crate feature pubsub only.
\ No newline at end of file diff --git a/alloy_rpc_client/client/pubsub_impl/sidebar-items.js b/alloy_rpc_client/client/pubsub_impl/sidebar-items.js new file mode 100644 index 000000000000..5244ce01ccff --- /dev/null +++ b/alloy_rpc_client/client/pubsub_impl/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/alloy_rpc_client/client/sidebar-items.js b/alloy_rpc_client/client/sidebar-items.js new file mode 100644 index 000000000000..3929bf7424e6 --- /dev/null +++ b/alloy_rpc_client/client/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["pubsub_impl"],"struct":["RpcClient"]}; \ No newline at end of file diff --git a/alloy_rpc_client/client/struct.RpcClient.html b/alloy_rpc_client/client/struct.RpcClient.html new file mode 100644 index 000000000000..4f7fbc5ba2b4 --- /dev/null +++ b/alloy_rpc_client/client/struct.RpcClient.html @@ -0,0 +1,87 @@ +RpcClient in alloy_rpc_client::client - Rust +
pub struct RpcClient<T> {
+    pub(crate) transport: T,
+    pub(crate) is_local: bool,
+    pub(crate) id: AtomicU64,
+}
Expand description

A JSON-RPC client.

+

This struct manages a [Transport] and a request ID counter. It is used to +build RpcCall and BatchRequest objects. The client delegates +transport access to the calls.

+

Note

+

IDs are allocated sequentially, starting at 0. IDs are reserved via +RpcClient::next_id. Note that allocated IDs may not be used. There is +no guarantee that a prepared RpcCall will be sent, or that a sent call +will receive a response.

+

Fields§

§transport: T

The underlying transport.

+
§is_local: bool

true if the transport is local.

+
§id: AtomicU64

The next request ID to use.

+

Implementations§

source§

impl RpcClient<PubSubFrontend>

source

pub async fn get_watcher(&self, id: U256) -> Receiver<Box<RawValue>>

Available on crate feature pubsub only.

Get a [broadcast::Receiver] for the given subscription ID.

+
source

pub async fn connect_pubsub<C>( + connect: C +) -> Result<RpcClient<PubSubFrontend>, TransportError>
where + C: PubSubConnect,

Available on crate feature pubsub only.

Connect to a transport via a [PubSubConnect] implementor.

+
source§

impl RpcClient<Identity>

source

pub fn builder() -> ClientBuilder<Identity>

Create a new ClientBuilder.

+
source§

impl<T> RpcClient<T>

source

pub const fn new(t: T, is_local: bool) -> Self

Create a new RpcClient with the given transport.

+
source

pub async fn connect<C>(connect: C) -> Result<Self, TransportError>
where + T: Transport, + C: TransportConnect<Transport = T>,

Connect to a transport via a [TransportConnect] implementor.

+
source

pub fn make_request<Params: RpcParam>( + &self, + method: &'static str, + params: Params +) -> Request<Params>

Build a JsonRpcRequest with the given method and params.

+

This function reserves an ID for the request, however the request +is not sent. To send a request, use RpcClient::prepare and await +the returned RpcCall.

+
source

pub const fn is_local(&self) -> bool

true if the client believes the transport is local.

+

This can be used to optimize remote API usage, or to change program +behavior on local endpoints. When the client is instantiated by parsing +a URL or other external input, this value is set on a best-efforts +basis and may be incorrect.

+
source

pub fn set_local(&mut self, is_local: bool)

Set the is_local flag.

+
source

fn increment_id(&self) -> u64

Reserve a request ID value. This is used to generate request IDs.

+
source

pub fn next_id(&self) -> Id

Reserve a request ID u64.

+
source§

impl<T> RpcClient<T>
where + T: Transport + Clone,

source

pub fn prepare<Params: RpcParam, Resp: RpcReturn>( + &self, + method: &'static str, + params: Params +) -> RpcCall<T, Params, Resp>

Prepare an RpcCall.

+

This function reserves an ID for the request, however the request +is not sent. To send a request, await the returned RpcCall.

+
Note:
+

Serialization is done lazily. It will not be performed until the call +is awaited. This means that if a serializer error occurs, it will not +be caught until the call is awaited.

+
source

pub fn boxed(self) -> RpcClient<BoxTransport>

Type erase the service in the transport, allowing it to be used in a +generic context.

+
Note:
+

This is for abstracting over RpcClient<T> for multiple T by +erasing each type. E.g. if you have RpcClient<Http> and +RpcClient<Ws> you can put both into a Vec<RpcClient<BoxTransport>>.

+
source§

impl<T> RpcClient<Http<T>>

source

pub fn new_batch(&self) -> BatchRequest<'_, Http<T>>

Create a new BatchRequest builder.

+

Trait Implementations§

source§

impl<T: Debug> Debug for RpcClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for RpcClient<T>
where + T: RefUnwindSafe,

§

impl<T> Send for RpcClient<T>
where + T: Send,

§

impl<T> Sync for RpcClient<T>
where + T: Sync,

§

impl<T> Unpin for RpcClient<T>
where + T: Unpin,

§

impl<T> UnwindSafe for RpcClient<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/index.html b/alloy_rpc_client/index.html new file mode 100644 index 000000000000..35ab082ec00a --- /dev/null +++ b/alloy_rpc_client/index.html @@ -0,0 +1,6 @@ +alloy_rpc_client - Rust +

Crate alloy_rpc_client

source ·
Expand description

alloy-rpc-client

+

RPC client.

+

Modules

Structs

\ No newline at end of file diff --git a/alloy_rpc_client/sidebar-items.js b/alloy_rpc_client/sidebar-items.js new file mode 100644 index 000000000000..34baa449f621 --- /dev/null +++ b/alloy_rpc_client/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["batch","builder","call","client"],"struct":["BatchRequest","ClientBuilder","IpcConnect","RpcCall","RpcClient","WsConnect"]}; \ No newline at end of file diff --git a/alloy_rpc_client/struct.BatchRequest.html b/alloy_rpc_client/struct.BatchRequest.html new file mode 100644 index 000000000000..3a4db9a2fbb6 --- /dev/null +++ b/alloy_rpc_client/struct.BatchRequest.html @@ -0,0 +1,49 @@ +BatchRequest in alloy_rpc_client - Rust +
pub struct BatchRequest<'a, T> {
+    transport: &'a RpcClient<T>,
+    requests: RequestPacket,
+    channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>,
+}
Expand description

A batch JSON-RPC request, used to bundle requests into a single transport +call.

+

Fields§

§transport: &'a RpcClient<T>

The transport via which the batch will be sent.

+
§requests: RequestPacket

The requests to be sent.

+
§channels: HashMap<Id, Sender<TransportResult<Box<RawValue>>>>

The channels to send the responses through.

+

Implementations§

source§

impl<'a, T> BatchRequest<'a, T>

source

pub fn new(transport: &'a RpcClient<T>) -> Self

Create a new batch request.

+
source

fn push_raw( + &mut self, + request: SerializedRequest +) -> Receiver<TransportResult<Box<RawValue>>>

source

fn push<Params: RpcParam, Resp: RpcReturn>( + &mut self, + request: Request<Params> +) -> Result<Waiter<Resp>, TransportError>

source§

impl<'a, Conn> BatchRequest<'a, Conn>
where + Conn: Transport + Clone,

source

pub fn add_call<Params: RpcParam, Resp: RpcReturn>( + &mut self, + method: &'static str, + params: &Params +) -> Result<Waiter<Resp>, TransportError>

Add a call to the batch.

+
Errors
+

If the request cannot be serialized, this will return an error.

+
source

pub fn send(self) -> BatchFuture<Conn>

Send the batch future via its connection.

+

Trait Implementations§

source§

impl<'a, T: Debug> Debug for BatchRequest<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T> IntoFuture for BatchRequest<'a, T>
where + T: Transport + Clone,

§

type Output = <BatchFuture<T> as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = BatchFuture<T>

Which kind of future are we turning this into?
source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more

Auto Trait Implementations§

§

impl<'a, T> !RefUnwindSafe for BatchRequest<'a, T>

§

impl<'a, T> Send for BatchRequest<'a, T>
where + T: Sync,

§

impl<'a, T> Sync for BatchRequest<'a, T>
where + T: Sync,

§

impl<'a, T> Unpin for BatchRequest<'a, T>

§

impl<'a, T> !UnwindSafe for BatchRequest<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_client/struct.ClientBuilder.html b/alloy_rpc_client/struct.ClientBuilder.html new file mode 100644 index 000000000000..e6568663b91a --- /dev/null +++ b/alloy_rpc_client/struct.ClientBuilder.html @@ -0,0 +1,81 @@ +ClientBuilder in alloy_rpc_client - Rust +
pub struct ClientBuilder<L> {
+    pub(crate) builder: ServiceBuilder<L>,
+}
Expand description

A builder for the transport RpcClient.

+

This is a wrapper around [tower::ServiceBuilder]. It allows you to +configure middleware layers that will be applied to the transport, and has +some shortcuts for common layers and transports.

+

A builder accumulates Layers, and then is finished via the +ClientBuilder::connect method, which produces an RPC client.

+

Fields§

§builder: ServiceBuilder<L>

Implementations§

source§

impl<L> ClientBuilder<L>

source

pub fn layer<M>(self, layer: M) -> ClientBuilder<Stack<M, L>>

Add a middleware layer to the stack.

+

This is a wrapper around [tower::ServiceBuilder::layer]. Layers that +are added first will be called with the request first.

+
source

pub fn transport<T>(self, transport: T, is_local: bool) -> RpcClient<L::Service>
where + L: Layer<T>, + T: Transport, + L::Service: Transport,

Create a new RpcClient with the given transport and the configured +layers.

+
source

pub fn reqwest_http(self, url: Url) -> RpcClient<L::Service>
where + L: Layer<Http<Client>>, + L::Service: Transport,

Available on crate feature reqwest only.

Convenience function to create a new RpcClient with a reqwest +HTTP transport.

+
source

pub fn hyper_http(self, url: Url) -> RpcClient<L::Service>
where + L: Layer<Http<Client<HttpConnector>>>, + L::Service: Transport,

Available on non-WebAssembly and crate feature hyper only.

Convenience function to create a new RpcClient with a [hyper] +HTTP transport.

+
source

pub async fn pubsub<C>( + self, + pubsub_connect: C +) -> Result<RpcClient<L::Service>, TransportError>
where + C: PubSubConnect, + L: Layer<PubSubFrontend>, + L::Service: Transport,

Available on crate feature pubsub only.

Connect a pubsub transport, producing an RpcClient with the provided +connection.

+
source

pub async fn ws( + self, + ws_connect: WsConnect +) -> Result<RpcClient<L::Service>, TransportError>
where + L: Layer<PubSubFrontend>, + L::Service: Transport,

Available on crate feature ws only.

Connect a WS transport, producing an RpcClient with the provided +connection

+
source

pub async fn connect<C>( + self, + connect: C +) -> Result<RpcClient<L::Service>, TransportError>
where + C: TransportConnect, + L: Layer<C::Transport>, + L::Service: Transport,

Connect a transport, producing an RpcClient with the provided +connection.

+
source

pub async fn connect_boxed<C>( + self, + connect: C +) -> Result<RpcClient<L::Service>, TransportError>
where + C: BoxTransportConnect, + L: Layer<BoxTransport>, + L::Service: Transport,

Connect a transport, producing an RpcClient with a [BoxTransport] +connection.

+

Trait Implementations§

source§

impl<L: Debug> Debug for ClientBuilder<L>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ClientBuilder<Identity>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<L> RefUnwindSafe for ClientBuilder<L>
where + L: RefUnwindSafe,

§

impl<L> Send for ClientBuilder<L>
where + L: Send,

§

impl<L> Sync for ClientBuilder<L>
where + L: Sync,

§

impl<L> Unpin for ClientBuilder<L>
where + L: Unpin,

§

impl<L> UnwindSafe for ClientBuilder<L>
where + L: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/struct.IpcConnect.html b/alloy_rpc_client/struct.IpcConnect.html new file mode 100644 index 000000000000..3260492dfec5 --- /dev/null +++ b/alloy_rpc_client/struct.IpcConnect.html @@ -0,0 +1,64 @@ +IpcConnect in alloy_rpc_client - Rust +
pub struct IpcConnect<T> {
+    inner: T,
+}
Available on crate feature ipc and non-WebAssembly only.
Expand description

An IPC Connection object.

+

Fields§

§inner: T

Trait Implementations§

§

impl<T> Clone for IpcConnect<T>
where + T: Clone,

§

fn clone(&self) -> IpcConnect<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for IpcConnect<T>
where + T: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<CString> for IpcConnect<CString>

§

fn from(inner: CString) -> IpcConnect<CString>

Converts to this type from the input type.
§

impl From<OsString> for IpcConnect<OsString>

§

fn from(inner: OsString) -> IpcConnect<OsString>

Converts to this type from the input type.
§

impl From<PathBuf> for IpcConnect<PathBuf>

§

fn from(inner: PathBuf) -> IpcConnect<PathBuf>

Converts to this type from the input type.
§

impl From<String> for IpcConnect<String>

§

fn from(inner: String) -> IpcConnect<String>

Converts to this type from the input type.
§

impl PubSubConnect for IpcConnect<CString>

§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
§

fn connect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
§

impl PubSubConnect for IpcConnect<OsString>

§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
§

fn connect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
§

impl PubSubConnect for IpcConnect<PathBuf>

§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
§

fn connect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
§

impl PubSubConnect for IpcConnect<String>

§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
§

fn connect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for IpcConnect<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IpcConnect<T>
where + T: Send,

§

impl<T> Sync for IpcConnect<T>
where + T: Sync,

§

impl<T> Unpin for IpcConnect<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IpcConnect<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/struct.RpcCall.html b/alloy_rpc_client/struct.RpcCall.html new file mode 100644 index 000000000000..4c8da20cbbbc --- /dev/null +++ b/alloy_rpc_client/struct.RpcCall.html @@ -0,0 +1,166 @@ +RpcCall in alloy_rpc_client - Rust +
pub struct RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam,
{ + state: CallState<Params, Conn>, + _pd: PhantomData<fn() -> Resp>, +}
Expand description

A prepared, but unsent, RPC call.

+

This is a future that will send the request when polled. It contains a +[Request], a [Transport], and knowledge of its expected response +type. Upon awaiting, it will send the request and wait for the response. It +will then deserialize the response into the expected type.

+

Errors are captured in the [RpcResult] type. Rpc Calls will result in +either a successful response of the Resp type, an error response, or a +transport error.

+

Note:

+

Serializing the request is done lazily. The request is not serialized until +the future is polled. This differs from the behavior of +crate::BatchRequest, which serializes greedily. This is because the +batch request must immediately erase the Param type to allow batching of +requests with different Param types, while the RpcCall may do so lazily.

+

Fields§

§state: CallState<Params, Conn>§_pd: PhantomData<fn() -> Resp>

Implementations§

source§

impl<Conn, Params, Resp> RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam,

source

pub(crate) fn project<'pin>( + self: Pin<&'pin mut Self> +) -> __RpcCallProjection<'pin, Conn, Params, Resp>

source

pub(crate) fn project_ref<'pin>( + self: Pin<&'pin Self> +) -> __RpcCallProjectionRef<'pin, Conn, Params, Resp>

source§

impl<Conn, Params, Resp> RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam,

source

pub fn params(&mut self) -> &mut Params

Get a mutable reference to the params of the request.

+

This is useful for modifying the params after the request has been +prepared.

+
source§

impl<Conn, Params, Resp> RpcCall<Conn, &Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam + Clone,

source

pub fn into_owned_params(self) -> RpcCall<Conn, Params, Resp>

Convert this call into one with owned params, by cloning the params.

+
source§

impl<'a, Conn, Params, Resp> RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam + 'a, + Resp: RpcReturn,

source

pub fn boxed(self) -> RpcFut<'a, Resp>

Convert this future into a boxed, pinned future, erasing its type.

+

Trait Implementations§

source§

impl<Conn, Params, Resp: Debug> Debug for RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone + Debug, + Params: RpcParam + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Conn, Params, Resp> Future for RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam, + Resp: RpcReturn,

§

type Output = Result<Resp, RpcError<TransportErrorKind>>

The type of value produced on completion.
source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempt to resolve the future to a final value, registering +the current task for wakeup if the value is not yet available. Read more
source§

impl<'pin, Conn, Params, Resp> Unpin for RpcCall<Conn, Params, Resp>
where + Conn: Transport + Clone, + Params: RpcParam, + __RpcCall<'pin, Conn, Params, Resp>: Unpin,

Auto Trait Implementations§

§

impl<Conn, Params, Resp> !RefUnwindSafe for RpcCall<Conn, Params, Resp>

§

impl<Conn, Params, Resp> Send for RpcCall<Conn, Params, Resp>

§

impl<Conn, Params, Resp> !Sync for RpcCall<Conn, Params, Resp>

§

impl<Conn, Params, Resp> !UnwindSafe for RpcCall<Conn, Params, Resp>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<F> FutureExt for F
where + F: Future + ?Sized,

§

fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll() on !Unpin types.
§

fn or<F>(self, other: F) -> Or<Self, F>
where + Self: Sized, + F: Future<Output = Self::Output>,

Returns the result of self or other future, preferring self if both are ready. Read more
§

impl<T> FutureExt for T
where + T: Future + ?Sized,

§

fn map<U, F>(self, f: F) -> Map<Self, F>
where + F: FnOnce(Self::Output) -> U, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn map_into<U>(self) -> MapInto<Self, U>
where + Self::Output: Into<U>, + Self: Sized,

Map this future’s output to a different type, returning a new future of +the resulting type. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where + F: FnOnce(Self::Output) -> Fut, + Fut: Future, + Self: Sized,

Chain on a computation for when a future finished, passing the result of +the future to the provided closure f. Read more
§

fn left_future<B>(self) -> Either<Self, B>
where + B: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the left-hand variant +of that Either. Read more
§

fn right_future<A>(self) -> Either<A, Self>
where + A: Future<Output = Self::Output>, + Self: Sized,

Wrap this future in an Either future, making it the right-hand variant +of that Either. Read more
§

fn into_stream(self) -> IntoStream<Self>
where + Self: Sized,

Convert this future into a single element stream. Read more
§

fn flatten(self) -> Flatten<Self>
where + Self::Output: Future, + Self: Sized,

Flatten the execution of this future when the output of this +future is itself another future. Read more
§

fn flatten_stream(self) -> FlattenStream<Self>
where + Self::Output: Stream, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Fuse a future such that poll will never again be called once it has +completed. This method can be used to turn any Future into a +FusedFuture. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + F: FnOnce(&Self::Output), + Self: Sized,

Do something with the output of a future before passing it on. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where + Self: Sized + UnwindSafe,

Available on crate feature std only.
Catches unwinding panics while polling the future. Read more
§

fn shared(self) -> Shared<Self>
where + Self: Sized, + Self::Output: Clone,

Available on crate feature std only.
Create a cloneable handle to this future where all handles will resolve +to the same result. Read more
§

fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)
where + Self: Sized,

Available on crate features channel and std only.
Turn this future into a future that yields () on completion and sends +its output to another future on a separate task. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where + Self: Sized + Send + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where + Self: Sized + 'a,

Available on crate feature alloc only.
Wrap the future in a Box, pinning it. Read more
§

fn unit_error(self) -> UnitError<Self>
where + Self: Sized,

§

fn never_error(self) -> NeverError<Self>
where + Self: Sized,

§

fn poll_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where + Self: Unpin,

A convenience for calling Future::poll on Unpin future types.
§

fn now_or_never(self) -> Option<Self::Output>
where + Self: Sized,

Evaluates and consumes the future, returning the resulting output if +the future is ready after the first call to Future::poll. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<F> IntoFuture for F
where + F: Future,

§

type Output = <F as Future>::Output

The output that the future will produce on completion.
§

type IntoFuture = F

Which kind of future are we turning this into?
source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<F, T, E> TryFuture for F
where + F: Future<Output = Result<T, E>> + ?Sized,

§

type Ok = T

The type of successful values yielded by this future
§

type Error = E

The type of failures yielded by this future
§

fn try_poll( + self: Pin<&mut F>, + cx: &mut Context<'_> +) -> Poll<<F as Future>::Output>

Poll this TryFuture as if it were a Future. Read more
§

impl<Fut> TryFutureExt for Fut
where + Fut: TryFuture + ?Sized,

§

fn flatten_sink<Item>(self) -> FlattenSink<Self, Self::Ok>
where + Self::Ok: Sink<Item, Error = Self::Error>, + Self: Sized,

Available on crate feature sink only.
Flattens the execution of this future when the successful result of this +future is a [Sink]. Read more
§

fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
where + F: FnOnce(Self::Ok) -> T, + Self: Sized,

Maps this future’s success value to a different value. Read more
§

fn map_ok_or_else<T, E, F>(self, e: E, f: F) -> MapOkOrElse<Self, F, E>
where + F: FnOnce(Self::Ok) -> T, + E: FnOnce(Self::Error) -> T, + Self: Sized,

Maps this future’s success value to a different value, and permits for error handling resulting in the same type. Read more
§

fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
where + F: FnOnce(Self::Error) -> E, + Self: Sized,

Maps this future’s error value to a different value. Read more
§

fn err_into<E>(self) -> ErrInto<Self, E>
where + Self: Sized, + Self::Error: Into<E>,

Maps this future’s Error to a new error type +using the Into trait. Read more
§

fn ok_into<U>(self) -> OkInto<Self, U>
where + Self: Sized, + Self::Ok: Into<U>,

Maps this future’s Ok to a new type +using the Into trait.
§

fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
where + F: FnOnce(Self::Ok) -> Fut, + Fut: TryFuture<Error = Self::Error>, + Self: Sized,

Executes another future after this one resolves successfully. The +success value is passed to a closure to create this subsequent future. Read more
§

fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
where + F: FnOnce(Self::Error) -> Fut, + Fut: TryFuture<Ok = Self::Ok>, + Self: Sized,

Executes another future if this one resolves to an error. The +error value is passed to a closure to create this subsequent future. Read more
§

fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
where + F: FnOnce(&Self::Ok), + Self: Sized,

Do something with the success value of a future before passing it on. Read more
§

fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
where + F: FnOnce(&Self::Error), + Self: Sized,

Do something with the error value of a future before passing it on. Read more
§

fn try_flatten(self) -> TryFlatten<Self, Self::Ok>
where + Self::Ok: TryFuture<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is another future. Read more
§

fn try_flatten_stream(self) -> TryFlattenStream<Self>
where + Self::Ok: TryStream<Error = Self::Error>, + Self: Sized,

Flatten the execution of this future when the successful result of this +future is a stream. Read more
§

fn unwrap_or_else<F>(self, f: F) -> UnwrapOrElse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Self::Ok,

Unwraps this future’s output, producing a future with this future’s +Ok type as its +Output type. Read more
§

fn into_future(self) -> IntoFuture<Self>
where + Self: Sized,

Wraps a [TryFuture] into a type that implements +Future. Read more
§

fn try_poll_unpin( + &mut self, + cx: &mut Context<'_> +) -> Poll<Result<Self::Ok, Self::Error>>
where + Self: Unpin,

A convenience method for calling [TryFuture::try_poll] on Unpin +future types.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/struct.RpcClient.html b/alloy_rpc_client/struct.RpcClient.html new file mode 100644 index 000000000000..c6d2f42ab04c --- /dev/null +++ b/alloy_rpc_client/struct.RpcClient.html @@ -0,0 +1,87 @@ +RpcClient in alloy_rpc_client - Rust +
pub struct RpcClient<T> {
+    pub(crate) transport: T,
+    pub(crate) is_local: bool,
+    pub(crate) id: AtomicU64,
+}
Expand description

A JSON-RPC client.

+

This struct manages a [Transport] and a request ID counter. It is used to +build RpcCall and BatchRequest objects. The client delegates +transport access to the calls.

+

Note

+

IDs are allocated sequentially, starting at 0. IDs are reserved via +RpcClient::next_id. Note that allocated IDs may not be used. There is +no guarantee that a prepared RpcCall will be sent, or that a sent call +will receive a response.

+

Fields§

§transport: T

The underlying transport.

+
§is_local: bool

true if the transport is local.

+
§id: AtomicU64

The next request ID to use.

+

Implementations§

source§

impl RpcClient<PubSubFrontend>

source

pub async fn get_watcher(&self, id: U256) -> Receiver<Box<RawValue>>

Available on crate feature pubsub only.

Get a [broadcast::Receiver] for the given subscription ID.

+
source

pub async fn connect_pubsub<C>( + connect: C +) -> Result<RpcClient<PubSubFrontend>, TransportError>
where + C: PubSubConnect,

Available on crate feature pubsub only.

Connect to a transport via a [PubSubConnect] implementor.

+
source§

impl RpcClient<Identity>

source

pub fn builder() -> ClientBuilder<Identity>

Create a new ClientBuilder.

+
source§

impl<T> RpcClient<T>

source

pub const fn new(t: T, is_local: bool) -> Self

Create a new RpcClient with the given transport.

+
source

pub async fn connect<C>(connect: C) -> Result<Self, TransportError>
where + T: Transport, + C: TransportConnect<Transport = T>,

Connect to a transport via a [TransportConnect] implementor.

+
source

pub fn make_request<Params: RpcParam>( + &self, + method: &'static str, + params: Params +) -> Request<Params>

Build a JsonRpcRequest with the given method and params.

+

This function reserves an ID for the request, however the request +is not sent. To send a request, use RpcClient::prepare and await +the returned RpcCall.

+
source

pub const fn is_local(&self) -> bool

true if the client believes the transport is local.

+

This can be used to optimize remote API usage, or to change program +behavior on local endpoints. When the client is instantiated by parsing +a URL or other external input, this value is set on a best-efforts +basis and may be incorrect.

+
source

pub fn set_local(&mut self, is_local: bool)

Set the is_local flag.

+
source

fn increment_id(&self) -> u64

Reserve a request ID value. This is used to generate request IDs.

+
source

pub fn next_id(&self) -> Id

Reserve a request ID u64.

+
source§

impl<T> RpcClient<T>
where + T: Transport + Clone,

source

pub fn prepare<Params: RpcParam, Resp: RpcReturn>( + &self, + method: &'static str, + params: Params +) -> RpcCall<T, Params, Resp>

Prepare an RpcCall.

+

This function reserves an ID for the request, however the request +is not sent. To send a request, await the returned RpcCall.

+
Note:
+

Serialization is done lazily. It will not be performed until the call +is awaited. This means that if a serializer error occurs, it will not +be caught until the call is awaited.

+
source

pub fn boxed(self) -> RpcClient<BoxTransport>

Type erase the service in the transport, allowing it to be used in a +generic context.

+
Note:
+

This is for abstracting over RpcClient<T> for multiple T by +erasing each type. E.g. if you have RpcClient<Http> and +RpcClient<Ws> you can put both into a Vec<RpcClient<BoxTransport>>.

+
source§

impl<T> RpcClient<Http<T>>

source

pub fn new_batch(&self) -> BatchRequest<'_, Http<T>>

Create a new BatchRequest builder.

+

Trait Implementations§

source§

impl<T: Debug> Debug for RpcClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for RpcClient<T>
where + T: RefUnwindSafe,

§

impl<T> Send for RpcClient<T>
where + T: Send,

§

impl<T> Sync for RpcClient<T>
where + T: Sync,

§

impl<T> Unpin for RpcClient<T>
where + T: Unpin,

§

impl<T> UnwindSafe for RpcClient<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_rpc_client/struct.WsConnect.html b/alloy_rpc_client/struct.WsConnect.html new file mode 100644 index 000000000000..edea2a3e0a8f --- /dev/null +++ b/alloy_rpc_client/struct.WsConnect.html @@ -0,0 +1,36 @@ +WsConnect in alloy_rpc_client - Rust +
pub struct WsConnect {
+    pub url: String,
+    pub auth: Option<Authorization>,
+}
Available on crate feature ws only.
Expand description

Simple connection details for a websocket connection.

+

Fields§

§url: String

The URL to connect to.

+
§auth: Option<Authorization>

The authorization header to use.

+

Trait Implementations§

source§

impl Clone for WsConnect

source§

fn clone(&self) -> WsConnect

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WsConnect

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl IntoClientRequest for WsConnect

source§

fn into_client_request(self) -> Result<Request<()>, Error>

Convert into a Request that can be used for a client connection.
source§

impl PubSubConnect for WsConnect

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/account/index.html b/alloy_rpc_types/account/index.html new file mode 100644 index 000000000000..5d111db5d761 --- /dev/null +++ b/alloy_rpc_types/account/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::account - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/account/sidebar-items.js b/alloy_rpc_types/account/sidebar-items.js new file mode 100644 index 000000000000..0d395dd7838e --- /dev/null +++ b/alloy_rpc_types/account/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AccountInfo","EIP1186AccountProofResponse","EIP1186StorageProof","ExtAccountInfo","RecoveredAccount"]}; \ No newline at end of file diff --git a/alloy_rpc_types/account/struct.AccountInfo.html b/alloy_rpc_types/account/struct.AccountInfo.html new file mode 100644 index 000000000000..fcf8e61385be --- /dev/null +++ b/alloy_rpc_types/account/struct.AccountInfo.html @@ -0,0 +1,28 @@ +AccountInfo in alloy_rpc_types::account - Rust +
pub struct AccountInfo {
+    pub name: String,
+}
Expand description

Account information.

+

Fields§

§name: String

Account name

+

Trait Implementations§

source§

impl Clone for AccountInfo

source§

fn clone(&self) -> AccountInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountInfo

source§

fn default() -> AccountInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountInfo

source§

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 PartialEq for AccountInfo

source§

fn eq(&self, other: &AccountInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountInfo

source§

impl StructuralEq for AccountInfo

source§

impl StructuralPartialEq for AccountInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/account/struct.EIP1186AccountProofResponse.html b/alloy_rpc_types/account/struct.EIP1186AccountProofResponse.html new file mode 100644 index 000000000000..8e0c53cfee8b --- /dev/null +++ b/alloy_rpc_types/account/struct.EIP1186AccountProofResponse.html @@ -0,0 +1,33 @@ +EIP1186AccountProofResponse in alloy_rpc_types::account - Rust +
pub struct EIP1186AccountProofResponse {
+    pub address: Address,
+    pub balance: U256,
+    pub code_hash: B256,
+    pub nonce: U64,
+    pub storage_hash: B256,
+    pub account_proof: Vec<Bytes>,
+    pub storage_proof: Vec<EIP1186StorageProof>,
+}
Expand description

Response for EIP-1186 account proof eth_getProof

+

Fields§

§address: Address§balance: U256§code_hash: B256§nonce: U64§storage_hash: B256§account_proof: Vec<Bytes>§storage_proof: Vec<EIP1186StorageProof>

Trait Implementations§

source§

impl Clone for EIP1186AccountProofResponse

source§

fn clone(&self) -> EIP1186AccountProofResponse

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1186AccountProofResponse

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EIP1186AccountProofResponse

source§

fn default() -> EIP1186AccountProofResponse

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EIP1186AccountProofResponse

source§

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 PartialEq for EIP1186AccountProofResponse

source§

fn eq(&self, other: &EIP1186AccountProofResponse) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EIP1186AccountProofResponse

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EIP1186AccountProofResponse

source§

impl StructuralEq for EIP1186AccountProofResponse

source§

impl StructuralPartialEq for EIP1186AccountProofResponse

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/account/struct.EIP1186StorageProof.html b/alloy_rpc_types/account/struct.EIP1186StorageProof.html new file mode 100644 index 000000000000..4a93a0dcfc0a --- /dev/null +++ b/alloy_rpc_types/account/struct.EIP1186StorageProof.html @@ -0,0 +1,32 @@ +EIP1186StorageProof in alloy_rpc_types::account - Rust +
pub struct EIP1186StorageProof {
+    pub key: JsonStorageKey,
+    pub value: U256,
+    pub proof: Vec<Bytes>,
+}
Expand description

Data structure with proof for one single storage-entry

+

Fields§

§key: JsonStorageKey

Storage key.

+
§value: U256

Value that the key holds

+
§proof: Vec<Bytes>

proof for the pair

+

Trait Implementations§

source§

impl Clone for EIP1186StorageProof

source§

fn clone(&self) -> EIP1186StorageProof

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1186StorageProof

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EIP1186StorageProof

source§

fn default() -> EIP1186StorageProof

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EIP1186StorageProof

source§

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 PartialEq for EIP1186StorageProof

source§

fn eq(&self, other: &EIP1186StorageProof) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EIP1186StorageProof

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EIP1186StorageProof

source§

impl StructuralEq for EIP1186StorageProof

source§

impl StructuralPartialEq for EIP1186StorageProof

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 88 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/account/struct.ExtAccountInfo.html b/alloy_rpc_types/account/struct.ExtAccountInfo.html new file mode 100644 index 000000000000..36dc7d56a888 --- /dev/null +++ b/alloy_rpc_types/account/struct.ExtAccountInfo.html @@ -0,0 +1,32 @@ +ExtAccountInfo in alloy_rpc_types::account - Rust +
pub struct ExtAccountInfo {
+    pub name: String,
+    pub meta: String,
+    pub uuid: Option<String>,
+}
Expand description

Extended account information (used by parity_allAccountInfo).

+

Fields§

§name: String

Account name

+
§meta: String

Account meta JSON

+
§uuid: Option<String>

Account UUID (None for address book entries)

+

Trait Implementations§

source§

impl Clone for ExtAccountInfo

source§

fn clone(&self) -> ExtAccountInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExtAccountInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ExtAccountInfo

source§

fn default() -> ExtAccountInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ExtAccountInfo

source§

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 PartialEq for ExtAccountInfo

source§

fn eq(&self, other: &ExtAccountInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ExtAccountInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ExtAccountInfo

source§

impl StructuralEq for ExtAccountInfo

source§

impl StructuralPartialEq for ExtAccountInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/account/struct.RecoveredAccount.html b/alloy_rpc_types/account/struct.RecoveredAccount.html new file mode 100644 index 000000000000..c36c0075c032 --- /dev/null +++ b/alloy_rpc_types/account/struct.RecoveredAccount.html @@ -0,0 +1,34 @@ +RecoveredAccount in alloy_rpc_types::account - Rust +
pub struct RecoveredAccount {
+    pub address: Address,
+    pub public_key: B512,
+    pub is_valid_for_current_chain: bool,
+}
Expand description

account derived from a signature +as well as information that tells if it is valid for +the current chain

+

Fields§

§address: Address

address of the recovered account

+
§public_key: B512

public key of the recovered account

+
§is_valid_for_current_chain: bool

If the signature contains chain replay protection, +And the chain_id encoded within the signature +matches the current chain this would be true, otherwise false.

+

Trait Implementations§

source§

impl Clone for RecoveredAccount

source§

fn clone(&self) -> RecoveredAccount

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RecoveredAccount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RecoveredAccount

source§

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 Serialize for RecoveredAccount

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 85 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/all.html b/alloy_rpc_types/all.html new file mode 100644 index 000000000000..d06c885c2b69 --- /dev/null +++ b/alloy_rpc_types/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/alloy_rpc_types/constant.EIP1559_TX_TYPE_ID.html b/alloy_rpc_types/constant.EIP1559_TX_TYPE_ID.html new file mode 100644 index 000000000000..b43227ea1c8b --- /dev/null +++ b/alloy_rpc_types/constant.EIP1559_TX_TYPE_ID.html @@ -0,0 +1,3 @@ +EIP1559_TX_TYPE_ID in alloy_rpc_types - Rust +
pub const EIP1559_TX_TYPE_ID: u8 = 2;
Expand description

Identifier for an EIP1559 transaction.

+
\ No newline at end of file diff --git a/alloy_rpc_types/constant.EIP2930_TX_TYPE_ID.html b/alloy_rpc_types/constant.EIP2930_TX_TYPE_ID.html new file mode 100644 index 000000000000..c15da76b099b --- /dev/null +++ b/alloy_rpc_types/constant.EIP2930_TX_TYPE_ID.html @@ -0,0 +1,3 @@ +EIP2930_TX_TYPE_ID in alloy_rpc_types - Rust +
pub const EIP2930_TX_TYPE_ID: u8 = 1;
Expand description

Identifier for an EIP2930 transaction.

+
\ No newline at end of file diff --git a/alloy_rpc_types/constant.EIP4844_TX_TYPE_ID.html b/alloy_rpc_types/constant.EIP4844_TX_TYPE_ID.html new file mode 100644 index 000000000000..9faef53c1f52 --- /dev/null +++ b/alloy_rpc_types/constant.EIP4844_TX_TYPE_ID.html @@ -0,0 +1,3 @@ +EIP4844_TX_TYPE_ID in alloy_rpc_types - Rust +
pub const EIP4844_TX_TYPE_ID: u8 = 3;
Expand description

Identifier for an EIP4844 transaction.

+
\ No newline at end of file diff --git a/alloy_rpc_types/constant.LEGACY_TX_TYPE_ID.html b/alloy_rpc_types/constant.LEGACY_TX_TYPE_ID.html new file mode 100644 index 000000000000..9b9276945c6a --- /dev/null +++ b/alloy_rpc_types/constant.LEGACY_TX_TYPE_ID.html @@ -0,0 +1,4 @@ +LEGACY_TX_TYPE_ID in alloy_rpc_types - Rust +
pub const LEGACY_TX_TYPE_ID: u8 = 0;
Expand description

Identifier for legacy transaction, however a legacy tx is technically not +typed.

+
\ No newline at end of file diff --git a/alloy_rpc_types/enum.BlockError.html b/alloy_rpc_types/enum.BlockError.html new file mode 100644 index 000000000000..63b25820529f --- /dev/null +++ b/alloy_rpc_types/enum.BlockError.html @@ -0,0 +1,25 @@ +BlockError in alloy_rpc_types - Rust +
pub enum BlockError {
+    InvalidSignature,
+    RlpDecodeRawBlock(Error),
+}
Expand description

Error that can occur when converting other types to blocks

+

Variants§

§

InvalidSignature

A transaction failed sender recovery

+
§

RlpDecodeRawBlock(Error)

A raw block failed to decode

+

Trait Implementations§

source§

impl Debug for BlockError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for BlockError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for BlockError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • InvalidSignature: 0 bytes
  • RlpDecodeRawBlock: 24 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.BlockHashOrNumber.html b/alloy_rpc_types/enum.BlockHashOrNumber.html new file mode 100644 index 000000000000..f9baa32fa2fb --- /dev/null +++ b/alloy_rpc_types/enum.BlockHashOrNumber.html @@ -0,0 +1,42 @@ +BlockHashOrNumber in alloy_rpc_types - Rust +
pub enum BlockHashOrNumber {
+    Hash(B256),
+    Number(u64),
+}
Expand description

Either a block hash or a block number

+

Variants§

§

Hash(B256)

A block hash

+
§

Number(u64)

A block number

+

Implementations§

source§

impl BlockHashOrNumber

source

pub fn as_number(self) -> Option<u64>

Returns the block number if it is a BlockHashOrNumber::Number.

+

Trait Implementations§

source§

impl<'arbitrary> Arbitrary<'arbitrary> for BlockHashOrNumber

source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given +unstructured data. Read more
source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type +needs to construct itself. Read more
source§

impl Arbitrary for BlockHashOrNumber

§

type Parameters = (<FixedBytes<32> as Arbitrary>::Parameters, <u64 as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration +of the generated Strategy. Parameters must implement Default.
§

type Strategy = TupleUnion<((u32, Arc<Map<<FixedBytes<32> as Arbitrary>::Strategy, fn(_: FixedBytes<32>) -> BlockHashOrNumber>>), (u32, Arc<Map<<u64 as Arbitrary>::Strategy, fn(_: u64) -> BlockHashOrNumber>>))>

The type of Strategy used to generate values of type Self.
source§

fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the +implementing type (Self). The strategy is passed the arguments given +in args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values +of type the implementing type (Self). Read more
source§

impl Clone for BlockHashOrNumber

source§

fn clone(&self) -> BlockHashOrNumber

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockHashOrNumber

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for BlockHashOrNumber

Allows for RLP decoding of a block hash or block number

+
source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl<'de> Deserialize<'de> for BlockHashOrNumber

source§

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 Encodable for BlockHashOrNumber

Allows for RLP encoding of either a block hash or block number

+
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl From<FixedBytes<32>> for BlockHashOrNumber

source§

fn from(value: B256) -> Self

Converts to this type from the input type.
source§

impl From<u64> for BlockHashOrNumber

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl FromStr for BlockHashOrNumber

§

type Err = ParseBlockHashOrNumberError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for BlockHashOrNumber

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for BlockHashOrNumber

source§

fn eq(&self, other: &BlockHashOrNumber) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockHashOrNumber

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlockHashOrNumber

source§

impl Eq for BlockHashOrNumber

source§

impl StructuralEq for BlockHashOrNumber

source§

impl StructuralPartialEq for BlockHashOrNumber

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Hash: 32 bytes
  • Number: 15 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.BlockId.html b/alloy_rpc_types/enum.BlockId.html new file mode 100644 index 000000000000..670927734b6c --- /dev/null +++ b/alloy_rpc_types/enum.BlockId.html @@ -0,0 +1,34 @@ +BlockId in alloy_rpc_types - Rust +
pub enum BlockId {
+    Hash(RpcBlockHash),
+    Number(BlockNumberOrTag),
+}
Expand description

Variants§

§

Hash(RpcBlockHash)

A block hash and an optional bool that defines if it’s canonical

+
§

Number(BlockNumberOrTag)

A block number

+

Implementations§

source§

impl BlockId

source

pub const fn as_block_hash(&self) -> Option<B256>

Returns the block hash if it is BlockId::Hash

+
source

pub const fn is_latest(&self) -> bool

Returns true if this is BlockNumberOrTag::Latest

+
source

pub const fn is_pending(&self) -> bool

Returns true if this is BlockNumberOrTag::Pending

+

Trait Implementations§

source§

impl Clone for BlockId

source§

fn clone(&self) -> BlockId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockId

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockId

source§

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<(FixedBytes<32>, Option<bool>)> for BlockId

source§

fn from(hash_can: (B256, Option<bool>)) -> Self

Converts to this type from the input type.
source§

impl From<BlockNumberOrTag> for BlockId

source§

fn from(num: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<FixedBytes<32>> for BlockId

source§

fn from(block_hash: B256) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for BlockId

source§

fn from(num: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for BlockId

source§

fn from(num: u64) -> Self

Converts to this type from the input type.
source§

impl PartialEq for BlockId

source§

fn eq(&self, other: &BlockId) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockId

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlockId

source§

impl Eq for BlockId

source§

impl StructuralEq for BlockId

source§

impl StructuralPartialEq for BlockId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Hash: 33 bytes
  • Number: 23 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.BlockNumberOrTag.html b/alloy_rpc_types/enum.BlockNumberOrTag.html new file mode 100644 index 000000000000..9a183ce5bb67 --- /dev/null +++ b/alloy_rpc_types/enum.BlockNumberOrTag.html @@ -0,0 +1,48 @@ +BlockNumberOrTag in alloy_rpc_types - Rust +
pub enum BlockNumberOrTag {
+    Latest,
+    Finalized,
+    Safe,
+    Earliest,
+    Pending,
+    Number(u64),
+}
Expand description

A block Number (or tag - “latest”, “earliest”, “pending”)

+

Variants§

§

Latest

Latest block

+
§

Finalized

Finalized block accepted as canonical

+
§

Safe

Safe head block

+
§

Earliest

Earliest block (genesis)

+
§

Pending

Pending block (not yet part of the blockchain)

+
§

Number(u64)

Block by number from canon chain

+

Implementations§

source§

impl BlockNumberOrTag

source

pub const fn as_number(&self) -> Option<u64>

Returns the numeric block number if explicitly set

+
source

pub const fn is_number(&self) -> bool

Returns true if a numeric block number is set

+
source

pub const fn is_latest(&self) -> bool

Returns true if it’s “latest”

+
source

pub const fn is_finalized(&self) -> bool

Returns true if it’s “finalized”

+
source

pub const fn is_safe(&self) -> bool

Returns true if it’s “safe”

+
source

pub const fn is_pending(&self) -> bool

Returns true if it’s “pending”

+
source

pub const fn is_earliest(&self) -> bool

Returns true if it’s “earliest”

+

Trait Implementations§

source§

impl Clone for BlockNumberOrTag

source§

fn clone(&self) -> BlockNumberOrTag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockNumberOrTag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockNumberOrTag

source§

fn default() -> BlockNumberOrTag

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockNumberOrTag

source§

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 Display for BlockNumberOrTag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<BlockNumberOrTag> for BlockId

source§

fn from(num: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<BlockNumberOrTag> for FilterBlockOption

source§

fn from(block: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for BlockNumberOrTag

source§

fn from(num: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for BlockNumberOrTag

source§

fn from(num: u64) -> Self

Converts to this type from the input type.
source§

impl FromStr for BlockNumberOrTag

§

type Err = ParseBlockNumberError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for BlockNumberOrTag

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for BlockNumberOrTag

source§

fn eq(&self, other: &BlockNumberOrTag) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockNumberOrTag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlockNumberOrTag

source§

impl Eq for BlockNumberOrTag

source§

impl StructuralEq for BlockNumberOrTag

source§

impl StructuralPartialEq for BlockNumberOrTag

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

Size for each variant:

  • Latest: 0 bytes
  • Finalized: 0 bytes
  • Safe: 0 bytes
  • Earliest: 0 bytes
  • Pending: 0 bytes
  • Number: 8 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.BlockTransactions.html b/alloy_rpc_types/enum.BlockTransactions.html new file mode 100644 index 000000000000..5fb571da7538 --- /dev/null +++ b/alloy_rpc_types/enum.BlockTransactions.html @@ -0,0 +1,40 @@ +BlockTransactions in alloy_rpc_types - Rust +
pub enum BlockTransactions {
+    Hashes(Vec<B256>),
+    Full(Vec<Transaction>),
+    Uncle,
+}
Expand description

Block Transactions depending on the boolean attribute of eth_getBlockBy*, +or if used by eth_getUncle*

+

Variants§

§

Hashes(Vec<B256>)

Only hashes

+
§

Full(Vec<Transaction>)

Full transactions

+
§

Uncle

Special case for uncle response.

+

Implementations§

source§

impl BlockTransactions

source

pub fn convert_to_hashes(&mut self)

Converts self into Hashes.

+
source

pub fn into_hashes(self) -> Self

Converts self into Hashes.

+
source

pub const fn is_uncle(&self) -> bool

Check if the enum variant is used for an uncle response.

+
source

pub fn iter(&self) -> BlockTransactionHashes<'_>

👎Deprecated: use hashes instead

Returns an iterator over the transaction hashes.

+
source

pub fn hashes(&self) -> BlockTransactionHashes<'_>

Returns an iterator over references to the transaction hashes.

+
source

pub fn hashes_mut(&mut self) -> BlockTransactionHashesMut<'_>

Returns an iterator over mutable references to the transaction hashes.

+
source

pub fn uncle() -> Self

Returns an instance of BlockTransactions with the Uncle special case.

+

Trait Implementations§

source§

impl Clone for BlockTransactions

source§

fn clone(&self) -> BlockTransactions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockTransactions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BlockTransactions

source§

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 PartialEq for BlockTransactions

source§

fn eq(&self, other: &BlockTransactions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockTransactions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlockTransactions

source§

impl StructuralEq for BlockTransactions

source§

impl StructuralPartialEq for BlockTransactions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

Size for each variant:

  • Hashes: 24 bytes
  • Full: 24 bytes
  • Uncle: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.BlockTransactionsKind.html b/alloy_rpc_types/enum.BlockTransactionsKind.html new file mode 100644 index 000000000000..acc2da46bc9d --- /dev/null +++ b/alloy_rpc_types/enum.BlockTransactionsKind.html @@ -0,0 +1,29 @@ +BlockTransactionsKind in alloy_rpc_types - Rust +
pub enum BlockTransactionsKind {
+    Hashes,
+    Full,
+}
Expand description

Determines how the transactions field of Block should be filled.

+

This essentially represents the full:bool argument in RPC calls that determine whether the +response should include full transaction objects or just the hashes.

+

Variants§

§

Hashes

Only include hashes: BlockTransactions::Hashes

+
§

Full

Include full transaction objects: BlockTransactions::Full

+

Trait Implementations§

source§

impl Clone for BlockTransactionsKind

source§

fn clone(&self) -> BlockTransactionsKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockTransactionsKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<bool> for BlockTransactionsKind

source§

fn from(is_full: bool) -> Self

Converts to this type from the input type.
source§

impl PartialEq for BlockTransactionsKind

source§

fn eq(&self, other: &BlockTransactionsKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for BlockTransactionsKind

source§

impl StructuralEq for BlockTransactionsKind

source§

impl StructuralPartialEq for BlockTransactionsKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • Hashes: 0 bytes
  • Full: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.FilterBlockOption.html b/alloy_rpc_types/enum.FilterBlockOption.html new file mode 100644 index 000000000000..74cdc50546e1 --- /dev/null +++ b/alloy_rpc_types/enum.FilterBlockOption.html @@ -0,0 +1,41 @@ +FilterBlockOption in alloy_rpc_types - Rust +
pub enum FilterBlockOption {
+    Range {
+        from_block: Option<BlockNumberOrTag>,
+        to_block: Option<BlockNumberOrTag>,
+    },
+    AtBlockHash(B256),
+}
Expand description

Represents the target range of blocks for the filter

+

Variants§

§

Range

Fields

§from_block: Option<BlockNumberOrTag>

The block number or tag this filter should start at.

+
§to_block: Option<BlockNumberOrTag>

The block number or that this filter should end at.

+

Represents a range of blocks with optional from and to blocks

+

Note: ranges are considered to be inclusive

+
§

AtBlockHash(B256)

The hash of the block if the filter only targets a single block

+

Implementations§

source§

impl FilterBlockOption

source

pub fn get_to_block(&self) -> Option<&BlockNumberOrTag>

Returns the fromBlock value, if any

+
source

pub fn get_from_block(&self) -> Option<&BlockNumberOrTag>

Returns the toBlock value, if any

+
source

pub fn as_range(&self) -> (Option<&BlockNumberOrTag>, Option<&BlockNumberOrTag>)

Returns the range (fromBlock, toBlock) if this is a range filter.

+
source§

impl FilterBlockOption

source

pub fn set_from_block(&self, block: BlockNumberOrTag) -> Self

Sets the block number this range filter should start at.

+
source

pub fn set_to_block(&self, block: BlockNumberOrTag) -> Self

Sets the block number this range filter should end at.

+
source

pub fn set_hash(&self, hash: B256) -> Self

Pins the block hash this filter should target.

+

Trait Implementations§

source§

impl Clone for FilterBlockOption

source§

fn clone(&self) -> FilterBlockOption

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FilterBlockOption

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FilterBlockOption

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<BlockNumberOrTag> for FilterBlockOption

source§

fn from(block: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<FixedBytes<32>> for FilterBlockOption

source§

fn from(hash: B256) -> Self

Converts to this type from the input type.
source§

impl<T: Into<BlockNumberOrTag>> From<Range<T>> for FilterBlockOption

source§

fn from(r: Range<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Into<BlockNumberOrTag>> From<RangeFrom<T>> for FilterBlockOption

source§

fn from(r: RangeFrom<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Into<BlockNumberOrTag>> From<RangeTo<T>> for FilterBlockOption

source§

fn from(r: RangeTo<T>) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for FilterBlockOption

source§

fn from(block: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for FilterBlockOption

source§

fn from(block: u64) -> Self

Converts to this type from the input type.
source§

impl Hash for FilterBlockOption

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for FilterBlockOption

source§

fn eq(&self, other: &FilterBlockOption) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for FilterBlockOption

source§

impl Eq for FilterBlockOption

source§

impl StructuralEq for FilterBlockOption

source§

impl StructuralPartialEq for FilterBlockOption

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 40 bytes

Size for each variant:

  • Range: 39 bytes
  • AtBlockHash: 32 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.FilterChanges.html b/alloy_rpc_types/enum.FilterChanges.html new file mode 100644 index 000000000000..e929098340d9 --- /dev/null +++ b/alloy_rpc_types/enum.FilterChanges.html @@ -0,0 +1,34 @@ +FilterChanges in alloy_rpc_types - Rust +
pub enum FilterChanges {
+    Logs(Vec<Log>),
+    Hashes(Vec<B256>),
+    Transactions(Vec<Transaction>),
+    Empty,
+}
Expand description

Response of the eth_getFilterChanges RPC.

+

Variants§

§

Logs(Vec<Log>)

New logs.

+
§

Hashes(Vec<B256>)

New hashes (block or transactions)

+
§

Transactions(Vec<Transaction>)

New transactions.

+
§

Empty

Empty result,

+

Trait Implementations§

source§

impl Clone for FilterChanges

source§

fn clone(&self) -> FilterChanges

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FilterChanges

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for FilterChanges

source§

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 PartialEq for FilterChanges

source§

fn eq(&self, other: &FilterChanges) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FilterChanges

source§

fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FilterChanges

source§

impl StructuralEq for FilterChanges

source§

impl StructuralPartialEq for FilterChanges

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

Size for each variant:

  • Logs: 24 bytes
  • Hashes: 24 bytes
  • Transactions: 24 bytes
  • Empty: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.FilterId.html b/alloy_rpc_types/enum.FilterId.html new file mode 100644 index 000000000000..7ef0132d9d26 --- /dev/null +++ b/alloy_rpc_types/enum.FilterId.html @@ -0,0 +1,32 @@ +FilterId in alloy_rpc_types - Rust +
pub enum FilterId {
+    Num(u64),
+    Str(String),
+}
Expand description

Owned equivalent of a SubscriptionId

+

Variants§

§

Num(u64)

Numeric id

+
§

Str(String)

String id

+

Trait Implementations§

source§

impl Clone for FilterId

source§

fn clone(&self) -> FilterId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FilterId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for FilterId

source§

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<FilterId> for SubscriptionId<'_>

Available on crate feature jsonrpsee only.
source§

fn from(value: FilterId) -> Self

Converts to this type from the input type.
source§

impl From<SubscriptionId<'_>> for FilterId

Available on crate feature jsonrpsee only.
source§

fn from(value: SubscriptionId<'_>) -> Self

Converts to this type from the input type.
source§

impl Hash for FilterId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for FilterId

source§

fn eq(&self, other: &FilterId) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FilterId

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FilterId

source§

impl StructuralEq for FilterId

source§

impl StructuralPartialEq for FilterId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

Size for each variant:

  • Num: 16 bytes
  • Str: 24 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.LogError.html b/alloy_rpc_types/enum.LogError.html new file mode 100644 index 000000000000..7bc4a84a95a0 --- /dev/null +++ b/alloy_rpc_types/enum.LogError.html @@ -0,0 +1,23 @@ +LogError in alloy_rpc_types - Rust +
pub enum LogError {
+    TooManyTopics,
+}
Expand description

Error that can occur when converting other types to logs

+

Variants§

§

TooManyTopics

There are too many topics

+

Trait Implementations§

source§

impl Debug for LogError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LogError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for LogError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/enum.ParseBlockNumberError.html b/alloy_rpc_types/enum.ParseBlockNumberError.html new file mode 100644 index 000000000000..0e513afbdaf8 --- /dev/null +++ b/alloy_rpc_types/enum.ParseBlockNumberError.html @@ -0,0 +1,27 @@ +ParseBlockNumberError in alloy_rpc_types - Rust +
pub enum ParseBlockNumberError {
+    ParseIntErr(ParseIntError),
+    ParseErr(ParseError),
+    MissingPrefix(HexStringMissingPrefixError),
+}
Expand description

Error variants when parsing a BlockNumberOrTag

+

Variants§

§

ParseIntErr(ParseIntError)

Failed to parse hex value

+
§

ParseErr(ParseError)

Failed to parse hex value

+
§

MissingPrefix(HexStringMissingPrefixError)

Block numbers should be 0x-prefixed

+

Trait Implementations§

source§

impl Debug for ParseBlockNumberError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ParseBlockNumberError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ParseBlockNumberError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<HexStringMissingPrefixError> for ParseBlockNumberError

source§

fn from(source: HexStringMissingPrefixError) -> Self

Converts to this type from the input type.
source§

impl From<ParseError> for ParseBlockNumberError

source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
source§

impl From<ParseIntError> for ParseBlockNumberError

source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • ParseIntErr: 9 bytes
  • ParseErr: 24 bytes
  • MissingPrefix: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.PeerCount.html b/alloy_rpc_types/enum.PeerCount.html new file mode 100644 index 000000000000..52522c6e0a70 --- /dev/null +++ b/alloy_rpc_types/enum.PeerCount.html @@ -0,0 +1,28 @@ +PeerCount in alloy_rpc_types - Rust +
pub enum PeerCount {
+    Number(u32),
+    Hex(U64),
+}
Expand description

Number of peers connected to.

+

Variants§

§

Number(u32)

Peer count as integer

+
§

Hex(U64)

Peer count as hex

+

Trait Implementations§

source§

impl Clone for PeerCount

source§

fn clone(&self) -> PeerCount

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerCount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PeerCount

source§

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 Serialize for PeerCount

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

Size for each variant:

  • Number: 4 bytes
  • Hex: 12 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.PendingTransactionFilterKind.html b/alloy_rpc_types/enum.PendingTransactionFilterKind.html new file mode 100644 index 000000000000..efd9c7902f9c --- /dev/null +++ b/alloy_rpc_types/enum.PendingTransactionFilterKind.html @@ -0,0 +1,48 @@ +PendingTransactionFilterKind in alloy_rpc_types - Rust +
pub enum PendingTransactionFilterKind {
+    Hashes,
+    Full,
+}
Expand description

Specifies the kind of information you wish to receive from the eth_newPendingTransactionFilter +RPC endpoint.

+

When this type is used in a request, it determines whether the client wishes to receive:

+
    +
  • Only the transaction hashes (Hashes variant), or
  • +
  • Full transaction details (Full variant).
  • +
+

Variants§

§

Hashes

Receive only the hashes of the transactions.

+
§

Full

Receive full details of the transactions.

+

Trait Implementations§

source§

impl Clone for PendingTransactionFilterKind

source§

fn clone(&self) -> PendingTransactionFilterKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PendingTransactionFilterKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PendingTransactionFilterKind

source§

fn default() -> PendingTransactionFilterKind

Returns the “default value” for a type. Read more
source§

impl<'a> Deserialize<'a> for PendingTransactionFilterKind

source§

fn deserialize<D>( + deserializer: D +) -> Result<PendingTransactionFilterKind, D::Error>
where + D: Deserializer<'a>,

Deserializes a boolean value into PendingTransactionFilterKind:

+
    +
  • false becomes Hashes
  • +
  • true becomes Full
  • +
+
source§

impl PartialEq for PendingTransactionFilterKind

source§

fn eq(&self, other: &PendingTransactionFilterKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PendingTransactionFilterKind

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serializes the PendingTransactionFilterKind into a boolean value:

+
    +
  • false for Hashes
  • +
  • true for Full
  • +
+
source§

impl Copy for PendingTransactionFilterKind

source§

impl Eq for PendingTransactionFilterKind

source§

impl StructuralEq for PendingTransactionFilterKind

source§

impl StructuralPartialEq for PendingTransactionFilterKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Hashes: 0 bytes
  • Full: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.SyncStatus.html b/alloy_rpc_types/enum.SyncStatus.html new file mode 100644 index 000000000000..041205f5b906 --- /dev/null +++ b/alloy_rpc_types/enum.SyncStatus.html @@ -0,0 +1,30 @@ +SyncStatus in alloy_rpc_types - Rust +
pub enum SyncStatus {
+    Info(SyncInfo),
+    None,
+}
Expand description

Sync status

+

Variants§

§

Info(SyncInfo)

Info when syncing

+
§

None

Not syncing

+

Trait Implementations§

source§

impl Clone for SyncStatus

source§

fn clone(&self) -> SyncStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SyncStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SyncStatus

source§

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 PartialEq for SyncStatus

source§

fn eq(&self, other: &SyncStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SyncStatus

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SyncStatus

source§

impl StructuralEq for SyncStatus

source§

impl StructuralPartialEq for SyncStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

Size for each variant:

  • Info: 176 bytes
  • None: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.TransactionKind.html b/alloy_rpc_types/enum.TransactionKind.html new file mode 100644 index 000000000000..e751af3af2f0 --- /dev/null +++ b/alloy_rpc_types/enum.TransactionKind.html @@ -0,0 +1,36 @@ +TransactionKind in alloy_rpc_types - Rust +
pub enum TransactionKind {
+    Call(Address),
+    Create,
+}
Expand description

Represents the to field of a transaction request

+

This determines what kind of transaction this is

+

Variants§

§

Call(Address)

Transaction will call this address or transfer funds to this address

+
§

Create

No to field set, this transaction will create a contract

+

Implementations§

source§

impl TransactionKind

source

pub fn as_call(&self) -> Option<&Address>

If this transaction is a call this returns the address of the callee

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the TransactionKind.

+

Trait Implementations§

source§

impl Clone for TransactionKind

source§

fn clone(&self) -> TransactionKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for TransactionKind

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl<'de> Deserialize<'de> for TransactionKind

source§

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 Encodable for TransactionKind

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl Hash for TransactionKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for TransactionKind

source§

fn eq(&self, other: &TransactionKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TransactionKind

source§

impl Eq for TransactionKind

source§

impl StructuralEq for TransactionKind

source§

impl StructuralPartialEq for TransactionKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 21 bytes

Size for each variant:

  • Call: 20 bytes
  • Create: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.TxType.html b/alloy_rpc_types/enum.TxType.html new file mode 100644 index 000000000000..505a877b6ad9 --- /dev/null +++ b/alloy_rpc_types/enum.TxType.html @@ -0,0 +1,43 @@ +TxType in alloy_rpc_types - Rust +
pub enum TxType {
+    Legacy = 0,
+    EIP2930 = 1,
+    EIP1559 = 2,
+    EIP4844 = 3,
+}
Expand description

Transaction Type

+

Currently being used as 2-bit type when encoding it to Compact on +crate::TransactionSignedNoHash (see Reth’s Compact encoding). Adding more transaction types will +break the codec and database format on Reth.

+

Other required changes when adding a new type can be seen on PR#3953.

+

Variants§

§

Legacy = 0

Legacy transaction pre EIP-2929

+
§

EIP2930 = 1

AccessList transaction

+
§

EIP1559 = 2

Transaction with Priority fee

+
§

EIP4844 = 3

Shard Blob Transactions - EIP-4844

+

Trait Implementations§

source§

impl Clone for TxType

source§

fn clone(&self) -> TxType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxType

source§

fn default() -> TxType

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxType

source§

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<TxType> for U8

source§

fn from(value: TxType) -> Self

Converts to this type from the input type.
source§

impl From<TxType> for u8

source§

fn from(value: TxType) -> Self

Converts to this type from the input type.
source§

impl Ord for TxType

source§

fn cmp(&self, other: &TxType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TxType

source§

fn eq(&self, other: &TxType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TxType

source§

fn partial_cmp(&self, other: &TxType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for TxType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TxType

source§

impl Eq for TxType

source§

impl StructuralEq for TxType

source§

impl StructuralPartialEq for TxType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Legacy: 0 bytes
  • EIP2930: 0 bytes
  • EIP1559: 0 bytes
  • EIP4844: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.TypedTransactionRequest.html b/alloy_rpc_types/enum.TypedTransactionRequest.html new file mode 100644 index 000000000000..4f4165120de3 --- /dev/null +++ b/alloy_rpc_types/enum.TypedTransactionRequest.html @@ -0,0 +1,36 @@ +TypedTransactionRequest in alloy_rpc_types - Rust +
pub enum TypedTransactionRequest {
+    Legacy(LegacyTransactionRequest),
+    EIP2930(EIP2930TransactionRequest),
+    EIP1559(EIP1559TransactionRequest),
+}
Expand description

Container type for various Ethereum transaction requests

+

Its variants correspond to specific allowed transactions:

+
    +
  1. Legacy (pre-EIP2718) LegacyTransactionRequest
  2. +
  3. EIP2930 (state access lists) EIP2930TransactionRequest
  4. +
  5. EIP1559 EIP1559TransactionRequest
  6. +
+

Variants§

§

Legacy(LegacyTransactionRequest)

A Legacy Transaction request.

+
§

EIP2930(EIP2930TransactionRequest)

An EIP2930 transaction request.

+
§

EIP1559(EIP1559TransactionRequest)

An EIP1559 Transaction Request.

+

Trait Implementations§

source§

impl Clone for TypedTransactionRequest

source§

fn clone(&self) -> TypedTransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TypedTransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for TypedTransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for TypedTransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for TypedTransactionRequest

source§

fn eq(&self, other: &TypedTransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for TypedTransactionRequest

source§

impl StructuralEq for TypedTransactionRequest

source§

impl StructuralPartialEq for TypedTransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 200 bytes

Size for each variant:

  • Legacy: 160 bytes
  • EIP2930: 176 bytes
  • EIP1559: 192 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/enum.ValueOrArray.html b/alloy_rpc_types/enum.ValueOrArray.html new file mode 100644 index 000000000000..eb5ba20ed592 --- /dev/null +++ b/alloy_rpc_types/enum.ValueOrArray.html @@ -0,0 +1,39 @@ +ValueOrArray in alloy_rpc_types - Rust +
pub enum ValueOrArray<T> {
+    Value(T),
+    Array(Vec<T>),
+}
Expand description

Union type for representing a single value or a vector of values inside a filter

+

Variants§

§

Value(T)

A single value

+
§

Array(Vec<T>)

A vector of values

+

Trait Implementations§

source§

impl<T: Clone> Clone for ValueOrArray<T>

source§

fn clone(&self) -> ValueOrArray<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for ValueOrArray<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T> Deserialize<'a> for ValueOrArray<T>
where + T: DeserializeOwned,

source§

fn deserialize<D>(deserializer: D) -> Result<ValueOrArray<T>, D::Error>
where + D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Address> for ValueOrArray<Address>

source§

fn from(src: Address) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>

source§

fn from(src: ValueOrArray<Option<T>>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>

source§

fn from(src: ValueOrArray<T>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Address>> for ValueOrArray<Address>

source§

fn from(src: Vec<Address>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<FixedBytes<32>>> for ValueOrArray<B256>

source§

fn from(src: Vec<B256>) -> Self

Converts to this type from the input type.
source§

impl<T: Hash> Hash for ValueOrArray<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: PartialEq> PartialEq for ValueOrArray<T>

source§

fn eq(&self, other: &ValueOrArray<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for ValueOrArray<T>
where + T: Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for ValueOrArray<T>

source§

impl<T> StructuralEq for ValueOrArray<T>

source§

impl<T> StructuralPartialEq for ValueOrArray<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ValueOrArray<T>
where + T: RefUnwindSafe,

§

impl<T> Send for ValueOrArray<T>
where + T: Send,

§

impl<T> Sync for ValueOrArray<T>
where + T: Sync,

§

impl<T> Unpin for ValueOrArray<T>
where + T: Unpin,

§

impl<T> UnwindSafe for ValueOrArray<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/eth/account/index.html b/alloy_rpc_types/eth/account/index.html new file mode 100644 index 000000000000..185d1c99d14d --- /dev/null +++ b/alloy_rpc_types/eth/account/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::eth::account - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/account/sidebar-items.js b/alloy_rpc_types/eth/account/sidebar-items.js new file mode 100644 index 000000000000..0d395dd7838e --- /dev/null +++ b/alloy_rpc_types/eth/account/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AccountInfo","EIP1186AccountProofResponse","EIP1186StorageProof","ExtAccountInfo","RecoveredAccount"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/account/struct.AccountInfo.html b/alloy_rpc_types/eth/account/struct.AccountInfo.html new file mode 100644 index 000000000000..452b02540b87 --- /dev/null +++ b/alloy_rpc_types/eth/account/struct.AccountInfo.html @@ -0,0 +1,28 @@ +AccountInfo in alloy_rpc_types::eth::account - Rust +
pub struct AccountInfo {
+    pub name: String,
+}
Expand description

Account information.

+

Fields§

§name: String

Account name

+

Trait Implementations§

source§

impl Clone for AccountInfo

source§

fn clone(&self) -> AccountInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountInfo

source§

fn default() -> AccountInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountInfo

source§

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 PartialEq for AccountInfo

source§

fn eq(&self, other: &AccountInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountInfo

source§

impl StructuralEq for AccountInfo

source§

impl StructuralPartialEq for AccountInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/account/struct.EIP1186AccountProofResponse.html b/alloy_rpc_types/eth/account/struct.EIP1186AccountProofResponse.html new file mode 100644 index 000000000000..68db4cb02e08 --- /dev/null +++ b/alloy_rpc_types/eth/account/struct.EIP1186AccountProofResponse.html @@ -0,0 +1,33 @@ +EIP1186AccountProofResponse in alloy_rpc_types::eth::account - Rust +
pub struct EIP1186AccountProofResponse {
+    pub address: Address,
+    pub balance: U256,
+    pub code_hash: B256,
+    pub nonce: U64,
+    pub storage_hash: B256,
+    pub account_proof: Vec<Bytes>,
+    pub storage_proof: Vec<EIP1186StorageProof>,
+}
Expand description

Response for EIP-1186 account proof eth_getProof

+

Fields§

§address: Address§balance: U256§code_hash: B256§nonce: U64§storage_hash: B256§account_proof: Vec<Bytes>§storage_proof: Vec<EIP1186StorageProof>

Trait Implementations§

source§

impl Clone for EIP1186AccountProofResponse

source§

fn clone(&self) -> EIP1186AccountProofResponse

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1186AccountProofResponse

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EIP1186AccountProofResponse

source§

fn default() -> EIP1186AccountProofResponse

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EIP1186AccountProofResponse

source§

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 PartialEq for EIP1186AccountProofResponse

source§

fn eq(&self, other: &EIP1186AccountProofResponse) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EIP1186AccountProofResponse

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EIP1186AccountProofResponse

source§

impl StructuralEq for EIP1186AccountProofResponse

source§

impl StructuralPartialEq for EIP1186AccountProofResponse

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/account/struct.EIP1186StorageProof.html b/alloy_rpc_types/eth/account/struct.EIP1186StorageProof.html new file mode 100644 index 000000000000..b73f073c340a --- /dev/null +++ b/alloy_rpc_types/eth/account/struct.EIP1186StorageProof.html @@ -0,0 +1,32 @@ +EIP1186StorageProof in alloy_rpc_types::eth::account - Rust +
pub struct EIP1186StorageProof {
+    pub key: JsonStorageKey,
+    pub value: U256,
+    pub proof: Vec<Bytes>,
+}
Expand description

Data structure with proof for one single storage-entry

+

Fields§

§key: JsonStorageKey

Storage key.

+
§value: U256

Value that the key holds

+
§proof: Vec<Bytes>

proof for the pair

+

Trait Implementations§

source§

impl Clone for EIP1186StorageProof

source§

fn clone(&self) -> EIP1186StorageProof

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1186StorageProof

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EIP1186StorageProof

source§

fn default() -> EIP1186StorageProof

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EIP1186StorageProof

source§

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 PartialEq for EIP1186StorageProof

source§

fn eq(&self, other: &EIP1186StorageProof) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EIP1186StorageProof

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EIP1186StorageProof

source§

impl StructuralEq for EIP1186StorageProof

source§

impl StructuralPartialEq for EIP1186StorageProof

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 88 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/account/struct.ExtAccountInfo.html b/alloy_rpc_types/eth/account/struct.ExtAccountInfo.html new file mode 100644 index 000000000000..ba59e3289a92 --- /dev/null +++ b/alloy_rpc_types/eth/account/struct.ExtAccountInfo.html @@ -0,0 +1,32 @@ +ExtAccountInfo in alloy_rpc_types::eth::account - Rust +
pub struct ExtAccountInfo {
+    pub name: String,
+    pub meta: String,
+    pub uuid: Option<String>,
+}
Expand description

Extended account information (used by parity_allAccountInfo).

+

Fields§

§name: String

Account name

+
§meta: String

Account meta JSON

+
§uuid: Option<String>

Account UUID (None for address book entries)

+

Trait Implementations§

source§

impl Clone for ExtAccountInfo

source§

fn clone(&self) -> ExtAccountInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExtAccountInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ExtAccountInfo

source§

fn default() -> ExtAccountInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ExtAccountInfo

source§

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 PartialEq for ExtAccountInfo

source§

fn eq(&self, other: &ExtAccountInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ExtAccountInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ExtAccountInfo

source§

impl StructuralEq for ExtAccountInfo

source§

impl StructuralPartialEq for ExtAccountInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/eth/account/struct.RecoveredAccount.html b/alloy_rpc_types/eth/account/struct.RecoveredAccount.html new file mode 100644 index 000000000000..95a6026ae9f0 --- /dev/null +++ b/alloy_rpc_types/eth/account/struct.RecoveredAccount.html @@ -0,0 +1,34 @@ +RecoveredAccount in alloy_rpc_types::eth::account - Rust +
pub struct RecoveredAccount {
+    pub address: Address,
+    pub public_key: B512,
+    pub is_valid_for_current_chain: bool,
+}
Expand description

account derived from a signature +as well as information that tells if it is valid for +the current chain

+

Fields§

§address: Address

address of the recovered account

+
§public_key: B512

public key of the recovered account

+
§is_valid_for_current_chain: bool

If the signature contains chain replay protection, +And the chain_id encoded within the signature +matches the current chain this would be true, otherwise false.

+

Trait Implementations§

source§

impl Clone for RecoveredAccount

source§

fn clone(&self) -> RecoveredAccount

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RecoveredAccount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RecoveredAccount

source§

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 Serialize for RecoveredAccount

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 85 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/constant._IMPL_ARBITRARY_FOR_BlockHashOrNumber.html b/alloy_rpc_types/eth/block/constant._IMPL_ARBITRARY_FOR_BlockHashOrNumber.html new file mode 100644 index 000000000000..078f796e6f4f --- /dev/null +++ b/alloy_rpc_types/eth/block/constant._IMPL_ARBITRARY_FOR_BlockHashOrNumber.html @@ -0,0 +1,2 @@ +_IMPL_ARBITRARY_FOR_BlockHashOrNumber in alloy_rpc_types::eth::block - Rust +
const _IMPL_ARBITRARY_FOR_BlockHashOrNumber: ();
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockError.html b/alloy_rpc_types/eth/block/enum.BlockError.html new file mode 100644 index 000000000000..c218d7edab9a --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockError.html @@ -0,0 +1,25 @@ +BlockError in alloy_rpc_types::eth::block - Rust +
pub enum BlockError {
+    InvalidSignature,
+    RlpDecodeRawBlock(Error),
+}
Expand description

Error that can occur when converting other types to blocks

+

Variants§

§

InvalidSignature

A transaction failed sender recovery

+
§

RlpDecodeRawBlock(Error)

A raw block failed to decode

+

Trait Implementations§

source§

impl Debug for BlockError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for BlockError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for BlockError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • InvalidSignature: 0 bytes
  • RlpDecodeRawBlock: 24 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockHashOrNumber.html b/alloy_rpc_types/eth/block/enum.BlockHashOrNumber.html new file mode 100644 index 000000000000..652ede1c0f78 --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockHashOrNumber.html @@ -0,0 +1,42 @@ +BlockHashOrNumber in alloy_rpc_types::eth::block - Rust +
pub enum BlockHashOrNumber {
+    Hash(B256),
+    Number(u64),
+}
Expand description

Either a block hash or a block number

+

Variants§

§

Hash(B256)

A block hash

+
§

Number(u64)

A block number

+

Implementations§

source§

impl BlockHashOrNumber

source

pub fn as_number(self) -> Option<u64>

Returns the block number if it is a BlockHashOrNumber::Number.

+

Trait Implementations§

source§

impl<'arbitrary> Arbitrary<'arbitrary> for BlockHashOrNumber

source§

fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the given unstructured data. Read more
source§

fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>

Generate an arbitrary value of Self from the entirety of the given +unstructured data. Read more
source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type +needs to construct itself. Read more
source§

impl Arbitrary for BlockHashOrNumber

§

type Parameters = (<FixedBytes<32> as Arbitrary>::Parameters, <u64 as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration +of the generated Strategy. Parameters must implement Default.
§

type Strategy = TupleUnion<((u32, Arc<Map<<FixedBytes<32> as Arbitrary>::Strategy, fn(_: FixedBytes<32>) -> BlockHashOrNumber>>), (u32, Arc<Map<<u64 as Arbitrary>::Strategy, fn(_: u64) -> BlockHashOrNumber>>))>

The type of Strategy used to generate values of type Self.
source§

fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the +implementing type (Self). The strategy is passed the arguments given +in args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values +of type the implementing type (Self). Read more
source§

impl Clone for BlockHashOrNumber

source§

fn clone(&self) -> BlockHashOrNumber

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockHashOrNumber

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for BlockHashOrNumber

Allows for RLP decoding of a block hash or block number

+
source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl<'de> Deserialize<'de> for BlockHashOrNumber

source§

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 Encodable for BlockHashOrNumber

Allows for RLP encoding of either a block hash or block number

+
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl From<FixedBytes<32>> for BlockHashOrNumber

source§

fn from(value: B256) -> Self

Converts to this type from the input type.
source§

impl From<u64> for BlockHashOrNumber

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl FromStr for BlockHashOrNumber

§

type Err = ParseBlockHashOrNumberError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for BlockHashOrNumber

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for BlockHashOrNumber

source§

fn eq(&self, other: &BlockHashOrNumber) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockHashOrNumber

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlockHashOrNumber

source§

impl Eq for BlockHashOrNumber

source§

impl StructuralEq for BlockHashOrNumber

source§

impl StructuralPartialEq for BlockHashOrNumber

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Hash: 32 bytes
  • Number: 15 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockId.html b/alloy_rpc_types/eth/block/enum.BlockId.html new file mode 100644 index 000000000000..76eb2aaa3f56 --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockId.html @@ -0,0 +1,34 @@ +BlockId in alloy_rpc_types::eth::block - Rust +
pub enum BlockId {
+    Hash(RpcBlockHash),
+    Number(BlockNumberOrTag),
+}
Expand description

Variants§

§

Hash(RpcBlockHash)

A block hash and an optional bool that defines if it’s canonical

+
§

Number(BlockNumberOrTag)

A block number

+

Implementations§

source§

impl BlockId

source

pub const fn as_block_hash(&self) -> Option<B256>

Returns the block hash if it is BlockId::Hash

+
source

pub const fn is_latest(&self) -> bool

Returns true if this is BlockNumberOrTag::Latest

+
source

pub const fn is_pending(&self) -> bool

Returns true if this is BlockNumberOrTag::Pending

+

Trait Implementations§

source§

impl Clone for BlockId

source§

fn clone(&self) -> BlockId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockId

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockId

source§

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<(FixedBytes<32>, Option<bool>)> for BlockId

source§

fn from(hash_can: (B256, Option<bool>)) -> Self

Converts to this type from the input type.
source§

impl From<BlockNumberOrTag> for BlockId

source§

fn from(num: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<FixedBytes<32>> for BlockId

source§

fn from(block_hash: B256) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for BlockId

source§

fn from(num: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for BlockId

source§

fn from(num: u64) -> Self

Converts to this type from the input type.
source§

impl PartialEq for BlockId

source§

fn eq(&self, other: &BlockId) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockId

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlockId

source§

impl Eq for BlockId

source§

impl StructuralEq for BlockId

source§

impl StructuralPartialEq for BlockId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Hash: 33 bytes
  • Number: 23 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockNumberOrTag.html b/alloy_rpc_types/eth/block/enum.BlockNumberOrTag.html new file mode 100644 index 000000000000..57cc5b777f51 --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockNumberOrTag.html @@ -0,0 +1,48 @@ +BlockNumberOrTag in alloy_rpc_types::eth::block - Rust +
pub enum BlockNumberOrTag {
+    Latest,
+    Finalized,
+    Safe,
+    Earliest,
+    Pending,
+    Number(u64),
+}
Expand description

A block Number (or tag - “latest”, “earliest”, “pending”)

+

Variants§

§

Latest

Latest block

+
§

Finalized

Finalized block accepted as canonical

+
§

Safe

Safe head block

+
§

Earliest

Earliest block (genesis)

+
§

Pending

Pending block (not yet part of the blockchain)

+
§

Number(u64)

Block by number from canon chain

+

Implementations§

source§

impl BlockNumberOrTag

source

pub const fn as_number(&self) -> Option<u64>

Returns the numeric block number if explicitly set

+
source

pub const fn is_number(&self) -> bool

Returns true if a numeric block number is set

+
source

pub const fn is_latest(&self) -> bool

Returns true if it’s “latest”

+
source

pub const fn is_finalized(&self) -> bool

Returns true if it’s “finalized”

+
source

pub const fn is_safe(&self) -> bool

Returns true if it’s “safe”

+
source

pub const fn is_pending(&self) -> bool

Returns true if it’s “pending”

+
source

pub const fn is_earliest(&self) -> bool

Returns true if it’s “earliest”

+

Trait Implementations§

source§

impl Clone for BlockNumberOrTag

source§

fn clone(&self) -> BlockNumberOrTag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockNumberOrTag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockNumberOrTag

source§

fn default() -> BlockNumberOrTag

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockNumberOrTag

source§

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 Display for BlockNumberOrTag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<BlockNumberOrTag> for BlockId

source§

fn from(num: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<BlockNumberOrTag> for FilterBlockOption

source§

fn from(block: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for BlockNumberOrTag

source§

fn from(num: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for BlockNumberOrTag

source§

fn from(num: u64) -> Self

Converts to this type from the input type.
source§

impl FromStr for BlockNumberOrTag

§

type Err = ParseBlockNumberError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for BlockNumberOrTag

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for BlockNumberOrTag

source§

fn eq(&self, other: &BlockNumberOrTag) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockNumberOrTag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlockNumberOrTag

source§

impl Eq for BlockNumberOrTag

source§

impl StructuralEq for BlockNumberOrTag

source§

impl StructuralPartialEq for BlockNumberOrTag

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

Size for each variant:

  • Latest: 0 bytes
  • Finalized: 0 bytes
  • Safe: 0 bytes
  • Earliest: 0 bytes
  • Pending: 0 bytes
  • Number: 8 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockTransactionHashesInner.html b/alloy_rpc_types/eth/block/enum.BlockTransactionHashesInner.html new file mode 100644 index 000000000000..71b39b050b0e --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockTransactionHashesInner.html @@ -0,0 +1,23 @@ +BlockTransactionHashesInner in alloy_rpc_types::eth::block - Rust +
enum BlockTransactionHashesInner<'a> {
+    Hashes(Iter<'a, B256>),
+    Full(Iter<'a, Transaction>),
+    Uncle,
+}

Variants§

§

Hashes(Iter<'a, B256>)

§

Full(Iter<'a, Transaction>)

§

Uncle

Trait Implementations§

source§

impl<'a> Clone for BlockTransactionHashesInner<'a>

source§

fn clone(&self) -> BlockTransactionHashesInner<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for BlockTransactionHashesInner<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • Hashes: 16 bytes
  • Full: 16 bytes
  • Uncle: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockTransactionHashesInnerMut.html b/alloy_rpc_types/eth/block/enum.BlockTransactionHashesInnerMut.html new file mode 100644 index 000000000000..6428f3b3a25d --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockTransactionHashesInnerMut.html @@ -0,0 +1,22 @@ +BlockTransactionHashesInnerMut in alloy_rpc_types::eth::block - Rust +
enum BlockTransactionHashesInnerMut<'a> {
+    Hashes(IterMut<'a, B256>),
+    Full(IterMut<'a, Transaction>),
+    Uncle,
+}

Variants§

§

Hashes(IterMut<'a, B256>)

§

Full(IterMut<'a, Transaction>)

§

Uncle

Trait Implementations§

source§

impl<'a> Debug for BlockTransactionHashesInnerMut<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • Hashes: 16 bytes
  • Full: 16 bytes
  • Uncle: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockTransactions.html b/alloy_rpc_types/eth/block/enum.BlockTransactions.html new file mode 100644 index 000000000000..bef5c5ed2926 --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockTransactions.html @@ -0,0 +1,40 @@ +BlockTransactions in alloy_rpc_types::eth::block - Rust +
pub enum BlockTransactions {
+    Hashes(Vec<B256>),
+    Full(Vec<Transaction>),
+    Uncle,
+}
Expand description

Block Transactions depending on the boolean attribute of eth_getBlockBy*, +or if used by eth_getUncle*

+

Variants§

§

Hashes(Vec<B256>)

Only hashes

+
§

Full(Vec<Transaction>)

Full transactions

+
§

Uncle

Special case for uncle response.

+

Implementations§

source§

impl BlockTransactions

source

pub fn convert_to_hashes(&mut self)

Converts self into Hashes.

+
source

pub fn into_hashes(self) -> Self

Converts self into Hashes.

+
source

pub const fn is_uncle(&self) -> bool

Check if the enum variant is used for an uncle response.

+
source

pub fn iter(&self) -> BlockTransactionHashes<'_>

👎Deprecated: use hashes instead

Returns an iterator over the transaction hashes.

+
source

pub fn hashes(&self) -> BlockTransactionHashes<'_>

Returns an iterator over references to the transaction hashes.

+
source

pub fn hashes_mut(&mut self) -> BlockTransactionHashesMut<'_>

Returns an iterator over mutable references to the transaction hashes.

+
source

pub fn uncle() -> Self

Returns an instance of BlockTransactions with the Uncle special case.

+

Trait Implementations§

source§

impl Clone for BlockTransactions

source§

fn clone(&self) -> BlockTransactions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockTransactions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for BlockTransactions

source§

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 PartialEq for BlockTransactions

source§

fn eq(&self, other: &BlockTransactions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockTransactions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlockTransactions

source§

impl StructuralEq for BlockTransactions

source§

impl StructuralPartialEq for BlockTransactions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

Size for each variant:

  • Hashes: 24 bytes
  • Full: 24 bytes
  • Uncle: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.BlockTransactionsKind.html b/alloy_rpc_types/eth/block/enum.BlockTransactionsKind.html new file mode 100644 index 000000000000..117c2c57eb0a --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.BlockTransactionsKind.html @@ -0,0 +1,29 @@ +BlockTransactionsKind in alloy_rpc_types::eth::block - Rust +
pub enum BlockTransactionsKind {
+    Hashes,
+    Full,
+}
Expand description

Determines how the transactions field of Block should be filled.

+

This essentially represents the full:bool argument in RPC calls that determine whether the +response should include full transaction objects or just the hashes.

+

Variants§

§

Hashes

Only include hashes: BlockTransactions::Hashes

+
§

Full

Include full transaction objects: BlockTransactions::Full

+

Trait Implementations§

source§

impl Clone for BlockTransactionsKind

source§

fn clone(&self) -> BlockTransactionsKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockTransactionsKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<bool> for BlockTransactionsKind

source§

fn from(is_full: bool) -> Self

Converts to this type from the input type.
source§

impl PartialEq for BlockTransactionsKind

source§

fn eq(&self, other: &BlockTransactionsKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for BlockTransactionsKind

source§

impl StructuralEq for BlockTransactionsKind

source§

impl StructuralPartialEq for BlockTransactionsKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • Hashes: 0 bytes
  • Full: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/enum.ParseBlockNumberError.html b/alloy_rpc_types/eth/block/enum.ParseBlockNumberError.html new file mode 100644 index 000000000000..e75b14b75df1 --- /dev/null +++ b/alloy_rpc_types/eth/block/enum.ParseBlockNumberError.html @@ -0,0 +1,27 @@ +ParseBlockNumberError in alloy_rpc_types::eth::block - Rust +
pub enum ParseBlockNumberError {
+    ParseIntErr(ParseIntError),
+    ParseErr(ParseError),
+    MissingPrefix(HexStringMissingPrefixError),
+}
Expand description

Error variants when parsing a BlockNumberOrTag

+

Variants§

§

ParseIntErr(ParseIntError)

Failed to parse hex value

+
§

ParseErr(ParseError)

Failed to parse hex value

+
§

MissingPrefix(HexStringMissingPrefixError)

Block numbers should be 0x-prefixed

+

Trait Implementations§

source§

impl Debug for ParseBlockNumberError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ParseBlockNumberError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ParseBlockNumberError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<HexStringMissingPrefixError> for ParseBlockNumberError

source§

fn from(source: HexStringMissingPrefixError) -> Self

Converts to this type from the input type.
source§

impl From<ParseError> for ParseBlockNumberError

source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
source§

impl From<ParseIntError> for ParseBlockNumberError

source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • ParseIntErr: 9 bytes
  • ParseErr: 24 bytes
  • MissingPrefix: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/index.html b/alloy_rpc_types/eth/block/index.html new file mode 100644 index 000000000000..cbadfc50ab09 --- /dev/null +++ b/alloy_rpc_types/eth/block/index.html @@ -0,0 +1,11 @@ +alloy_rpc_types::eth::block - Rust +

Module alloy_rpc_types::eth::block

source ·
Expand description

Block RPC types.

+

Structs

Enums

Constants

Type Aliases

  • Block number and hash of the forked block.
  • A Block representation that allows to include additional fields
  • Header representation with additional info.
\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/sidebar-items.js b/alloy_rpc_types/eth/block/sidebar-items.js new file mode 100644 index 000000000000..e0e2c5b248cf --- /dev/null +++ b/alloy_rpc_types/eth/block/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["_IMPL_ARBITRARY_FOR_BlockHashOrNumber"],"enum":["BlockError","BlockHashOrNumber","BlockId","BlockNumberOrTag","BlockTransactionHashesInner","BlockTransactionHashesInnerMut","BlockTransactions","BlockTransactionsKind","ParseBlockNumberError"],"struct":["Block","BlockNumHash","BlockOverrides","BlockTransactionHashes","BlockTransactionHashesMut","Header","HexStringMissingPrefixError","ParseBlockHashOrNumberError","Rich","RpcBlockHash"],"type":["ForkBlock","RichBlock","RichHeader"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.Block.html b/alloy_rpc_types/eth/block/struct.Block.html new file mode 100644 index 000000000000..4240b13530a4 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.Block.html @@ -0,0 +1,42 @@ +Block in alloy_rpc_types::eth::block - Rust +
pub struct Block {
+    pub header: Header,
+    pub total_difficulty: Option<U256>,
+    pub uncles: Vec<B256>,
+    pub transactions: BlockTransactions,
+    pub size: Option<U256>,
+    pub withdrawals: Option<Vec<Withdrawal>>,
+    pub other: OtherFields,
+}
Expand description

Block representation

+

Fields§

§header: Header

Header of the block.

+
§total_difficulty: Option<U256>

Total difficulty, this field is None only if representing +an Uncle block.

+
§uncles: Vec<B256>

Uncles’ hashes.

+
§transactions: BlockTransactions

Transactions.

+
§size: Option<U256>

Integer the size of this block in bytes.

+
§withdrawals: Option<Vec<Withdrawal>>

Withdrawals in the block.

+
§other: OtherFields

Support for arbitrary additional fields.

+

Implementations§

source§

impl Block

source

pub fn into_full_block(self, txs: Vec<Transaction>) -> Self

Converts a block with Tx hashes into a full block.

+

Trait Implementations§

source§

impl Clone for Block

source§

fn clone(&self) -> Block

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Block

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Block

source§

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<Block> for RichBlock

source§

fn from(block: Block) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Block

source§

fn eq(&self, other: &Block) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Block

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Block

source§

impl StructuralEq for Block

source§

impl StructuralPartialEq for Block

Auto Trait Implementations§

§

impl RefUnwindSafe for Block

§

impl Send for Block

§

impl Sync for Block

§

impl Unpin for Block

§

impl UnwindSafe for Block

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1040 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.BlockNumHash.html b/alloy_rpc_types/eth/block/struct.BlockNumHash.html new file mode 100644 index 000000000000..a5ccbcbadad8 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.BlockNumHash.html @@ -0,0 +1,32 @@ +BlockNumHash in alloy_rpc_types::eth::block - Rust +
pub struct BlockNumHash {
+    pub number: BlockNumber,
+    pub hash: BlockHash,
+}
Expand description

Block number and hash.

+

Fields§

§number: BlockNumber

Block number

+
§hash: BlockHash

Block hash

+

Implementations§

source§

impl BlockNumHash

source

pub fn new(number: BlockNumber, hash: BlockHash) -> Self

Creates a new BlockNumHash from a block number and hash.

+
source

pub fn into_components(self) -> (BlockNumber, BlockHash)

Consumes Self and returns [BlockNumber], [BlockHash]

+
source

pub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool

Returns whether or not the block matches the given BlockHashOrNumber.

+

Trait Implementations§

source§

impl Clone for BlockNumHash

source§

fn clone(&self) -> BlockNumHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockNumHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockNumHash

source§

fn default() -> BlockNumHash

Returns the “default value” for a type. Read more
source§

impl From<(FixedBytes<32>, u64)> for BlockNumHash

source§

fn from(val: (BlockHash, BlockNumber)) -> Self

Converts to this type from the input type.
source§

impl From<(u64, FixedBytes<32>)> for BlockNumHash

source§

fn from(val: (BlockNumber, BlockHash)) -> Self

Converts to this type from the input type.
source§

impl Hash for BlockNumHash

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for BlockNumHash

source§

fn eq(&self, other: &BlockNumHash) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for BlockNumHash

source§

impl Eq for BlockNumHash

source§

impl StructuralEq for BlockNumHash

source§

impl StructuralPartialEq for BlockNumHash

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.BlockOverrides.html b/alloy_rpc_types/eth/block/struct.BlockOverrides.html new file mode 100644 index 000000000000..e8267cee6ab3 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.BlockOverrides.html @@ -0,0 +1,46 @@ +BlockOverrides in alloy_rpc_types::eth::block - Rust +
pub struct BlockOverrides {
+    pub number: Option<U256>,
+    pub difficulty: Option<U256>,
+    pub time: Option<U64>,
+    pub gas_limit: Option<U64>,
+    pub coinbase: Option<Address>,
+    pub random: Option<B256>,
+    pub base_fee: Option<U256>,
+    pub block_hash: Option<BTreeMap<u64, B256>>,
+}
Expand description

BlockOverrides is a set of header fields to override.

+

Fields§

§number: Option<U256>

Overrides the block number.

+

For eth_callMany this will be the block number of the first simulated block. Each +following block increments its block number by 1

+
§difficulty: Option<U256>

Overrides the difficulty of the block.

+
§time: Option<U64>

Overrides the timestamp of the block.

+
§gas_limit: Option<U64>

Overrides the gas limit of the block.

+
§coinbase: Option<Address>

Overrides the coinbase address of the block.

+
§random: Option<B256>

Overrides the prevrandao of the block.

+
§base_fee: Option<U256>

Overrides the basefee of the block.

+
§block_hash: Option<BTreeMap<u64, B256>>

A dictionary that maps blockNumber to a user-defined hash. It could be queried from the +solidity opcode BLOCKHASH.

+

Trait Implementations§

source§

impl Clone for BlockOverrides

source§

fn clone(&self) -> BlockOverrides

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockOverrides

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockOverrides

source§

fn default() -> BlockOverrides

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockOverrides

source§

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 PartialEq for BlockOverrides

source§

fn eq(&self, other: &BlockOverrides) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockOverrides

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlockOverrides

source§

impl StructuralEq for BlockOverrides

source§

impl StructuralPartialEq for BlockOverrides

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 240 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.BlockTransactionHashes.html b/alloy_rpc_types/eth/block/struct.BlockTransactionHashes.html new file mode 100644 index 000000000000..4ed37c2db844 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.BlockTransactionHashes.html @@ -0,0 +1,623 @@ +BlockTransactionHashes in alloy_rpc_types::eth::block - Rust +
pub struct BlockTransactionHashes<'a>(BlockTransactionHashesInner<'a>);
Expand description

An iterator over the transaction hashes of a block.

+

See BlockTransactions::hashes.

+

Tuple Fields§

§0: BlockTransactionHashesInner<'a>

Implementations§

Trait Implementations§

source§

impl<'a> Clone for BlockTransactionHashes<'a>

source§

fn clone(&self) -> BlockTransactionHashes<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for BlockTransactionHashes<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DoubleEndedIterator for BlockTransactionHashes<'_>

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.37.0 · source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
1.27.0 · source§

fn rfold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
1.27.0 · source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

impl ExactSizeIterator for BlockTransactionHashes<'_>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<'a> Iterator for BlockTransactionHashes<'a>

§

type Item = &'a FixedBytes<32>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>, + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where + Self: Sized, + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where + T: 'a, + Self: Sized + DoubleEndedIterator<Item = &'a mut T>, + P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, +such that all those that return true precede all those that return false. +Returns the number of true elements found. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(Self::Item) -> bool, + Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its +index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn rev(self) -> Rev<Self>
where + Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
1.0.0 · source§

fn cycle(self) -> Cycle<Self>
where + Self: Sized + Clone,

Repeats an iterator endlessly. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<'a> FusedIterator for BlockTransactionHashes<'a>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<I> IteratorRandom for I
where + I: Iterator,

source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where + R: Rng + ?Sized,

Collects values at random from the iterator into a supplied buffer +until that buffer is filled. Read more
source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where + R: Rng + ?Sized,

Available on crate feature alloc only.
Collects amount values at random from the iterator into a vector. Read more
source§

impl<T> Itertools for T
where + T: Iterator + ?Sized,

source§

fn interleave<J>( + self, + other: J +) -> Interleave<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until both have run out. Read more
source§

fn interleave_shortest<J>( + self, + other: J +) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until at least one of them has run +out. Read more
source§

fn intersperse( + self, + element: Self::Item +) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
where + Self: Sized, + Self::Item: Clone,

An iterator adaptor to insert a particular value +between each element of the adapted iterator. Read more
source§

fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
where + Self: Sized, + F: FnMut() -> Self::Item,

An iterator adaptor to insert a particular value created by a function +between each element of the adapted iterator. Read more
source§

fn zip_longest<J>( + self, + other: J +) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of two optional elements. Read more
source§

fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of elements. Read more
source§

fn batching<B, F>(self, f: F) -> Batching<Self, F>
where + F: FnMut(&mut Self) -> Option<B>, + Self: Sized,

A “meta iterator adaptor”. Its closure receives a reference to the +iterator and may pick off as many elements as it likes, to produce the +next iterator element. Read more
source§

fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> K, + K: PartialEq,

Available on crate feature use_alloc only.
Return an iterable that can group iterator elements. +Consecutive elements that map to the same key (“runs”), are assigned +to the same group. Read more
source§

fn chunks(self, size: usize) -> IntoChunks<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
Return an iterable that can chunk the iterator. Read more
source§

fn tuple_windows<T>(self) -> TupleWindows<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple, + <T as TupleCollect>::Item: Clone,

Return an iterator over all contiguous windows producing tuples of +a specific size (up to 12). Read more
source§

fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>
where + Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator, + T: TupleCollect + Clone, + <T as TupleCollect>::Item: Clone,

Return an iterator over all windows, wrapping back to the first +elements when the window would otherwise exceed the length of the +iterator, producing tuples of a specific size (up to 12). Read more
source§

fn tuples<T>(self) -> Tuples<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Return an iterator that groups the items in tuples of a specific size +(up to 12). Read more
source§

fn tee(self) -> (Tee<Self>, Tee<Self>)
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Split into an iterator pair that both yield all elements from +the original iterator. Read more
source§

fn step(self, n: usize) -> Step<Self>
where + Self: Sized,

👎Deprecated since 0.8.0: Use std .step_by() instead
Return an iterator adaptor that steps n elements in the base iterator +for each iteration. Read more
source§

fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
where + Self: Sized, + Self::Item: Into<R>,

Convert each item of the iterator using the Into trait. Read more
source§

fn map_results<F, T, U, E>( + self, + f: F +) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

👎Deprecated since 0.10.0: Use .map_ok() instead
source§

fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

Return an iterator adaptor that applies the provided closure +to every Result::Ok value. Result::Err values are +unchanged. Read more
source§

fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(&T) -> bool,

Return an iterator adaptor that filters every Result::Ok +value with the provided closure. Result::Err values are +unchanged. Read more
source§

fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> Option<U>,

Return an iterator adaptor that filters and transforms every +Result::Ok value with the provided closure. Result::Err +values are unchanged. Read more
source§

fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + T: IntoIterator,

Return an iterator adaptor that flattens every Result::Ok value into +a series of Result::Ok values. Result::Err values are unchanged. Read more
source§

fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnOnce(ProcessResults<'_, Self, E>) -> R,

“Lift” a function of the values of the current iterator so as to process +an iterator of Result values instead. Read more
source§

fn merge<J>( + self, + other: J +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
where + Self: Sized, + Self::Item: PartialOrd, + J: IntoIterator<Item = Self::Item>,

Return an iterator adaptor that merges the two base iterators in +ascending order. If both base iterators are sorted (ascending), the +result is sorted. Read more
source§

fn merge_by<J, F>( + self, + other: J, + is_first: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
where + Self: Sized, + J: IntoIterator<Item = Self::Item>, + F: FnMut(&Self::Item, &Self::Item) -> bool,

Return an iterator adaptor that merges the two base iterators in order. +This is much like .merge() but allows for a custom ordering. Read more
source§

fn merge_join_by<J, F, T>( + self, + other: J, + cmp_fn: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>>
where + J: IntoIterator, + F: FnMut(&Self::Item, &<J as IntoIterator>::Item) -> T, + Self: Sized,

Create an iterator that merges items from both this and the specified +iterator in ascending order. Read more
source§

fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::Item: PartialOrd,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them in ascending order. Read more
source§

fn kmerge_by<F>( + self, + first: F +) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>
where + Self: Sized, + Self::Item: IntoIterator, + F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them according to the given closure. Read more
source§

fn cartesian_product<J>( + self, + other: J +) -> Product<Self, <J as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: Clone, + J: IntoIterator, + <J as IntoIterator>::IntoIter: Clone,

Return an iterator adaptor that iterates over the cartesian product of +the element sets of two iterators self and J. Read more
source§

fn multi_cartesian_product( + self +) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::IntoIter: Clone, + <Self::Item as IntoIterator>::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the cartesian product of +all subiterators returned by meta-iterator self. Read more
source§

fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Result<Self::Item, (Self::Item, Self::Item)>,

Return an iterator adaptor that uses the passed-in closure to +optionally merge together consecutive elements. Read more
source§

fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, Self::Item>
where + Self: Sized, + Self::Item: PartialEq,

Remove duplicates from sections of consecutive identical elements. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, Self::Item>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, +determining equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_with_count( + self +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, (usize, Self::Item)>
where + Self: Sized,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by_with_count<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, (usize, Self::Item)>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +This will determine equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn unique(self) -> Unique<Self>
where + Self: Sized, + Self::Item: Clone + Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Duplicates +are detected using hash and equality. Read more
source§

fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Read more
source§

fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
where + Self: Sized + PeekingNext, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from this iterator and +takes items while the closure accept returns true. Read more
source§

fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
where + Self: Clone, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from a Clone-able iterator +to only pick off elements while the predicate accept returns true. Read more
source§

fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> bool,

Returns an iterator adaptor that consumes elements while the given +predicate is true, including the element for which the predicate +first returned false. Read more
source§

fn while_some<A>(self) -> WhileSome<Self>
where + Self: Sized + Iterator<Item = Option<A>>,

Return an iterator adaptor that filters Option<A> iterator elements +and produces A. Stops on the first None encountered. Read more
source§

fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
where + Self: Sized + Clone, + Self::Item: Clone, + T: HasCombination<Self>,

Return an iterator adaptor that iterates over the combinations of the +elements from an iterator. Read more
source§

fn combinations(self, k: usize) -> Combinations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the k-length combinations of +the elements from an iterator. Read more
source§

fn combinations_with_replacement( + self, + k: usize +) -> CombinationsWithReplacement<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates over the k-length combinations of +the elements from an iterator, with replacement. Read more
source§

fn permutations(self, k: usize) -> Permutations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over all k-permutations of the +elements from an iterator. Read more
source§

fn powerset(self) -> Powerset<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates through the powerset of the elements from an +iterator. Read more
source§

fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
where + Self: Sized, + F: FnMut(usize) -> Self::Item,

Return an iterator adaptor that pads the sequence to a minimum length of +min by filling missing elements using a closure f. Read more
source§

fn with_position(self) -> WithPosition<Self>
where + Self: Sized,

Return an iterator adaptor that combines each element with a Position to +ease special-case handling of the first or last elements. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Return an iterator adaptor that yields the indices of all elements +satisfying a predicate, counted from the start of the iterator. Read more
source§

fn update<F>(self, updater: F) -> Update<Self, F>
where + Self: Sized, + F: FnMut(&mut Self::Item),

Return an iterator adaptor that applies a mutating function +to each element before yielding it. Read more
source§

fn next_tuple<T>(&mut self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Advances the iterator and returns the next items grouped in a tuple of +a specific size (up to 12). Read more
source§

fn collect_tuple<T>(self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Collects all items from the iterator into a tuple of a specific size +(up to 12). Read more
source§

fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
where + P: FnMut(&Self::Item) -> bool,

Find the position and value of the first element satisfying a predicate. Read more
source§

fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the last element, if any. Read more
source§

fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the first element, if any. Read more
source§

fn contains<Q>(&mut self, query: &Q) -> bool
where + Self: Sized, + Self::Item: Borrow<Q>, + Q: PartialEq,

Returns true if the given item is present in this iterator. Read more
source§

fn all_equal(&mut self) -> bool
where + Self: Sized, + Self::Item: PartialEq,

Check whether all elements compare equal. Read more
source§

fn all_equal_value( + &mut self +) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
where + Self: Sized, + Self::Item: PartialEq,

If there are elements and they are all equal, return a single copy of that element. +If there are no elements, return an Error containing None. +If there are elements and they are not all equal, return a tuple containing the first +two non-equal elements found. Read more
source§

fn all_unique(&mut self) -> bool
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Check whether all elements are unique (non equal). Read more
source§

fn dropping(self, n: usize) -> Self
where + Self: Sized,

Consume the first n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn dropping_back(self, n: usize) -> Self
where + Self: Sized + DoubleEndedIterator,

Consume the last n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn foreach<F>(self, f: F)
where + F: FnMut(Self::Item), + Self: Sized,

👎Deprecated since 0.8.0: Use .for_each() instead
Run the closure f eagerly on each element of the iterator. Read more
source§

fn concat(self) -> Self::Item
where + Self: Sized, + Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Combine all an iterator’s elements into one element by using Extend. Read more
source§

fn collect_vec(self) -> Vec<Self::Item>
where + Self: Sized,

Available on crate feature use_alloc only.
.collect_vec() is simply a type specialization of Iterator::collect, +for convenience.
source§

fn try_collect<T, U, E>(self) -> Result<U, E>
where + Self: Sized + Iterator<Item = Result<T, E>>, + Result<U, E>: FromIterator<Result<T, E>>,

.try_collect() is more convenient way of writing +.collect::<Result<_, _>>() Read more
source§

fn set_from<'a, A, J>(&mut self, from: J) -> usize
where + A: 'a, + Self: Iterator<Item = &'a mut A>, + J: IntoIterator<Item = A>,

Assign to each reference in self from the from iterator, +stopping at the shortest of the two iterators. Read more
source§

fn join(&mut self, sep: &str) -> String
where + Self::Item: Display,

Available on crate feature use_alloc only.
Combine all iterator elements into one String, separated by sep. Read more
source§

fn format(self, sep: &str) -> Format<'_, Self>
where + Self: Sized,

Format all iterator elements, separated by sep. Read more
source§

fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
where + Self: Sized, + F: FnMut(Self::Item, &mut dyn FnMut(&dyn Display) -> Result<(), Error>) -> Result<(), Error>,

Format all iterator elements, separated by sep. Read more
source§

fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

👎Deprecated since 0.10.0: Use .fold_ok() instead
source§

fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

Fold Result values from an iterator. Read more
source§

fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
where + Self: Iterator<Item = Option<A>>, + F: FnMut(B, A) -> B,

Fold Option values from an iterator. Read more
source§

fn fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

👎Deprecated since 0.10.2: Use Iterator::reduce instead
Accumulator of the elements in the iterator. Read more
source§

fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

Accumulate the elements in the iterator in a tree-like manner. Read more
source§

fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
where + Self: Sized, + F: FnMut(B, Self::Item) -> FoldWhile<B>,

An iterator method that applies a function, producing a single, final value. Read more
source§

fn sum1<S>(self) -> Option<S>
where + Self: Sized, + S: Sum<Self::Item>,

Iterate over the entire iterator and add all the elements. Read more
source§

fn product1<P>(self) -> Option<P>
where + Self: Sized, + P: Product<Self::Item>,

Iterate over the entire iterator and multiply all the elements. Read more
source§

fn sorted_unstable(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. The key function is +called exactly once per key. Read more
source§

fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort the k smallest elements into a new iterator, in ascending order. Read more
source§

fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
where + Self: Sized, + F: FnMut(Self::Item) -> Either<L, R>, + A: Default + Extend<L>, + B: Default + Extend<R>,

Collect all iterator elements into one of two +partitions. Unlike Iterator::partition, each partition may +have a distinct type. Read more
source§

fn partition_result<A, B, T, E>(self) -> (A, B)
where + Self: Iterator<Item = Result<T, E>> + Sized, + A: Default + Extend<T>, + B: Default + Extend<E>,

Partition a sequence of Results into one list of all the Ok elements +and another list of all the Err elements. Read more
source§

fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Return a HashMap of keys mapped to Vecs of values. Keys and values +are taken from (Key, Value) tuple pairs yielded by the input iterator. Read more
source§

fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: Fn(&V) -> K,

Available on crate feature use_std only.
Return an Iterator on a HashMap. Keys mapped to Vecs of values. The key is specified +in the closure. Read more
source§

fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn into_grouping_map_by<K, V, F>( + self, + key_mapper: F +) -> GroupingMap<MapForGrouping<Self, F>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: FnMut(&V) -> K,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn min_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator. Read more
source§

fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator. Read more
source§

fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn minmax(self) -> MinMaxResult<Self::Item>
where + Self: Sized, + Self::Item: PartialOrd,

Return the minimum and maximum elements in the iterator. Read more
source§

fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the minimum and maximum element of an iterator, as determined by +the specified function. Read more
source§

fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the minimum and maximum element of an iterator, as determined by +the specified comparison function. Read more
source§

fn position_max(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the maximum element in the iterator. Read more
source§

fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the maximum element in the iterator, as +determined by the specified function. Read more
source§

fn position_max_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the maximum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_min(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the minimum element in the iterator. Read more
source§

fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the minimum element in the iterator, as +determined by the specified function. Read more
source§

fn position_min_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the minimum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_minmax(self) -> MinMaxResult<usize>
where + Self: Sized, + Self::Item: PartialOrd,

Return the positions of the minimum and maximum elements in +the iterator. Read more
source§

fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified function. Read more
source§

fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified comparison function. Read more
source§

fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields exactly one element, that element will be returned, otherwise +an error will be returned containing an iterator that has the same output as the input +iterator. Read more
source§

fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields no elements, Ok(None) will be returned. If the iterator yields +exactly one element, that element will be returned, otherwise an error will be returned +containing an iterator that has the same output as the input iterator. Read more
source§

fn multipeek(self) -> MultiPeek<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
An iterator adaptor that allows the user to peek at multiple .next() +values without advancing the base iterator. Read more
source§

fn counts(self) -> HashMap<Self::Item, usize>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears. Read more
source§

fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
where + Self: Sized, + K: Eq + Hash, + F: FnMut(Self::Item) -> K,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears, +determining identity using a keying function. Read more
source§

fn multiunzip<FromI>(self) -> FromI
where + Self: Sized + MultiUnzip<FromI>,

Converts an iterator of tuples into a tuple of containers. Read more
source§

fn try_len(&self) -> Result<usize, (usize, Option<usize>)>

Returns the length of the iterator if one exists. +Otherwise return self.size_hint(). Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.BlockTransactionHashesMut.html b/alloy_rpc_types/eth/block/struct.BlockTransactionHashesMut.html new file mode 100644 index 000000000000..559910775155 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.BlockTransactionHashesMut.html @@ -0,0 +1,621 @@ +BlockTransactionHashesMut in alloy_rpc_types::eth::block - Rust +
pub struct BlockTransactionHashesMut<'a>(BlockTransactionHashesInnerMut<'a>);
Expand description

An Iterator over the transaction hashes of a block.

+

See BlockTransactions::hashes_mut.

+

Tuple Fields§

§0: BlockTransactionHashesInnerMut<'a>

Implementations§

Trait Implementations§

source§

impl<'a> Debug for BlockTransactionHashesMut<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DoubleEndedIterator for BlockTransactionHashesMut<'_>

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.37.0 · source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
1.27.0 · source§

fn rfold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
1.27.0 · source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

impl ExactSizeIterator for BlockTransactionHashesMut<'_>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<'a> Iterator for BlockTransactionHashesMut<'a>

§

type Item = &'a mut FixedBytes<32>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>, + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where + Self: Sized, + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where + T: 'a, + Self: Sized + DoubleEndedIterator<Item = &'a mut T>, + P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, +such that all those that return true precede all those that return false. +Returns the number of true elements found. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(Self::Item) -> bool, + Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its +index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn rev(self) -> Rev<Self>
where + Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<'a> FusedIterator for BlockTransactionHashesMut<'a>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<I> IteratorRandom for I
where + I: Iterator,

source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where + R: Rng + ?Sized,

Collects values at random from the iterator into a supplied buffer +until that buffer is filled. Read more
source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where + R: Rng + ?Sized,

Available on crate feature alloc only.
Collects amount values at random from the iterator into a vector. Read more
source§

impl<T> Itertools for T
where + T: Iterator + ?Sized,

source§

fn interleave<J>( + self, + other: J +) -> Interleave<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until both have run out. Read more
source§

fn interleave_shortest<J>( + self, + other: J +) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until at least one of them has run +out. Read more
source§

fn intersperse( + self, + element: Self::Item +) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
where + Self: Sized, + Self::Item: Clone,

An iterator adaptor to insert a particular value +between each element of the adapted iterator. Read more
source§

fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
where + Self: Sized, + F: FnMut() -> Self::Item,

An iterator adaptor to insert a particular value created by a function +between each element of the adapted iterator. Read more
source§

fn zip_longest<J>( + self, + other: J +) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of two optional elements. Read more
source§

fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of elements. Read more
source§

fn batching<B, F>(self, f: F) -> Batching<Self, F>
where + F: FnMut(&mut Self) -> Option<B>, + Self: Sized,

A “meta iterator adaptor”. Its closure receives a reference to the +iterator and may pick off as many elements as it likes, to produce the +next iterator element. Read more
source§

fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> K, + K: PartialEq,

Available on crate feature use_alloc only.
Return an iterable that can group iterator elements. +Consecutive elements that map to the same key (“runs”), are assigned +to the same group. Read more
source§

fn chunks(self, size: usize) -> IntoChunks<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
Return an iterable that can chunk the iterator. Read more
source§

fn tuple_windows<T>(self) -> TupleWindows<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple, + <T as TupleCollect>::Item: Clone,

Return an iterator over all contiguous windows producing tuples of +a specific size (up to 12). Read more
source§

fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>
where + Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator, + T: TupleCollect + Clone, + <T as TupleCollect>::Item: Clone,

Return an iterator over all windows, wrapping back to the first +elements when the window would otherwise exceed the length of the +iterator, producing tuples of a specific size (up to 12). Read more
source§

fn tuples<T>(self) -> Tuples<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Return an iterator that groups the items in tuples of a specific size +(up to 12). Read more
source§

fn tee(self) -> (Tee<Self>, Tee<Self>)
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Split into an iterator pair that both yield all elements from +the original iterator. Read more
source§

fn step(self, n: usize) -> Step<Self>
where + Self: Sized,

👎Deprecated since 0.8.0: Use std .step_by() instead
Return an iterator adaptor that steps n elements in the base iterator +for each iteration. Read more
source§

fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
where + Self: Sized, + Self::Item: Into<R>,

Convert each item of the iterator using the Into trait. Read more
source§

fn map_results<F, T, U, E>( + self, + f: F +) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

👎Deprecated since 0.10.0: Use .map_ok() instead
source§

fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

Return an iterator adaptor that applies the provided closure +to every Result::Ok value. Result::Err values are +unchanged. Read more
source§

fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(&T) -> bool,

Return an iterator adaptor that filters every Result::Ok +value with the provided closure. Result::Err values are +unchanged. Read more
source§

fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> Option<U>,

Return an iterator adaptor that filters and transforms every +Result::Ok value with the provided closure. Result::Err +values are unchanged. Read more
source§

fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + T: IntoIterator,

Return an iterator adaptor that flattens every Result::Ok value into +a series of Result::Ok values. Result::Err values are unchanged. Read more
source§

fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnOnce(ProcessResults<'_, Self, E>) -> R,

“Lift” a function of the values of the current iterator so as to process +an iterator of Result values instead. Read more
source§

fn merge<J>( + self, + other: J +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
where + Self: Sized, + Self::Item: PartialOrd, + J: IntoIterator<Item = Self::Item>,

Return an iterator adaptor that merges the two base iterators in +ascending order. If both base iterators are sorted (ascending), the +result is sorted. Read more
source§

fn merge_by<J, F>( + self, + other: J, + is_first: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
where + Self: Sized, + J: IntoIterator<Item = Self::Item>, + F: FnMut(&Self::Item, &Self::Item) -> bool,

Return an iterator adaptor that merges the two base iterators in order. +This is much like .merge() but allows for a custom ordering. Read more
source§

fn merge_join_by<J, F, T>( + self, + other: J, + cmp_fn: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>>
where + J: IntoIterator, + F: FnMut(&Self::Item, &<J as IntoIterator>::Item) -> T, + Self: Sized,

Create an iterator that merges items from both this and the specified +iterator in ascending order. Read more
source§

fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::Item: PartialOrd,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them in ascending order. Read more
source§

fn kmerge_by<F>( + self, + first: F +) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>
where + Self: Sized, + Self::Item: IntoIterator, + F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them according to the given closure. Read more
source§

fn cartesian_product<J>( + self, + other: J +) -> Product<Self, <J as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: Clone, + J: IntoIterator, + <J as IntoIterator>::IntoIter: Clone,

Return an iterator adaptor that iterates over the cartesian product of +the element sets of two iterators self and J. Read more
source§

fn multi_cartesian_product( + self +) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::IntoIter: Clone, + <Self::Item as IntoIterator>::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the cartesian product of +all subiterators returned by meta-iterator self. Read more
source§

fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Result<Self::Item, (Self::Item, Self::Item)>,

Return an iterator adaptor that uses the passed-in closure to +optionally merge together consecutive elements. Read more
source§

fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, Self::Item>
where + Self: Sized, + Self::Item: PartialEq,

Remove duplicates from sections of consecutive identical elements. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, Self::Item>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, +determining equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_with_count( + self +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, (usize, Self::Item)>
where + Self: Sized,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by_with_count<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, (usize, Self::Item)>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +This will determine equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn unique(self) -> Unique<Self>
where + Self: Sized, + Self::Item: Clone + Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Duplicates +are detected using hash and equality. Read more
source§

fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Read more
source§

fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
where + Self: Sized + PeekingNext, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from this iterator and +takes items while the closure accept returns true. Read more
source§

fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
where + Self: Clone, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from a Clone-able iterator +to only pick off elements while the predicate accept returns true. Read more
source§

fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> bool,

Returns an iterator adaptor that consumes elements while the given +predicate is true, including the element for which the predicate +first returned false. Read more
source§

fn while_some<A>(self) -> WhileSome<Self>
where + Self: Sized + Iterator<Item = Option<A>>,

Return an iterator adaptor that filters Option<A> iterator elements +and produces A. Stops on the first None encountered. Read more
source§

fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
where + Self: Sized + Clone, + Self::Item: Clone, + T: HasCombination<Self>,

Return an iterator adaptor that iterates over the combinations of the +elements from an iterator. Read more
source§

fn combinations(self, k: usize) -> Combinations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the k-length combinations of +the elements from an iterator. Read more
source§

fn combinations_with_replacement( + self, + k: usize +) -> CombinationsWithReplacement<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates over the k-length combinations of +the elements from an iterator, with replacement. Read more
source§

fn permutations(self, k: usize) -> Permutations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over all k-permutations of the +elements from an iterator. Read more
source§

fn powerset(self) -> Powerset<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates through the powerset of the elements from an +iterator. Read more
source§

fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
where + Self: Sized, + F: FnMut(usize) -> Self::Item,

Return an iterator adaptor that pads the sequence to a minimum length of +min by filling missing elements using a closure f. Read more
source§

fn with_position(self) -> WithPosition<Self>
where + Self: Sized,

Return an iterator adaptor that combines each element with a Position to +ease special-case handling of the first or last elements. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Return an iterator adaptor that yields the indices of all elements +satisfying a predicate, counted from the start of the iterator. Read more
source§

fn update<F>(self, updater: F) -> Update<Self, F>
where + Self: Sized, + F: FnMut(&mut Self::Item),

Return an iterator adaptor that applies a mutating function +to each element before yielding it. Read more
source§

fn next_tuple<T>(&mut self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Advances the iterator and returns the next items grouped in a tuple of +a specific size (up to 12). Read more
source§

fn collect_tuple<T>(self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Collects all items from the iterator into a tuple of a specific size +(up to 12). Read more
source§

fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
where + P: FnMut(&Self::Item) -> bool,

Find the position and value of the first element satisfying a predicate. Read more
source§

fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the last element, if any. Read more
source§

fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the first element, if any. Read more
source§

fn contains<Q>(&mut self, query: &Q) -> bool
where + Self: Sized, + Self::Item: Borrow<Q>, + Q: PartialEq,

Returns true if the given item is present in this iterator. Read more
source§

fn all_equal(&mut self) -> bool
where + Self: Sized, + Self::Item: PartialEq,

Check whether all elements compare equal. Read more
source§

fn all_equal_value( + &mut self +) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
where + Self: Sized, + Self::Item: PartialEq,

If there are elements and they are all equal, return a single copy of that element. +If there are no elements, return an Error containing None. +If there are elements and they are not all equal, return a tuple containing the first +two non-equal elements found. Read more
source§

fn all_unique(&mut self) -> bool
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Check whether all elements are unique (non equal). Read more
source§

fn dropping(self, n: usize) -> Self
where + Self: Sized,

Consume the first n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn dropping_back(self, n: usize) -> Self
where + Self: Sized + DoubleEndedIterator,

Consume the last n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn foreach<F>(self, f: F)
where + F: FnMut(Self::Item), + Self: Sized,

👎Deprecated since 0.8.0: Use .for_each() instead
Run the closure f eagerly on each element of the iterator. Read more
source§

fn concat(self) -> Self::Item
where + Self: Sized, + Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Combine all an iterator’s elements into one element by using Extend. Read more
source§

fn collect_vec(self) -> Vec<Self::Item>
where + Self: Sized,

Available on crate feature use_alloc only.
.collect_vec() is simply a type specialization of Iterator::collect, +for convenience.
source§

fn try_collect<T, U, E>(self) -> Result<U, E>
where + Self: Sized + Iterator<Item = Result<T, E>>, + Result<U, E>: FromIterator<Result<T, E>>,

.try_collect() is more convenient way of writing +.collect::<Result<_, _>>() Read more
source§

fn set_from<'a, A, J>(&mut self, from: J) -> usize
where + A: 'a, + Self: Iterator<Item = &'a mut A>, + J: IntoIterator<Item = A>,

Assign to each reference in self from the from iterator, +stopping at the shortest of the two iterators. Read more
source§

fn join(&mut self, sep: &str) -> String
where + Self::Item: Display,

Available on crate feature use_alloc only.
Combine all iterator elements into one String, separated by sep. Read more
source§

fn format(self, sep: &str) -> Format<'_, Self>
where + Self: Sized,

Format all iterator elements, separated by sep. Read more
source§

fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
where + Self: Sized, + F: FnMut(Self::Item, &mut dyn FnMut(&dyn Display) -> Result<(), Error>) -> Result<(), Error>,

Format all iterator elements, separated by sep. Read more
source§

fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

👎Deprecated since 0.10.0: Use .fold_ok() instead
source§

fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

Fold Result values from an iterator. Read more
source§

fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
where + Self: Iterator<Item = Option<A>>, + F: FnMut(B, A) -> B,

Fold Option values from an iterator. Read more
source§

fn fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

👎Deprecated since 0.10.2: Use Iterator::reduce instead
Accumulator of the elements in the iterator. Read more
source§

fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

Accumulate the elements in the iterator in a tree-like manner. Read more
source§

fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
where + Self: Sized, + F: FnMut(B, Self::Item) -> FoldWhile<B>,

An iterator method that applies a function, producing a single, final value. Read more
source§

fn sum1<S>(self) -> Option<S>
where + Self: Sized, + S: Sum<Self::Item>,

Iterate over the entire iterator and add all the elements. Read more
source§

fn product1<P>(self) -> Option<P>
where + Self: Sized, + P: Product<Self::Item>,

Iterate over the entire iterator and multiply all the elements. Read more
source§

fn sorted_unstable(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. The key function is +called exactly once per key. Read more
source§

fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort the k smallest elements into a new iterator, in ascending order. Read more
source§

fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
where + Self: Sized, + F: FnMut(Self::Item) -> Either<L, R>, + A: Default + Extend<L>, + B: Default + Extend<R>,

Collect all iterator elements into one of two +partitions. Unlike Iterator::partition, each partition may +have a distinct type. Read more
source§

fn partition_result<A, B, T, E>(self) -> (A, B)
where + Self: Iterator<Item = Result<T, E>> + Sized, + A: Default + Extend<T>, + B: Default + Extend<E>,

Partition a sequence of Results into one list of all the Ok elements +and another list of all the Err elements. Read more
source§

fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Return a HashMap of keys mapped to Vecs of values. Keys and values +are taken from (Key, Value) tuple pairs yielded by the input iterator. Read more
source§

fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: Fn(&V) -> K,

Available on crate feature use_std only.
Return an Iterator on a HashMap. Keys mapped to Vecs of values. The key is specified +in the closure. Read more
source§

fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn into_grouping_map_by<K, V, F>( + self, + key_mapper: F +) -> GroupingMap<MapForGrouping<Self, F>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: FnMut(&V) -> K,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn min_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator. Read more
source§

fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator. Read more
source§

fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn minmax(self) -> MinMaxResult<Self::Item>
where + Self: Sized, + Self::Item: PartialOrd,

Return the minimum and maximum elements in the iterator. Read more
source§

fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the minimum and maximum element of an iterator, as determined by +the specified function. Read more
source§

fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the minimum and maximum element of an iterator, as determined by +the specified comparison function. Read more
source§

fn position_max(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the maximum element in the iterator. Read more
source§

fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the maximum element in the iterator, as +determined by the specified function. Read more
source§

fn position_max_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the maximum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_min(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the minimum element in the iterator. Read more
source§

fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the minimum element in the iterator, as +determined by the specified function. Read more
source§

fn position_min_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the minimum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_minmax(self) -> MinMaxResult<usize>
where + Self: Sized, + Self::Item: PartialOrd,

Return the positions of the minimum and maximum elements in +the iterator. Read more
source§

fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified function. Read more
source§

fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified comparison function. Read more
source§

fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields exactly one element, that element will be returned, otherwise +an error will be returned containing an iterator that has the same output as the input +iterator. Read more
source§

fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields no elements, Ok(None) will be returned. If the iterator yields +exactly one element, that element will be returned, otherwise an error will be returned +containing an iterator that has the same output as the input iterator. Read more
source§

fn multipeek(self) -> MultiPeek<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
An iterator adaptor that allows the user to peek at multiple .next() +values without advancing the base iterator. Read more
source§

fn counts(self) -> HashMap<Self::Item, usize>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears. Read more
source§

fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
where + Self: Sized, + K: Eq + Hash, + F: FnMut(Self::Item) -> K,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears, +determining identity using a keying function. Read more
source§

fn multiunzip<FromI>(self) -> FromI
where + Self: Sized + MultiUnzip<FromI>,

Converts an iterator of tuples into a tuple of containers. Read more
source§

fn try_len(&self) -> Result<usize, (usize, Option<usize>)>

Returns the length of the iterator if one exists. +Otherwise return self.size_hint(). Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.Header.html b/alloy_rpc_types/eth/block/struct.Header.html new file mode 100644 index 000000000000..65b09f83745a --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.Header.html @@ -0,0 +1,76 @@ +Header in alloy_rpc_types::eth::block - Rust +
pub struct Header {
Show 21 fields + pub hash: Option<B256>, + pub parent_hash: B256, + pub uncles_hash: B256, + pub miner: Address, + pub state_root: B256, + pub transactions_root: B256, + pub receipts_root: B256, + pub logs_bloom: Bloom, + pub difficulty: U256, + pub number: Option<U256>, + pub gas_limit: U256, + pub gas_used: U256, + pub timestamp: U256, + pub extra_data: Bytes, + pub mix_hash: Option<B256>, + pub nonce: Option<B64>, + pub base_fee_per_gas: Option<U256>, + pub withdrawals_root: Option<B256>, + pub blob_gas_used: Option<U64>, + pub excess_blob_gas: Option<U64>, + pub parent_beacon_block_root: Option<B256>, +
}
Expand description

Block header representation.

+

Fields§

§hash: Option<B256>

Hash of the block

+
§parent_hash: B256

Hash of the parent

+
§uncles_hash: B256

Hash of the uncles

+
§miner: Address

Alias of author

+
§state_root: B256

State root hash

+
§transactions_root: B256

Transactions root hash

+
§receipts_root: B256

Transactions receipts root hash

+
§logs_bloom: Bloom

Logs bloom

+
§difficulty: U256

Difficulty

+
§number: Option<U256>

Block number

+
§gas_limit: U256

Gas Limit

+
§gas_used: U256

Gas Used

+
§timestamp: U256

Timestamp

+
§extra_data: Bytes

Extra data

+
§mix_hash: Option<B256>

Mix Hash

+

Before the merge this proves, combined with the nonce, that a sufficient amount of +computation has been carried out on this block: the Proof-of-Work (PoF).

+

After the merge this is prevRandao: Randomness value for the generated payload.

+

This is an Option because it is not always set by non-ethereum networks.

+

See also https://eips.ethereum.org/EIPS/eip-4399 +And https://github.com/ethereum/execution-apis/issues/328

+
§nonce: Option<B64>

Nonce

+
§base_fee_per_gas: Option<U256>

Base fee per unit of gas (if past London)

+
§withdrawals_root: Option<B256>

Withdrawals root hash added by EIP-4895 and is ignored in legacy headers.

+
§blob_gas_used: Option<U64>

Blob gas used

+
§excess_blob_gas: Option<U64>

Excess blob gas

+
§parent_beacon_block_root: Option<B256>

Parent beacon block root

+

Trait Implementations§

source§

impl Clone for Header

source§

fn clone(&self) -> Header

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Header

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Header

source§

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<Header> for RichHeader

source§

fn from(header: Header) -> Self

Converts to this type from the input type.
source§

impl Hash for Header

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Header

source§

fn eq(&self, other: &Header) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Header

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Header

source§

impl StructuralEq for Header

source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 856 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.HexStringMissingPrefixError.html b/alloy_rpc_types/eth/block/struct.HexStringMissingPrefixError.html new file mode 100644 index 000000000000..05b51983fdd4 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.HexStringMissingPrefixError.html @@ -0,0 +1,21 @@ +HexStringMissingPrefixError in alloy_rpc_types::eth::block - Rust +
#[non_exhaustive]
pub struct HexStringMissingPrefixError;
Expand description

Thrown when a 0x-prefixed hex string was expected

+

Trait Implementations§

source§

impl Clone for HexStringMissingPrefixError

source§

fn clone(&self) -> HexStringMissingPrefixError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HexStringMissingPrefixError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for HexStringMissingPrefixError

source§

fn default() -> HexStringMissingPrefixError

Returns the “default value” for a type. Read more
source§

impl Display for HexStringMissingPrefixError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for HexStringMissingPrefixError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<HexStringMissingPrefixError> for ParseBlockNumberError

source§

fn from(source: HexStringMissingPrefixError) -> Self

Converts to this type from the input type.
source§

impl Copy for HexStringMissingPrefixError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.ParseBlockHashOrNumberError.html b/alloy_rpc_types/eth/block/struct.ParseBlockHashOrNumberError.html new file mode 100644 index 000000000000..3ec786132426 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.ParseBlockHashOrNumberError.html @@ -0,0 +1,24 @@ +ParseBlockHashOrNumberError in alloy_rpc_types::eth::block - Rust +
pub struct ParseBlockHashOrNumberError {
+    input: String,
+    parse_int_error: ParseIntError,
+    hex_error: FromHexError,
+}
Expand description

Error thrown when parsing a BlockHashOrNumber from a string.

+

Fields§

§input: String§parse_int_error: ParseIntError§hex_error: FromHexError

Trait Implementations§

source§

impl Debug for ParseBlockHashOrNumberError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ParseBlockHashOrNumberError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ParseBlockHashOrNumberError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.Rich.html b/alloy_rpc_types/eth/block/struct.Rich.html new file mode 100644 index 000000000000..38c845c833a1 --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.Rich.html @@ -0,0 +1,36 @@ +Rich in alloy_rpc_types::eth::block - Rust +

Struct alloy_rpc_types::eth::block::Rich

source ·
pub struct Rich<T> {
+    pub inner: T,
+    pub extra_info: BTreeMap<String, Value>,
+}
Expand description

Value representation with additional info

+

Fields§

§inner: T

Standard value.

+
§extra_info: BTreeMap<String, Value>

Additional fields that should be serialized into the Block object

+

Trait Implementations§

source§

impl<T: Clone> Clone for Rich<T>

source§

fn clone(&self) -> Rich<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Rich<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Deref for Rich<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'de, T> Deserialize<'de> for Rich<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for Rich<T>

source§

fn eq(&self, other: &Rich<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T: Serialize> Serialize for Rich<T>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for Rich<T>

source§

impl<T> StructuralEq for Rich<T>

source§

impl<T> StructuralPartialEq for Rich<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Rich<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Rich<T>
where + T: Send,

§

impl<T> Sync for Rich<T>
where + T: Sync,

§

impl<T> Unpin for Rich<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Rich<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/struct.RpcBlockHash.html b/alloy_rpc_types/eth/block/struct.RpcBlockHash.html new file mode 100644 index 000000000000..004f82f74e0b --- /dev/null +++ b/alloy_rpc_types/eth/block/struct.RpcBlockHash.html @@ -0,0 +1,38 @@ +RpcBlockHash in alloy_rpc_types::eth::block - Rust +
pub struct RpcBlockHash {
+    pub block_hash: B256,
+    pub require_canonical: Option<bool>,
+}
Expand description

A block hash which may have +a boolean requireCanonical field. +If false, an RPC call should raise if a block +matching the hash is not found. +If true, an RPC call should additionaly raise if +the block is not in the canonical chain. +https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md#specification

+

Fields§

§block_hash: B256

A block hash

+
§require_canonical: Option<bool>

Whether the block must be a canonical block

+

Implementations§

source§

impl RpcBlockHash

source

pub const fn from_hash( + block_hash: B256, + require_canonical: Option<bool> +) -> Self

Returns an RpcBlockHash from a [B256].

+

Trait Implementations§

source§

impl AsRef<FixedBytes<32>> for RpcBlockHash

source§

fn as_ref(&self) -> &B256

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for RpcBlockHash

source§

fn clone(&self) -> RpcBlockHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RpcBlockHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<FixedBytes<32>> for RpcBlockHash

source§

fn from(value: B256) -> Self

Converts to this type from the input type.
source§

impl From<RpcBlockHash> for B256

source§

fn from(value: RpcBlockHash) -> Self

Converts to this type from the input type.
source§

impl PartialEq for RpcBlockHash

source§

fn eq(&self, other: &RpcBlockHash) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RpcBlockHash

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for RpcBlockHash

source§

impl Eq for RpcBlockHash

source§

impl StructuralEq for RpcBlockHash

source§

impl StructuralPartialEq for RpcBlockHash

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 33 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/type.ForkBlock.html b/alloy_rpc_types/eth/block/type.ForkBlock.html new file mode 100644 index 000000000000..c00bf6756552 --- /dev/null +++ b/alloy_rpc_types/eth/block/type.ForkBlock.html @@ -0,0 +1,8 @@ +ForkBlock in alloy_rpc_types::eth::block - Rust +

Type Alias alloy_rpc_types::eth::block::ForkBlock

source ·
pub type ForkBlock = BlockNumHash;
Expand description

Block number and hash of the forked block.

+

Aliased Type§

struct ForkBlock {
+    pub number: u64,
+    pub hash: FixedBytes<32>,
+}

Fields§

§number: u64

Block number

+
§hash: FixedBytes<32>

Block hash

+

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/type.RichBlock.html b/alloy_rpc_types/eth/block/type.RichBlock.html new file mode 100644 index 000000000000..9c83b1872cb2 --- /dev/null +++ b/alloy_rpc_types/eth/block/type.RichBlock.html @@ -0,0 +1,8 @@ +RichBlock in alloy_rpc_types::eth::block - Rust +

Type Alias alloy_rpc_types::eth::block::RichBlock

source ·
pub type RichBlock = Rich<Block>;
Expand description

A Block representation that allows to include additional fields

+

Aliased Type§

struct RichBlock {
+    pub inner: Block,
+    pub extra_info: BTreeMap<String, Value>,
+}

Fields§

§inner: Block

Standard value.

+
§extra_info: BTreeMap<String, Value>

Additional fields that should be serialized into the Block object

+

Trait Implementations§

source§

impl From<Block> for RichBlock

source§

fn from(block: Block) -> Self

Converts to this type from the input type.

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: 1064 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/block/type.RichHeader.html b/alloy_rpc_types/eth/block/type.RichHeader.html new file mode 100644 index 000000000000..2e20b483a092 --- /dev/null +++ b/alloy_rpc_types/eth/block/type.RichHeader.html @@ -0,0 +1,8 @@ +RichHeader in alloy_rpc_types::eth::block - Rust +

Type Alias alloy_rpc_types::eth::block::RichHeader

source ·
pub type RichHeader = Rich<Header>;
Expand description

Header representation with additional info.

+

Aliased Type§

struct RichHeader {
+    pub inner: Header,
+    pub extra_info: BTreeMap<String, Value>,
+}

Fields§

§inner: Header

Standard value.

+
§extra_info: BTreeMap<String, Value>

Additional fields that should be serialized into the Block object

+

Trait Implementations§

source§

impl From<Header> for RichHeader

source§

fn from(header: Header) -> Self

Converts to this type from the input type.

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: 880 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/enum.TransactionIndex.html b/alloy_rpc_types/eth/call/enum.TransactionIndex.html new file mode 100644 index 000000000000..1dc863cc3f53 --- /dev/null +++ b/alloy_rpc_types/eth/call/enum.TransactionIndex.html @@ -0,0 +1,32 @@ +TransactionIndex in alloy_rpc_types::eth::call - Rust +
pub enum TransactionIndex {
+    All,
+    Index(usize),
+}
Expand description

Represents a transaction index where -1 means all transactions

+

Variants§

§

All

-1 means all transactions

+
§

Index(usize)

Transaction index

+

Implementations§

source§

impl TransactionIndex

source

pub fn is_all(&self) -> bool

Returns true if this is the all variant

+
source

pub fn index(&self) -> Option<usize>

Returns the index if this is the index variant

+

Trait Implementations§

source§

impl Clone for TransactionIndex

source§

fn clone(&self) -> TransactionIndex

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionIndex

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TransactionIndex

source§

fn default() -> TransactionIndex

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TransactionIndex

source§

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 PartialEq for TransactionIndex

source§

fn eq(&self, other: &TransactionIndex) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionIndex

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TransactionIndex

source§

impl Eq for TransactionIndex

source§

impl StructuralEq for TransactionIndex

source§

impl StructuralPartialEq for TransactionIndex

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

Size for each variant:

  • All: 0 bytes
  • Index: 8 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/index.html b/alloy_rpc_types/eth/call/index.html new file mode 100644 index 000000000000..8a2493c9fc6c --- /dev/null +++ b/alloy_rpc_types/eth/call/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::call - Rust +

Module alloy_rpc_types::eth::call

source ·

Structs

  • Bundle of transactions
  • Helper type that supports both data and input fields that map to transaction input data.
  • Error thrown when both data and input fields are set and not equal.
  • Call request for eth_call and adjacent methods.
  • CallResponse for eth_callMany
  • State context for callMany

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/sidebar-items.js b/alloy_rpc_types/eth/call/sidebar-items.js new file mode 100644 index 000000000000..aeea75c71b66 --- /dev/null +++ b/alloy_rpc_types/eth/call/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TransactionIndex"],"struct":["Bundle","CallInput","CallInputError","CallRequest","EthCallResponse","StateContext"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/call/struct.Bundle.html b/alloy_rpc_types/eth/call/struct.Bundle.html new file mode 100644 index 000000000000..469439ea01c3 --- /dev/null +++ b/alloy_rpc_types/eth/call/struct.Bundle.html @@ -0,0 +1,31 @@ +Bundle in alloy_rpc_types::eth::call - Rust +
pub struct Bundle {
+    pub transactions: Vec<CallRequest>,
+    pub block_override: Option<BlockOverrides>,
+}
Expand description

Bundle of transactions

+

Fields§

§transactions: Vec<CallRequest>

Transactions

+
§block_override: Option<BlockOverrides>

Block overides

+

Trait Implementations§

source§

impl Clone for Bundle

source§

fn clone(&self) -> Bundle

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Bundle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Bundle

source§

fn default() -> Bundle

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Bundle
where + Bundle: Default,

source§

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 PartialEq for Bundle

source§

fn eq(&self, other: &Bundle) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Bundle

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Bundle

source§

impl StructuralEq for Bundle

source§

impl StructuralPartialEq for Bundle

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 264 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/struct.CallInput.html b/alloy_rpc_types/eth/call/struct.CallInput.html new file mode 100644 index 000000000000..05718f0cfbb8 --- /dev/null +++ b/alloy_rpc_types/eth/call/struct.CallInput.html @@ -0,0 +1,45 @@ +CallInput in alloy_rpc_types::eth::call - Rust +
pub struct CallInput {
+    pub input: Option<Bytes>,
+    pub data: Option<Bytes>,
+}
Expand description

Helper type that supports both data and input fields that map to transaction input data.

+

This is done for compatibility reasons where older implementations used data instead of the +newer, recommended input field.

+

If both fields are set, it is expected that they contain the same value, otherwise an error is +returned.

+

Fields§

§input: Option<Bytes>

Transaction data

+
§data: Option<Bytes>

Transaction data

+

This is the same as input but is used for backwards compatibility: https://github.com/ethereum/go-ethereum/issues/15628

+

Implementations§

source§

impl CallInput

source

pub fn new(data: Bytes) -> Self

Creates a new instance with the given input data.

+
source

pub fn maybe_input(input: Option<Bytes>) -> Self

Creates a new instance with the given input data.

+
source

pub fn into_input(self) -> Option<Bytes>

Consumes the type and returns the optional input data.

+
source

pub fn try_into_unique_input(self) -> Result<Option<Bytes>, CallInputError>

Consumes the type and returns the optional input data.

+

Returns an error if both data and input fields are set and not equal.

+
source

pub fn input(&self) -> Option<&Bytes>

Returns the optional input data.

+
source

pub fn unique_input(&self) -> Result<Option<&Bytes>, CallInputError>

Returns the optional input data.

+

Returns an error if both data and input fields are set and not equal.

+
source

fn check_unique_input(&self) -> Result<(), CallInputError>

Trait Implementations§

source§

impl Clone for CallInput

source§

fn clone(&self) -> CallInput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallInput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallInput

source§

fn default() -> CallInput

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallInput

source§

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<Bytes> for CallInput

source§

fn from(input: Bytes) -> Self

Converts to this type from the input type.
source§

impl From<Option<Bytes>> for CallInput

source§

fn from(input: Option<Bytes>) -> Self

Converts to this type from the input type.
source§

impl Hash for CallInput

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for CallInput

source§

fn eq(&self, other: &CallInput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallInput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallInput

source§

impl StructuralEq for CallInput

source§

impl StructuralPartialEq for CallInput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/struct.CallInputError.html b/alloy_rpc_types/eth/call/struct.CallInputError.html new file mode 100644 index 000000000000..609ebaa74b18 --- /dev/null +++ b/alloy_rpc_types/eth/call/struct.CallInputError.html @@ -0,0 +1,20 @@ +CallInputError in alloy_rpc_types::eth::call - Rust +
#[non_exhaustive]
pub struct CallInputError;
Expand description

Error thrown when both data and input fields are set and not equal.

+

Trait Implementations§

source§

impl Debug for CallInputError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallInputError

source§

fn default() -> CallInputError

Returns the “default value” for a type. Read more
source§

impl Display for CallInputError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CallInputError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/struct.CallRequest.html b/alloy_rpc_types/eth/call/struct.CallRequest.html new file mode 100644 index 000000000000..a8f7151da8a2 --- /dev/null +++ b/alloy_rpc_types/eth/call/struct.CallRequest.html @@ -0,0 +1,60 @@ +CallRequest in alloy_rpc_types::eth::call - Rust +
pub struct CallRequest {
Show 14 fields + pub from: Option<Address>, + pub to: Option<Address>, + pub gas_price: Option<U256>, + pub max_fee_per_gas: Option<U256>, + pub max_priority_fee_per_gas: Option<U256>, + pub gas: Option<U256>, + pub value: Option<U256>, + pub input: CallInput, + pub nonce: Option<U64>, + pub chain_id: Option<U64>, + pub access_list: Option<AccessList>, + pub max_fee_per_blob_gas: Option<U256>, + pub blob_versioned_hashes: Option<Vec<B256>>, + pub transaction_type: Option<U8>, +
}
Expand description

Call request for eth_call and adjacent methods.

+

Fields§

§from: Option<Address>

From

+
§to: Option<Address>

To

+
§gas_price: Option<U256>

Gas Price

+
§max_fee_per_gas: Option<U256>

EIP-1559 Max base fee the caller is willing to pay

+
§max_priority_fee_per_gas: Option<U256>

EIP-1559 Priority fee the caller is paying to the block author

+
§gas: Option<U256>

Gas

+
§value: Option<U256>

Value

+
§input: CallInput

Transaction input data

+
§nonce: Option<U64>

Nonce

+
§chain_id: Option<U64>

chain id

+
§access_list: Option<AccessList>

AccessList

+
§max_fee_per_blob_gas: Option<U256>

Max Fee per Blob gas for EIP-4844 transactions

+
§blob_versioned_hashes: Option<Vec<B256>>

Blob Versioned Hashes for EIP-4844 transactions

+
§transaction_type: Option<U8>

EIP-2718 type

+

Implementations§

source§

impl CallRequest

source

pub fn fee_cap(&self) -> Option<U256>

Returns the configured fee cap, if any.

+

The returns gas_price (legacy) if set or max_fee_per_gas (EIP1559)

+
source

pub fn has_empty_blob_hashes(&self) -> bool

Returns true if the request has a blobVersionedHashes field but it is empty.

+

Trait Implementations§

source§

impl Clone for CallRequest

source§

fn clone(&self) -> CallRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallRequest

source§

fn default() -> CallRequest

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallRequest

source§

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 Hash for CallRequest

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for CallRequest

source§

fn eq(&self, other: &CallRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallRequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallRequest

source§

impl StructuralEq for CallRequest

source§

impl StructuralPartialEq for CallRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 448 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/struct.EthCallResponse.html b/alloy_rpc_types/eth/call/struct.EthCallResponse.html new file mode 100644 index 000000000000..699b6bb445b8 --- /dev/null +++ b/alloy_rpc_types/eth/call/struct.EthCallResponse.html @@ -0,0 +1,31 @@ +EthCallResponse in alloy_rpc_types::eth::call - Rust +
pub struct EthCallResponse {
+    pub output: Option<Bytes>,
+    pub error: Option<String>,
+}
Expand description

CallResponse for eth_callMany

+

Fields§

§output: Option<Bytes>

eth_call output (if no error)

+
§error: Option<String>

eth_call output (if error)

+

Trait Implementations§

source§

impl Clone for EthCallResponse

source§

fn clone(&self) -> EthCallResponse

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EthCallResponse

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EthCallResponse

source§

fn default() -> EthCallResponse

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EthCallResponse

source§

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 PartialEq for EthCallResponse

source§

fn eq(&self, other: &EthCallResponse) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EthCallResponse

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EthCallResponse

source§

impl StructuralEq for EthCallResponse

source§

impl StructuralPartialEq for EthCallResponse

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/call/struct.StateContext.html b/alloy_rpc_types/eth/call/struct.StateContext.html new file mode 100644 index 000000000000..7fe012f6731f --- /dev/null +++ b/alloy_rpc_types/eth/call/struct.StateContext.html @@ -0,0 +1,31 @@ +StateContext in alloy_rpc_types::eth::call - Rust +
pub struct StateContext {
+    pub block_number: Option<BlockId>,
+    pub transaction_index: Option<TransactionIndex>,
+}
Expand description

State context for callMany

+

Fields§

§block_number: Option<BlockId>

Block Number

+
§transaction_index: Option<TransactionIndex>

Inclusive number of tx to replay in block. -1 means replay all

+

Trait Implementations§

source§

impl Clone for StateContext

source§

fn clone(&self) -> StateContext

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StateContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StateContext

source§

fn default() -> StateContext

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for StateContext

source§

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 PartialEq for StateContext

source§

fn eq(&self, other: &StateContext) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StateContext

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StateContext

source§

impl StructuralEq for StateContext

source§

impl StructuralPartialEq for StateContext

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/fee/index.html b/alloy_rpc_types/eth/fee/index.html new file mode 100644 index 000000000000..1dad770ccd3a --- /dev/null +++ b/alloy_rpc_types/eth/fee/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::fee - Rust +

Module alloy_rpc_types::eth::fee

source ·

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/fee/sidebar-items.js b/alloy_rpc_types/eth/fee/sidebar-items.js new file mode 100644 index 000000000000..25ed431315a4 --- /dev/null +++ b/alloy_rpc_types/eth/fee/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["FeeHistory","TxGasAndReward"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/fee/struct.FeeHistory.html b/alloy_rpc_types/eth/fee/struct.FeeHistory.html new file mode 100644 index 000000000000..3f42f4d90314 --- /dev/null +++ b/alloy_rpc_types/eth/fee/struct.FeeHistory.html @@ -0,0 +1,44 @@ +FeeHistory in alloy_rpc_types::eth::fee - Rust +
pub struct FeeHistory {
+    pub base_fee_per_gas: Vec<U256>,
+    pub gas_used_ratio: Vec<f64>,
+    pub oldest_block: U256,
+    pub reward: Option<Vec<Vec<U256>>>,
+}
Expand description

Response type for eth_feeHistory

+

Fields§

§base_fee_per_gas: Vec<U256>

An array of block base fees per gas. +This includes the next block after the newest of the returned range, +because this value can be derived from the newest block. Zeroes are +returned for pre-EIP-1559 blocks.

+

Note

+

The Option is only for compatability with Erigon and Geth. +Empty list is skipped only for compatability with Erigon and Geth.

+
§gas_used_ratio: Vec<f64>

An array of block gas used ratios. These are calculated as the ratio +of gasUsed and gasLimit.

+

Note

+

The Option is only for compatability with Erigon and Geth.

+
§oldest_block: U256

Lowest number block of the returned range.

+
§reward: Option<Vec<Vec<U256>>>

An (optional) array of effective priority fee per gas data points from a single +block. All zeroes are returned if the block is empty.

+

Trait Implementations§

source§

impl Clone for FeeHistory

source§

fn clone(&self) -> FeeHistory

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FeeHistory

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FeeHistory

source§

fn default() -> FeeHistory

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FeeHistory

source§

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 PartialEq for FeeHistory

source§

fn eq(&self, other: &FeeHistory) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FeeHistory

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for FeeHistory

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 104 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/fee/struct.TxGasAndReward.html b/alloy_rpc_types/eth/fee/struct.TxGasAndReward.html new file mode 100644 index 000000000000..fb99268e47e8 --- /dev/null +++ b/alloy_rpc_types/eth/fee/struct.TxGasAndReward.html @@ -0,0 +1,32 @@ +TxGasAndReward in alloy_rpc_types::eth::fee - Rust +
pub struct TxGasAndReward {
+    pub gas_used: u64,
+    pub reward: u128,
+}
Expand description

Internal struct to calculate reward percentiles

+

Fields§

§gas_used: u64

Gas used by the transaction

+
§reward: u128

The effective gas tip by the transaction

+

Trait Implementations§

source§

impl Clone for TxGasAndReward

source§

fn clone(&self) -> TxGasAndReward

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxGasAndReward

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for TxGasAndReward

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TxGasAndReward

source§

fn eq(&self, other: &TxGasAndReward) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TxGasAndReward

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Eq for TxGasAndReward

source§

impl StructuralEq for TxGasAndReward

source§

impl StructuralPartialEq for TxGasAndReward

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/enum.FilterBlockOption.html b/alloy_rpc_types/eth/filter/enum.FilterBlockOption.html new file mode 100644 index 000000000000..24ed26af93ec --- /dev/null +++ b/alloy_rpc_types/eth/filter/enum.FilterBlockOption.html @@ -0,0 +1,41 @@ +FilterBlockOption in alloy_rpc_types::eth::filter - Rust +
pub enum FilterBlockOption {
+    Range {
+        from_block: Option<BlockNumberOrTag>,
+        to_block: Option<BlockNumberOrTag>,
+    },
+    AtBlockHash(B256),
+}
Expand description

Represents the target range of blocks for the filter

+

Variants§

§

Range

Fields

§from_block: Option<BlockNumberOrTag>

The block number or tag this filter should start at.

+
§to_block: Option<BlockNumberOrTag>

The block number or that this filter should end at.

+

Represents a range of blocks with optional from and to blocks

+

Note: ranges are considered to be inclusive

+
§

AtBlockHash(B256)

The hash of the block if the filter only targets a single block

+

Implementations§

source§

impl FilterBlockOption

source

pub fn get_to_block(&self) -> Option<&BlockNumberOrTag>

Returns the fromBlock value, if any

+
source

pub fn get_from_block(&self) -> Option<&BlockNumberOrTag>

Returns the toBlock value, if any

+
source

pub fn as_range(&self) -> (Option<&BlockNumberOrTag>, Option<&BlockNumberOrTag>)

Returns the range (fromBlock, toBlock) if this is a range filter.

+
source§

impl FilterBlockOption

source

pub fn set_from_block(&self, block: BlockNumberOrTag) -> Self

Sets the block number this range filter should start at.

+
source

pub fn set_to_block(&self, block: BlockNumberOrTag) -> Self

Sets the block number this range filter should end at.

+
source

pub fn set_hash(&self, hash: B256) -> Self

Pins the block hash this filter should target.

+

Trait Implementations§

source§

impl Clone for FilterBlockOption

source§

fn clone(&self) -> FilterBlockOption

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FilterBlockOption

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FilterBlockOption

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<BlockNumberOrTag> for FilterBlockOption

source§

fn from(block: BlockNumberOrTag) -> Self

Converts to this type from the input type.
source§

impl From<FixedBytes<32>> for FilterBlockOption

source§

fn from(hash: B256) -> Self

Converts to this type from the input type.
source§

impl<T: Into<BlockNumberOrTag>> From<Range<T>> for FilterBlockOption

source§

fn from(r: Range<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Into<BlockNumberOrTag>> From<RangeFrom<T>> for FilterBlockOption

source§

fn from(r: RangeFrom<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Into<BlockNumberOrTag>> From<RangeTo<T>> for FilterBlockOption

source§

fn from(r: RangeTo<T>) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for FilterBlockOption

source§

fn from(block: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for FilterBlockOption

source§

fn from(block: u64) -> Self

Converts to this type from the input type.
source§

impl Hash for FilterBlockOption

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for FilterBlockOption

source§

fn eq(&self, other: &FilterBlockOption) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for FilterBlockOption

source§

impl Eq for FilterBlockOption

source§

impl StructuralEq for FilterBlockOption

source§

impl StructuralPartialEq for FilterBlockOption

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 40 bytes

Size for each variant:

  • Range: 39 bytes
  • AtBlockHash: 32 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/enum.FilterChanges.html b/alloy_rpc_types/eth/filter/enum.FilterChanges.html new file mode 100644 index 000000000000..2a1768e66ecc --- /dev/null +++ b/alloy_rpc_types/eth/filter/enum.FilterChanges.html @@ -0,0 +1,34 @@ +FilterChanges in alloy_rpc_types::eth::filter - Rust +
pub enum FilterChanges {
+    Logs(Vec<Log>),
+    Hashes(Vec<B256>),
+    Transactions(Vec<Transaction>),
+    Empty,
+}
Expand description

Response of the eth_getFilterChanges RPC.

+

Variants§

§

Logs(Vec<Log>)

New logs.

+
§

Hashes(Vec<B256>)

New hashes (block or transactions)

+
§

Transactions(Vec<Transaction>)

New transactions.

+
§

Empty

Empty result,

+

Trait Implementations§

source§

impl Clone for FilterChanges

source§

fn clone(&self) -> FilterChanges

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FilterChanges

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for FilterChanges

source§

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 PartialEq for FilterChanges

source§

fn eq(&self, other: &FilterChanges) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FilterChanges

source§

fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FilterChanges

source§

impl StructuralEq for FilterChanges

source§

impl StructuralPartialEq for FilterChanges

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

Size for each variant:

  • Logs: 24 bytes
  • Hashes: 24 bytes
  • Transactions: 24 bytes
  • Empty: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/enum.FilterId.html b/alloy_rpc_types/eth/filter/enum.FilterId.html new file mode 100644 index 000000000000..ab309e133337 --- /dev/null +++ b/alloy_rpc_types/eth/filter/enum.FilterId.html @@ -0,0 +1,32 @@ +FilterId in alloy_rpc_types::eth::filter - Rust +
pub enum FilterId {
+    Num(u64),
+    Str(String),
+}
Expand description

Owned equivalent of a SubscriptionId

+

Variants§

§

Num(u64)

Numeric id

+
§

Str(String)

String id

+

Trait Implementations§

source§

impl Clone for FilterId

source§

fn clone(&self) -> FilterId

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FilterId

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for FilterId

source§

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<FilterId> for SubscriptionId<'_>

Available on crate feature jsonrpsee only.
source§

fn from(value: FilterId) -> Self

Converts to this type from the input type.
source§

impl From<SubscriptionId<'_>> for FilterId

Available on crate feature jsonrpsee only.
source§

fn from(value: SubscriptionId<'_>) -> Self

Converts to this type from the input type.
source§

impl Hash for FilterId

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for FilterId

source§

fn eq(&self, other: &FilterId) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FilterId

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FilterId

source§

impl StructuralEq for FilterId

source§

impl StructuralPartialEq for FilterId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

Size for each variant:

  • Num: 16 bytes
  • Str: 24 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/enum.PendingTransactionFilterKind.html b/alloy_rpc_types/eth/filter/enum.PendingTransactionFilterKind.html new file mode 100644 index 000000000000..e267fb2008fd --- /dev/null +++ b/alloy_rpc_types/eth/filter/enum.PendingTransactionFilterKind.html @@ -0,0 +1,48 @@ +PendingTransactionFilterKind in alloy_rpc_types::eth::filter - Rust +
pub enum PendingTransactionFilterKind {
+    Hashes,
+    Full,
+}
Expand description

Specifies the kind of information you wish to receive from the eth_newPendingTransactionFilter +RPC endpoint.

+

When this type is used in a request, it determines whether the client wishes to receive:

+
    +
  • Only the transaction hashes (Hashes variant), or
  • +
  • Full transaction details (Full variant).
  • +
+

Variants§

§

Hashes

Receive only the hashes of the transactions.

+
§

Full

Receive full details of the transactions.

+

Trait Implementations§

source§

impl Clone for PendingTransactionFilterKind

source§

fn clone(&self) -> PendingTransactionFilterKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PendingTransactionFilterKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PendingTransactionFilterKind

source§

fn default() -> PendingTransactionFilterKind

Returns the “default value” for a type. Read more
source§

impl<'a> Deserialize<'a> for PendingTransactionFilterKind

source§

fn deserialize<D>( + deserializer: D +) -> Result<PendingTransactionFilterKind, D::Error>
where + D: Deserializer<'a>,

Deserializes a boolean value into PendingTransactionFilterKind:

+
    +
  • false becomes Hashes
  • +
  • true becomes Full
  • +
+
source§

impl PartialEq for PendingTransactionFilterKind

source§

fn eq(&self, other: &PendingTransactionFilterKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PendingTransactionFilterKind

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serializes the PendingTransactionFilterKind into a boolean value:

+
    +
  • false for Hashes
  • +
  • true for Full
  • +
+
source§

impl Copy for PendingTransactionFilterKind

source§

impl Eq for PendingTransactionFilterKind

source§

impl StructuralEq for PendingTransactionFilterKind

source§

impl StructuralPartialEq for PendingTransactionFilterKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Hashes: 0 bytes
  • Full: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/enum.ValueOrArray.html b/alloy_rpc_types/eth/filter/enum.ValueOrArray.html new file mode 100644 index 000000000000..066271b11bbb --- /dev/null +++ b/alloy_rpc_types/eth/filter/enum.ValueOrArray.html @@ -0,0 +1,39 @@ +ValueOrArray in alloy_rpc_types::eth::filter - Rust +
pub enum ValueOrArray<T> {
+    Value(T),
+    Array(Vec<T>),
+}
Expand description

Union type for representing a single value or a vector of values inside a filter

+

Variants§

§

Value(T)

A single value

+
§

Array(Vec<T>)

A vector of values

+

Trait Implementations§

source§

impl<T: Clone> Clone for ValueOrArray<T>

source§

fn clone(&self) -> ValueOrArray<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for ValueOrArray<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T> Deserialize<'a> for ValueOrArray<T>
where + T: DeserializeOwned,

source§

fn deserialize<D>(deserializer: D) -> Result<ValueOrArray<T>, D::Error>
where + D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<Address> for ValueOrArray<Address>

source§

fn from(src: Address) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>

source§

fn from(src: ValueOrArray<Option<T>>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>

source§

fn from(src: ValueOrArray<T>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Address>> for ValueOrArray<Address>

source§

fn from(src: Vec<Address>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<FixedBytes<32>>> for ValueOrArray<B256>

source§

fn from(src: Vec<B256>) -> Self

Converts to this type from the input type.
source§

impl<T: Hash> Hash for ValueOrArray<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: PartialEq> PartialEq for ValueOrArray<T>

source§

fn eq(&self, other: &ValueOrArray<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for ValueOrArray<T>
where + T: Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for ValueOrArray<T>

source§

impl<T> StructuralEq for ValueOrArray<T>

source§

impl<T> StructuralPartialEq for ValueOrArray<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ValueOrArray<T>
where + T: RefUnwindSafe,

§

impl<T> Send for ValueOrArray<T>
where + T: Send,

§

impl<T> Sync for ValueOrArray<T>
where + T: Sync,

§

impl<T> Unpin for ValueOrArray<T>
where + T: Unpin,

§

impl<T> UnwindSafe for ValueOrArray<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/index.html b/alloy_rpc_types/eth/filter/index.html new file mode 100644 index 000000000000..f96b73524348 --- /dev/null +++ b/alloy_rpc_types/eth/filter/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::filter - Rust +

Module alloy_rpc_types::eth::filter

source ·

Structs

Enums

  • Represents the target range of blocks for the filter
  • Response of the eth_getFilterChanges RPC.
  • Owned equivalent of a SubscriptionId
  • Specifies the kind of information you wish to receive from the eth_newPendingTransactionFilter +RPC endpoint.
  • Union type for representing a single value or a vector of values inside a filter

Type Aliases

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/sidebar-items.js b/alloy_rpc_types/eth/filter/sidebar-items.js new file mode 100644 index 000000000000..8c71d78a9136 --- /dev/null +++ b/alloy_rpc_types/eth/filter/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["FilterBlockOption","FilterChanges","FilterId","PendingTransactionFilterKind","ValueOrArray"],"struct":["BloomFilter","Filter","FilterSet","FilteredParams"],"type":["RawAddressFilter","RawTopicsFilter","Topic"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/struct.BloomFilter.html b/alloy_rpc_types/eth/filter/struct.BloomFilter.html new file mode 100644 index 000000000000..70a21f3b8e77 --- /dev/null +++ b/alloy_rpc_types/eth/filter/struct.BloomFilter.html @@ -0,0 +1,22 @@ +BloomFilter in alloy_rpc_types::eth::filter - Rust +
pub struct BloomFilter(Vec<Bloom>);
Expand description

Helper type to represent a bloom filter used for matching logs.

+

Tuple Fields§

§0: Vec<Bloom>

Implementations§

source§

impl BloomFilter

source

pub fn matches(&self, bloom: Bloom) -> bool

Returns whether the given bloom matches the list of Blooms in the current filter. +If the filter is empty (the list is empty), then any bloom matches +Otherwise, there must be at least one matche for the BloomFilter to match.

+

Trait Implementations§

source§

impl Debug for BloomFilter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BloomFilter

source§

fn default() -> BloomFilter

Returns the “default value” for a type. Read more
source§

impl From<Vec<Bloom>> for BloomFilter

source§

fn from(src: Vec<Bloom>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/struct.Filter.html b/alloy_rpc_types/eth/filter/struct.Filter.html new file mode 100644 index 000000000000..84f199b344e0 --- /dev/null +++ b/alloy_rpc_types/eth/filter/struct.Filter.html @@ -0,0 +1,88 @@ +Filter in alloy_rpc_types::eth::filter - Rust +
pub struct Filter {
+    pub block_option: FilterBlockOption,
+    pub address: FilterSet<Address>,
+    pub topics: [Topic; 4],
+}
Expand description

Filter for logs.

+

Fields§

§block_option: FilterBlockOption

Filter block options, specifying on which blocks the filter should +match.

+
§address: FilterSet<Address>

Address

+
§topics: [Topic; 4]

Topics (maxmimum of 4)

+

Implementations§

source§

impl Filter

source

pub fn new() -> Self

Creates a new, empty filter

+
source

pub fn select(self, filter: impl Into<FilterBlockOption>) -> Self

Sets the inner filter object

+

NOTE: ranges are always inclusive

+
Examples
+

Match only a specific block

+ +
let filter = Filter::new().select(69u64);
+

This is the same as Filter::new().from_block(1337u64).to_block(1337u64)

+

Match the latest block only

+ +
let filter = Filter::new().select(BlockNumberOrTag::Latest);
+

Match a block by its hash

+ +
let filter = Filter::new().select(B256::ZERO);
+

This is the same as at_block_hash

+

Match a range of blocks

+ +
let filter = Filter::new().select(0u64..100u64);
+

Match all blocks in range (1337..BlockNumberOrTag::Latest)

+ +
let filter = Filter::new().select(1337u64..);
+

Match all blocks in range (BlockNumberOrTag::Earliest..1337)

+ +
let filter = Filter::new().select(..1337u64);
+
source

pub fn from_block<T: Into<BlockNumberOrTag>>(self, block: T) -> Self

Sets the from block number

+
source

pub fn to_block<T: Into<BlockNumberOrTag>>(self, block: T) -> Self

Sets the to block number

+
source

pub fn at_block_hash<T: Into<B256>>(self, hash: T) -> Self

Pins the block hash for the filter

+
source

pub fn address<T: Into<ValueOrArray<Address>>>(self, address: T) -> Self

Sets the inner filter object

+

NOTE: ranges are always inclusive

+
Examples
+

Match only a specific address ("0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF")

+ +
let filter = Filter::new()
+    .address("0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF".parse::<Address>().unwrap());
+

Match all addresses in array (vec!["0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF", "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8"])

+ +
let addresses = vec![
+    "0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF".parse::<Address>().unwrap(),
+    "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8".parse::<Address>().unwrap(),
+];
+let filter = Filter::new().address(addresses);
+
source

pub fn event(self, event_name: &str) -> Self

Given the event signature in string form, it hashes it and adds it to the topics to monitor

+
source

pub fn events(self, events: impl IntoIterator<Item = impl AsRef<[u8]>>) -> Self

Hashes all event signatures and sets them as array to event_signature(topic0)

+
source

pub fn event_signature<T: Into<Topic>>(self, topic: T) -> Self

Sets event_signature(topic0) (the event name for non-anonymous events)

+
source

pub fn topic0<T: Into<Topic>>(self, topic: T) -> Self

👎Deprecated: use event_signature instead

Sets topic0 (the event name for non-anonymous events)

+
source

pub fn topic1<T: Into<Topic>>(self, topic: T) -> Self

Sets the 1st indexed topic

+
source

pub fn topic2<T: Into<Topic>>(self, topic: T) -> Self

Sets the 2nd indexed topic

+
source

pub fn topic3<T: Into<Topic>>(self, topic: T) -> Self

Sets the 3rd indexed topic

+
source

pub fn is_paginatable(&self) -> bool

Returns true if this is a range filter and has a from block

+
source

pub fn get_to_block(&self) -> Option<u64>

Returns the numeric value of the toBlock field

+
source

pub fn get_from_block(&self) -> Option<u64>

Returns the numeric value of the fromBlock field

+
source

pub fn get_block_hash(&self) -> Option<B256>

Returns the numeric value of the fromBlock field

+
source

pub fn has_topics(&self) -> bool

Returns true if at least one topic is set

+

Trait Implementations§

source§

impl Clone for Filter

source§

fn clone(&self) -> Filter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Filter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Filter

source§

fn default() -> Filter

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Filter

source§

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 Hash for Filter

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Filter

source§

fn eq(&self, other: &Filter) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Filter

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Filter

source§

impl StructuralEq for Filter

source§

impl StructuralPartialEq for Filter

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 280 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/struct.FilterSet.html b/alloy_rpc_types/eth/filter/struct.FilterSet.html new file mode 100644 index 000000000000..732b8a1ec5f5 --- /dev/null +++ b/alloy_rpc_types/eth/filter/struct.FilterSet.html @@ -0,0 +1,43 @@ +FilterSet in alloy_rpc_types::eth::filter - Rust +
pub struct FilterSet<T: Eq + Hash>(HashSet<T>);
Expand description

FilterSet is a set of values that will be used to filter logs

+

Tuple Fields§

§0: HashSet<T>

Implementations§

source§

impl<T: Eq + Hash> FilterSet<T>

source

pub fn is_empty(&self) -> bool

Returns wheter the filter is empty

+
source

pub fn matches(&self, value: &T) -> bool

Returns whether the given value matches the filter. It the filter is empty +any value matches. Otherwise, the filter must include the value

+
source§

impl<T: AsRef<[u8]> + Eq + Hash> FilterSet<T>

source

pub fn to_bloom_filter(&self) -> BloomFilter

Returns a list of Bloom (BloomFilter) corresponding to the filter’s values

+
source§

impl<T: Clone + Eq + Hash> FilterSet<T>

source

pub fn to_value_or_array(&self) -> Option<ValueOrArray<T>>

Returns a ValueOrArray inside an Option, so that:

+
    +
  • If the filter is empty, it returns None
  • +
  • If the filter has only 1 value, it returns the single value
  • +
  • Otherwise it returns an array of values +This should be useful for serialization
  • +
+

Trait Implementations§

source§

impl<T: Clone + Eq + Hash> Clone for FilterSet<T>

source§

fn clone(&self) -> FilterSet<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Eq + Hash> Debug for FilterSet<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default + Eq + Hash> Default for FilterSet<T>

source§

fn default() -> FilterSet<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for FilterSet<T>
where + T: Deserialize<'de> + Eq + Hash,

source§

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<T: Eq + Hash> From<T> for FilterSet<T>

source§

fn from(src: T) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>

source§

fn from(src: ValueOrArray<Option<T>>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>

source§

fn from(src: ValueOrArray<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<Vec<T>> for FilterSet<T>

source§

fn from(src: Vec<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> Hash for FilterSet<T>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: PartialEq + Eq + Hash> PartialEq for FilterSet<T>

source§

fn eq(&self, other: &FilterSet<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T: Eq + Eq + Hash> Eq for FilterSet<T>

source§

impl<T: Eq + Hash> StructuralEq for FilterSet<T>

source§

impl<T: Eq + Hash> StructuralPartialEq for FilterSet<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for FilterSet<T>
where + T: RefUnwindSafe,

§

impl<T> Send for FilterSet<T>
where + T: Send,

§

impl<T> Sync for FilterSet<T>
where + T: Sync,

§

impl<T> Unpin for FilterSet<T>
where + T: Unpin,

§

impl<T> UnwindSafe for FilterSet<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/struct.FilteredParams.html b/alloy_rpc_types/eth/filter/struct.FilteredParams.html new file mode 100644 index 000000000000..d4989271285a --- /dev/null +++ b/alloy_rpc_types/eth/filter/struct.FilteredParams.html @@ -0,0 +1,33 @@ +FilteredParams in alloy_rpc_types::eth::filter - Rust +
pub struct FilteredParams {
+    pub filter: Option<Filter>,
+}
Expand description

Support for matching Filters

+

Fields§

§filter: Option<Filter>

The original filter, if any

+

Implementations§

source§

impl FilteredParams

source

pub fn new(filter: Option<Filter>) -> Self

Creates a new wrapper type for a Filter, if any with flattened topics, that can be used +for matching

+
source

pub fn address_filter(address: &FilterSet<Address>) -> BloomFilter

Returns the BloomFilter for the given address

+
source

pub fn topics_filter(topics: &[FilterSet<B256>]) -> Vec<BloomFilter>

Returns the BloomFilter for the given topics

+
source

pub fn matches_topics(bloom: Bloom, topic_filters: &[BloomFilter]) -> bool

Returns true if the bloom matches the topics

+
source

pub fn matches_address(bloom: Bloom, address_filter: &BloomFilter) -> bool

Returns true if the bloom contains one of the address blooms, or the address blooms +list is empty (thus, no filters)

+
source

pub fn filter_block_range(&self, block_number: u64) -> bool

Returns true if the filter matches the given block number

+
source

pub fn filter_block_hash(&self, block_hash: B256) -> bool

Returns true if the filter matches the given block hash.

+
source

pub fn filter_address(&self, log: &Log) -> bool

Returns true if the filter matches the given log.

+
source

pub fn filter_topics(&self, log: &Log) -> bool

Returns true if the log matches the filter’s topics

+

Trait Implementations§

source§

impl Debug for FilteredParams

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FilteredParams

source§

fn default() -> FilteredParams

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 280 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/type.RawAddressFilter.html b/alloy_rpc_types/eth/filter/type.RawAddressFilter.html new file mode 100644 index 000000000000..0d75ce8ccb21 --- /dev/null +++ b/alloy_rpc_types/eth/filter/type.RawAddressFilter.html @@ -0,0 +1,7 @@ +RawAddressFilter in alloy_rpc_types::eth::filter - Rust +
type RawAddressFilter = ValueOrArray<Option<Address>>;

Aliased Type§

enum RawAddressFilter {
+    Value(Option<Address>),
+    Array(Vec<Option<Address>>),
+}

Variants§

§

Value(Option<Address>)

A single value

+
§

Array(Vec<Option<Address>>)

A vector of values

+

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: 32 bytes

Size for each variant:

  • Value: 21 bytes
  • Array: 31 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/type.RawTopicsFilter.html b/alloy_rpc_types/eth/filter/type.RawTopicsFilter.html new file mode 100644 index 000000000000..8004a237638d --- /dev/null +++ b/alloy_rpc_types/eth/filter/type.RawTopicsFilter.html @@ -0,0 +1,5 @@ +RawTopicsFilter in alloy_rpc_types::eth::filter - Rust +
type RawTopicsFilter = Vec<Option<ValueOrArray<Option<B256>>>>;

Aliased Type§

struct RawTopicsFilter {
+    buf: RawVec<Option<ValueOrArray<Option<FixedBytes<32>>>>>,
+    len: usize,
+}

Fields§

§buf: RawVec<Option<ValueOrArray<Option<FixedBytes<32>>>>>§len: usize

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/filter/type.Topic.html b/alloy_rpc_types/eth/filter/type.Topic.html new file mode 100644 index 000000000000..4da6d61deb22 --- /dev/null +++ b/alloy_rpc_types/eth/filter/type.Topic.html @@ -0,0 +1,3 @@ +Topic in alloy_rpc_types::eth::filter - Rust +

Type Alias alloy_rpc_types::eth::filter::Topic

source ·
pub type Topic = FilterSet<B256>;
Expand description

A single topic

+

Aliased Type§

struct Topic(HashSet<FixedBytes<32>>);

Fields§

§0: HashSet<FixedBytes<32>>

Trait Implementations§

source§

impl From<Uint<256, 4>> for Topic

source§

fn from(src: U256) -> Self

Converts to this type from the input type.

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/index.html b/alloy_rpc_types/eth/index.html new file mode 100644 index 000000000000..77ef5733cb9c --- /dev/null +++ b/alloy_rpc_types/eth/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth - Rust +

Module alloy_rpc_types::eth

source ·
Expand description

Ethereum related types

+

Re-exports

Modules

\ No newline at end of file diff --git a/alloy_rpc_types/eth/log/enum.LogError.html b/alloy_rpc_types/eth/log/enum.LogError.html new file mode 100644 index 000000000000..3388af6feb1b --- /dev/null +++ b/alloy_rpc_types/eth/log/enum.LogError.html @@ -0,0 +1,23 @@ +LogError in alloy_rpc_types::eth::log - Rust +
pub enum LogError {
+    TooManyTopics,
+}
Expand description

Error that can occur when converting other types to logs

+

Variants§

§

TooManyTopics

There are too many topics

+

Trait Implementations§

source§

impl Debug for LogError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LogError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for LogError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/log/index.html b/alloy_rpc_types/eth/log/index.html new file mode 100644 index 000000000000..6863bc4de170 --- /dev/null +++ b/alloy_rpc_types/eth/log/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::log - Rust +

Module alloy_rpc_types::eth::log

source ·

Structs

  • Ethereum Log emitted by a transaction

Enums

  • Error that can occur when converting other types to logs
\ No newline at end of file diff --git a/alloy_rpc_types/eth/log/sidebar-items.js b/alloy_rpc_types/eth/log/sidebar-items.js new file mode 100644 index 000000000000..f091e27fe888 --- /dev/null +++ b/alloy_rpc_types/eth/log/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["LogError"],"struct":["Log"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/log/struct.Log.html b/alloy_rpc_types/eth/log/struct.Log.html new file mode 100644 index 000000000000..e9b298c188ea --- /dev/null +++ b/alloy_rpc_types/eth/log/struct.Log.html @@ -0,0 +1,46 @@ +Log in alloy_rpc_types::eth::log - Rust +

Struct alloy_rpc_types::eth::log::Log

source ·
pub struct Log {
+    pub address: Address,
+    pub topics: Vec<B256>,
+    pub data: Bytes,
+    pub block_hash: Option<B256>,
+    pub block_number: Option<U256>,
+    pub transaction_hash: Option<B256>,
+    pub transaction_index: Option<U256>,
+    pub log_index: Option<U256>,
+    pub removed: bool,
+}
Expand description

Ethereum Log emitted by a transaction

+

Fields§

§address: Address

Address

+
§topics: Vec<B256>

All topics of the log

+
§data: Bytes

Additional data fields of the log

+
§block_hash: Option<B256>

Hash of the block the transaction that emitted this log was mined in

+
§block_number: Option<U256>

Number of the block the transaction that emitted this log was mined in

+
§transaction_hash: Option<B256>

Transaction Hash

+
§transaction_index: Option<U256>

Index of the Transaction in the block

+
§log_index: Option<U256>

Log Index in Block

+
§removed: bool

Geth Compatibility Field: whether this log was removed

+

Trait Implementations§

source§

impl Clone for Log

source§

fn clone(&self) -> Log

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Log

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Log

source§

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 Hash for Log

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Log

source§

fn eq(&self, other: &Log) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Log

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<Log> for Log

§

type Error = LogError

The type returned in the event of a conversion error.
source§

fn try_from(value: Log) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for Log

source§

impl StructuralEq for Log

source§

impl StructuralPartialEq for Log

Auto Trait Implementations§

§

impl RefUnwindSafe for Log

§

impl Send for Log

§

impl Sync for Log

§

impl Unpin for Log

§

impl UnwindSafe for Log

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 264 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/other/index.html b/alloy_rpc_types/eth/other/index.html new file mode 100644 index 000000000000..fff9b3670dad --- /dev/null +++ b/alloy_rpc_types/eth/other/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::other - Rust +

Module alloy_rpc_types::eth::other

source ·
Expand description

Support for capturing other fields

+

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/other/sidebar-items.js b/alloy_rpc_types/eth/other/sidebar-items.js new file mode 100644 index 000000000000..4e9f8e04286a --- /dev/null +++ b/alloy_rpc_types/eth/other/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["OtherFields"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/other/struct.OtherFields.html b/alloy_rpc_types/eth/other/struct.OtherFields.html new file mode 100644 index 000000000000..0470b4b947eb --- /dev/null +++ b/alloy_rpc_types/eth/other/struct.OtherFields.html @@ -0,0 +1,581 @@ +OtherFields in alloy_rpc_types::eth::other - Rust +
pub struct OtherFields {
+    inner: BTreeMap<String, Value>,
+}
Expand description

A type that is supposed to capture additional fields that are not native to ethereum but included in ethereum adjacent networks, for example fields the optimism eth_getTransactionByHash request returns additional fields that this type will capture

+

This type is supposed to be used with #[serde(flatten)

+

Fields§

§inner: BTreeMap<String, Value>

Contains all unknown fields

+

Implementations§

source§

impl OtherFields

source

pub fn get_with<F, V>(&self, key: impl AsRef<str>, with: F) -> Option<V>
where + F: FnOnce(Value) -> V,

Returns the deserialized value of the field, if it exists. +Deserializes the value with the given closure

+
source

pub fn get_deserialized<V: DeserializeOwned>( + &self, + key: impl AsRef<str> +) -> Option<Result<V>>

Returns the deserialized value of the field, if it exists

+
source

pub fn remove_deserialized<V: DeserializeOwned>( + &mut self, + key: impl AsRef<str> +) -> Option<Result<V>>

Removes the deserialized value of the field, if it exists

+

Note: this will also remove the value if deserializing it resulted in an error

+
source

pub fn remove_with<F, V>(&mut self, key: impl AsRef<str>, with: F) -> Option<V>
where + F: FnOnce(Value) -> V,

Removes the deserialized value of the field, if it exists. +Deserializes the value with the given closure

+

Note: this will also remove the value if deserializing it resulted in an error

+
source

pub fn remove_entry_deserialized<V: DeserializeOwned>( + &mut self, + key: impl AsRef<str> +) -> Option<(String, Result<V>)>

Removes the deserialized value of the field, if it exists and also returns the key

+

Note: this will also remove the value if deserializing it resulted in an error

+
source

pub fn deserialize_into<T: DeserializeOwned>(self) -> Result<T>

Deserialized this type into another container type

+

Methods from Deref<Target = BTreeMap<String, Value>>§

1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.clear();
+assert!(a.is_empty());
+
1.0.0 · source

pub fn get<Q>(&self, key: &Q) -> Option<&V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get(&1), Some(&"a"));
+assert_eq!(map.get(&2), None);
+
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns the key-value pair corresponding to the supplied key.

+

The supplied key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
+assert_eq!(map.get_key_value(&2), None);
+
1.66.0 · source

pub fn first_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the first key-value pair in the map. +The key in this pair is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.first_key_value(), None);
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.first_key_value(), Some((&1, &"b")));
+
1.66.0 · source

pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the first entry in the map for in-place manipulation. +The key of this entry is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.first_entry() {
+    if *entry.key() > 0 {
+        entry.insert("first");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "first");
+assert_eq!(*map.get(&2).unwrap(), "b");
+
1.66.0 · source

pub fn pop_first(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the first element in the map. +The key of this element is the minimum key that was in the map.

+
Examples
+

Draining elements in ascending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_first() {
+    assert!(map.iter().all(|(k, _v)| *k > key));
+}
+assert!(map.is_empty());
+
1.66.0 · source

pub fn last_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the last key-value pair in the map. +The key in this pair is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.last_key_value(), Some((&2, &"a")));
+
1.66.0 · source

pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the last entry in the map for in-place manipulation. +The key of this entry is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.last_entry() {
+    if *entry.key() > 0 {
+        entry.insert("last");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "a");
+assert_eq!(*map.get(&2).unwrap(), "last");
+
1.66.0 · source

pub fn pop_last(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the last element in the map. +The key of this element is the maximum key that was in the map.

+
Examples
+

Draining elements in descending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_last() {
+    assert!(map.iter().all(|(k, _v)| *k < key));
+}
+assert!(map.is_empty());
+
1.0.0 · source

pub fn contains_key<Q>(&self, key: &Q) -> bool
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns true if the map contains a value for the specified key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.contains_key(&1), true);
+assert_eq!(map.contains_key(&2), false);
+
1.0.0 · source

pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a mutable reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+if let Some(x) = map.get_mut(&1) {
+    *x = "b";
+}
+assert_eq!(map[&1], "b");
+
1.0.0 · source

pub fn insert(&mut self, key: K, value: V) -> Option<V>
where + K: Ord,

Inserts a key-value pair into the map.

+

If the map did not have this key present, None is returned.

+

If the map did have this key present, the value is updated, and the old +value is returned. The key is not updated, though; this matters for +types that can be == without being identical. See the module-level +documentation for more.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.insert(37, "a"), None);
+assert_eq!(map.is_empty(), false);
+
+map.insert(37, "b");
+assert_eq!(map.insert(37, "c"), Some("b"));
+assert_eq!(map[&37], "c");
+
source

pub fn try_insert( + &mut self, + key: K, + value: V +) -> Result<&mut V, OccupiedError<'_, K, V, A>>
where + K: Ord,

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns +a mutable reference to the value in the entry.

+

If the map already had this key present, nothing is updated, and +an error containing the occupied entry and the value is returned.

+
Examples
+
#![feature(map_try_insert)]
+
+use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.try_insert(37, "a").unwrap(), &"a");
+
+let err = map.try_insert(37, "b").unwrap_err();
+assert_eq!(err.entry.key(), &37);
+assert_eq!(err.entry.get(), &"a");
+assert_eq!(err.value, "b");
+
1.0.0 · source

pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the value at the key if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove(&1), Some("a"));
+assert_eq!(map.remove(&1), None);
+
1.45.0 · source

pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the stored key and value if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove_entry(&1), Some((1, "a")));
+assert_eq!(map.remove_entry(&1), None);
+
1.53.0 · source

pub fn retain<F>(&mut self, f: F)
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

+

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false. +The elements are visited in ascending key order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
+// Keep only the elements with even-numbered keys.
+map.retain(|&k, _| k % 2 == 0);
+assert!(map.into_iter().eq(vec![(0, 0), (2, 20), (4, 40), (6, 60)]));
+
1.11.0 · source

pub fn append(&mut self, other: &mut BTreeMap<K, V, A>)
where + K: Ord, + A: Clone,

Moves all elements from other into self, leaving other empty.

+

If a key from other is already present in self, the respective +value from self will be overwritten with the respective value from other.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c"); // Note: Key (3) also present in b.
+
+let mut b = BTreeMap::new();
+b.insert(3, "d"); // Note: Key (3) also present in a.
+b.insert(4, "e");
+b.insert(5, "f");
+
+a.append(&mut b);
+
+assert_eq!(a.len(), 5);
+assert_eq!(b.len(), 0);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+assert_eq!(a[&3], "d"); // Note: "c" has been overwritten.
+assert_eq!(a[&4], "e");
+assert_eq!(a[&5], "f");
+
1.17.0 · source

pub fn range<T, R>(&self, range: R) -> Range<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+use std::ops::Bound::Included;
+
+let mut map = BTreeMap::new();
+map.insert(3, "a");
+map.insert(5, "b");
+map.insert(8, "c");
+for (&key, &value) in map.range((Included(&4), Included(&8))) {
+    println!("{key}: {value}");
+}
+assert_eq!(Some((&5, &"b")), map.range(4..).next());
+
1.17.0 · source

pub fn range_mut<T, R>(&mut self, range: R) -> RangeMut<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a mutable double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<&str, i32> =
+    [("Alice", 0), ("Bob", 0), ("Carol", 0), ("Cheryl", 0)].into();
+for (_, balance) in map.range_mut("B".."Cheryl") {
+    *balance += 100;
+}
+for (name, balance) in &map {
+    println!("{name} => {balance}");
+}
+
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A>
where + K: Ord,

Gets the given key’s corresponding entry in the map for in-place manipulation.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut count: BTreeMap<&str, usize> = BTreeMap::new();
+
+// count the number of occurrences of letters in the vec
+for x in ["a", "b", "a", "c", "a", "b"] {
+    count.entry(x).and_modify(|curr| *curr += 1).or_insert(1);
+}
+
+assert_eq!(count["a"], 3);
+assert_eq!(count["b"], 2);
+assert_eq!(count["c"], 1);
+
1.11.0 · source

pub fn split_off<Q>(&mut self, key: &Q) -> BTreeMap<K, V, A>
where + Q: Ord + ?Sized, + K: Borrow<Q> + Ord, + A: Clone,

Splits the collection into two at the given key. Returns everything after the given key, +including the key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(17, "d");
+a.insert(41, "e");
+
+let b = a.split_off(&3);
+
+assert_eq!(a.len(), 2);
+assert_eq!(b.len(), 3);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+
+assert_eq!(b[&3], "c");
+assert_eq!(b[&17], "d");
+assert_eq!(b[&41], "e");
+
source

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A>
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (btree_extract_if)

Creates an iterator that visits all elements (key-value pairs) in +ascending key order and uses a closure to determine if an element should +be removed. If the closure returns true, the element is removed from +the map and yielded. If the closure returns false, or panics, the +element remains in the map and will not be yielded.

+

The iterator also lets you mutate the value of each element in the +closure, regardless of whether you choose to keep or remove it.

+

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating +or the iteration short-circuits, then the remaining elements will be retained. +Use retain with a negated predicate if you do not need the returned iterator.

+
Examples
+

Splitting a map into even and odd keys, reusing the original map:

+ +
#![feature(btree_extract_if)]
+use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
+let evens: BTreeMap<_, _> = map.extract_if(|k, _v| k % 2 == 0).collect();
+let odds = map;
+assert_eq!(evens.keys().copied().collect::<Vec<_>>(), [0, 2, 4, 6]);
+assert_eq!(odds.keys().copied().collect::<Vec<_>>(), [1, 3, 5, 7]);
+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

Gets an iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(3, "c");
+map.insert(2, "b");
+map.insert(1, "a");
+
+for (key, value) in map.iter() {
+    println!("{key}: {value}");
+}
+
+let (first_key, first_value) = map.iter().next().unwrap();
+assert_eq!((*first_key, *first_value), (1, "a"));
+
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

Gets a mutable iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::from([
+   ("a", 1),
+   ("b", 2),
+   ("c", 3),
+]);
+
+// add 10 to the value if the key isn't "a"
+for (key, value) in map.iter_mut() {
+    if key != &"a" {
+        *value += 10;
+    }
+}
+
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

Gets an iterator over the keys of the map, in sorted order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(2, "b");
+a.insert(1, "a");
+
+let keys: Vec<_> = a.keys().cloned().collect();
+assert_eq!(keys, [1, 2]);
+
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

Gets an iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "hello");
+a.insert(2, "goodbye");
+
+let values: Vec<&str> = a.values().cloned().collect();
+assert_eq!(values, ["hello", "goodbye"]);
+
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

Gets a mutable iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, String::from("hello"));
+a.insert(2, String::from("goodbye"));
+
+for value in a.values_mut() {
+    value.push_str("!");
+}
+
+let values: Vec<String> = a.values().cloned().collect();
+assert_eq!(values, [String::from("hello!"),
+                    String::from("goodbye!")]);
+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert_eq!(a.len(), 0);
+a.insert(1, "a");
+assert_eq!(a.len(), 1);
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert!(a.is_empty());
+a.insert(1, "a");
+assert!(!a.is_empty());
+
source

pub fn lower_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn lower_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound_mut(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound_mut(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn upper_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+
source

pub fn upper_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound_mut(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound_mut(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+

Trait Implementations§

source§

impl AsRef<BTreeMap<String, Value>> for OtherFields

source§

fn as_ref(&self) -> &BTreeMap<String, Value>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for OtherFields

source§

fn clone(&self) -> OtherFields

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OtherFields

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for OtherFields

source§

fn default() -> OtherFields

Returns the “default value” for a type. Read more
source§

impl Deref for OtherFields

§

type Target = BTreeMap<String, Value>

The resulting type after dereferencing.
source§

fn deref(&self) -> &BTreeMap<String, Value>

Dereferences the value.
source§

impl DerefMut for OtherFields

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for OtherFields

source§

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<'a> IntoIterator for &'a OtherFields

§

type Item = (&'a String, &'a Value)

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, String, Value>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl IntoIterator for OtherFields

§

type Item = (String, Value)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<String, Value>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq for OtherFields

source§

fn eq(&self, other: &OtherFields) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for OtherFields

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for OtherFields

source§

impl StructuralEq for OtherFields

source§

impl StructuralPartialEq for OtherFields

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/pubsub/enum.Params.html b/alloy_rpc_types/eth/pubsub/enum.Params.html new file mode 100644 index 000000000000..42276878aed7 --- /dev/null +++ b/alloy_rpc_types/eth/pubsub/enum.Params.html @@ -0,0 +1,34 @@ +Params in alloy_rpc_types::eth::pubsub - Rust +
pub enum Params {
+    None,
+    Logs(Box<Filter>),
+    Bool(bool),
+}
Expand description

Any additional parameters for a subscription.

+

Variants§

§

None

No parameters passed.

+
§

Logs(Box<Filter>)

Log parameters.

+
§

Bool(bool)

Boolean parameter for new pending transactions.

+

Implementations§

source§

impl Params

source

pub fn is_bool(&self) -> bool

Returns true if it’s a bool parameter.

+
source

pub fn is_logs(&self) -> bool

Returns true if it’s a log parameter.

+

Trait Implementations§

source§

impl Clone for Params

source§

fn clone(&self) -> Params

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Params

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Params

source§

fn default() -> Params

Returns the “default value” for a type. Read more
source§

impl<'a> Deserialize<'a> for Params

source§

fn deserialize<D>(deserializer: D) -> Result<Params, D::Error>
where + D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Params

source§

fn eq(&self, other: &Params) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Params

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Params

source§

impl StructuralEq for Params

source§

impl StructuralPartialEq for Params

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

Size for each variant:

  • None: 0 bytes
  • Logs: 15 bytes
  • Bool: 1 byte
\ No newline at end of file diff --git a/alloy_rpc_types/eth/pubsub/enum.PubSubSyncStatus.html b/alloy_rpc_types/eth/pubsub/enum.PubSubSyncStatus.html new file mode 100644 index 000000000000..901f1b03e533 --- /dev/null +++ b/alloy_rpc_types/eth/pubsub/enum.PubSubSyncStatus.html @@ -0,0 +1,30 @@ +PubSubSyncStatus in alloy_rpc_types::eth::pubsub - Rust +
pub enum PubSubSyncStatus {
+    Simple(bool),
+    Detailed(SyncStatusMetadata),
+}
Expand description

Response type for a SyncStatus subscription

+

Variants§

§

Simple(bool)

If not currently syncing, this should always be false

+
§

Detailed(SyncStatusMetadata)

Current Stats about syncing

+

Trait Implementations§

source§

impl Clone for PubSubSyncStatus

source§

fn clone(&self) -> PubSubSyncStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PubSubSyncStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PubSubSyncStatus

source§

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 PartialEq for PubSubSyncStatus

source§

fn eq(&self, other: &PubSubSyncStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PubSubSyncStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PubSubSyncStatus

source§

impl StructuralEq for PubSubSyncStatus

source§

impl StructuralPartialEq for PubSubSyncStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Simple: 9 bytes
  • Detailed: 40 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/pubsub/enum.SubscriptionKind.html b/alloy_rpc_types/eth/pubsub/enum.SubscriptionKind.html new file mode 100644 index 000000000000..b2a19a36ef3c --- /dev/null +++ b/alloy_rpc_types/eth/pubsub/enum.SubscriptionKind.html @@ -0,0 +1,52 @@ +SubscriptionKind in alloy_rpc_types::eth::pubsub - Rust +
pub enum SubscriptionKind {
+    NewHeads,
+    Logs,
+    NewPendingTransactions,
+    Syncing,
+}
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

source§

fn clone(&self) -> SubscriptionKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SubscriptionKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SubscriptionKind

source§

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 Hash for SubscriptionKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for SubscriptionKind

source§

fn eq(&self, other: &SubscriptionKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SubscriptionKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SubscriptionKind

source§

impl StructuralEq for SubscriptionKind

source§

impl StructuralPartialEq for SubscriptionKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • NewHeads: 0 bytes
  • Logs: 0 bytes
  • NewPendingTransactions: 0 bytes
  • Syncing: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/pubsub/enum.SubscriptionResult.html b/alloy_rpc_types/eth/pubsub/enum.SubscriptionResult.html new file mode 100644 index 000000000000..e90e21e76456 --- /dev/null +++ b/alloy_rpc_types/eth/pubsub/enum.SubscriptionResult.html @@ -0,0 +1,36 @@ +SubscriptionResult in alloy_rpc_types::eth::pubsub - Rust +
pub enum SubscriptionResult {
+    Header(Box<RichHeader>),
+    Log(Box<Log>),
+    TransactionHash(B256),
+    FullTransaction(Box<Transaction>),
+    SyncState(PubSubSyncStatus),
+}
Expand description

Subscription result.

+

Variants§

§

Header(Box<RichHeader>)

New block header.

+
§

Log(Box<Log>)

Log

+
§

TransactionHash(B256)

Transaction hash

+
§

FullTransaction(Box<Transaction>)

Full Transaction

+
§

SyncState(PubSubSyncStatus)

SyncStatus

+

Trait Implementations§

source§

impl Clone for SubscriptionResult

source§

fn clone(&self) -> SubscriptionResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SubscriptionResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SubscriptionResult

source§

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 PartialEq for SubscriptionResult

source§

fn eq(&self, other: &SubscriptionResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SubscriptionResult

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SubscriptionResult

source§

impl StructuralEq for SubscriptionResult

source§

impl StructuralPartialEq for SubscriptionResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Header: 16 bytes
  • Log: 16 bytes
  • TransactionHash: 40 bytes
  • FullTransaction: 16 bytes
  • SyncState: 40 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/pubsub/index.html b/alloy_rpc_types/eth/pubsub/index.html new file mode 100644 index 000000000000..aee4b6c6ff3c --- /dev/null +++ b/alloy_rpc_types/eth/pubsub/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::pubsub - Rust +

Module alloy_rpc_types::eth::pubsub

source ·
Expand description

Ethereum types for pub-sub

+

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/pubsub/sidebar-items.js b/alloy_rpc_types/eth/pubsub/sidebar-items.js new file mode 100644 index 000000000000..32602c620eb8 --- /dev/null +++ b/alloy_rpc_types/eth/pubsub/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Params","PubSubSyncStatus","SubscriptionKind","SubscriptionResult"],"struct":["SyncStatusMetadata"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/pubsub/struct.SyncStatusMetadata.html b/alloy_rpc_types/eth/pubsub/struct.SyncStatusMetadata.html new file mode 100644 index 000000000000..c3fe8022f3e0 --- /dev/null +++ b/alloy_rpc_types/eth/pubsub/struct.SyncStatusMetadata.html @@ -0,0 +1,30 @@ +SyncStatusMetadata in alloy_rpc_types::eth::pubsub - Rust +
pub struct SyncStatusMetadata {
+    pub syncing: bool,
+    pub starting_block: u64,
+    pub current_block: u64,
+    pub highest_block: Option<u64>,
+}
Expand description

Sync status infos

+

Fields§

§syncing: bool§starting_block: u64§current_block: u64§highest_block: Option<u64>

Trait Implementations§

source§

impl Clone for SyncStatusMetadata

source§

fn clone(&self) -> SyncStatusMetadata

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SyncStatusMetadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SyncStatusMetadata

source§

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 PartialEq for SyncStatusMetadata

source§

fn eq(&self, other: &SyncStatusMetadata) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SyncStatusMetadata

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SyncStatusMetadata

source§

impl StructuralEq for SyncStatusMetadata

source§

impl StructuralPartialEq for SyncStatusMetadata

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/raw_log/fn.logs_bloom.html b/alloy_rpc_types/eth/raw_log/fn.logs_bloom.html new file mode 100644 index 000000000000..4034fa05036c --- /dev/null +++ b/alloy_rpc_types/eth/raw_log/fn.logs_bloom.html @@ -0,0 +1,4 @@ +logs_bloom in alloy_rpc_types::eth::raw_log - Rust +
pub fn logs_bloom<'a, It>(logs: It) -> Bloom
where + It: IntoIterator<Item = &'a Log>,
Expand description

Calculate receipt logs bloom.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/raw_log/index.html b/alloy_rpc_types/eth/raw_log/index.html new file mode 100644 index 000000000000..1498e30be3b9 --- /dev/null +++ b/alloy_rpc_types/eth/raw_log/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::raw_log - Rust +
Expand description

Ethereum log object.

+

Structs

  • Ethereum Log

Functions

\ No newline at end of file diff --git a/alloy_rpc_types/eth/raw_log/sidebar-items.js b/alloy_rpc_types/eth/raw_log/sidebar-items.js new file mode 100644 index 000000000000..b8c2ee7115b9 --- /dev/null +++ b/alloy_rpc_types/eth/raw_log/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["logs_bloom"],"struct":["Log"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/raw_log/struct.Log.html b/alloy_rpc_types/eth/raw_log/struct.Log.html new file mode 100644 index 000000000000..8d9e39138e46 --- /dev/null +++ b/alloy_rpc_types/eth/raw_log/struct.Log.html @@ -0,0 +1,30 @@ +Log in alloy_rpc_types::eth::raw_log - Rust +
pub struct Log {
+    pub address: Address,
+    pub topics: Vec<B256>,
+    pub data: Bytes,
+}
Expand description

Ethereum Log

+

Fields§

§address: Address

Contract that emitted this log.

+
§topics: Vec<B256>

Topics of the log. The number of logs depend on what LOG opcode is used.

+
§data: Bytes

Arbitrary length data.

+

Implementations§

Trait Implementations§

source§

impl Clone for Log

source§

fn clone(&self) -> Log

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Log

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Log

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for Log

source§

fn default() -> Log

Returns the “default value” for a type. Read more
source§

impl Encodable for Log

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl PartialEq for Log

source§

fn eq(&self, other: &Log) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Log

source§

impl StructuralEq for Log

source§

impl StructuralPartialEq for Log

Auto Trait Implementations§

§

impl RefUnwindSafe for Log

§

impl Send for Log

§

impl Sync for Log

§

impl Unpin for Log

§

impl UnwindSafe for Log

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/sidebar-items.js b/alloy_rpc_types/eth/sidebar-items.js new file mode 100644 index 000000000000..8e40dd3c9743 --- /dev/null +++ b/alloy_rpc_types/eth/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["account","block","call","fee","filter","log","other","pubsub","raw_log","state","syncing","trace","transaction","txpool","withdrawal"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/state/index.html b/alloy_rpc_types/eth/state/index.html new file mode 100644 index 000000000000..5265f777071e --- /dev/null +++ b/alloy_rpc_types/eth/state/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::state - Rust +

Module alloy_rpc_types::eth::state

source ·
Expand description

bindings for state overrides in eth_call

+

Structs

Type Aliases

\ No newline at end of file diff --git a/alloy_rpc_types/eth/state/sidebar-items.js b/alloy_rpc_types/eth/state/sidebar-items.js new file mode 100644 index 000000000000..0b1926665459 --- /dev/null +++ b/alloy_rpc_types/eth/state/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AccountOverride"],"type":["StateOverride"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/state/struct.AccountOverride.html b/alloy_rpc_types/eth/state/struct.AccountOverride.html new file mode 100644 index 000000000000..70b90c6fd41e --- /dev/null +++ b/alloy_rpc_types/eth/state/struct.AccountOverride.html @@ -0,0 +1,39 @@ +AccountOverride in alloy_rpc_types::eth::state - Rust +
pub struct AccountOverride {
+    pub balance: Option<U256>,
+    pub nonce: Option<U64>,
+    pub code: Option<Bytes>,
+    pub state: Option<HashMap<B256, U256>>,
+    pub state_diff: Option<HashMap<B256, U256>>,
+}
Expand description

Custom account override used in call

+

Fields§

§balance: Option<U256>

Fake balance to set for the account before executing the call.

+
§nonce: Option<U64>

Fake nonce to set for the account before executing the call.

+
§code: Option<Bytes>

Fake EVM bytecode to inject into the account before executing the call.

+
§state: Option<HashMap<B256, U256>>

Fake key-value mapping to override all slots in the account storage before executing the +call.

+
§state_diff: Option<HashMap<B256, U256>>

Fake key-value mapping to override individual slots in the account storage before executing +the call.

+

Trait Implementations§

source§

impl Clone for AccountOverride

source§

fn clone(&self) -> AccountOverride

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountOverride

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountOverride

source§

fn default() -> AccountOverride

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountOverride

source§

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 PartialEq for AccountOverride

source§

fn eq(&self, other: &AccountOverride) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountOverride

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountOverride

source§

impl StructuralEq for AccountOverride

source§

impl StructuralPartialEq for AccountOverride

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 184 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/state/type.StateOverride.html b/alloy_rpc_types/eth/state/type.StateOverride.html new file mode 100644 index 000000000000..20ac37c418f2 --- /dev/null +++ b/alloy_rpc_types/eth/state/type.StateOverride.html @@ -0,0 +1,5 @@ +StateOverride in alloy_rpc_types::eth::state - Rust +
pub type StateOverride = HashMap<Address, AccountOverride>;
Expand description

A set of account overrides

+

Aliased Type§

struct StateOverride {
+    base: HashMap<Address, AccountOverride, RandomState>,
+}

Fields§

§base: HashMap<Address, AccountOverride, RandomState>

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/enum.PeerCount.html b/alloy_rpc_types/eth/syncing/enum.PeerCount.html new file mode 100644 index 000000000000..6f02d9214acb --- /dev/null +++ b/alloy_rpc_types/eth/syncing/enum.PeerCount.html @@ -0,0 +1,28 @@ +PeerCount in alloy_rpc_types::eth::syncing - Rust +
pub enum PeerCount {
+    Number(u32),
+    Hex(U64),
+}
Expand description

Number of peers connected to.

+

Variants§

§

Number(u32)

Peer count as integer

+
§

Hex(U64)

Peer count as hex

+

Trait Implementations§

source§

impl Clone for PeerCount

source§

fn clone(&self) -> PeerCount

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerCount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PeerCount

source§

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 Serialize for PeerCount

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

Size for each variant:

  • Number: 4 bytes
  • Hex: 12 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/enum.SyncStatus.html b/alloy_rpc_types/eth/syncing/enum.SyncStatus.html new file mode 100644 index 000000000000..270ffa23cfed --- /dev/null +++ b/alloy_rpc_types/eth/syncing/enum.SyncStatus.html @@ -0,0 +1,30 @@ +SyncStatus in alloy_rpc_types::eth::syncing - Rust +
pub enum SyncStatus {
+    Info(SyncInfo),
+    None,
+}
Expand description

Sync status

+

Variants§

§

Info(SyncInfo)

Info when syncing

+
§

None

Not syncing

+

Trait Implementations§

source§

impl Clone for SyncStatus

source§

fn clone(&self) -> SyncStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SyncStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SyncStatus

source§

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 PartialEq for SyncStatus

source§

fn eq(&self, other: &SyncStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SyncStatus

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SyncStatus

source§

impl StructuralEq for SyncStatus

source§

impl StructuralPartialEq for SyncStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

Size for each variant:

  • Info: 176 bytes
  • None: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/index.html b/alloy_rpc_types/eth/syncing/index.html new file mode 100644 index 000000000000..2e4e88896aa3 --- /dev/null +++ b/alloy_rpc_types/eth/syncing/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::syncing - Rust +

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/sidebar-items.js b/alloy_rpc_types/eth/syncing/sidebar-items.js new file mode 100644 index 000000000000..998a74bc386b --- /dev/null +++ b/alloy_rpc_types/eth/syncing/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["PeerCount","SyncStatus"],"struct":["ChainStatus","PeerEthProtocolInfo","PeerInfo","PeerNetworkInfo","PeerProtocolsInfo","Peers","PipProtocolInfo","SyncInfo","TransactionStats"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.ChainStatus.html b/alloy_rpc_types/eth/syncing/struct.ChainStatus.html new file mode 100644 index 000000000000..2e2020c2705b --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.ChainStatus.html @@ -0,0 +1,24 @@ +ChainStatus in alloy_rpc_types::eth::syncing - Rust +
pub struct ChainStatus {
+    pub block_gap: Option<(U256, U256)>,
+}
Expand description

Chain status.

+

Fields§

§block_gap: Option<(U256, U256)>

Describes the gap in the blockchain, if there is one: (first, last)

+

Trait Implementations§

source§

impl Clone for ChainStatus

source§

fn clone(&self) -> ChainStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ChainStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ChainStatus

source§

fn default() -> ChainStatus

Returns the “default value” for a type. Read more
source§

impl Serialize for ChainStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.PeerEthProtocolInfo.html b/alloy_rpc_types/eth/syncing/struct.PeerEthProtocolInfo.html new file mode 100644 index 000000000000..1e76c410b014 --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.PeerEthProtocolInfo.html @@ -0,0 +1,30 @@ +PeerEthProtocolInfo in alloy_rpc_types::eth::syncing - Rust +
pub struct PeerEthProtocolInfo {
+    pub version: u32,
+    pub difficulty: Option<U256>,
+    pub head: String,
+}
Expand description

Peer Ethereum protocol information

+

Fields§

§version: u32

Negotiated ethereum protocol version

+
§difficulty: Option<U256>

Peer total difficulty if known

+
§head: String

SHA3 of peer best block hash

+

Trait Implementations§

source§

impl Clone for PeerEthProtocolInfo

source§

fn clone(&self) -> PeerEthProtocolInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerEthProtocolInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerEthProtocolInfo

source§

fn default() -> PeerEthProtocolInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerEthProtocolInfo

source§

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 Serialize for PeerEthProtocolInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.PeerInfo.html b/alloy_rpc_types/eth/syncing/struct.PeerInfo.html new file mode 100644 index 000000000000..200822688dca --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.PeerInfo.html @@ -0,0 +1,34 @@ +PeerInfo in alloy_rpc_types::eth::syncing - Rust +
pub struct PeerInfo {
+    pub id: Option<String>,
+    pub name: String,
+    pub caps: Vec<String>,
+    pub network: PeerNetworkInfo,
+    pub protocols: PeerProtocolsInfo,
+}
Expand description

Peer connection information

+

Fields§

§id: Option<String>

Public node id

+
§name: String

Node client ID

+
§caps: Vec<String>

Capabilities

+
§network: PeerNetworkInfo

Network information

+
§protocols: PeerProtocolsInfo

Protocols information

+

Trait Implementations§

source§

impl Clone for PeerInfo

source§

fn clone(&self) -> PeerInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerInfo

source§

fn default() -> PeerInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerInfo

source§

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 Serialize for PeerInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 256 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.PeerNetworkInfo.html b/alloy_rpc_types/eth/syncing/struct.PeerNetworkInfo.html new file mode 100644 index 000000000000..2cc8534f6648 --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.PeerNetworkInfo.html @@ -0,0 +1,28 @@ +PeerNetworkInfo in alloy_rpc_types::eth::syncing - Rust +
pub struct PeerNetworkInfo {
+    pub remote_address: String,
+    pub local_address: String,
+}
Expand description

Peer network information

+

Fields§

§remote_address: String

Remote endpoint address

+
§local_address: String

Local endpoint address

+

Trait Implementations§

source§

impl Clone for PeerNetworkInfo

source§

fn clone(&self) -> PeerNetworkInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerNetworkInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerNetworkInfo

source§

fn default() -> PeerNetworkInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerNetworkInfo

source§

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 Serialize for PeerNetworkInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.PeerProtocolsInfo.html b/alloy_rpc_types/eth/syncing/struct.PeerProtocolsInfo.html new file mode 100644 index 000000000000..fb1345d64aa9 --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.PeerProtocolsInfo.html @@ -0,0 +1,28 @@ +PeerProtocolsInfo in alloy_rpc_types::eth::syncing - Rust +
pub struct PeerProtocolsInfo {
+    pub eth: Option<PeerEthProtocolInfo>,
+    pub pip: Option<PipProtocolInfo>,
+}
Expand description

Peer protocols information

+

Fields§

§eth: Option<PeerEthProtocolInfo>

Ethereum protocol information

+
§pip: Option<PipProtocolInfo>

PIP protocol information.

+

Trait Implementations§

source§

impl Clone for PeerProtocolsInfo

source§

fn clone(&self) -> PeerProtocolsInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerProtocolsInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerProtocolsInfo

source§

fn default() -> PeerProtocolsInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerProtocolsInfo

source§

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 Serialize for PeerProtocolsInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.Peers.html b/alloy_rpc_types/eth/syncing/struct.Peers.html new file mode 100644 index 000000000000..1a2b28f0f431 --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.Peers.html @@ -0,0 +1,30 @@ +Peers in alloy_rpc_types::eth::syncing - Rust +
pub struct Peers {
+    pub active: usize,
+    pub connected: usize,
+    pub max: u32,
+    pub peers: Vec<PeerInfo>,
+}
Expand description

Peers info

+

Fields§

§active: usize

Number of active peers

+
§connected: usize

Number of connected peers

+
§max: u32

Max number of peers

+
§peers: Vec<PeerInfo>

Detailed information on peers

+

Trait Implementations§

source§

impl Clone for Peers

source§

fn clone(&self) -> Peers

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Peers

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Peers

source§

fn default() -> Peers

Returns the “default value” for a type. Read more
source§

impl Serialize for Peers

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Peers

§

impl Send for Peers

§

impl Sync for Peers

§

impl Unpin for Peers

§

impl UnwindSafe for Peers

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.PipProtocolInfo.html b/alloy_rpc_types/eth/syncing/struct.PipProtocolInfo.html new file mode 100644 index 000000000000..551f13b31c64 --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.PipProtocolInfo.html @@ -0,0 +1,30 @@ +PipProtocolInfo in alloy_rpc_types::eth::syncing - Rust +
pub struct PipProtocolInfo {
+    pub version: u32,
+    pub difficulty: U256,
+    pub head: String,
+}
Expand description

Peer PIP protocol information

+

Fields§

§version: u32

Negotiated PIP protocol version

+
§difficulty: U256

Peer total difficulty

+
§head: String

SHA3 of peer best block hash

+

Trait Implementations§

source§

impl Clone for PipProtocolInfo

source§

fn clone(&self) -> PipProtocolInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PipProtocolInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PipProtocolInfo

source§

fn default() -> PipProtocolInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PipProtocolInfo

source§

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 Serialize for PipProtocolInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.SyncInfo.html b/alloy_rpc_types/eth/syncing/struct.SyncInfo.html new file mode 100644 index 000000000000..294be45b7536 --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.SyncInfo.html @@ -0,0 +1,36 @@ +SyncInfo in alloy_rpc_types::eth::syncing - Rust +
pub struct SyncInfo {
+    pub starting_block: U256,
+    pub current_block: U256,
+    pub highest_block: U256,
+    pub warp_chunks_amount: Option<U256>,
+    pub warp_chunks_processed: Option<U256>,
+}
Expand description

Syncing info

+

Fields§

§starting_block: U256

Starting block

+
§current_block: U256

Current block

+
§highest_block: U256

Highest block seen so far

+
§warp_chunks_amount: Option<U256>

Warp sync snapshot chunks total.

+
§warp_chunks_processed: Option<U256>

Warp sync snapshot chunks processed.

+

Trait Implementations§

source§

impl Clone for SyncInfo

source§

fn clone(&self) -> SyncInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SyncInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SyncInfo

source§

fn default() -> SyncInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for SyncInfo

source§

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 PartialEq for SyncInfo

source§

fn eq(&self, other: &SyncInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SyncInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SyncInfo

source§

impl StructuralEq for SyncInfo

source§

impl StructuralPartialEq for SyncInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/syncing/struct.TransactionStats.html b/alloy_rpc_types/eth/syncing/struct.TransactionStats.html new file mode 100644 index 000000000000..6a6c892e8fca --- /dev/null +++ b/alloy_rpc_types/eth/syncing/struct.TransactionStats.html @@ -0,0 +1,26 @@ +TransactionStats in alloy_rpc_types::eth::syncing - Rust +
pub struct TransactionStats {
+    pub first_seen: u64,
+    pub propagated_to: BTreeMap<B512, usize>,
+}
Expand description

Propagation statistics for pending transaction.

+

Fields§

§first_seen: u64

Block no this transaction was first seen.

+
§propagated_to: BTreeMap<B512, usize>

Peers this transaction was propagated to with count.

+

Trait Implementations§

source§

impl Clone for TransactionStats

source§

fn clone(&self) -> TransactionStats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionStats

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TransactionStats

source§

fn default() -> TransactionStats

Returns the “default value” for a type. Read more
source§

impl Serialize for TransactionStats

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/common/enum.TraceResult.html b/alloy_rpc_types/eth/trace/common/enum.TraceResult.html new file mode 100644 index 000000000000..0ceb050b198a --- /dev/null +++ b/alloy_rpc_types/eth/trace/common/enum.TraceResult.html @@ -0,0 +1,48 @@ +TraceResult in alloy_rpc_types::eth::trace::common - Rust +
pub enum TraceResult<Ok, Err> {
+    Success {
+        result: Ok,
+    },
+    Error {
+        error: Err,
+    },
+}
Expand description

The result of a single transaction trace.

+

Variants§

§

Success

Fields

§result: Ok

Untagged success variant

+
§

Error

Fields

§error: Err

Untagged error variant

+

Trait Implementations§

source§

impl<Ok: Clone, Err: Clone> Clone for TraceResult<Ok, Err>

source§

fn clone(&self) -> TraceResult<Ok, Err>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Ok: Debug, Err: Debug> Debug for TraceResult<Ok, Err>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, Ok, Err> Deserialize<'de> for TraceResult<Ok, Err>
where + Ok: Deserialize<'de>, + Err: Deserialize<'de>,

source§

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<Ok: PartialEq, Err: PartialEq> PartialEq for TraceResult<Ok, Err>

source§

fn eq(&self, other: &TraceResult<Ok, Err>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<Ok, Err> Serialize for TraceResult<Ok, Err>
where + Ok: Serialize, + Err: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Ok: Eq, Err: Eq> Eq for TraceResult<Ok, Err>

source§

impl<Ok, Err> StructuralEq for TraceResult<Ok, Err>

source§

impl<Ok, Err> StructuralPartialEq for TraceResult<Ok, Err>

Auto Trait Implementations§

§

impl<Ok, Err> RefUnwindSafe for TraceResult<Ok, Err>
where + Err: RefUnwindSafe, + Ok: RefUnwindSafe,

§

impl<Ok, Err> Send for TraceResult<Ok, Err>
where + Err: Send, + Ok: Send,

§

impl<Ok, Err> Sync for TraceResult<Ok, Err>
where + Err: Sync, + Ok: Sync,

§

impl<Ok, Err> Unpin for TraceResult<Ok, Err>
where + Err: Unpin, + Ok: Unpin,

§

impl<Ok, Err> UnwindSafe for TraceResult<Ok, Err>
where + Err: UnwindSafe, + Ok: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/common/index.html b/alloy_rpc_types/eth/trace/common/index.html new file mode 100644 index 000000000000..d64650a1c174 --- /dev/null +++ b/alloy_rpc_types/eth/trace/common/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::trace::common - Rust +
Expand description

Types used by tracing backends

+

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/common/sidebar-items.js b/alloy_rpc_types/eth/trace/common/sidebar-items.js new file mode 100644 index 000000000000..93aaa7289543 --- /dev/null +++ b/alloy_rpc_types/eth/trace/common/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TraceResult"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/filter/enum.TraceFilterMode.html b/alloy_rpc_types/eth/trace/filter/enum.TraceFilterMode.html new file mode 100644 index 000000000000..ba1c7da20ca9 --- /dev/null +++ b/alloy_rpc_types/eth/trace/filter/enum.TraceFilterMode.html @@ -0,0 +1,30 @@ +TraceFilterMode in alloy_rpc_types::eth::trace::filter - Rust +
pub enum TraceFilterMode {
+    Union,
+    Intersection,
+}
Expand description

How to apply from_address and to_address filters.

+

Variants§

§

Union

Return traces for transactions with matching from OR to addresses.

+
§

Intersection

Only return traces for transactions with matching from and to addresses.

+

Trait Implementations§

source§

impl Clone for TraceFilterMode

source§

fn clone(&self) -> TraceFilterMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilterMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceFilterMode

source§

fn default() -> TraceFilterMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceFilterMode

source§

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 PartialEq for TraceFilterMode

source§

fn eq(&self, other: &TraceFilterMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceFilterMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TraceFilterMode

source§

impl Eq for TraceFilterMode

source§

impl StructuralEq for TraceFilterMode

source§

impl StructuralPartialEq for TraceFilterMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Union: 0 bytes
  • Intersection: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/filter/index.html b/alloy_rpc_types/eth/trace/filter/index.html new file mode 100644 index 000000000000..0bd4c42e9f9e --- /dev/null +++ b/alloy_rpc_types/eth/trace/filter/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::trace::filter - Rust +
Expand description

trace_filter types and support

+

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/filter/sidebar-items.js b/alloy_rpc_types/eth/trace/filter/sidebar-items.js new file mode 100644 index 000000000000..0e2c7b75bb46 --- /dev/null +++ b/alloy_rpc_types/eth/trace/filter/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TraceFilterMode"],"struct":["TraceFilter","TraceFilterMatcher"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/filter/struct.TraceFilter.html b/alloy_rpc_types/eth/trace/filter/struct.TraceFilter.html new file mode 100644 index 000000000000..7dfcec9aadb5 --- /dev/null +++ b/alloy_rpc_types/eth/trace/filter/struct.TraceFilter.html @@ -0,0 +1,41 @@ +TraceFilter in alloy_rpc_types::eth::trace::filter - Rust +
pub struct TraceFilter {
+    pub from_block: Option<u64>,
+    pub to_block: Option<u64>,
+    pub from_address: Vec<Address>,
+    pub to_address: Vec<Address>,
+    pub mode: TraceFilterMode,
+    pub after: Option<u64>,
+    pub count: Option<u64>,
+}
Expand description

Trace filter.

+

Fields§

§from_block: Option<u64>

From block

+
§to_block: Option<u64>

To block

+
§from_address: Vec<Address>

From address

+
§to_address: Vec<Address>

To address

+
§mode: TraceFilterMode

How to apply from_address and to_address filters.

+
§after: Option<u64>

Output offset

+
§count: Option<u64>

Output amount

+

Implementations§

source§

impl TraceFilter

source

pub fn matcher(&self) -> TraceFilterMatcher

Returns a TraceFilterMatcher for this filter.

+

Trait Implementations§

source§

impl Clone for TraceFilter

source§

fn clone(&self) -> TraceFilter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceFilter

source§

fn default() -> TraceFilter

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceFilter

source§

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 PartialEq for TraceFilter

source§

fn eq(&self, other: &TraceFilter) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceFilter

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceFilter

source§

impl StructuralEq for TraceFilter

source§

impl StructuralPartialEq for TraceFilter

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/filter/struct.TraceFilterMatcher.html b/alloy_rpc_types/eth/trace/filter/struct.TraceFilterMatcher.html new file mode 100644 index 000000000000..360a5f0961a1 --- /dev/null +++ b/alloy_rpc_types/eth/trace/filter/struct.TraceFilterMatcher.html @@ -0,0 +1,27 @@ +TraceFilterMatcher in alloy_rpc_types::eth::trace::filter - Rust +
pub struct TraceFilterMatcher {
+    mode: TraceFilterMode,
+    from_addresses: HashSet<Address>,
+    to_addresses: HashSet<Address>,
+}
Expand description

Helper type for matching from and to addresses. Empty sets match all addresses.

+

Fields§

§mode: TraceFilterMode§from_addresses: HashSet<Address>§to_addresses: HashSet<Address>

Implementations§

source§

impl TraceFilterMatcher

source

pub fn matches(&self, from: Address, to: Option<Address>) -> bool

Returns true if the given from and to addresses match this filter.

+

Trait Implementations§

source§

impl Clone for TraceFilterMatcher

source§

fn clone(&self) -> TraceFilterMatcher

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilterMatcher

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for TraceFilterMatcher

source§

fn eq(&self, other: &TraceFilterMatcher) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for TraceFilterMatcher

source§

impl StructuralEq for TraceFilterMatcher

source§

impl StructuralPartialEq for TraceFilterMatcher

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 104 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/call/index.html b/alloy_rpc_types/eth/trace/geth/call/index.html new file mode 100644 index 000000000000..e009532e0418 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/call/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::trace::geth::call - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/call/sidebar-items.js b/alloy_rpc_types/eth/trace/geth/call/sidebar-items.js new file mode 100644 index 000000000000..6ccba397fe52 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/call/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["CallConfig","CallFrame","CallLogFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/call/struct.CallConfig.html b/alloy_rpc_types/eth/trace/geth/call/struct.CallConfig.html new file mode 100644 index 000000000000..35d66d6ab4c8 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/call/struct.CallConfig.html @@ -0,0 +1,31 @@ +CallConfig in alloy_rpc_types::eth::trace::geth::call - Rust +
pub struct CallConfig {
+    pub only_top_call: Option<bool>,
+    pub with_log: Option<bool>,
+}

Fields§

§only_top_call: Option<bool>

When set to true, this will only trace the primary (top-level) call and not any sub-calls. +It eliminates the additional processing for each call frame

+
§with_log: Option<bool>

Implementations§

source§

impl CallConfig

source

pub fn only_top_call(self) -> Self

Sets the only top call flag

+
source

pub fn with_log(self) -> Self

Sets the with log flag

+

Trait Implementations§

source§

impl Clone for CallConfig

source§

fn clone(&self) -> CallConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallConfig

source§

fn default() -> CallConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallConfig

source§

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 PartialEq for CallConfig

source§

fn eq(&self, other: &CallConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallConfig

source§

impl StructuralEq for CallConfig

source§

impl StructuralPartialEq for CallConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 2 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/call/struct.CallFrame.html b/alloy_rpc_types/eth/trace/geth/call/struct.CallFrame.html new file mode 100644 index 000000000000..859f5dc0ddc1 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/call/struct.CallFrame.html @@ -0,0 +1,39 @@ +CallFrame in alloy_rpc_types::eth::trace::geth::call - Rust +
pub struct CallFrame {
+    pub from: Address,
+    pub gas: U256,
+    pub gas_used: U256,
+    pub to: Option<Address>,
+    pub input: Bytes,
+    pub output: Option<Bytes>,
+    pub error: Option<String>,
+    pub revert_reason: Option<String>,
+    pub calls: Vec<CallFrame>,
+    pub logs: Vec<CallLogFrame>,
+    pub value: Option<U256>,
+    pub typ: String,
+}
Expand description

The response object for debug_traceTransaction with "tracer": "callTracer"

+

https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/call.go#L44

+

Fields§

§from: Address§gas: U256§gas_used: U256§to: Option<Address>§input: Bytes§output: Option<Bytes>§error: Option<String>§revert_reason: Option<String>§calls: Vec<CallFrame>§logs: Vec<CallLogFrame>§value: Option<U256>§typ: String

Trait Implementations§

source§

impl Clone for CallFrame

source§

fn clone(&self) -> CallFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallFrame

source§

fn default() -> CallFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallFrame

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CallFrame

source§

fn eq(&self, other: &CallFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallFrame

source§

impl StructuralEq for CallFrame

source§

impl StructuralPartialEq for CallFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/call/struct.CallLogFrame.html b/alloy_rpc_types/eth/trace/geth/call/struct.CallLogFrame.html new file mode 100644 index 000000000000..eb1ef75ac2e2 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/call/struct.CallLogFrame.html @@ -0,0 +1,28 @@ +CallLogFrame in alloy_rpc_types::eth::trace::geth::call - Rust +
pub struct CallLogFrame {
+    pub address: Option<Address>,
+    pub topics: Option<Vec<B256>>,
+    pub data: Option<Bytes>,
+}

Fields§

§address: Option<Address>§topics: Option<Vec<B256>>§data: Option<Bytes>

Trait Implementations§

source§

impl Clone for CallLogFrame

source§

fn clone(&self) -> CallLogFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallLogFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallLogFrame

source§

fn default() -> CallLogFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallLogFrame

source§

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 PartialEq for CallLogFrame

source§

fn eq(&self, other: &CallLogFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallLogFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallLogFrame

source§

impl StructuralEq for CallLogFrame

source§

impl StructuralPartialEq for CallLogFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/enum.GethDebugBuiltInTracerType.html b/alloy_rpc_types/eth/trace/geth/enum.GethDebugBuiltInTracerType.html new file mode 100644 index 000000000000..6686fc7d7104 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/enum.GethDebugBuiltInTracerType.html @@ -0,0 +1,47 @@ +GethDebugBuiltInTracerType in alloy_rpc_types::eth::trace::geth - Rust +
pub enum GethDebugBuiltInTracerType {
+    FourByteTracer,
+    CallTracer,
+    PreStateTracer,
+    NoopTracer,
+}
Expand description

Variants§

§

FourByteTracer

The 4byteTracer collects the function selectors of every function executed in the lifetime +of a transaction, along with the size of the supplied call data. The result is a +FourByteFrame where the keys are SELECTOR-CALLDATASIZE and the values are number of +occurrences of this key.

+
§

CallTracer

The callTracer tracks all the call frames executed during a transaction, including depth 0. +The result will be a nested list of call frames, resembling how EVM works. They form a tree +with the top-level call at root and sub-calls as children of the higher levels.

+
§

PreStateTracer

The prestate tracer has two modes: prestate and diff. The prestate mode returns the +accounts necessary to execute a given transaction. diff mode returns the differences +between the transaction’s pre and post-state (i.e. what changed because the transaction +happened). The prestateTracer defaults to prestate mode. It reexecutes the given +transaction and tracks every part of state that is touched. This is similar to the concept +of a stateless witness, the difference being this tracer doesn’t return any cryptographic +proof, rather only the trie leaves. The result is an object. The keys are addresses of +accounts.

+
§

NoopTracer

This tracer is noop. It returns an empty object and is only meant for testing the setup.

+

Trait Implementations§

source§

impl Clone for GethDebugBuiltInTracerType

source§

fn clone(&self) -> GethDebugBuiltInTracerType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugBuiltInTracerType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethDebugBuiltInTracerType

source§

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<GethDebugBuiltInTracerType> for GethDebugTracerType

source§

fn from(value: GethDebugBuiltInTracerType) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugBuiltInTracerType

source§

fn eq(&self, other: &GethDebugBuiltInTracerType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugBuiltInTracerType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugBuiltInTracerType

source§

impl StructuralEq for GethDebugBuiltInTracerType

source§

impl StructuralPartialEq for GethDebugBuiltInTracerType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • FourByteTracer: 0 bytes
  • CallTracer: 0 bytes
  • PreStateTracer: 0 bytes
  • NoopTracer: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/enum.GethDebugTracerType.html b/alloy_rpc_types/eth/trace/geth/enum.GethDebugTracerType.html new file mode 100644 index 000000000000..2f78a169759c --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/enum.GethDebugTracerType.html @@ -0,0 +1,31 @@ +GethDebugTracerType in alloy_rpc_types::eth::trace::geth - Rust +
pub enum GethDebugTracerType {
+    BuiltInTracer(GethDebugBuiltInTracerType),
+    JsTracer(String),
+}
Expand description

Variants§

§

BuiltInTracer(GethDebugBuiltInTracerType)

built-in tracer

+
§

JsTracer(String)

custom JS tracer

+

Trait Implementations§

source§

impl Clone for GethDebugTracerType

source§

fn clone(&self) -> GethDebugTracerType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracerType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracerType

source§

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<GethDebugBuiltInTracerType> for GethDebugTracerType

source§

fn from(value: GethDebugBuiltInTracerType) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugTracerType

source§

fn eq(&self, other: &GethDebugTracerType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracerType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracerType

source§

impl StructuralEq for GethDebugTracerType

source§

impl StructuralPartialEq for GethDebugTracerType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

Size for each variant:

  • BuiltInTracer: 9 bytes
  • JsTracer: 24 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/enum.GethTrace.html b/alloy_rpc_types/eth/trace/geth/enum.GethTrace.html new file mode 100644 index 000000000000..ac8a1d73409c --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/enum.GethTrace.html @@ -0,0 +1,41 @@ +GethTrace in alloy_rpc_types::eth::trace::geth - Rust +
pub enum GethTrace {
+    Default(DefaultFrame),
+    CallTracer(CallFrame),
+    FourByteTracer(FourByteFrame),
+    PreStateTracer(PreStateFrame),
+    NoopTracer(NoopFrame),
+    JS(Value),
+}
Expand description

Tracing response objects

+

Note: This deserializes untagged, so it’s possible that a custom javascript tracer response +matches another variant, for example a js tracer that returns {} would be deserialized as +GethTrace::NoopTracer

+

Variants§

§

Default(DefaultFrame)

The response for the default struct log tracer

+
§

CallTracer(CallFrame)

The response for call tracer

+
§

FourByteTracer(FourByteFrame)

The response for four byte tracer

+
§

PreStateTracer(PreStateFrame)

The response for pre-state byte tracer

+
§

NoopTracer(NoopFrame)

An empty json response

+
§

JS(Value)

Any other trace response, such as custom javascript response objects

+

Trait Implementations§

source§

impl Clone for GethTrace

source§

fn clone(&self) -> GethTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethTrace

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl From<DefaultFrame> for GethTrace

source§

fn from(value: DefaultFrame) -> Self

Converts to this type from the input type.
source§

impl From<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl From<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl From<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethTrace

source§

fn eq(&self, other: &GethTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethTrace

source§

impl StructuralEq for GethTrace

source§

impl StructuralPartialEq for GethTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

Size for each variant:

  • Default: 80 bytes
  • CallTracer: 336 bytes
  • FourByteTracer: 32 bytes
  • PreStateTracer: 64 bytes
  • NoopTracer: 32 bytes
  • JS: 40 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/fn.serialize_string_storage_map_opt.html b/alloy_rpc_types/eth/trace/geth/fn.serialize_string_storage_map_opt.html new file mode 100644 index 000000000000..da34210e05f3 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/fn.serialize_string_storage_map_opt.html @@ -0,0 +1,6 @@ +serialize_string_storage_map_opt in alloy_rpc_types::eth::trace::geth - Rust +
fn serialize_string_storage_map_opt<S: Serializer>(
+    storage: &Option<BTreeMap<B256, B256>>,
+    s: S
+) -> Result<S::Ok, S::Error>
Expand description

Serializes a storage map as a list of key-value pairs without 0x-prefix

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/four_byte/index.html b/alloy_rpc_types/eth/trace/geth/four_byte/index.html new file mode 100644 index 000000000000..e3074dda456a --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/four_byte/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::trace::geth::four_byte - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/four_byte/sidebar-items.js b/alloy_rpc_types/eth/trace/geth/four_byte/sidebar-items.js new file mode 100644 index 000000000000..6976f866f430 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/four_byte/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["FourByteFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/four_byte/struct.FourByteFrame.html b/alloy_rpc_types/eth/trace/geth/four_byte/struct.FourByteFrame.html new file mode 100644 index 000000000000..0834db91ce02 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/four_byte/struct.FourByteFrame.html @@ -0,0 +1,25 @@ +FourByteFrame in alloy_rpc_types::eth::trace::geth::four_byte - Rust +
pub struct FourByteFrame(pub BTreeMap<String, u64>);
Expand description

Tuple Fields§

§0: BTreeMap<String, u64>

Trait Implementations§

source§

impl Clone for FourByteFrame

source§

fn clone(&self) -> FourByteFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FourByteFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FourByteFrame

source§

fn default() -> FourByteFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FourByteFrame

source§

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<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for FourByteFrame

source§

fn eq(&self, other: &FourByteFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FourByteFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FourByteFrame

source§

impl StructuralEq for FourByteFrame

source§

impl StructuralPartialEq for FourByteFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/index.html b/alloy_rpc_types/eth/trace/geth/index.html new file mode 100644 index 000000000000..4cd068fecfa4 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::eth::trace::geth - Rust +

Module alloy_rpc_types::eth::trace::geth

source ·
Expand description

Geth tracing types

+

Re-exports

Modules

Structs

Enums

Functions

Type Aliases

  • Result type for geth style transaction trace
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/noop/index.html b/alloy_rpc_types/eth/trace/geth/noop/index.html new file mode 100644 index 000000000000..ee4d2744b115 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/noop/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::trace::geth::noop - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/noop/sidebar-items.js b/alloy_rpc_types/eth/trace/geth/noop/sidebar-items.js new file mode 100644 index 000000000000..fc071b787c57 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/noop/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["NoopFrame","Null"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/noop/struct.NoopFrame.html b/alloy_rpc_types/eth/trace/geth/noop/struct.NoopFrame.html new file mode 100644 index 000000000000..31352a2f6bc4 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/noop/struct.NoopFrame.html @@ -0,0 +1,26 @@ +NoopFrame in alloy_rpc_types::eth::trace::geth::noop - Rust +
pub struct NoopFrame(BTreeMap<Null, Null>);
Expand description

Tuple Fields§

§0: BTreeMap<Null, Null>

Trait Implementations§

source§

impl Clone for NoopFrame

source§

fn clone(&self) -> NoopFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NoopFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for NoopFrame

source§

fn default() -> NoopFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for NoopFrame

source§

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<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for NoopFrame

source§

fn eq(&self, other: &NoopFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NoopFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NoopFrame

source§

impl StructuralEq for NoopFrame

source§

impl StructuralPartialEq for NoopFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/noop/struct.Null.html b/alloy_rpc_types/eth/trace/geth/noop/struct.Null.html new file mode 100644 index 000000000000..c5ff14bcdc0e --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/noop/struct.Null.html @@ -0,0 +1,29 @@ +Null in alloy_rpc_types::eth::trace::geth::noop - Rust +
struct Null;

Trait Implementations§

source§

impl Clone for Null

source§

fn clone(&self) -> Null

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Null

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Null

source§

fn default() -> Null

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Null

source§

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 Ord for Null

source§

fn cmp(&self, other: &Null) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Null

source§

fn eq(&self, other: &Null) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Null

source§

fn partial_cmp(&self, other: &Null) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for Null

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Null

source§

impl StructuralEq for Null

source§

impl StructuralPartialEq for Null

Auto Trait Implementations§

§

impl RefUnwindSafe for Null

§

impl Send for Null

§

impl Sync for Null

§

impl Unpin for Null

§

impl UnwindSafe for Null

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/enum.AccountChangeKind.html b/alloy_rpc_types/eth/trace/geth/pre_state/enum.AccountChangeKind.html new file mode 100644 index 000000000000..9d7486256ba9 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/enum.AccountChangeKind.html @@ -0,0 +1,34 @@ +AccountChangeKind in alloy_rpc_types::eth::trace::geth::pre_state - Rust +
pub enum AccountChangeKind {
+    Modify,
+    Create,
+    SelfDestruct,
+}
Expand description

Helper type to track the kind of change of an AccountState.

+

Variants§

§

Modify

§

Create

§

SelfDestruct

Implementations§

source§

impl AccountChangeKind

source

pub fn is_created(&self) -> bool

Returns true if the account was created

+
source

pub fn is_modified(&self) -> bool

Returns true the account was modified

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true the account was modified

+

Trait Implementations§

source§

impl Clone for AccountChangeKind

source§

fn clone(&self) -> AccountChangeKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountChangeKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountChangeKind

source§

fn default() -> AccountChangeKind

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountChangeKind

source§

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 Hash for AccountChangeKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountChangeKind

source§

fn eq(&self, other: &AccountChangeKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountChangeKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountChangeKind

source§

impl StructuralEq for AccountChangeKind

source§

impl StructuralPartialEq for AccountChangeKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Modify: 0 bytes
  • Create: 0 bytes
  • SelfDestruct: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/enum.DiffStateKind.html b/alloy_rpc_types/eth/trace/geth/pre_state/enum.DiffStateKind.html new file mode 100644 index 000000000000..655273332886 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/enum.DiffStateKind.html @@ -0,0 +1,29 @@ +DiffStateKind in alloy_rpc_types::eth::trace::geth::pre_state - Rust +
pub enum DiffStateKind {
+    Pre,
+    Post,
+}
Expand description

Helper type for DiffMode to represent a specific set

+

Variants§

§

Pre

Corresponds to the pre state of the DiffMode

+
§

Post

Corresponds to the post state of the DiffMode

+

Implementations§

source§

impl DiffStateKind

source

pub fn is_pre(&self) -> bool

Returns true if this is the pre state of the DiffMode

+
source

pub fn is_post(&self) -> bool

Returns true if this is the post state of the DiffMode

+

Trait Implementations§

source§

impl Clone for DiffStateKind

source§

fn clone(&self) -> DiffStateKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffStateKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DiffStateKind

source§

fn eq(&self, other: &DiffStateKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for DiffStateKind

source§

impl Eq for DiffStateKind

source§

impl StructuralEq for DiffStateKind

source§

impl StructuralPartialEq for DiffStateKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • Pre: 0 bytes
  • Post: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/enum.PreStateFrame.html b/alloy_rpc_types/eth/trace/geth/pre_state/enum.PreStateFrame.html new file mode 100644 index 000000000000..686266b51973 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/enum.PreStateFrame.html @@ -0,0 +1,40 @@ +PreStateFrame in alloy_rpc_types::eth::trace::geth::pre_state - Rust +
pub enum PreStateFrame {
+    Default(PreStateMode),
+    Diff(DiffMode),
+}
Expand description

Variants§

§

Default(PreStateMode)

The default mode returns the accounts necessary to execute a given transaction.

+

It re-executes the given transaction and tracks every part of state that is touched.

+
§

Diff(DiffMode)

Diff mode returns the differences between the transaction’s pre and post-state (i.e. what +changed because the transaction happened).

+

Implementations§

source§

impl PreStateFrame

source

pub fn is_default(&self) -> bool

Returns true if this trace was requested without diffmode.

+
source

pub fn is_diff(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn as_default(&self) -> Option<&PreStateMode>

Returns the account states after the transaction is executed if this trace was requested +without diffmode.

+
source

pub fn as_diff(&self) -> Option<&DiffMode>

Returns the account states before and after the transaction is executed if this trace was +requested with diffmode.

+

Trait Implementations§

source§

impl Clone for PreStateFrame

source§

fn clone(&self) -> PreStateFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PreStateFrame

source§

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<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PreStateFrame

source§

fn eq(&self, other: &PreStateFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateFrame

source§

impl StructuralEq for PreStateFrame

source§

impl StructuralPartialEq for PreStateFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

Size for each variant:

  • Default: 24 bytes
  • Diff: 48 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/index.html b/alloy_rpc_types/eth/trace/geth/pre_state/index.html new file mode 100644 index 000000000000..07971fd6f5bc --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::trace::geth::pre_state - Rust +

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/sidebar-items.js b/alloy_rpc_types/eth/trace/geth/pre_state/sidebar-items.js new file mode 100644 index 000000000000..2e63ad48aa29 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AccountChangeKind","DiffStateKind","PreStateFrame"],"struct":["AccountState","DiffMode","PreStateConfig","PreStateMode"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/struct.AccountState.html b/alloy_rpc_types/eth/trace/geth/pre_state/struct.AccountState.html new file mode 100644 index 000000000000..2c727b12dae6 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/struct.AccountState.html @@ -0,0 +1,38 @@ +AccountState in alloy_rpc_types::eth::trace::geth::pre_state - Rust +
pub struct AccountState {
+    pub balance: Option<U256>,
+    pub code: Option<Bytes>,
+    pub nonce: Option<u64>,
+    pub storage: BTreeMap<B256, B256>,
+}
Expand description

Represents the state of an account

+

Fields§

§balance: Option<U256>§code: Option<Bytes>§nonce: Option<u64>§storage: BTreeMap<B256, B256>

Implementations§

source§

impl AccountState

source

pub fn from_account_info(nonce: u64, balance: U256, code: Option<Bytes>) -> Self

Creates a new AccountState with the given account info.

+

If balance is zero, it will be omitted. +If nonce is zero, it will be omitted. +If code is empty, it will be omitted.

+
source

pub fn remove_matching_account_info(&mut self, other: &AccountState)

Removes balance,nonce or code if they match the given account info.

+

This is useful for comparing pre vs post state and only keep changed values in post state.

+

Trait Implementations§

source§

impl Clone for AccountState

source§

fn clone(&self) -> AccountState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountState

source§

fn default() -> AccountState

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountState

source§

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 Hash for AccountState

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountState

source§

fn eq(&self, other: &AccountState) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountState

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountState

source§

impl StructuralEq for AccountState

source§

impl StructuralPartialEq for AccountState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/struct.DiffMode.html b/alloy_rpc_types/eth/trace/geth/pre_state/struct.DiffMode.html new file mode 100644 index 000000000000..1478f6aa16d1 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/struct.DiffMode.html @@ -0,0 +1,37 @@ +DiffMode in alloy_rpc_types::eth::trace::geth::pre_state - Rust +
pub struct DiffMode {
+    pub post: BTreeMap<Address, AccountState>,
+    pub pre: BTreeMap<Address, AccountState>,
+}
Expand description

Represents the account states before and after the transaction is executed.

+

This corresponds to the DiffMode of the PreStateConfig.

+

This will only contain changed AccountStates, created accounts will not be included in the pre +state and selfdestructed accounts will not be included in the post state.

+

Fields§

§post: BTreeMap<Address, AccountState>

The account states after the transaction is executed.

+
§pre: BTreeMap<Address, AccountState>

The account states before the transaction is executed.

+

Implementations§

source§

impl DiffMode

source

pub fn retain_changed(&mut self) -> &mut Self

The sets of the DiffMode should only contain changed AccountStates.

+

This will remove all unchanged AccountStates from the sets.

+

In other words it removes entries that are equal (unchanged) in both the pre and post sets.

+
source

pub fn remove_zero_storage_values(&mut self)

Removes all zero values from the storage of the AccountStates.

+

Trait Implementations§

source§

impl Clone for DiffMode

source§

fn clone(&self) -> DiffMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DiffMode

source§

fn default() -> DiffMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DiffMode

source§

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 PartialEq for DiffMode

source§

fn eq(&self, other: &DiffMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DiffMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DiffMode

source§

impl StructuralEq for DiffMode

source§

impl StructuralPartialEq for DiffMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/struct.PreStateConfig.html b/alloy_rpc_types/eth/trace/geth/pre_state/struct.PreStateConfig.html new file mode 100644 index 000000000000..407b4692baf7 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/struct.PreStateConfig.html @@ -0,0 +1,32 @@ +PreStateConfig in alloy_rpc_types::eth::trace::geth::pre_state - Rust +
pub struct PreStateConfig {
+    pub diff_mode: Option<bool>,
+}
Expand description

The config for the prestate tracer.

+

If diffMode is set to true, the response frame includes all the account and storage diffs for +the transaction. If it’s missing or set to false it only returns the accounts and storage +necessary to execute the transaction.

+

Fields§

§diff_mode: Option<bool>

Implementations§

source§

impl PreStateConfig

source

pub fn is_diff_mode(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn is_default_mode(&self) -> bool

Is default mode if diff_mode is not set

+

Trait Implementations§

source§

impl Clone for PreStateConfig

source§

fn clone(&self) -> PreStateConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateConfig

source§

fn default() -> PreStateConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateConfig

source§

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 PartialEq for PreStateConfig

source§

fn eq(&self, other: &PreStateConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateConfig

source§

impl StructuralEq for PreStateConfig

source§

impl StructuralPartialEq for PreStateConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/pre_state/struct.PreStateMode.html b/alloy_rpc_types/eth/trace/geth/pre_state/struct.PreStateMode.html new file mode 100644 index 000000000000..f2231bb80a96 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/pre_state/struct.PreStateMode.html @@ -0,0 +1,24 @@ +PreStateMode in alloy_rpc_types::eth::trace::geth::pre_state - Rust +
pub struct PreStateMode(pub BTreeMap<Address, AccountState>);

Tuple Fields§

§0: BTreeMap<Address, AccountState>

Trait Implementations§

source§

impl Clone for PreStateMode

source§

fn clone(&self) -> PreStateMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateMode

source§

fn default() -> PreStateMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateMode

source§

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 PartialEq for PreStateMode

source§

fn eq(&self, other: &PreStateMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateMode

source§

impl StructuralEq for PreStateMode

source§

impl StructuralPartialEq for PreStateMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/sidebar-items.js b/alloy_rpc_types/eth/trace/geth/sidebar-items.js new file mode 100644 index 000000000000..8410f3d66e9b --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["GethDebugBuiltInTracerType","GethDebugTracerType","GethTrace"],"fn":["serialize_string_storage_map_opt"],"mod":["call","four_byte","noop","pre_state"],"struct":["BlockTraceResult","DefaultFrame","GethDebugTracerConfig","GethDebugTracingCallOptions","GethDebugTracingOptions","GethDefaultTracingOptions","StructLog"],"type":["TraceResult"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/struct.BlockTraceResult.html b/alloy_rpc_types/eth/trace/geth/struct.BlockTraceResult.html new file mode 100644 index 000000000000..4edd01327bf9 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/struct.BlockTraceResult.html @@ -0,0 +1,33 @@ +BlockTraceResult in alloy_rpc_types::eth::trace::geth - Rust +
pub struct BlockTraceResult {
+    pub block: U256,
+    pub hash: B256,
+    pub traces: Vec<TraceResult>,
+}
Expand description

blockTraceResult represents the results of tracing a single block when an entire chain is being +traced. ref https://github.com/ethereum/go-ethereum/blob/ee530c0d5aa70d2c00ab5691a89ab431b73f8165/eth/tracers/api.go#L218-L222

+

Fields§

§block: U256

Block number corresponding to the trace task

+
§hash: B256

Block hash corresponding to the trace task

+
§traces: Vec<TraceResult>

Trace results produced by the trace task

+

Trait Implementations§

source§

impl Clone for BlockTraceResult

source§

fn clone(&self) -> BlockTraceResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockTraceResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockTraceResult

source§

fn default() -> BlockTraceResult

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockTraceResult

source§

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 PartialEq for BlockTraceResult

source§

fn eq(&self, other: &BlockTraceResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockTraceResult

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlockTraceResult

source§

impl StructuralEq for BlockTraceResult

source§

impl StructuralPartialEq for BlockTraceResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 88 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/struct.DefaultFrame.html b/alloy_rpc_types/eth/trace/geth/struct.DefaultFrame.html new file mode 100644 index 000000000000..05ddf82fcd14 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/struct.DefaultFrame.html @@ -0,0 +1,31 @@ +DefaultFrame in alloy_rpc_types::eth::trace::geth - Rust +
pub struct DefaultFrame {
+    pub failed: bool,
+    pub gas: u64,
+    pub return_value: Bytes,
+    pub struct_logs: Vec<StructLog>,
+}
Expand description

Fields§

§failed: bool§gas: u64§return_value: Bytes§struct_logs: Vec<StructLog>

Trait Implementations§

source§

impl Clone for DefaultFrame

source§

fn clone(&self) -> DefaultFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DefaultFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DefaultFrame

source§

fn default() -> DefaultFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DefaultFrame

source§

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<DefaultFrame> for GethTrace

source§

fn from(value: DefaultFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for DefaultFrame

source§

fn eq(&self, other: &DefaultFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DefaultFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DefaultFrame

source§

impl StructuralEq for DefaultFrame

source§

impl StructuralPartialEq for DefaultFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracerConfig.html b/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracerConfig.html new file mode 100644 index 000000000000..1f427f2290e4 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracerConfig.html @@ -0,0 +1,32 @@ +GethDebugTracerConfig in alloy_rpc_types::eth::trace::geth - Rust +
pub struct GethDebugTracerConfig(pub Value);
Expand description

Configuration of the tracer

+

This is a simple wrapper around serde_json::Value. +with helpers for deserializing tracer configs.

+

Tuple Fields§

§0: Value

Implementations§

source§

impl GethDebugTracerConfig

source

pub fn is_null(&self) -> bool

Returns if this is a null object

+
source

pub fn from_value<T: DeserializeOwned>(self) -> Result<T, Error>

Consumes the config and tries to deserialize it into the given type.

+
source

pub fn into_call_config(self) -> Result<CallConfig, Error>

Returns the CallConfig if it is a call config.

+
source

pub fn into_json(self) -> Value

Returns the raw json value

+
source

pub fn into_pre_state_config(self) -> Result<PreStateConfig, Error>

Returns the PreStateConfig if it is a call config.

+

Trait Implementations§

source§

impl Clone for GethDebugTracerConfig

source§

fn clone(&self) -> GethDebugTracerConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracerConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracerConfig

source§

fn default() -> GethDebugTracerConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracerConfig

source§

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<Value> for GethDebugTracerConfig

source§

fn from(value: Value) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugTracerConfig

source§

fn eq(&self, other: &GethDebugTracerConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracerConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracerConfig

source§

impl StructuralEq for GethDebugTracerConfig

source§

impl StructuralPartialEq for GethDebugTracerConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracingCallOptions.html b/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracingCallOptions.html new file mode 100644 index 000000000000..f177bfc765c7 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracingCallOptions.html @@ -0,0 +1,32 @@ +GethDebugTracingCallOptions in alloy_rpc_types::eth::trace::geth - Rust +
pub struct GethDebugTracingCallOptions {
+    pub tracing_options: GethDebugTracingOptions,
+    pub state_overrides: Option<StateOverride>,
+    pub block_overrides: Option<BlockOverrides>,
+}
Expand description

Bindings for additional debug_traceCall options

+

See https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracecall

+

Fields§

§tracing_options: GethDebugTracingOptions§state_overrides: Option<StateOverride>

The state overrides to apply

+
§block_overrides: Option<BlockOverrides>

The block overrides to apply

+

Trait Implementations§

source§

impl Clone for GethDebugTracingCallOptions

source§

fn clone(&self) -> GethDebugTracingCallOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracingCallOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracingCallOptions

source§

fn default() -> GethDebugTracingCallOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracingCallOptions

source§

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 PartialEq for GethDebugTracingCallOptions

source§

fn eq(&self, other: &GethDebugTracingCallOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracingCallOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracingCallOptions

source§

impl StructuralEq for GethDebugTracingCallOptions

source§

impl StructuralPartialEq for GethDebugTracingCallOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 400 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracingOptions.html b/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracingOptions.html new file mode 100644 index 000000000000..d9aa7cf4dc21 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/struct.GethDebugTracingOptions.html @@ -0,0 +1,44 @@ +GethDebugTracingOptions in alloy_rpc_types::eth::trace::geth - Rust +
pub struct GethDebugTracingOptions {
+    pub config: GethDefaultTracingOptions,
+    pub tracer: Option<GethDebugTracerType>,
+    pub tracer_config: GethDebugTracerConfig,
+    pub timeout: Option<String>,
+}
Expand description

Bindings for additional debug_traceTransaction options

+

See https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracetransaction

+

Fields§

§config: GethDefaultTracingOptions§tracer: Option<GethDebugTracerType>

The custom tracer to use.

+

If None then the default structlog tracer is used.

+
§tracer_config: GethDebugTracerConfig

Config specific to given tracer.

+

Note default struct logger config are historically embedded in main object.

+

tracerConfig is slated for Geth v1.11.0 +See https://github.com/ethereum/go-ethereum/issues/26513

+

This could be CallConfig or PreStateConfig depending on the tracer.

+
§timeout: Option<String>

A string of decimal integers that overrides the JavaScript-based tracing calls default +timeout of 5 seconds.

+

Implementations§

source§

impl GethDebugTracingOptions

source

pub fn with_tracer(self, tracer: GethDebugTracerType) -> Self

Sets the tracer to use

+
source

pub fn with_timeout(self, duration: Duration) -> Self

Sets the timeout to use for tracing

+
source

pub fn call_config(self, config: CallConfig) -> Self

Configures a CallConfig

+
source

pub fn prestate_config(self, config: PreStateConfig) -> Self

Configures a PreStateConfig

+

Trait Implementations§

source§

impl Clone for GethDebugTracingOptions

source§

fn clone(&self) -> GethDebugTracingOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracingOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracingOptions

source§

fn default() -> GethDebugTracingOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracingOptions

source§

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 PartialEq for GethDebugTracingOptions

source§

fn eq(&self, other: &GethDebugTracingOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracingOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracingOptions

source§

impl StructuralEq for GethDebugTracingOptions

source§

impl StructuralPartialEq for GethDebugTracingOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/struct.GethDefaultTracingOptions.html b/alloy_rpc_types/eth/trace/geth/struct.GethDefaultTracingOptions.html new file mode 100644 index 000000000000..925056abfec9 --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/struct.GethDefaultTracingOptions.html @@ -0,0 +1,73 @@ +GethDefaultTracingOptions in alloy_rpc_types::eth::trace::geth - Rust +
pub struct GethDefaultTracingOptions {
+    pub enable_memory: Option<bool>,
+    pub disable_memory: Option<bool>,
+    pub disable_stack: Option<bool>,
+    pub disable_storage: Option<bool>,
+    pub enable_return_data: Option<bool>,
+    pub disable_return_data: Option<bool>,
+    pub debug: Option<bool>,
+    pub limit: Option<u64>,
+}
Expand description

Default tracing options for the struct looger.

+

These are all known general purpose tracer options that may or not be supported by a given +tracer. For example, the enableReturnData option is a noop on regular +debug_trace{Transaction,Block} calls.

+

Fields§

§enable_memory: Option<bool>

enable memory capture

+
§disable_memory: Option<bool>

Disable memory capture

+

This is the opposite of enable_memory.

+

Note: memory capture used to be enabled by default on geth, but has since been flipped https://github.com/ethereum/go-ethereum/pull/23558 and is now disabled by default. +However, at the time of writing this, erigon still defaults to enabled and supports the +disableMemory option. So we keep this option for compatibility, but if it’s missing +OR enableMemory is present enableMemory takes precedence.

+

See also https://github.com/paradigmxyz/reth/issues/3033

+
§disable_stack: Option<bool>

disable stack capture

+
§disable_storage: Option<bool>

Disable storage capture

+
§enable_return_data: Option<bool>

Enable return data capture

+
§disable_return_data: Option<bool>

Disable return data capture

+

This is the opposite of enable_return_data, and only supported for compatibility reasons. +See also disable_memory.

+

If enable_return_data is present, enable_return_data always takes precedence.

+
§debug: Option<bool>

print output during capture end

+
§limit: Option<u64>

maximum length of output, but zero means unlimited

+

Implementations§

source§

impl GethDefaultTracingOptions

source

pub fn enable_memory(self) -> Self

Enables memory capture.

+
source

pub fn disable_memory(self) -> Self

Disables memory capture.

+
source

pub fn disable_stack(self) -> Self

Disables stack capture.

+
source

pub fn disable_storage(self) -> Self

Disables storage capture.

+
source

pub fn enable_return_data(self) -> Self

Enables return data capture.

+
source

pub fn disable_return_data(self) -> Self

Disables return data capture.

+
source

pub fn debug(self) -> Self

Enables debug mode.

+
source

pub fn with_enable_memory(self, enable: bool) -> Self

Sets the enable_memory field.

+
source

pub fn with_disable_memory(self, disable: bool) -> Self

Sets the disable_memory field.

+
source

pub fn with_disable_stack(self, disable: bool) -> Self

Sets the disable_stack field.

+
source

pub fn with_disable_storage(self, disable: bool) -> Self

Sets the disable_storage field.

+
source

pub fn with_enable_return_data(self, enable: bool) -> Self

Sets the enable_return_data field.

+
source

pub fn with_disable_return_data(self, disable: bool) -> Self

Sets the disable_return_data field.

+
source

pub fn with_debug(self, debug: bool) -> Self

Sets the debug field.

+
source

pub fn with_limit(self, limit: u64) -> Self

Sets the limit field.

+
source

pub fn is_return_data_enabled(&self) -> bool

Returns true if return data capture is enabled

+
source

pub fn is_memory_enabled(&self) -> bool

Returns true if memory capture is enabled

+
source

pub fn is_stack_enabled(&self) -> bool

Returns true if stack capture is enabled

+
source

pub fn is_storage_enabled(&self) -> bool

Returns true if storage capture is enabled

+

Trait Implementations§

source§

impl Clone for GethDefaultTracingOptions

source§

fn clone(&self) -> GethDefaultTracingOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDefaultTracingOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDefaultTracingOptions

source§

fn default() -> GethDefaultTracingOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDefaultTracingOptions

source§

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 PartialEq for GethDefaultTracingOptions

source§

fn eq(&self, other: &GethDefaultTracingOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDefaultTracingOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDefaultTracingOptions

source§

impl StructuralEq for GethDefaultTracingOptions

source§

impl StructuralPartialEq for GethDefaultTracingOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/struct.StructLog.html b/alloy_rpc_types/eth/trace/geth/struct.StructLog.html new file mode 100644 index 000000000000..5618b75cf31a --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/struct.StructLog.html @@ -0,0 +1,52 @@ +StructLog in alloy_rpc_types::eth::trace::geth - Rust +
pub struct StructLog {
+    pub pc: u64,
+    pub op: String,
+    pub gas: u64,
+    pub gas_cost: u64,
+    pub memory: Option<Vec<String>>,
+    pub memory_size: Option<u64>,
+    pub stack: Option<Vec<U256>>,
+    pub return_data: Option<Bytes>,
+    pub storage: Option<BTreeMap<B256, B256>>,
+    pub depth: u64,
+    pub refund_counter: Option<u64>,
+    pub error: Option<String>,
+}
Expand description

Fields§

§pc: u64

program counter

+
§op: String

opcode to be executed

+
§gas: u64

remaining gas

+
§gas_cost: u64

cost for executing op

+
§memory: Option<Vec<String>>§memory_size: Option<u64>

Size of memory.

+
§stack: Option<Vec<U256>>

EVM stack

+
§return_data: Option<Bytes>

Last call’s return data. Enabled via enableReturnData

+
§storage: Option<BTreeMap<B256, B256>>

Storage slots of current contract read from and written to. Only emitted for SLOAD and +SSTORE. Disabled via disableStorage

+
§depth: u64

Current call depth

+
§refund_counter: Option<u64>

Refund counter

+
§error: Option<String>

Error message if any

+

Trait Implementations§

source§

impl Clone for StructLog

source§

fn clone(&self) -> StructLog

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StructLog

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StructLog

source§

fn default() -> StructLog

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for StructLog

source§

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 PartialEq for StructLog

source§

fn eq(&self, other: &StructLog) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StructLog

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StructLog

source§

impl StructuralEq for StructLog

source§

impl StructuralPartialEq for StructLog

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 224 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/geth/type.TraceResult.html b/alloy_rpc_types/eth/trace/geth/type.TraceResult.html new file mode 100644 index 000000000000..076d07985a2a --- /dev/null +++ b/alloy_rpc_types/eth/trace/geth/type.TraceResult.html @@ -0,0 +1,12 @@ +TraceResult in alloy_rpc_types::eth::trace::geth - Rust +
pub type TraceResult = TraceResult<GethTrace, String>;
Expand description

Result type for geth style transaction trace

+

Aliased Type§

enum TraceResult {
+    Success {
+        result: GethTrace,
+    },
+    Error {
+        error: String,
+    },
+}

Variants§

§

Success

Fields

§result: GethTrace

Untagged success variant

+
§

Error

Fields

§error: String

Untagged error variant

+

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: 336 bytes

Size for each variant:

  • Success: 336 bytes
  • Error: 32 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/index.html b/alloy_rpc_types/eth/trace/index.html new file mode 100644 index 000000000000..7667379c7ad3 --- /dev/null +++ b/alloy_rpc_types/eth/trace/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::trace - Rust +

Module alloy_rpc_types::eth::trace

source ·
Expand description

Types for tracing

+

Re-exports

Modules

  • Types used by tracing backends
  • trace_filter types and support
  • Geth tracing types
  • Types for trace module.
  • Builder style functions for trace_call
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/enum.Action.html b/alloy_rpc_types/eth/trace/parity/enum.Action.html new file mode 100644 index 000000000000..f8742b3bffb8 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/enum.Action.html @@ -0,0 +1,40 @@ +Action in alloy_rpc_types::eth::trace::parity - Rust +
pub enum Action {
+    Call(CallAction),
+    Create(CreateAction),
+    Selfdestruct(SelfdestructAction),
+    Reward(RewardAction),
+}
Expand description

Action

+

Variants§

§

Call(CallAction)

Call

+
§

Create(CreateAction)

Create

+
§

Selfdestruct(SelfdestructAction)

Parity style traces never renamed suicide to selfdestruct: https://eips.ethereum.org/EIPS/eip-6

+

For compatibility reasons, this is serialized as suicide: https://github.com/paradigmxyz/reth/issues/3721

+
§

Reward(RewardAction)

Reward

+

Implementations§

source§

impl Action

source

pub fn is_call(&self) -> bool

Returns true if this is a call action

+
source

pub fn is_create(&self) -> bool

Returns true if this is a create action

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true if this is a selfdestruct action

+
source

pub fn is_reward(&self) -> bool

Returns true if this is a reward action

+
source

pub fn kind(&self) -> ActionType

Returns what kind of action this is

+

Trait Implementations§

source§

impl Clone for Action

source§

fn clone(&self) -> Action

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Action

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Action

source§

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 PartialEq for Action

source§

fn eq(&self, other: &Action) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Action

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Action

source§

impl StructuralEq for Action

source§

impl StructuralPartialEq for Action

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

Size for each variant:

  • Call: 120 bytes
  • Create: 96 bytes
  • Selfdestruct: 72 bytes
  • Reward: 56 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/enum.ActionType.html b/alloy_rpc_types/eth/trace/parity/enum.ActionType.html new file mode 100644 index 000000000000..bb3a6e8ec527 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/enum.ActionType.html @@ -0,0 +1,35 @@ +ActionType in alloy_rpc_types::eth::trace::parity - Rust +
pub enum ActionType {
+    Call,
+    Create,
+    Selfdestruct,
+    Reward,
+}
Expand description

An external action type.

+

Used as enum identifier for Action

+

Variants§

§

Call

Contract call.

+
§

Create

Contract creation.

+
§

Selfdestruct

Contract suicide/selfdestruct.

+
§

Reward

A block reward.

+

Trait Implementations§

source§

impl Clone for ActionType

source§

fn clone(&self) -> ActionType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ActionType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ActionType

source§

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 PartialEq for ActionType

source§

fn eq(&self, other: &ActionType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ActionType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ActionType

source§

impl StructuralEq for ActionType

source§

impl StructuralPartialEq for ActionType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Call: 0 bytes
  • Create: 0 bytes
  • Selfdestruct: 0 bytes
  • Reward: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/enum.CallType.html b/alloy_rpc_types/eth/trace/parity/enum.CallType.html new file mode 100644 index 000000000000..67dc6fbdb1ab --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/enum.CallType.html @@ -0,0 +1,36 @@ +CallType in alloy_rpc_types::eth::trace::parity - Rust +
pub enum CallType {
+    None,
+    Call,
+    CallCode,
+    DelegateCall,
+    StaticCall,
+}
Expand description

Call type.

+

Variants§

§

None

None

+
§

Call

Call

+
§

CallCode

Call code

+
§

DelegateCall

Delegate call

+
§

StaticCall

Static call

+

Trait Implementations§

source§

impl Clone for CallType

source§

fn clone(&self) -> CallType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallType

source§

fn default() -> CallType

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallType

source§

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 PartialEq for CallType

source§

fn eq(&self, other: &CallType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallType

source§

impl StructuralEq for CallType

source§

impl StructuralPartialEq for CallType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • None: 0 bytes
  • Call: 0 bytes
  • CallCode: 0 bytes
  • DelegateCall: 0 bytes
  • StaticCall: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/enum.Delta.html b/alloy_rpc_types/eth/trace/parity/enum.Delta.html new file mode 100644 index 000000000000..98854f283c4d --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/enum.Delta.html @@ -0,0 +1,46 @@ +Delta in alloy_rpc_types::eth::trace::parity - Rust +
pub enum Delta<T> {
+    Unchanged,
+    Added(T),
+    Removed(T),
+    Changed(ChangedType<T>),
+}
Expand description

Delta type

+

Variants§

§

Unchanged

Unchanged variant.

+
§

Added(T)

Added variant.

+
§

Removed(T)

Removed variant.

+
§

Changed(ChangedType<T>)

Changed variant.

+

Implementations§

source§

impl<T> Delta<T>

source

pub fn changed(from: T, to: T) -> Self

Creates a new Delta::Changed variant

+
source

pub fn is_unchanged(&self) -> bool

Returns true if the value is unchanged

+
source

pub fn is_added(&self) -> bool

Returns true if the value is added

+
source

pub fn is_removed(&self) -> bool

Returns true if the value is removed

+
source

pub fn is_changed(&self) -> bool

Returns true if the value is changed

+

Trait Implementations§

source§

impl<T: Clone> Clone for Delta<T>

source§

fn clone(&self) -> Delta<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Delta<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for Delta<T>

source§

fn default() -> Delta<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for Delta<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for Delta<T>

source§

fn eq(&self, other: &Delta<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for Delta<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for Delta<T>

source§

impl<T> StructuralEq for Delta<T>

source§

impl<T> StructuralPartialEq for Delta<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Delta<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Delta<T>
where + T: Send,

§

impl<T> Sync for Delta<T>
where + T: Sync,

§

impl<T> Unpin for Delta<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Delta<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/enum.RewardType.html b/alloy_rpc_types/eth/trace/parity/enum.RewardType.html new file mode 100644 index 000000000000..352a61447967 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/enum.RewardType.html @@ -0,0 +1,30 @@ +RewardType in alloy_rpc_types::eth::trace::parity - Rust +
pub enum RewardType {
+    Block,
+    Uncle,
+}
Expand description

Reward type.

+

Variants§

§

Block

Block

+
§

Uncle

Uncle

+

Trait Implementations§

source§

impl Clone for RewardType

source§

fn clone(&self) -> RewardType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RewardType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RewardType

source§

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 PartialEq for RewardType

source§

fn eq(&self, other: &RewardType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RewardType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RewardType

source§

impl StructuralEq for RewardType

source§

impl StructuralPartialEq for RewardType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Block: 0 bytes
  • Uncle: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/enum.TraceOutput.html b/alloy_rpc_types/eth/trace/parity/enum.TraceOutput.html new file mode 100644 index 000000000000..c4ea4e817b52 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/enum.TraceOutput.html @@ -0,0 +1,32 @@ +TraceOutput in alloy_rpc_types::eth::trace::parity - Rust +
pub enum TraceOutput {
+    Call(CallOutput),
+    Create(CreateOutput),
+}
Expand description

Represents the output of a trace.

+

Variants§

§

Call(CallOutput)

Output of a regular call transaction.

+
§

Create(CreateOutput)

Output of a CREATE transaction.

+

Implementations§

source§

impl TraceOutput

source

pub fn gas_used(&self) -> U64

Returns the gas used by this trace.

+
source

pub fn set_gas_used(&mut self, gas_used: u64)

Sets the gas used by this trace.

+

Trait Implementations§

source§

impl Clone for TraceOutput

source§

fn clone(&self) -> TraceOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceOutput

source§

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 PartialEq for TraceOutput

source§

fn eq(&self, other: &TraceOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceOutput

source§

impl StructuralEq for TraceOutput

source§

impl StructuralPartialEq for TraceOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

Size for each variant:

  • Call: 48 bytes
  • Create: 64 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/enum.TraceType.html b/alloy_rpc_types/eth/trace/parity/enum.TraceType.html new file mode 100644 index 000000000000..bc7651eccd74 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/enum.TraceType.html @@ -0,0 +1,36 @@ +TraceType in alloy_rpc_types::eth::trace::parity - Rust +
pub enum TraceType {
+    Trace,
+    VmTrace,
+    StateDiff,
+}
Expand description

Different Trace diagnostic targets.

+

Variants§

§

Trace

Default trace

+
§

VmTrace

Provides a full trace of the VM’s state throughout the execution of the transaction, +including for any subcalls.

+
§

StateDiff

Provides information detailing all altered portions of the Ethereum state made due to the +execution of the transaction.

+

Trait Implementations§

source§

impl Clone for TraceType

source§

fn clone(&self) -> TraceType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceType

source§

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 Hash for TraceType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for TraceType

source§

fn eq(&self, other: &TraceType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceType

source§

impl StructuralEq for TraceType

source§

impl StructuralPartialEq for TraceType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Trace: 0 bytes
  • VmTrace: 0 bytes
  • StateDiff: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/index.html b/alloy_rpc_types/eth/trace/parity/index.html new file mode 100644 index 000000000000..869c0e9c92c4 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::eth::trace::parity - Rust +
Expand description

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/sidebar-items.js b/alloy_rpc_types/eth/trace/parity/sidebar-items.js new file mode 100644 index 000000000000..5d61ff31162b --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Action","ActionType","CallType","Delta","RewardType","TraceOutput","TraceType"],"struct":["AccountDiff","CallAction","CallOutput","ChangedType","CreateAction","CreateOutput","LocalizedTransactionTrace","MemoryDelta","RewardAction","SelfdestructAction","StateDiff","StorageDelta","TraceResults","TraceResultsWithTransactionHash","TransactionTrace","VmExecutedOperation","VmInstruction","VmTrace"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.AccountDiff.html b/alloy_rpc_types/eth/trace/parity/struct.AccountDiff.html new file mode 100644 index 000000000000..1bde7ca1e1c1 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.AccountDiff.html @@ -0,0 +1,34 @@ +AccountDiff in alloy_rpc_types::eth::trace::parity - Rust +
pub struct AccountDiff {
+    pub balance: Delta<U256>,
+    pub code: Delta<Bytes>,
+    pub nonce: Delta<U64>,
+    pub storage: BTreeMap<B256, Delta<B256>>,
+}
Expand description

Serde-friendly AccountDiff shadow.

+

Fields§

§balance: Delta<U256>

Balance change.

+
§code: Delta<Bytes>

Code change.

+
§nonce: Delta<U64>

Nonce change.

+
§storage: BTreeMap<B256, Delta<B256>>

Storage changes.

+

Trait Implementations§

source§

impl Clone for AccountDiff

source§

fn clone(&self) -> AccountDiff

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountDiff

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountDiff

source§

fn default() -> AccountDiff

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountDiff

source§

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 PartialEq for AccountDiff

source§

fn eq(&self, other: &AccountDiff) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountDiff

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountDiff

source§

impl StructuralEq for AccountDiff

source§

impl StructuralPartialEq for AccountDiff

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 192 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.CallAction.html b/alloy_rpc_types/eth/trace/parity/struct.CallAction.html new file mode 100644 index 000000000000..e40ef3e0de3b --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.CallAction.html @@ -0,0 +1,38 @@ +CallAction in alloy_rpc_types::eth::trace::parity - Rust +
pub struct CallAction {
+    pub from: Address,
+    pub call_type: CallType,
+    pub gas: U64,
+    pub input: Bytes,
+    pub to: Address,
+    pub value: U256,
+}
Expand description

Represents a certain CallType of a call or message transaction.

+

Fields§

§from: Address

Address of the sending account.

+
§call_type: CallType

The type of the call.

+
§gas: U64

The gas available for executing the call.

+
§input: Bytes

The input data provided to the call.

+
§to: Address

Address of the destination/target account.

+
§value: U256

Value transferred to the destination account.

+

Trait Implementations§

source§

impl Clone for CallAction

source§

fn clone(&self) -> CallAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CallAction

source§

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 PartialEq for CallAction

source§

fn eq(&self, other: &CallAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallAction

source§

impl StructuralEq for CallAction

source§

impl StructuralPartialEq for CallAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.CallOutput.html b/alloy_rpc_types/eth/trace/parity/struct.CallOutput.html new file mode 100644 index 000000000000..dc87a1ddbafc --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.CallOutput.html @@ -0,0 +1,30 @@ +CallOutput in alloy_rpc_types::eth::trace::parity - Rust +
pub struct CallOutput {
+    pub gas_used: U64,
+    pub output: Bytes,
+}
Expand description

Call out put type

+

Fields§

§gas_used: U64

Gas Used.

+
§output: Bytes

Output

+

Trait Implementations§

source§

impl Clone for CallOutput

source§

fn clone(&self) -> CallOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CallOutput

source§

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 PartialEq for CallOutput

source§

fn eq(&self, other: &CallOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallOutput

source§

impl StructuralEq for CallOutput

source§

impl StructuralPartialEq for CallOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.ChangedType.html b/alloy_rpc_types/eth/trace/parity/struct.ChangedType.html new file mode 100644 index 000000000000..d603ae5c9723 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.ChangedType.html @@ -0,0 +1,37 @@ +ChangedType in alloy_rpc_types::eth::trace::parity - Rust +
pub struct ChangedType<T> {
+    pub from: T,
+    pub to: T,
+}
Expand description

Aux type for Diff::Changed.

+

Fields§

§from: T

Previous value.

+
§to: T

Current value.

+

Trait Implementations§

source§

impl<T: Clone> Clone for ChangedType<T>

source§

fn clone(&self) -> ChangedType<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for ChangedType<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, T> Deserialize<'de> for ChangedType<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for ChangedType<T>

source§

fn eq(&self, other: &ChangedType<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for ChangedType<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for ChangedType<T>

source§

impl<T> StructuralEq for ChangedType<T>

source§

impl<T> StructuralPartialEq for ChangedType<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ChangedType<T>
where + T: RefUnwindSafe,

§

impl<T> Send for ChangedType<T>
where + T: Send,

§

impl<T> Sync for ChangedType<T>
where + T: Sync,

§

impl<T> Unpin for ChangedType<T>
where + T: Unpin,

§

impl<T> UnwindSafe for ChangedType<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.CreateAction.html b/alloy_rpc_types/eth/trace/parity/struct.CreateAction.html new file mode 100644 index 000000000000..30b5b1254579 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.CreateAction.html @@ -0,0 +1,34 @@ +CreateAction in alloy_rpc_types::eth::trace::parity - Rust +
pub struct CreateAction {
+    pub from: Address,
+    pub gas: U64,
+    pub init: Bytes,
+    pub value: U256,
+}
Expand description

Represents a create action, either a CREATE operation or a CREATE transaction.

+

Fields§

§from: Address

The address of the creator.

+
§gas: U64

The gas available for the creation init code.

+
§init: Bytes

The init code.

+
§value: U256

The value with which the new account is endowed.

+

Trait Implementations§

source§

impl Clone for CreateAction

source§

fn clone(&self) -> CreateAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CreateAction

source§

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 PartialEq for CreateAction

source§

fn eq(&self, other: &CreateAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CreateAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CreateAction

source§

impl StructuralEq for CreateAction

source§

impl StructuralPartialEq for CreateAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 96 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.CreateOutput.html b/alloy_rpc_types/eth/trace/parity/struct.CreateOutput.html new file mode 100644 index 000000000000..482f47378c93 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.CreateOutput.html @@ -0,0 +1,32 @@ +CreateOutput in alloy_rpc_types::eth::trace::parity - Rust +
pub struct CreateOutput {
+    pub address: Address,
+    pub code: Bytes,
+    pub gas_used: U64,
+}
Expand description

Represents the output of a create operation.

+

Fields§

§address: Address

Address output.

+
§code: Bytes

Code data.

+
§gas_used: U64

Resulting address.

+

Trait Implementations§

source§

impl Clone for CreateOutput

source§

fn clone(&self) -> CreateOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CreateOutput

source§

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 PartialEq for CreateOutput

source§

fn eq(&self, other: &CreateOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CreateOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CreateOutput

source§

impl StructuralEq for CreateOutput

source§

impl StructuralPartialEq for CreateOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.LocalizedTransactionTrace.html b/alloy_rpc_types/eth/trace/parity/struct.LocalizedTransactionTrace.html new file mode 100644 index 000000000000..accbd2c9f018 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.LocalizedTransactionTrace.html @@ -0,0 +1,39 @@ +LocalizedTransactionTrace in alloy_rpc_types::eth::trace::parity - Rust +
pub struct LocalizedTransactionTrace {
+    pub trace: TransactionTrace,
+    pub block_hash: Option<B256>,
+    pub block_number: Option<u64>,
+    pub transaction_hash: Option<B256>,
+    pub transaction_position: Option<u64>,
+}
Expand description

Localized transaction trace.

+

Fields§

§trace: TransactionTrace

Trace of the transaction and its result. +Trace of the transaction and its result.

+
§block_hash: Option<B256>

Hash of the block, if not pending.

+

Note: this deviates from https://openethereum.github.io/JSONRPC-trace-module#trace_transaction which always returns a block number

+
§block_number: Option<u64>

Block number the transaction is included in, None if pending.

+

Note: this deviates from https://openethereum.github.io/JSONRPC-trace-module#trace_transaction which always returns a block number

+
§transaction_hash: Option<B256>

Hash of the transaction

+
§transaction_position: Option<u64>

Transaction index within the block, None if pending.

+

Trait Implementations§

source§

impl Clone for LocalizedTransactionTrace

source§

fn clone(&self) -> LocalizedTransactionTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LocalizedTransactionTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for LocalizedTransactionTrace

source§

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 PartialEq for LocalizedTransactionTrace

source§

fn eq(&self, other: &LocalizedTransactionTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for LocalizedTransactionTrace

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for LocalizedTransactionTrace

source§

impl StructuralEq for LocalizedTransactionTrace

source§

impl StructuralPartialEq for LocalizedTransactionTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 352 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.MemoryDelta.html b/alloy_rpc_types/eth/trace/parity/struct.MemoryDelta.html new file mode 100644 index 000000000000..d6850e36a8ac --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.MemoryDelta.html @@ -0,0 +1,30 @@ +MemoryDelta in alloy_rpc_types::eth::trace::parity - Rust +
pub struct MemoryDelta {
+    pub off: usize,
+    pub data: Bytes,
+}
Expand description

A diff of some chunk of memory.

+

Fields§

§off: usize

Offset into memory the change begins.

+
§data: Bytes

The changed data.

+

Trait Implementations§

source§

impl Clone for MemoryDelta

source§

fn clone(&self) -> MemoryDelta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MemoryDelta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for MemoryDelta

source§

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 PartialEq for MemoryDelta

source§

fn eq(&self, other: &MemoryDelta) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for MemoryDelta

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for MemoryDelta

source§

impl StructuralEq for MemoryDelta

source§

impl StructuralPartialEq for MemoryDelta

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.RewardAction.html b/alloy_rpc_types/eth/trace/parity/struct.RewardAction.html new file mode 100644 index 000000000000..63a31bb21001 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.RewardAction.html @@ -0,0 +1,32 @@ +RewardAction in alloy_rpc_types::eth::trace::parity - Rust +
pub struct RewardAction {
+    pub author: Address,
+    pub reward_type: RewardType,
+    pub value: U256,
+}
Expand description

Reward Action.

+

Fields§

§author: Address

Author’s address.

+
§reward_type: RewardType

Reward type.

+
§value: U256

Reward amount.

+

Trait Implementations§

source§

impl Clone for RewardAction

source§

fn clone(&self) -> RewardAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RewardAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RewardAction

source§

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 PartialEq for RewardAction

source§

fn eq(&self, other: &RewardAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RewardAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RewardAction

source§

impl StructuralEq for RewardAction

source§

impl StructuralPartialEq for RewardAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.SelfdestructAction.html b/alloy_rpc_types/eth/trace/parity/struct.SelfdestructAction.html new file mode 100644 index 000000000000..c793c6a6a87b --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.SelfdestructAction.html @@ -0,0 +1,32 @@ +SelfdestructAction in alloy_rpc_types::eth::trace::parity - Rust +
pub struct SelfdestructAction {
+    pub address: Address,
+    pub balance: U256,
+    pub refund_address: Address,
+}
Expand description

Represents a selfdestruct action fka suicide.

+

Fields§

§address: Address

destroyed/suicided address.

+
§balance: U256

Balance of the contract just before it was destroyed.

+
§refund_address: Address

destroyed contract heir.

+

Trait Implementations§

source§

impl Clone for SelfdestructAction

source§

fn clone(&self) -> SelfdestructAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SelfdestructAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SelfdestructAction

source§

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 PartialEq for SelfdestructAction

source§

fn eq(&self, other: &SelfdestructAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SelfdestructAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SelfdestructAction

source§

impl StructuralEq for SelfdestructAction

source§

impl StructuralPartialEq for SelfdestructAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.StateDiff.html b/alloy_rpc_types/eth/trace/parity/struct.StateDiff.html new file mode 100644 index 000000000000..c0e4d349f41b --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.StateDiff.html @@ -0,0 +1,555 @@ +StateDiff in alloy_rpc_types::eth::trace::parity - Rust +
pub struct StateDiff(pub BTreeMap<Address, AccountDiff>);
Expand description

New-type for list of account diffs

+

Tuple Fields§

§0: BTreeMap<Address, AccountDiff>

Methods from Deref<Target = BTreeMap<Address, AccountDiff>>§

1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.clear();
+assert!(a.is_empty());
+
1.0.0 · source

pub fn get<Q>(&self, key: &Q) -> Option<&V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get(&1), Some(&"a"));
+assert_eq!(map.get(&2), None);
+
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns the key-value pair corresponding to the supplied key.

+

The supplied key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
+assert_eq!(map.get_key_value(&2), None);
+
1.66.0 · source

pub fn first_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the first key-value pair in the map. +The key in this pair is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.first_key_value(), None);
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.first_key_value(), Some((&1, &"b")));
+
1.66.0 · source

pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the first entry in the map for in-place manipulation. +The key of this entry is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.first_entry() {
+    if *entry.key() > 0 {
+        entry.insert("first");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "first");
+assert_eq!(*map.get(&2).unwrap(), "b");
+
1.66.0 · source

pub fn pop_first(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the first element in the map. +The key of this element is the minimum key that was in the map.

+
Examples
+

Draining elements in ascending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_first() {
+    assert!(map.iter().all(|(k, _v)| *k > key));
+}
+assert!(map.is_empty());
+
1.66.0 · source

pub fn last_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the last key-value pair in the map. +The key in this pair is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.last_key_value(), Some((&2, &"a")));
+
1.66.0 · source

pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the last entry in the map for in-place manipulation. +The key of this entry is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.last_entry() {
+    if *entry.key() > 0 {
+        entry.insert("last");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "a");
+assert_eq!(*map.get(&2).unwrap(), "last");
+
1.66.0 · source

pub fn pop_last(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the last element in the map. +The key of this element is the maximum key that was in the map.

+
Examples
+

Draining elements in descending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_last() {
+    assert!(map.iter().all(|(k, _v)| *k < key));
+}
+assert!(map.is_empty());
+
1.0.0 · source

pub fn contains_key<Q>(&self, key: &Q) -> bool
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns true if the map contains a value for the specified key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.contains_key(&1), true);
+assert_eq!(map.contains_key(&2), false);
+
1.0.0 · source

pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a mutable reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+if let Some(x) = map.get_mut(&1) {
+    *x = "b";
+}
+assert_eq!(map[&1], "b");
+
1.0.0 · source

pub fn insert(&mut self, key: K, value: V) -> Option<V>
where + K: Ord,

Inserts a key-value pair into the map.

+

If the map did not have this key present, None is returned.

+

If the map did have this key present, the value is updated, and the old +value is returned. The key is not updated, though; this matters for +types that can be == without being identical. See the module-level +documentation for more.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.insert(37, "a"), None);
+assert_eq!(map.is_empty(), false);
+
+map.insert(37, "b");
+assert_eq!(map.insert(37, "c"), Some("b"));
+assert_eq!(map[&37], "c");
+
source

pub fn try_insert( + &mut self, + key: K, + value: V +) -> Result<&mut V, OccupiedError<'_, K, V, A>>
where + K: Ord,

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns +a mutable reference to the value in the entry.

+

If the map already had this key present, nothing is updated, and +an error containing the occupied entry and the value is returned.

+
Examples
+
#![feature(map_try_insert)]
+
+use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.try_insert(37, "a").unwrap(), &"a");
+
+let err = map.try_insert(37, "b").unwrap_err();
+assert_eq!(err.entry.key(), &37);
+assert_eq!(err.entry.get(), &"a");
+assert_eq!(err.value, "b");
+
1.0.0 · source

pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the value at the key if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove(&1), Some("a"));
+assert_eq!(map.remove(&1), None);
+
1.45.0 · source

pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the stored key and value if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove_entry(&1), Some((1, "a")));
+assert_eq!(map.remove_entry(&1), None);
+
1.53.0 · source

pub fn retain<F>(&mut self, f: F)
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

+

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false. +The elements are visited in ascending key order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
+// Keep only the elements with even-numbered keys.
+map.retain(|&k, _| k % 2 == 0);
+assert!(map.into_iter().eq(vec![(0, 0), (2, 20), (4, 40), (6, 60)]));
+
1.11.0 · source

pub fn append(&mut self, other: &mut BTreeMap<K, V, A>)
where + K: Ord, + A: Clone,

Moves all elements from other into self, leaving other empty.

+

If a key from other is already present in self, the respective +value from self will be overwritten with the respective value from other.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c"); // Note: Key (3) also present in b.
+
+let mut b = BTreeMap::new();
+b.insert(3, "d"); // Note: Key (3) also present in a.
+b.insert(4, "e");
+b.insert(5, "f");
+
+a.append(&mut b);
+
+assert_eq!(a.len(), 5);
+assert_eq!(b.len(), 0);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+assert_eq!(a[&3], "d"); // Note: "c" has been overwritten.
+assert_eq!(a[&4], "e");
+assert_eq!(a[&5], "f");
+
1.17.0 · source

pub fn range<T, R>(&self, range: R) -> Range<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+use std::ops::Bound::Included;
+
+let mut map = BTreeMap::new();
+map.insert(3, "a");
+map.insert(5, "b");
+map.insert(8, "c");
+for (&key, &value) in map.range((Included(&4), Included(&8))) {
+    println!("{key}: {value}");
+}
+assert_eq!(Some((&5, &"b")), map.range(4..).next());
+
1.17.0 · source

pub fn range_mut<T, R>(&mut self, range: R) -> RangeMut<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a mutable double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<&str, i32> =
+    [("Alice", 0), ("Bob", 0), ("Carol", 0), ("Cheryl", 0)].into();
+for (_, balance) in map.range_mut("B".."Cheryl") {
+    *balance += 100;
+}
+for (name, balance) in &map {
+    println!("{name} => {balance}");
+}
+
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A>
where + K: Ord,

Gets the given key’s corresponding entry in the map for in-place manipulation.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut count: BTreeMap<&str, usize> = BTreeMap::new();
+
+// count the number of occurrences of letters in the vec
+for x in ["a", "b", "a", "c", "a", "b"] {
+    count.entry(x).and_modify(|curr| *curr += 1).or_insert(1);
+}
+
+assert_eq!(count["a"], 3);
+assert_eq!(count["b"], 2);
+assert_eq!(count["c"], 1);
+
1.11.0 · source

pub fn split_off<Q>(&mut self, key: &Q) -> BTreeMap<K, V, A>
where + Q: Ord + ?Sized, + K: Borrow<Q> + Ord, + A: Clone,

Splits the collection into two at the given key. Returns everything after the given key, +including the key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(17, "d");
+a.insert(41, "e");
+
+let b = a.split_off(&3);
+
+assert_eq!(a.len(), 2);
+assert_eq!(b.len(), 3);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+
+assert_eq!(b[&3], "c");
+assert_eq!(b[&17], "d");
+assert_eq!(b[&41], "e");
+
source

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A>
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (btree_extract_if)

Creates an iterator that visits all elements (key-value pairs) in +ascending key order and uses a closure to determine if an element should +be removed. If the closure returns true, the element is removed from +the map and yielded. If the closure returns false, or panics, the +element remains in the map and will not be yielded.

+

The iterator also lets you mutate the value of each element in the +closure, regardless of whether you choose to keep or remove it.

+

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating +or the iteration short-circuits, then the remaining elements will be retained. +Use retain with a negated predicate if you do not need the returned iterator.

+
Examples
+

Splitting a map into even and odd keys, reusing the original map:

+ +
#![feature(btree_extract_if)]
+use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
+let evens: BTreeMap<_, _> = map.extract_if(|k, _v| k % 2 == 0).collect();
+let odds = map;
+assert_eq!(evens.keys().copied().collect::<Vec<_>>(), [0, 2, 4, 6]);
+assert_eq!(odds.keys().copied().collect::<Vec<_>>(), [1, 3, 5, 7]);
+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

Gets an iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(3, "c");
+map.insert(2, "b");
+map.insert(1, "a");
+
+for (key, value) in map.iter() {
+    println!("{key}: {value}");
+}
+
+let (first_key, first_value) = map.iter().next().unwrap();
+assert_eq!((*first_key, *first_value), (1, "a"));
+
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

Gets a mutable iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::from([
+   ("a", 1),
+   ("b", 2),
+   ("c", 3),
+]);
+
+// add 10 to the value if the key isn't "a"
+for (key, value) in map.iter_mut() {
+    if key != &"a" {
+        *value += 10;
+    }
+}
+
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

Gets an iterator over the keys of the map, in sorted order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(2, "b");
+a.insert(1, "a");
+
+let keys: Vec<_> = a.keys().cloned().collect();
+assert_eq!(keys, [1, 2]);
+
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

Gets an iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "hello");
+a.insert(2, "goodbye");
+
+let values: Vec<&str> = a.values().cloned().collect();
+assert_eq!(values, ["hello", "goodbye"]);
+
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

Gets a mutable iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, String::from("hello"));
+a.insert(2, String::from("goodbye"));
+
+for value in a.values_mut() {
+    value.push_str("!");
+}
+
+let values: Vec<String> = a.values().cloned().collect();
+assert_eq!(values, [String::from("hello!"),
+                    String::from("goodbye!")]);
+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert_eq!(a.len(), 0);
+a.insert(1, "a");
+assert_eq!(a.len(), 1);
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert!(a.is_empty());
+a.insert(1, "a");
+assert!(!a.is_empty());
+
source

pub fn lower_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn lower_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound_mut(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound_mut(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn upper_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+
source

pub fn upper_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound_mut(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound_mut(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+

Trait Implementations§

source§

impl Clone for StateDiff

source§

fn clone(&self) -> StateDiff

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StateDiff

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StateDiff

source§

fn default() -> StateDiff

Returns the “default value” for a type. Read more
source§

impl Deref for StateDiff

§

type Target = BTreeMap<Address, AccountDiff>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for StateDiff

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for StateDiff

source§

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 PartialEq for StateDiff

source§

fn eq(&self, other: &StateDiff) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StateDiff

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StateDiff

source§

impl StructuralEq for StateDiff

source§

impl StructuralPartialEq for StateDiff

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.StorageDelta.html b/alloy_rpc_types/eth/trace/parity/struct.StorageDelta.html new file mode 100644 index 000000000000..864896f4123f --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.StorageDelta.html @@ -0,0 +1,30 @@ +StorageDelta in alloy_rpc_types::eth::trace::parity - Rust +
pub struct StorageDelta {
+    pub key: U256,
+    pub val: U256,
+}
Expand description

A diff of some storage value.

+

Fields§

§key: U256

Key.

+
§val: U256

Value.

+

Trait Implementations§

source§

impl Clone for StorageDelta

source§

fn clone(&self) -> StorageDelta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StorageDelta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for StorageDelta

source§

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 PartialEq for StorageDelta

source§

fn eq(&self, other: &StorageDelta) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StorageDelta

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StorageDelta

source§

impl StructuralEq for StorageDelta

source§

impl StructuralPartialEq for StorageDelta

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.TraceResults.html b/alloy_rpc_types/eth/trace/parity/struct.TraceResults.html new file mode 100644 index 000000000000..b15d35366c94 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.TraceResults.html @@ -0,0 +1,37 @@ +TraceResults in alloy_rpc_types::eth::trace::parity - Rust +
pub struct TraceResults {
+    pub output: Bytes,
+    pub state_diff: Option<StateDiff>,
+    pub trace: Vec<TransactionTrace>,
+    pub vm_trace: Option<VmTrace>,
+}
Expand description

The Outcome of a traced transaction with optional settings

+

Fields§

§output: Bytes

Output of the trace

+
§state_diff: Option<StateDiff>

Enabled if TraceType::StateDiff is provided

+
§trace: Vec<TransactionTrace>

Enabled if TraceType::Trace is provided, otherwise an empty vec

+
§vm_trace: Option<VmTrace>

Enabled if TraceType::VmTrace is provided

+

Implementations§

source§

impl TraceResults

source

pub fn set_root_trace_gas_used(&mut self, gas_used: u64)

Sets the gas used of the root trace.

+

The root trace’s gasUsed should mirror the actual gas used by the transaction.

+

This allows setting it manually by consuming the execution result’s gas for example.

+

Trait Implementations§

source§

impl Clone for TraceResults

source§

fn clone(&self) -> TraceResults

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceResults

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceResults

source§

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 PartialEq for TraceResults

source§

fn eq(&self, other: &TraceResults) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceResults

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceResults

source§

impl StructuralEq for TraceResults

source§

impl StructuralPartialEq for TraceResults

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 144 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.TraceResultsWithTransactionHash.html b/alloy_rpc_types/eth/trace/parity/struct.TraceResultsWithTransactionHash.html new file mode 100644 index 000000000000..1f2a12f42c6a --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.TraceResultsWithTransactionHash.html @@ -0,0 +1,30 @@ +TraceResultsWithTransactionHash in alloy_rpc_types::eth::trace::parity - Rust +
pub struct TraceResultsWithTransactionHash {
+    pub full_trace: TraceResults,
+    pub transaction_hash: B256,
+}
Expand description

A FullTrace with an additional transaction hash

+

Fields§

§full_trace: TraceResults

Full trace data.

+
§transaction_hash: B256

Transaction hash.

+

Trait Implementations§

source§

impl Clone for TraceResultsWithTransactionHash

source§

fn clone(&self) -> TraceResultsWithTransactionHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceResultsWithTransactionHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceResultsWithTransactionHash

source§

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 PartialEq for TraceResultsWithTransactionHash

source§

fn eq(&self, other: &TraceResultsWithTransactionHash) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceResultsWithTransactionHash

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceResultsWithTransactionHash

source§

impl StructuralEq for TraceResultsWithTransactionHash

source§

impl StructuralPartialEq for TraceResultsWithTransactionHash

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.TransactionTrace.html b/alloy_rpc_types/eth/trace/parity/struct.TransactionTrace.html new file mode 100644 index 000000000000..92491d0d7c15 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.TransactionTrace.html @@ -0,0 +1,36 @@ +TransactionTrace in alloy_rpc_types::eth::trace::parity - Rust +
pub struct TransactionTrace {
+    pub action: Action,
+    pub error: Option<String>,
+    pub result: Option<TraceOutput>,
+    pub subtraces: usize,
+    pub trace_address: Vec<usize>,
+}
Expand description

A parity style trace of a transaction.

+

Fields§

§action: Action

Transaction action.

+
§error: Option<String>

Error message.

+
§result: Option<TraceOutput>

Execution result.

+
§subtraces: usize

Subtrace count.

+
§trace_address: Vec<usize>

Trace address path.

+

Trait Implementations§

source§

impl Clone for TransactionTrace

source§

fn clone(&self) -> TransactionTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransactionTrace

source§

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 PartialEq for TransactionTrace

source§

fn eq(&self, other: &TransactionTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionTrace

source§

impl StructuralEq for TransactionTrace

source§

impl StructuralPartialEq for TransactionTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 248 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.VmExecutedOperation.html b/alloy_rpc_types/eth/trace/parity/struct.VmExecutedOperation.html new file mode 100644 index 000000000000..fee2b589ad4c --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.VmExecutedOperation.html @@ -0,0 +1,34 @@ +VmExecutedOperation in alloy_rpc_types::eth::trace::parity - Rust +
pub struct VmExecutedOperation {
+    pub used: u64,
+    pub push: Vec<U256>,
+    pub mem: Option<MemoryDelta>,
+    pub store: Option<StorageDelta>,
+}
Expand description

A record of an executed VM operation.

+

Fields§

§used: u64

The total gas used.

+
§push: Vec<U256>

The stack item placed, if any.

+
§mem: Option<MemoryDelta>

If altered, the memory delta.

+
§store: Option<StorageDelta>

The altered storage value, if any.

+

Trait Implementations§

source§

impl Clone for VmExecutedOperation

source§

fn clone(&self) -> VmExecutedOperation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmExecutedOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for VmExecutedOperation

source§

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 PartialEq for VmExecutedOperation

source§

fn eq(&self, other: &VmExecutedOperation) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmExecutedOperation

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmExecutedOperation

source§

impl StructuralEq for VmExecutedOperation

source§

impl StructuralPartialEq for VmExecutedOperation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 144 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.VmInstruction.html b/alloy_rpc_types/eth/trace/parity/struct.VmInstruction.html new file mode 100644 index 000000000000..98272eaad450 --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.VmInstruction.html @@ -0,0 +1,38 @@ +VmInstruction in alloy_rpc_types::eth::trace::parity - Rust +
pub struct VmInstruction {
+    pub cost: u64,
+    pub ex: Option<VmExecutedOperation>,
+    pub pc: usize,
+    pub sub: Option<VmTrace>,
+    pub op: Option<String>,
+    pub idx: Option<String>,
+}
Expand description

Vm instruction type.

+

Fields§

§cost: u64

The gas cost for this instruction.

+
§ex: Option<VmExecutedOperation>

Information concerning the execution of the operation.

+
§pc: usize

The program counter.

+
§sub: Option<VmTrace>

Subordinate trace of the CALL/CREATE if applicable.

+
§op: Option<String>

Stringified opcode.

+
§idx: Option<String>

Index.

+

Trait Implementations§

source§

impl Clone for VmInstruction

source§

fn clone(&self) -> VmInstruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmInstruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for VmInstruction

source§

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 PartialEq for VmInstruction

source§

fn eq(&self, other: &VmInstruction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmInstruction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmInstruction

source§

impl StructuralEq for VmInstruction

source§

impl StructuralPartialEq for VmInstruction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 264 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/parity/struct.VmTrace.html b/alloy_rpc_types/eth/trace/parity/struct.VmTrace.html new file mode 100644 index 000000000000..9c93154c4b7c --- /dev/null +++ b/alloy_rpc_types/eth/trace/parity/struct.VmTrace.html @@ -0,0 +1,30 @@ +VmTrace in alloy_rpc_types::eth::trace::parity - Rust +
pub struct VmTrace {
+    pub code: Bytes,
+    pub ops: Vec<VmInstruction>,
+}
Expand description

A record of a full VM trace for a CALL/CREATE.

+

Fields§

§code: Bytes

The code to be executed.

+
§ops: Vec<VmInstruction>

All executed instructions.

+

Trait Implementations§

source§

impl Clone for VmTrace

source§

fn clone(&self) -> VmTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for VmTrace

source§

fn default() -> VmTrace

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for VmTrace

source§

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 PartialEq for VmTrace

source§

fn eq(&self, other: &VmTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmTrace

source§

impl StructuralEq for VmTrace

source§

impl StructuralPartialEq for VmTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/sidebar-items.js b/alloy_rpc_types/eth/trace/sidebar-items.js new file mode 100644 index 000000000000..2343c97df16c --- /dev/null +++ b/alloy_rpc_types/eth/trace/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["common","filter","geth","parity","tracerequest"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/tracerequest/index.html b/alloy_rpc_types/eth/trace/tracerequest/index.html new file mode 100644 index 000000000000..b3f2ed02a952 --- /dev/null +++ b/alloy_rpc_types/eth/trace/tracerequest/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::trace::tracerequest - Rust +
Expand description

Builder style functions for trace_call

+

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/tracerequest/sidebar-items.js b/alloy_rpc_types/eth/trace/tracerequest/sidebar-items.js new file mode 100644 index 000000000000..3e8c6853414f --- /dev/null +++ b/alloy_rpc_types/eth/trace/tracerequest/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["TraceCallRequest"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/trace/tracerequest/struct.TraceCallRequest.html b/alloy_rpc_types/eth/trace/tracerequest/struct.TraceCallRequest.html new file mode 100644 index 000000000000..bb5253380895 --- /dev/null +++ b/alloy_rpc_types/eth/trace/tracerequest/struct.TraceCallRequest.html @@ -0,0 +1,48 @@ +TraceCallRequest in alloy_rpc_types::eth::trace::tracerequest - Rust +
pub struct TraceCallRequest {
+    pub call: CallRequest,
+    pub trace_types: HashSet<TraceType>,
+    pub block_id: Option<BlockId>,
+    pub state_overrides: Option<StateOverride>,
+    pub block_overrides: Option<Box<BlockOverrides>>,
+}
Expand description

Container type for trace_call arguments

+

Fields§

§call: CallRequest

call request object

+
§trace_types: HashSet<TraceType>

trace types

+
§block_id: Option<BlockId>

Optional: blockId

+
§state_overrides: Option<StateOverride>

Optional: StateOverride

+
§block_overrides: Option<Box<BlockOverrides>>

Optional: BlockOverrides

+

Implementations§

source§

impl TraceCallRequest

source

pub fn new(call: CallRequest) -> Self

Returns a new TraceCallRequest given a CallRequest and HashSet<TraceType>

+
source

pub fn with_block_id(self, block_id: BlockId) -> Self

Sets the BlockId +Note: this is optional

+
source

pub fn with_state_override(self, state_overrides: StateOverride) -> Self

Sets the StateOverride +Note: this is optional

+
source

pub fn with_block_overrides(self, block_overrides: Box<BlockOverrides>) -> Self

Sets the BlockOverrides +Note: this is optional

+
source

pub fn with_trace_type(self, trace_type: TraceType) -> Self

Inserts a single trace type.

+
source

pub fn with_trace_types<I: IntoIterator<Item = TraceType>>( + self, + trace_types: I +) -> Self

Inserts multiple trace types from an iterator.

+
source

pub fn with_trace(self) -> Self

source

pub fn with_vm_trace(self) -> Self

source

pub fn with_statediff(self) -> Self

Trait Implementations§

source§

impl Debug for TraceCallRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceCallRequest

source§

fn default() -> TraceCallRequest

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceCallRequest

source§

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 Serialize for TraceCallRequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 592 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/access_list/index.html b/alloy_rpc_types/eth/transaction/access_list/index.html new file mode 100644 index 000000000000..26b549774346 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/access_list/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::transaction::access_list - Rust +

Structs

  • AccessList as defined in EIP-2930
  • A list of addresses and storage keys that the transaction plans to access. +Accesses outside the list are possible, but become more expensive.
  • Access list with gas used appended.
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/access_list/sidebar-items.js b/alloy_rpc_types/eth/transaction/access_list/sidebar-items.js new file mode 100644 index 000000000000..f5d7ed70da7e --- /dev/null +++ b/alloy_rpc_types/eth/transaction/access_list/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AccessList","AccessListItem","AccessListWithGasUsed"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/access_list/struct.AccessList.html b/alloy_rpc_types/eth/transaction/access_list/struct.AccessList.html new file mode 100644 index 000000000000..ee4b1c3a3f2a --- /dev/null +++ b/alloy_rpc_types/eth/transaction/access_list/struct.AccessList.html @@ -0,0 +1,33 @@ +AccessList in alloy_rpc_types::eth::transaction::access_list - Rust +
pub struct AccessList(pub Vec<AccessListItem>);
Expand description

AccessList as defined in EIP-2930

+

Tuple Fields§

§0: Vec<AccessListItem>

Implementations§

source§

impl AccessList

source§

impl AccessList

source

pub fn flattened(&self) -> Vec<(Address, Vec<U256>)>

Converts the list into a vec, expected by revm

+
source

pub fn into_flattened(self) -> Vec<(Address, Vec<U256>)>

Consumes the type and converts the list into a vec, expected by revm

+
source

pub fn into_flatten(self) -> impl Iterator<Item = (Address, Vec<U256>)>

Consumes the type and returns an iterator over the list’s addresses and storage keys.

+
source

pub fn flatten(&self) -> impl Iterator<Item = (Address, Vec<U256>)> + '_

Returns an iterator over the list’s addresses and storage keys.

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the AccessList.

+

Trait Implementations§

source§

impl Clone for AccessList

source§

fn clone(&self) -> AccessList

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessList

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for AccessList

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for AccessList

source§

fn default() -> AccessList

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccessList

source§

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 Encodable for AccessList

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl Hash for AccessList

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccessList

source§

fn eq(&self, other: &AccessList) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccessList

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccessList

source§

impl StructuralEq for AccessList

source§

impl StructuralPartialEq for AccessList

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/access_list/struct.AccessListItem.html b/alloy_rpc_types/eth/transaction/access_list/struct.AccessListItem.html new file mode 100644 index 000000000000..58e6c59f9015 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/access_list/struct.AccessListItem.html @@ -0,0 +1,35 @@ +AccessListItem in alloy_rpc_types::eth::transaction::access_list - Rust +
pub struct AccessListItem {
+    pub address: Address,
+    pub storage_keys: Vec<B256>,
+}
Expand description

A list of addresses and storage keys that the transaction plans to access. +Accesses outside the list are possible, but become more expensive.

+

Fields§

§address: Address

Account addresses that would be loaded at the start of execution

+
§storage_keys: Vec<B256>

Keys of storage that would be loaded at the start of execution

+

Implementations§

source§

impl AccessListItem

source§

impl AccessListItem

source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the AccessListItem.

+

Trait Implementations§

source§

impl Clone for AccessListItem

source§

fn clone(&self) -> AccessListItem

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessListItem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for AccessListItem

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for AccessListItem

source§

fn default() -> AccessListItem

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccessListItem

source§

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 Encodable for AccessListItem

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl Hash for AccessListItem

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccessListItem

source§

fn eq(&self, other: &AccessListItem) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccessListItem

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccessListItem

source§

impl StructuralEq for AccessListItem

source§

impl StructuralPartialEq for AccessListItem

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/access_list/struct.AccessListWithGasUsed.html b/alloy_rpc_types/eth/transaction/access_list/struct.AccessListWithGasUsed.html new file mode 100644 index 000000000000..ca1756c3fe22 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/access_list/struct.AccessListWithGasUsed.html @@ -0,0 +1,30 @@ +AccessListWithGasUsed in alloy_rpc_types::eth::transaction::access_list - Rust +
pub struct AccessListWithGasUsed {
+    pub access_list: AccessList,
+    pub gas_used: U256,
+}
Expand description

Access list with gas used appended.

+

Fields§

§access_list: AccessList

List with accounts accessed during transaction.

+
§gas_used: U256

Estimated gas used with access list.

+

Trait Implementations§

source§

impl Clone for AccessListWithGasUsed

source§

fn clone(&self) -> AccessListWithGasUsed

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessListWithGasUsed

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccessListWithGasUsed

source§

fn default() -> AccessListWithGasUsed

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccessListWithGasUsed

source§

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 PartialEq for AccessListWithGasUsed

source§

fn eq(&self, other: &AccessListWithGasUsed) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccessListWithGasUsed

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccessListWithGasUsed

source§

impl StructuralEq for AccessListWithGasUsed

source§

impl StructuralPartialEq for AccessListWithGasUsed

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/common/index.html b/alloy_rpc_types/eth/transaction/common/index.html new file mode 100644 index 000000000000..36d2c1dddd3e --- /dev/null +++ b/alloy_rpc_types/eth/transaction/common/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::eth::transaction::common - Rust +
Expand description

Commonly used additional types that are not part of the JSON RPC spec but are often required +when working with RPC types, such as Transaction

+

Structs

  • Additional fields in the context of a block that contains this transaction.
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/common/sidebar-items.js b/alloy_rpc_types/eth/transaction/common/sidebar-items.js new file mode 100644 index 000000000000..9ee430d2fa36 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/common/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["TransactionInfo"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/common/struct.TransactionInfo.html b/alloy_rpc_types/eth/transaction/common/struct.TransactionInfo.html new file mode 100644 index 000000000000..20afe4d653ad --- /dev/null +++ b/alloy_rpc_types/eth/transaction/common/struct.TransactionInfo.html @@ -0,0 +1,33 @@ +TransactionInfo in alloy_rpc_types::eth::transaction::common - Rust +
pub struct TransactionInfo {
+    pub hash: Option<TxHash>,
+    pub index: Option<u64>,
+    pub block_hash: Option<B256>,
+    pub block_number: Option<u64>,
+    pub base_fee: Option<u64>,
+}
Expand description

Additional fields in the context of a block that contains this transaction.

+

Fields§

§hash: Option<TxHash>

Hash of the transaction.

+
§index: Option<u64>

Index of the transaction in the block

+
§block_hash: Option<B256>

Hash of the block.

+
§block_number: Option<u64>

Number of the block.

+
§base_fee: Option<u64>

Base fee of the block.

+

Trait Implementations§

source§

impl Clone for TransactionInfo

source§

fn clone(&self) -> TransactionInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TransactionInfo

source§

fn default() -> TransactionInfo

Returns the “default value” for a type. Read more
source§

impl PartialEq for TransactionInfo

source§

fn eq(&self, other: &TransactionInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for TransactionInfo

source§

impl Eq for TransactionInfo

source§

impl StructuralEq for TransactionInfo

source§

impl StructuralPartialEq for TransactionInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/index.html b/alloy_rpc_types/eth/transaction/index.html new file mode 100644 index 000000000000..4dd8fffa8871 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/index.html @@ -0,0 +1,5 @@ +alloy_rpc_types::eth::transaction - Rust +

Re-exports

Modules

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/receipt/index.html b/alloy_rpc_types/eth/transaction/receipt/index.html new file mode 100644 index 000000000000..a970d6ee5c20 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/receipt/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::transaction::receipt - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/receipt/sidebar-items.js b/alloy_rpc_types/eth/transaction/receipt/sidebar-items.js new file mode 100644 index 000000000000..b9c13d9abfad --- /dev/null +++ b/alloy_rpc_types/eth/transaction/receipt/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["TransactionReceipt"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/receipt/struct.TransactionReceipt.html b/alloy_rpc_types/eth/transaction/receipt/struct.TransactionReceipt.html new file mode 100644 index 000000000000..a53e66239802 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/receipt/struct.TransactionReceipt.html @@ -0,0 +1,66 @@ +TransactionReceipt in alloy_rpc_types::eth::transaction::receipt - Rust +
pub struct TransactionReceipt {
Show 18 fields + pub transaction_hash: Option<B256>, + pub transaction_index: U64, + pub block_hash: Option<B256>, + pub block_number: Option<U256>, + pub cumulative_gas_used: U256, + pub gas_used: Option<U256>, + pub effective_gas_price: U128, + pub blob_gas_used: Option<U128>, + pub blob_gas_price: Option<U128>, + pub from: Address, + pub to: Option<Address>, + pub contract_address: Option<Address>, + pub logs: Vec<Log>, + pub logs_bloom: Bloom, + pub state_root: Option<B256>, + pub status_code: Option<U64>, + pub transaction_type: U8, + pub other: OtherFields, +
}
Expand description

Transaction receipt

+

Fields§

§transaction_hash: Option<B256>

Transaction Hash.

+
§transaction_index: U64

Index within the block.

+
§block_hash: Option<B256>

Hash of the block this transaction was included within.

+
§block_number: Option<U256>

Number of the block this transaction was included within.

+
§cumulative_gas_used: U256

Cumulative gas used within the block after this was executed.

+
§gas_used: Option<U256>

Gas used by this transaction alone.

+
§effective_gas_price: U128

The price paid post-execution by the transaction (i.e. base fee + priority fee). Both +fields in 1559-style transactions are maximums (max fee + max priority fee), the amount +that’s actually paid by users can only be determined post-execution

+
§blob_gas_used: Option<U128>

Blob gas used by the eip-4844 transaction

+

This is None for non eip-4844 transactions

+
§blob_gas_price: Option<U128>

The price paid by the eip-4844 transaction per blob gas.

+
§from: Address

Address of the sender

+
§to: Option<Address>

Address of the receiver. null when its a contract creation transaction.

+
§contract_address: Option<Address>

Contract address created, or None if not a deployment.

+
§logs: Vec<Log>

Logs emitted by this transaction.

+
§logs_bloom: Bloom

Logs bloom

+
§state_root: Option<B256>

The post-transaction stateroot (pre Byzantium)

+

EIP98 makes this optional field, if it’s missing then skip serializing it

+
§status_code: Option<U64>

Status: either 1 (success) or 0 (failure). Only present after activation of EIP-658

+
§transaction_type: U8

EIP-2718 Transaction type, Some(1) for AccessList transaction, None for Legacy

+
§other: OtherFields

Support for arbitrary additional fields.

+

Trait Implementations§

source§

impl Clone for TransactionReceipt

source§

fn clone(&self) -> TransactionReceipt

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionReceipt

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransactionReceipt

source§

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 PartialEq for TransactionReceipt

source§

fn eq(&self, other: &TransactionReceipt) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionReceipt

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionReceipt

source§

impl StructuralEq for TransactionReceipt

source§

impl StructuralPartialEq for TransactionReceipt

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 680 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/request/index.html b/alloy_rpc_types/eth/transaction/request/index.html new file mode 100644 index 000000000000..32fcb6eef3d4 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/request/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::eth::transaction::request - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/request/sidebar-items.js b/alloy_rpc_types/eth/transaction/request/sidebar-items.js new file mode 100644 index 000000000000..7f73c09f0fee --- /dev/null +++ b/alloy_rpc_types/eth/transaction/request/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["TransactionRequest"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/request/struct.TransactionRequest.html b/alloy_rpc_types/eth/transaction/request/struct.TransactionRequest.html new file mode 100644 index 000000000000..7d8f9bf3b847 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/request/struct.TransactionRequest.html @@ -0,0 +1,60 @@ +TransactionRequest in alloy_rpc_types::eth::transaction::request - Rust +
pub struct TransactionRequest {
+    pub from: Option<Address>,
+    pub to: Option<Address>,
+    pub gas_price: Option<U128>,
+    pub max_fee_per_gas: Option<U128>,
+    pub max_priority_fee_per_gas: Option<U128>,
+    pub gas: Option<U256>,
+    pub value: Option<U256>,
+    pub data: Option<Bytes>,
+    pub nonce: Option<U64>,
+    pub access_list: Option<AccessList>,
+    pub transaction_type: Option<U8>,
+}
Expand description

Represents all transaction requests received from RPC

+

Fields§

§from: Option<Address>

from address

+
§to: Option<Address>

to address

+
§gas_price: Option<U128>

legacy, gas Price

+
§max_fee_per_gas: Option<U128>

max base fee per gas sender is willing to pay

+
§max_priority_fee_per_gas: Option<U128>

miner tip

+
§gas: Option<U256>

gas

+
§value: Option<U256>

value of th tx in wei

+
§data: Option<Bytes>

Any additional data sent

+
§nonce: Option<U64>

Transaction nonce

+
§access_list: Option<AccessList>

warm storage access pre-payment

+
§transaction_type: Option<U8>

EIP-2718 type

+

Implementations§

source§

impl TransactionRequest

source

pub fn into_typed_request(self) -> Option<TypedTransactionRequest>

Converts the request into a TypedTransactionRequest

+

Returns None if mutual exclusive fields gasPrice and max_fee_per_gas are either missing +or both set.

+
source

pub fn gas_limit(self, gas_limit: u64) -> Self

Sets the gas limit for the transaction.

+
source

pub fn nonce(self, nonce: u64) -> Self

Sets the nonce for the transaction.

+
source

pub fn max_fee_per_gas(self, max_fee_per_gas: u128) -> Self

Sets the maximum fee per gas for the transaction.

+
source

pub fn max_priority_fee_per_gas(self, max_priority_fee_per_gas: u128) -> Self

Sets the maximum priority fee per gas for the transaction.

+
source

pub fn to(self, to: Address) -> Self

Sets the recipient address for the transaction.

+
source

pub fn value(self, value: u128) -> Self

Sets the value (amount) for the transaction.

+
source

pub fn access_list(self, access_list: AccessList) -> Self

Sets the access list for the transaction.

+
source

pub fn input(self, input: Bytes) -> Self

Sets the input data for the transaction.

+
source

pub fn transaction_type(self, transaction_type: u8) -> Self

Sets the transactions type for the transactions.

+

Trait Implementations§

source§

impl Clone for TransactionRequest

source§

fn clone(&self) -> TransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TransactionRequest

source§

fn default() -> TransactionRequest

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TransactionRequest

source§

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 PartialEq for TransactionRequest

source§

fn eq(&self, other: &TransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionRequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionRequest

source§

impl StructuralEq for TransactionRequest

source§

impl StructuralPartialEq for TransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 288 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/sidebar-items.js b/alloy_rpc_types/eth/transaction/sidebar-items.js new file mode 100644 index 000000000000..b77d61694fca --- /dev/null +++ b/alloy_rpc_types/eth/transaction/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["access_list","common","receipt","request","signature","tx_type","typed"],"struct":["Transaction"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/signature/fn.deserialize_parity.html b/alloy_rpc_types/eth/transaction/signature/fn.deserialize_parity.html new file mode 100644 index 000000000000..8d07c07835fc --- /dev/null +++ b/alloy_rpc_types/eth/transaction/signature/fn.deserialize_parity.html @@ -0,0 +1,4 @@ +deserialize_parity in alloy_rpc_types::eth::transaction::signature - Rust +
fn deserialize_parity<'de, D>(deserializer: D) -> Result<bool, D::Error>
where + D: Deserializer<'de>,
Expand description

This implementation disallows serialization of the y parity bit that are not "0x0" or "0x1".

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/signature/fn.serialize_parity.html b/alloy_rpc_types/eth/transaction/signature/fn.serialize_parity.html new file mode 100644 index 000000000000..d5fc53147de6 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/signature/fn.serialize_parity.html @@ -0,0 +1,3 @@ +serialize_parity in alloy_rpc_types::eth::transaction::signature - Rust +
fn serialize_parity<S>(parity: &bool, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/signature/index.html b/alloy_rpc_types/eth/transaction/signature/index.html new file mode 100644 index 000000000000..e200fcc1792b --- /dev/null +++ b/alloy_rpc_types/eth/transaction/signature/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::transaction::signature - Rust +
Expand description

Signature related RPC values

+

Structs

  • Type that represents the signature parity byte, meant for use in RPC.
  • Container type for all signature fields in RPC

Functions

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/signature/sidebar-items.js b/alloy_rpc_types/eth/transaction/signature/sidebar-items.js new file mode 100644 index 000000000000..c8e6bf069e7a --- /dev/null +++ b/alloy_rpc_types/eth/transaction/signature/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize_parity","serialize_parity"],"struct":["Parity","Signature"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/signature/struct.Parity.html b/alloy_rpc_types/eth/transaction/signature/struct.Parity.html new file mode 100644 index 000000000000..1e19fff004cf --- /dev/null +++ b/alloy_rpc_types/eth/transaction/signature/struct.Parity.html @@ -0,0 +1,29 @@ +Parity in alloy_rpc_types::eth::transaction::signature - Rust +
pub struct Parity(pub bool);
Expand description

Type that represents the signature parity byte, meant for use in RPC.

+

This will be serialized as “0x0” if false, and “0x1” if true.

+

Tuple Fields§

§0: bool

Trait Implementations§

source§

impl Clone for Parity

source§

fn clone(&self) -> Parity

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Parity

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Parity

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl<'de> Deserialize<'de> for Parity

source§

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 Encodable for Parity

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl From<Parity> for U256

source§

fn from(p: Parity) -> Self

Converts to this type from the input type.
source§

impl From<Parity> for u64

source§

fn from(p: Parity) -> Self

Converts to this type from the input type.
source§

impl From<Parity> for u8

source§

fn from(value: Parity) -> Self

Converts to this type from the input type.
source§

impl From<Uint<256, 4>> for Parity

source§

fn from(value: U256) -> Self

Converts to this type from the input type.
source§

impl From<bool> for Parity

source§

fn from(b: bool) -> Self

Converts to this type from the input type.
source§

impl Hash for Parity

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Parity

source§

fn eq(&self, other: &Parity) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Parity

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Parity

source§

impl Eq for Parity

source§

impl StructuralEq for Parity

source§

impl StructuralPartialEq for Parity

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/signature/struct.Signature.html b/alloy_rpc_types/eth/transaction/signature/struct.Signature.html new file mode 100644 index 000000000000..11b7cd74e03f --- /dev/null +++ b/alloy_rpc_types/eth/transaction/signature/struct.Signature.html @@ -0,0 +1,61 @@ +Signature in alloy_rpc_types::eth::transaction::signature - Rust +
pub struct Signature {
+    pub r: U256,
+    pub s: U256,
+    pub v: U256,
+    pub y_parity: Option<Parity>,
+}
Expand description

Container type for all signature fields in RPC

+

Fields§

§r: U256

The R field of the signature; the point on the curve.

+
§s: U256

The S field of the signature; the point on the curve.

+
§v: U256

For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0 for even, 1 for +odd) of the y-value of the secp256k1 signature.

+

For legacy transactions, this is the recovery id

+

See also https://ethereum.github.io/execution-apis/api-documentation/ and https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash

+
§y_parity: Option<Parity>

The y parity of the signature. This is only used for typed (non-legacy) transactions.

+

Implementations§

source§

impl Signature

source

pub fn payload_len_with_eip155_chain_id(&self, chain_id: Option<u64>) -> usize

Output the length of the signature without the length of the RLP header, using the legacy +scheme with EIP-155 support depends on chain_id.

+
source

pub fn encode_with_eip155_chain_id( + &self, + out: &mut dyn BufMut, + chain_id: Option<u64> +)

Encode the v, r, s values without a RLP header. +Encodes the v value using the legacy scheme with EIP-155 support depends on chain_id.

+
source

pub fn v(&self, chain_id: Option<u64>) -> u64

Output the v of the signature depends on chain_id

+
source

pub fn decode_with_eip155_chain_id( + buf: &mut &[u8] +) -> Result<(Self, Option<u64>)>

Decodes the v, r, s values without a RLP header. +This will return a chain ID if the v value is EIP-155 compatible.

+
source

pub fn payload_len(&self) -> usize

Output the length of the signature without the length of the RLP header

+
source

pub fn encode(&self, out: &mut dyn BufMut)

Encode the y_parity, r, s values without a RLP header. +Panics if the y parity is not set.

+
source

pub fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the y_parity, r, s values without a RLP header.

+
source

pub fn to_bytes(&self) -> [u8; 65]

Turn this signature into its byte +(hex) representation. +Panics: if the y_parity field is not set.

+
source

pub fn to_hex_bytes(&self) -> Bytes

Turn this signature into its hex-encoded representation.

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the Signature.

+

Trait Implementations§

source§

impl Clone for Signature

source§

fn clone(&self) -> Signature

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Signature

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Signature

source§

fn default() -> Signature

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Signature

source§

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 Hash for Signature

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Signature

source§

fn eq(&self, other: &Signature) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Signature

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Signature

source§

impl StructuralEq for Signature

source§

impl StructuralPartialEq for Signature

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 104 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/struct.Transaction.html b/alloy_rpc_types/eth/transaction/struct.Transaction.html new file mode 100644 index 000000000000..efda0a90c250 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/struct.Transaction.html @@ -0,0 +1,68 @@ +Transaction in alloy_rpc_types::eth::transaction - Rust +
pub struct Transaction {
Show 20 fields + pub hash: B256, + pub nonce: U64, + pub block_hash: Option<B256>, + pub block_number: Option<U256>, + pub transaction_index: Option<U256>, + pub from: Address, + pub to: Option<Address>, + pub value: U256, + pub gas_price: Option<U128>, + pub gas: U256, + pub max_fee_per_gas: Option<U128>, + pub max_priority_fee_per_gas: Option<U128>, + pub max_fee_per_blob_gas: Option<U128>, + pub input: Bytes, + pub signature: Option<Signature>, + pub chain_id: Option<U64>, + pub blob_versioned_hashes: Vec<B256>, + pub access_list: Option<Vec<AccessListItem>>, + pub transaction_type: Option<U64>, + pub other: OtherFields, +
}
Expand description

Transaction object used in RPC

+

Fields§

§hash: B256

Hash

+
§nonce: U64

Nonce

+
§block_hash: Option<B256>

Block hash

+
§block_number: Option<U256>

Block number

+
§transaction_index: Option<U256>

Transaction Index

+
§from: Address

Sender

+
§to: Option<Address>

Recipient

+
§value: U256

Transferred value

+
§gas_price: Option<U128>

Gas Price

+
§gas: U256

Gas amount

+
§max_fee_per_gas: Option<U128>

Max BaseFeePerGas the user is willing to pay.

+
§max_priority_fee_per_gas: Option<U128>

The miner’s tip.

+
§max_fee_per_blob_gas: Option<U128>

Configured max fee per blob gas for eip-4844 transactions

+
§input: Bytes

Data

+
§signature: Option<Signature>

All flattened fields of the transaction signature.

+

Note: this is an option so special transaction types without a signature (e.g. https://github.com/ethereum-optimism/optimism/blob/0bf643c4147b43cd6f25a759d331ef3a2a61a2a3/specs/deposits.md#the-deposited-transaction-type) can be supported.

+
§chain_id: Option<U64>

The chain id of the transaction, if any.

+
§blob_versioned_hashes: Vec<B256>

Contains the blob hashes for eip-4844 transactions.

+
§access_list: Option<Vec<AccessListItem>>

EIP2930

+

Pre-pay to warm storage access.

+
§transaction_type: Option<U64>

EIP2718

+
§other: OtherFields

Arbitrary extra fields.

+

Trait Implementations§

source§

impl Clone for Transaction

source§

fn clone(&self) -> Transaction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Transaction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Transaction

source§

fn default() -> Transaction

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Transaction

source§

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 PartialEq for Transaction

source§

fn eq(&self, other: &Transaction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Transaction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Transaction

source§

impl StructuralEq for Transaction

source§

impl StructuralPartialEq for Transaction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 600 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/tx_type/constant.EIP1559_TX_TYPE_ID.html b/alloy_rpc_types/eth/transaction/tx_type/constant.EIP1559_TX_TYPE_ID.html new file mode 100644 index 000000000000..f283a1d2d517 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/tx_type/constant.EIP1559_TX_TYPE_ID.html @@ -0,0 +1,3 @@ +EIP1559_TX_TYPE_ID in alloy_rpc_types::eth::transaction::tx_type - Rust +
pub const EIP1559_TX_TYPE_ID: u8 = 2;
Expand description

Identifier for an EIP1559 transaction.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/tx_type/constant.EIP2930_TX_TYPE_ID.html b/alloy_rpc_types/eth/transaction/tx_type/constant.EIP2930_TX_TYPE_ID.html new file mode 100644 index 000000000000..0acba75408b8 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/tx_type/constant.EIP2930_TX_TYPE_ID.html @@ -0,0 +1,3 @@ +EIP2930_TX_TYPE_ID in alloy_rpc_types::eth::transaction::tx_type - Rust +
pub const EIP2930_TX_TYPE_ID: u8 = 1;
Expand description

Identifier for an EIP2930 transaction.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/tx_type/constant.EIP4844_TX_TYPE_ID.html b/alloy_rpc_types/eth/transaction/tx_type/constant.EIP4844_TX_TYPE_ID.html new file mode 100644 index 000000000000..854889307dcf --- /dev/null +++ b/alloy_rpc_types/eth/transaction/tx_type/constant.EIP4844_TX_TYPE_ID.html @@ -0,0 +1,3 @@ +EIP4844_TX_TYPE_ID in alloy_rpc_types::eth::transaction::tx_type - Rust +
pub const EIP4844_TX_TYPE_ID: u8 = 3;
Expand description

Identifier for an EIP4844 transaction.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/tx_type/constant.LEGACY_TX_TYPE_ID.html b/alloy_rpc_types/eth/transaction/tx_type/constant.LEGACY_TX_TYPE_ID.html new file mode 100644 index 000000000000..f2f424333636 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/tx_type/constant.LEGACY_TX_TYPE_ID.html @@ -0,0 +1,4 @@ +LEGACY_TX_TYPE_ID in alloy_rpc_types::eth::transaction::tx_type - Rust +
pub const LEGACY_TX_TYPE_ID: u8 = 0;
Expand description

Identifier for legacy transaction, however a legacy tx is technically not +typed.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/tx_type/enum.TxType.html b/alloy_rpc_types/eth/transaction/tx_type/enum.TxType.html new file mode 100644 index 000000000000..e994c927416d --- /dev/null +++ b/alloy_rpc_types/eth/transaction/tx_type/enum.TxType.html @@ -0,0 +1,43 @@ +TxType in alloy_rpc_types::eth::transaction::tx_type - Rust +
pub enum TxType {
+    Legacy = 0,
+    EIP2930 = 1,
+    EIP1559 = 2,
+    EIP4844 = 3,
+}
Expand description

Transaction Type

+

Currently being used as 2-bit type when encoding it to Compact on +crate::TransactionSignedNoHash (see Reth’s Compact encoding). Adding more transaction types will +break the codec and database format on Reth.

+

Other required changes when adding a new type can be seen on PR#3953.

+

Variants§

§

Legacy = 0

Legacy transaction pre EIP-2929

+
§

EIP2930 = 1

AccessList transaction

+
§

EIP1559 = 2

Transaction with Priority fee

+
§

EIP4844 = 3

Shard Blob Transactions - EIP-4844

+

Trait Implementations§

source§

impl Clone for TxType

source§

fn clone(&self) -> TxType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxType

source§

fn default() -> TxType

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxType

source§

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<TxType> for U8

source§

fn from(value: TxType) -> Self

Converts to this type from the input type.
source§

impl From<TxType> for u8

source§

fn from(value: TxType) -> Self

Converts to this type from the input type.
source§

impl Ord for TxType

source§

fn cmp(&self, other: &TxType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TxType

source§

fn eq(&self, other: &TxType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TxType

source§

fn partial_cmp(&self, other: &TxType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for TxType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TxType

source§

impl Eq for TxType

source§

impl StructuralEq for TxType

source§

impl StructuralPartialEq for TxType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Legacy: 0 bytes
  • EIP2930: 0 bytes
  • EIP1559: 0 bytes
  • EIP4844: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/tx_type/index.html b/alloy_rpc_types/eth/transaction/tx_type/index.html new file mode 100644 index 000000000000..4ce8948e0535 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/tx_type/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::transaction::tx_type - Rust +

Enums

Constants

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/tx_type/sidebar-items.js b/alloy_rpc_types/eth/transaction/tx_type/sidebar-items.js new file mode 100644 index 000000000000..076617551eb9 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/tx_type/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["EIP1559_TX_TYPE_ID","EIP2930_TX_TYPE_ID","EIP4844_TX_TYPE_ID","LEGACY_TX_TYPE_ID"],"enum":["TxType"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/typed/enum.TransactionKind.html b/alloy_rpc_types/eth/transaction/typed/enum.TransactionKind.html new file mode 100644 index 000000000000..c13a9c75c6eb --- /dev/null +++ b/alloy_rpc_types/eth/transaction/typed/enum.TransactionKind.html @@ -0,0 +1,36 @@ +TransactionKind in alloy_rpc_types::eth::transaction::typed - Rust +
pub enum TransactionKind {
+    Call(Address),
+    Create,
+}
Expand description

Represents the to field of a transaction request

+

This determines what kind of transaction this is

+

Variants§

§

Call(Address)

Transaction will call this address or transfer funds to this address

+
§

Create

No to field set, this transaction will create a contract

+

Implementations§

source§

impl TransactionKind

source

pub fn as_call(&self) -> Option<&Address>

If this transaction is a call this returns the address of the callee

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the TransactionKind.

+

Trait Implementations§

source§

impl Clone for TransactionKind

source§

fn clone(&self) -> TransactionKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for TransactionKind

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl<'de> Deserialize<'de> for TransactionKind

source§

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 Encodable for TransactionKind

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl Hash for TransactionKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for TransactionKind

source§

fn eq(&self, other: &TransactionKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TransactionKind

source§

impl Eq for TransactionKind

source§

impl StructuralEq for TransactionKind

source§

impl StructuralPartialEq for TransactionKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 21 bytes

Size for each variant:

  • Call: 20 bytes
  • Create: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/typed/enum.TypedTransactionRequest.html b/alloy_rpc_types/eth/transaction/typed/enum.TypedTransactionRequest.html new file mode 100644 index 000000000000..ae61f83d8046 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/typed/enum.TypedTransactionRequest.html @@ -0,0 +1,36 @@ +TypedTransactionRequest in alloy_rpc_types::eth::transaction::typed - Rust +
pub enum TypedTransactionRequest {
+    Legacy(LegacyTransactionRequest),
+    EIP2930(EIP2930TransactionRequest),
+    EIP1559(EIP1559TransactionRequest),
+}
Expand description

Container type for various Ethereum transaction requests

+

Its variants correspond to specific allowed transactions:

+
    +
  1. Legacy (pre-EIP2718) LegacyTransactionRequest
  2. +
  3. EIP2930 (state access lists) EIP2930TransactionRequest
  4. +
  5. EIP1559 EIP1559TransactionRequest
  6. +
+

Variants§

§

Legacy(LegacyTransactionRequest)

A Legacy Transaction request.

+
§

EIP2930(EIP2930TransactionRequest)

An EIP2930 transaction request.

+
§

EIP1559(EIP1559TransactionRequest)

An EIP1559 Transaction Request.

+

Trait Implementations§

source§

impl Clone for TypedTransactionRequest

source§

fn clone(&self) -> TypedTransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TypedTransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for TypedTransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for TypedTransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for TypedTransactionRequest

source§

fn eq(&self, other: &TypedTransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for TypedTransactionRequest

source§

impl StructuralEq for TypedTransactionRequest

source§

impl StructuralPartialEq for TypedTransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 200 bytes

Size for each variant:

  • Legacy: 160 bytes
  • EIP2930: 176 bytes
  • EIP1559: 192 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/typed/index.html b/alloy_rpc_types/eth/transaction/typed/index.html new file mode 100644 index 000000000000..a05463c6abf9 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/typed/index.html @@ -0,0 +1,5 @@ +alloy_rpc_types::eth::transaction::typed - Rust +
Expand description

The TransactionRequest is a universal representation for a +transaction deserialized from the json input of an RPC call. Depending on what fields are set, +it can be converted into the container type TypedTransactionRequest.

+

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/typed/sidebar-items.js b/alloy_rpc_types/eth/transaction/typed/sidebar-items.js new file mode 100644 index 000000000000..8604f59a8d14 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/typed/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TransactionKind","TypedTransactionRequest"],"struct":["EIP1559TransactionRequest","EIP2930TransactionRequest","LegacyTransactionRequest"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/typed/struct.EIP1559TransactionRequest.html b/alloy_rpc_types/eth/transaction/typed/struct.EIP1559TransactionRequest.html new file mode 100644 index 000000000000..6f114e1bc753 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/typed/struct.EIP1559TransactionRequest.html @@ -0,0 +1,67 @@ +EIP1559TransactionRequest in alloy_rpc_types::eth::transaction::typed - Rust +
pub struct EIP1559TransactionRequest {
+    pub chain_id: u64,
+    pub nonce: U64,
+    pub max_priority_fee_per_gas: U128,
+    pub max_fee_per_gas: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub access_list: AccessList,
+}
Expand description

Represents an EIP-1559 transaction request

+

Fields§

§chain_id: u64§nonce: U64§max_priority_fee_per_gas: U128§max_fee_per_gas: U128§gas_limit: U256§kind: TransactionKind§value: U256§input: Bytes§access_list: AccessList

Implementations§

source§

impl EIP1559TransactionRequest

source

pub fn decode_inner(buf: &mut &[u8]) -> Result<Self>

Decodes the inner fields from RLP bytes.

+

NOTE: This assumes a RLP header has already been decoded, and just decodes the following +RLP fields in the following order:

+
    +
  • chain_id
  • +
  • nonce
  • +
  • max_priority_fee_per_gas
  • +
  • max_fee_per_gas
  • +
  • gas_limit
  • +
  • to
  • +
  • value
  • +
  • data (input)
  • +
  • access_list
  • +
+
source

pub fn fields_len(&self) -> usize

Encodes only the transaction’s fields into the desired buffer, without a RLP header.

+
source

pub fn encode_fields(&self, out: &mut dyn BufMut)

Encodes only the transaction’s fields into the desired buffer, without a RLP header.

+
source

pub fn encode_with_signature( + &self, + signature: &Signature, + out: &mut dyn BufMut, + with_header: bool +)

Inner encoding function that is used for both rlp [Encodable] trait and for calculating +hash that for eip2718 does not require rlp header

+
source

pub fn payload_len_with_signature_without_header( + &self, + signature: &Signature +) -> usize

Output the length of the RLP signed transaction encoding, without a RLP string header.

+
source

pub fn payload_len_with_signature(&self, signature: &Signature) -> usize

Output the length of the RLP signed transaction encoding. This encodes with a RLP header.

+
source

pub fn tx_type(&self) -> TxType

Get transaction type

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the transaction.

+
source

pub fn encode_for_signing(&self, out: &mut dyn BufMut)

Encodes the legacy transaction in RLP for signing.

+
source

pub fn payload_len_for_signature(&self) -> usize

Outputs the length of the signature RLP encoding for the transaction.

+
source

pub fn signature_hash(&self) -> B256

Outputs the signature hash of the transaction by first encoding without a signature, then +hashing.

+

Trait Implementations§

source§

impl Clone for EIP1559TransactionRequest

source§

fn clone(&self) -> EIP1559TransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1559TransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for EIP1559TransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for EIP1559TransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for EIP1559TransactionRequest

source§

fn eq(&self, other: &EIP1559TransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for EIP1559TransactionRequest

source§

impl StructuralEq for EIP1559TransactionRequest

source§

impl StructuralPartialEq for EIP1559TransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 192 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/typed/struct.EIP2930TransactionRequest.html b/alloy_rpc_types/eth/transaction/typed/struct.EIP2930TransactionRequest.html new file mode 100644 index 000000000000..3f7b13d726c0 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/typed/struct.EIP2930TransactionRequest.html @@ -0,0 +1,65 @@ +EIP2930TransactionRequest in alloy_rpc_types::eth::transaction::typed - Rust +
pub struct EIP2930TransactionRequest {
+    pub chain_id: u64,
+    pub nonce: U64,
+    pub gas_price: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub access_list: AccessList,
+}
Expand description

Represents an EIP-2930 transaction request

+

Fields§

§chain_id: u64§nonce: U64§gas_price: U128§gas_limit: U256§kind: TransactionKind§value: U256§input: Bytes§access_list: AccessList

Implementations§

source§

impl EIP2930TransactionRequest

source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the transaction.

+
source

pub fn decode_inner(buf: &mut &[u8]) -> Result<Self>

Decodes the inner fields from RLP bytes.

+

NOTE: This assumes a RLP header has already been decoded, and just decodes the following +RLP fields in the following order:

+
    +
  • chain_id
  • +
  • nonce
  • +
  • gas_price
  • +
  • gas_limit
  • +
  • to
  • +
  • value
  • +
  • data (input)
  • +
  • access_list
  • +
+
source

pub fn fields_len(&self) -> usize

Outputs the length of the transaction’s fields, without a RLP header.

+
source

pub fn encode_fields(&self, out: &mut dyn BufMut)

Encodes only the transaction’s fields into the desired buffer, without a RLP header.

+
source

pub fn encode_with_signature( + &self, + signature: &Signature, + out: &mut dyn BufMut, + with_header: bool +)

Inner encoding function that is used for both rlp [Encodable] trait and for calculating +hash that for eip2718 does not require rlp header

+
source

pub fn payload_len_with_signature_without_header( + &self, + signature: &Signature +) -> usize

Output the length of the RLP signed transaction encoding, without a RLP string header.

+
source

pub fn payload_len_with_signature(&self, signature: &Signature) -> usize

Output the length of the RLP signed transaction encoding. This encodes with a RLP header.

+
source

pub fn tx_type(&self) -> TxType

Get transaction type

+
source

pub fn encode_for_signing(&self, out: &mut dyn BufMut)

Encodes the EIP-2930 transaction in RLP for signing.

+
source

pub fn payload_len_for_signature(&self) -> usize

Outputs the length of the signature RLP encoding for the transaction.

+
source

pub fn signature_hash(&self) -> B256

Outputs the signature hash of the transaction by first encoding without a signature, then +hashing.

+

Trait Implementations§

source§

impl Clone for EIP2930TransactionRequest

source§

fn clone(&self) -> EIP2930TransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP2930TransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for EIP2930TransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for EIP2930TransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for EIP2930TransactionRequest

source§

fn eq(&self, other: &EIP2930TransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for EIP2930TransactionRequest

source§

impl StructuralEq for EIP2930TransactionRequest

source§

impl StructuralPartialEq for EIP2930TransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/transaction/typed/struct.LegacyTransactionRequest.html b/alloy_rpc_types/eth/transaction/typed/struct.LegacyTransactionRequest.html new file mode 100644 index 000000000000..d0e52d0bc674 --- /dev/null +++ b/alloy_rpc_types/eth/transaction/typed/struct.LegacyTransactionRequest.html @@ -0,0 +1,46 @@ +LegacyTransactionRequest in alloy_rpc_types::eth::transaction::typed - Rust +
pub struct LegacyTransactionRequest {
+    pub nonce: U64,
+    pub gas_price: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub chain_id: Option<u64>,
+}
Expand description

Represents a legacy transaction request

+

Fields§

§nonce: U64§gas_price: U128§gas_limit: U256§kind: TransactionKind§value: U256§input: Bytes§chain_id: Option<u64>

Implementations§

source§

impl LegacyTransactionRequest

source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the LegacyTransactionRequest transaction.

+
source

pub fn fields_len(&self) -> usize

Outputs the length of the transaction’s fields, without a RLP header or length of the +eip155 fields.

+
source

pub fn encode_fields(&self, out: &mut dyn BufMut)

Encodes only the transaction’s fields into the desired buffer, without a RLP header or +eip155 fields.

+
source

pub fn eip155_fields_len(&self) -> usize

Outputs the length of EIP-155 fields. Only outputs a non-zero value for EIP-155 legacy +transactions.

+
source

pub fn encode_eip155_fields(&self, out: &mut dyn BufMut)

Encodes EIP-155 arguments into the desired buffer. Only encodes values for legacy +transactions.

+
source

pub fn encode_for_signing(&self, out: &mut dyn BufMut)

Encodes the legacy transaction in RLP for signing, including the EIP-155 fields if possible.

+
source

pub fn payload_len_for_signature(&self) -> usize

Outputs the length of the signature RLP encoding for the transaction, including the length +of the EIP-155 fields if possible.

+
source

pub fn signature_hash(&self) -> B256

Outputs the signature hash of the transaction by first encoding without a signature, then +hashing.

+

See Self::encode_for_signing for more information on the encoding format.

+

Trait Implementations§

source§

impl Clone for LegacyTransactionRequest

source§

fn clone(&self) -> LegacyTransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LegacyTransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for LegacyTransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for LegacyTransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for LegacyTransactionRequest

source§

fn eq(&self, other: &LegacyTransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for LegacyTransactionRequest

source§

impl StructuralEq for LegacyTransactionRequest

source§

impl StructuralPartialEq for LegacyTransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 160 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/index.html b/alloy_rpc_types/eth/txpool/index.html new file mode 100644 index 000000000000..736640eb1dee --- /dev/null +++ b/alloy_rpc_types/eth/txpool/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::eth::txpool - Rust +

Module alloy_rpc_types::eth::txpool

source ·
Expand description

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/sidebar-items.js b/alloy_rpc_types/eth/txpool/sidebar-items.js new file mode 100644 index 000000000000..7ba7e4affebc --- /dev/null +++ b/alloy_rpc_types/eth/txpool/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["TxpoolContent","TxpoolContentFrom","TxpoolInspect","TxpoolInspectSummary","TxpoolInspectSummaryVisitor","TxpoolStatus"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/struct.TxpoolContent.html b/alloy_rpc_types/eth/txpool/struct.TxpoolContent.html new file mode 100644 index 000000000000..c9468a3fa48e --- /dev/null +++ b/alloy_rpc_types/eth/txpool/struct.TxpoolContent.html @@ -0,0 +1,35 @@ +TxpoolContent in alloy_rpc_types::eth::txpool - Rust +
pub struct TxpoolContent {
+    pub pending: BTreeMap<Address, BTreeMap<String, Transaction>>,
+    pub queued: BTreeMap<Address, BTreeMap<String, Transaction>>,
+}
Expand description

Transaction Pool Content

+

The content inspection property can be queried to list the exact details of all +the transactions currently pending for inclusion in the next block(s), as well +as the ones that are being scheduled for future execution only.

+

See here for more details

+

Fields§

§pending: BTreeMap<Address, BTreeMap<String, Transaction>>

pending tx

+
§queued: BTreeMap<Address, BTreeMap<String, Transaction>>

queued tx

+

Implementations§

source§

impl TxpoolContent

source

pub fn remove_from(&mut self, sender: &Address) -> TxpoolContentFrom

Removes the transactions from the given sender

+

Trait Implementations§

source§

impl Clone for TxpoolContent

source§

fn clone(&self) -> TxpoolContent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolContent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolContent

source§

fn default() -> TxpoolContent

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolContent

source§

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 PartialEq for TxpoolContent

source§

fn eq(&self, other: &TxpoolContent) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolContent

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolContent

source§

impl StructuralEq for TxpoolContent

source§

impl StructuralPartialEq for TxpoolContent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/struct.TxpoolContentFrom.html b/alloy_rpc_types/eth/txpool/struct.TxpoolContentFrom.html new file mode 100644 index 000000000000..e355848e8437 --- /dev/null +++ b/alloy_rpc_types/eth/txpool/struct.TxpoolContentFrom.html @@ -0,0 +1,32 @@ +TxpoolContentFrom in alloy_rpc_types::eth::txpool - Rust +
pub struct TxpoolContentFrom {
+    pub pending: BTreeMap<String, Transaction>,
+    pub queued: BTreeMap<String, Transaction>,
+}
Expand description

Transaction Pool Content From

+

Same as TxpoolContent but for a specific address.

+

See here for more details

+

Fields§

§pending: BTreeMap<String, Transaction>

pending tx

+
§queued: BTreeMap<String, Transaction>

queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolContentFrom

source§

fn clone(&self) -> TxpoolContentFrom

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolContentFrom

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolContentFrom

source§

fn default() -> TxpoolContentFrom

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolContentFrom

source§

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 PartialEq for TxpoolContentFrom

source§

fn eq(&self, other: &TxpoolContentFrom) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolContentFrom

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolContentFrom

source§

impl StructuralEq for TxpoolContentFrom

source§

impl StructuralPartialEq for TxpoolContentFrom

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/struct.TxpoolInspect.html b/alloy_rpc_types/eth/txpool/struct.TxpoolInspect.html new file mode 100644 index 000000000000..1368c9ddaa93 --- /dev/null +++ b/alloy_rpc_types/eth/txpool/struct.TxpoolInspect.html @@ -0,0 +1,36 @@ +TxpoolInspect in alloy_rpc_types::eth::txpool - Rust +
pub struct TxpoolInspect {
+    pub pending: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+    pub queued: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+}
Expand description

Transaction Pool Inspect

+

The inspect inspection property can be queried to list a textual summary +of all the transactions currently pending for inclusion in the next block(s), +as well as the ones that are being scheduled for future execution only. +This is a method specifically tailored to developers to quickly see the +transactions in the pool and find any potential issues.

+

See here for more details

+

Fields§

§pending: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>

pending tx

+
§queued: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>

queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolInspect

source§

fn clone(&self) -> TxpoolInspect

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolInspect

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolInspect

source§

fn default() -> TxpoolInspect

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolInspect

source§

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 PartialEq for TxpoolInspect

source§

fn eq(&self, other: &TxpoolInspect) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolInspect

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolInspect

source§

impl StructuralEq for TxpoolInspect

source§

impl StructuralPartialEq for TxpoolInspect

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/struct.TxpoolInspectSummary.html b/alloy_rpc_types/eth/txpool/struct.TxpoolInspectSummary.html new file mode 100644 index 000000000000..d43ebd170632 --- /dev/null +++ b/alloy_rpc_types/eth/txpool/struct.TxpoolInspectSummary.html @@ -0,0 +1,37 @@ +TxpoolInspectSummary in alloy_rpc_types::eth::txpool - Rust +
pub struct TxpoolInspectSummary {
+    pub to: Option<Address>,
+    pub value: U256,
+    pub gas: U256,
+    pub gas_price: U256,
+}
Expand description

Transaction summary as found in the Txpool Inspection property.

+

Fields§

§to: Option<Address>

Recipient (None when contract creation)

+
§value: U256

Transferred value

+
§gas: U256

Gas amount

+
§gas_price: U256

Gas Price

+

Trait Implementations§

source§

impl Clone for TxpoolInspectSummary

source§

fn clone(&self) -> TxpoolInspectSummary

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolInspectSummary

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TxpoolInspectSummary

Implement the Deserialize trait for TxpoolInspectSummary struct.

+
source§

fn deserialize<D>(deserializer: D) -> Result<TxpoolInspectSummary, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for TxpoolInspectSummary

source§

fn eq(&self, other: &TxpoolInspectSummary) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolInspectSummary

Implement the Serialize trait for TxpoolInspectSummary struct so that the +format matches the one from geth.

+
source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolInspectSummary

source§

impl StructuralEq for TxpoolInspectSummary

source§

impl StructuralPartialEq for TxpoolInspectSummary

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/struct.TxpoolInspectSummaryVisitor.html b/alloy_rpc_types/eth/txpool/struct.TxpoolInspectSummaryVisitor.html new file mode 100644 index 000000000000..caac67321da6 --- /dev/null +++ b/alloy_rpc_types/eth/txpool/struct.TxpoolInspectSummaryVisitor.html @@ -0,0 +1,71 @@ +TxpoolInspectSummaryVisitor in alloy_rpc_types::eth::txpool - Rust +
struct TxpoolInspectSummaryVisitor;
Expand description

Visitor struct for TxpoolInspectSummary.

+

Trait Implementations§

source§

impl<'de> Visitor<'de> for TxpoolInspectSummaryVisitor

Walk through the deserializer to parse a txpool inspection summary into the +TxpoolInspectSummary struct.

+
§

type Value = TxpoolInspectSummary

The value produced by this visitor.
source§

fn expecting(&self, formatter: &mut Formatter<'_>) -> Result

Format a message stating what data this Visitor expects to receive. Read more
source§

fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>
where + E: Error,

The input contains a string. The lifetime of the string is ephemeral and +it may be destroyed after this method returns. Read more
source§

fn visit_string<E>(self, value: String) -> Result<Self::Value, E>
where + E: Error,

Available on crate features std or alloc only.
The input contains a string and ownership of the string is being given +to the Visitor. Read more
source§

fn visit_bool<E>(self, v: bool) -> Result<Self::Value, E>
where + E: Error,

The input contains a boolean. Read more
source§

fn visit_i8<E>(self, v: i8) -> Result<Self::Value, E>
where + E: Error,

The input contains an i8. Read more
source§

fn visit_i16<E>(self, v: i16) -> Result<Self::Value, E>
where + E: Error,

The input contains an i16. Read more
source§

fn visit_i32<E>(self, v: i32) -> Result<Self::Value, E>
where + E: Error,

The input contains an i32. Read more
source§

fn visit_i64<E>(self, v: i64) -> Result<Self::Value, E>
where + E: Error,

The input contains an i64. Read more
source§

fn visit_i128<E>(self, v: i128) -> Result<Self::Value, E>
where + E: Error,

The input contains a i128. Read more
source§

fn visit_u8<E>(self, v: u8) -> Result<Self::Value, E>
where + E: Error,

The input contains a u8. Read more
source§

fn visit_u16<E>(self, v: u16) -> Result<Self::Value, E>
where + E: Error,

The input contains a u16. Read more
source§

fn visit_u32<E>(self, v: u32) -> Result<Self::Value, E>
where + E: Error,

The input contains a u32. Read more
source§

fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
where + E: Error,

The input contains a u64. Read more
source§

fn visit_u128<E>(self, v: u128) -> Result<Self::Value, E>
where + E: Error,

The input contains a u128. Read more
source§

fn visit_f32<E>(self, v: f32) -> Result<Self::Value, E>
where + E: Error,

The input contains an f32. Read more
source§

fn visit_f64<E>(self, v: f64) -> Result<Self::Value, E>
where + E: Error,

The input contains an f64. Read more
source§

fn visit_char<E>(self, v: char) -> Result<Self::Value, E>
where + E: Error,

The input contains a char. Read more
source§

fn visit_borrowed_str<E>(self, v: &'de str) -> Result<Self::Value, E>
where + E: Error,

The input contains a string that lives at least as long as the +Deserializer. Read more
source§

fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
where + E: Error,

The input contains a byte array. The lifetime of the byte array is +ephemeral and it may be destroyed after this method returns. Read more
source§

fn visit_borrowed_bytes<E>(self, v: &'de [u8]) -> Result<Self::Value, E>
where + E: Error,

The input contains a byte array that lives at least as long as the +Deserializer. Read more
source§

fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
where + E: Error,

Available on crate features std or alloc only.
The input contains a byte array and ownership of the byte array is being +given to the Visitor. Read more
source§

fn visit_none<E>(self) -> Result<Self::Value, E>
where + E: Error,

The input contains an optional that is absent. Read more
source§

fn visit_some<D>( + self, + deserializer: D +) -> Result<Self::Value, <D as Deserializer<'de>>::Error>
where + D: Deserializer<'de>,

The input contains an optional that is present. Read more
source§

fn visit_unit<E>(self) -> Result<Self::Value, E>
where + E: Error,

The input contains a unit (). Read more
source§

fn visit_newtype_struct<D>( + self, + deserializer: D +) -> Result<Self::Value, <D as Deserializer<'de>>::Error>
where + D: Deserializer<'de>,

The input contains a newtype struct. Read more
source§

fn visit_seq<A>( + self, + seq: A +) -> Result<Self::Value, <A as SeqAccess<'de>>::Error>
where + A: SeqAccess<'de>,

The input contains a sequence of elements. Read more
source§

fn visit_map<A>( + self, + map: A +) -> Result<Self::Value, <A as MapAccess<'de>>::Error>
where + A: MapAccess<'de>,

The input contains a key-value map. Read more
source§

fn visit_enum<A>( + self, + data: A +) -> Result<Self::Value, <A as EnumAccess<'de>>::Error>
where + A: EnumAccess<'de>,

The input contains an enum. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<'de, T> Expected for T
where + T: Visitor<'de>,

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result<(), Error>

Format an explanation of what data was being expected. Same signature as +the Display and Debug traits.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/txpool/struct.TxpoolStatus.html b/alloy_rpc_types/eth/txpool/struct.TxpoolStatus.html new file mode 100644 index 000000000000..3b26ff15f468 --- /dev/null +++ b/alloy_rpc_types/eth/txpool/struct.TxpoolStatus.html @@ -0,0 +1,34 @@ +TxpoolStatus in alloy_rpc_types::eth::txpool - Rust +
pub struct TxpoolStatus {
+    pub pending: U64,
+    pub queued: U64,
+}
Expand description

Transaction Pool Status

+

The status inspection property can be queried for the number of transactions +currently pending for inclusion in the next block(s), as well as the ones that +are being scheduled for future execution only.

+

See here for more details

+

Fields§

§pending: U64

number of pending tx

+
§queued: U64

number of queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolStatus

source§

fn clone(&self) -> TxpoolStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolStatus

source§

fn default() -> TxpoolStatus

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolStatus

source§

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 PartialEq for TxpoolStatus

source§

fn eq(&self, other: &TxpoolStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolStatus

source§

impl StructuralEq for TxpoolStatus

source§

impl StructuralPartialEq for TxpoolStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/fn.deserialize.html b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/fn.deserialize.html new file mode 100644 index 000000000000..0bddcce7085c --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/fn.deserialize.html @@ -0,0 +1,4 @@ +deserialize in alloy_rpc_types::eth::withdrawal::beacon_api_withdrawals - Rust +
pub fn deserialize<'de, D>(deserializer: D) -> Result<Withdrawal, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserialize the payload attributes for the beacon API.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/fn.serialize.html b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/fn.serialize.html new file mode 100644 index 000000000000..992fbdfbad90 --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/fn.serialize.html @@ -0,0 +1,7 @@ +serialize in alloy_rpc_types::eth::withdrawal::beacon_api_withdrawals - Rust +
pub fn serialize<S>(
+    payload_attributes: &Withdrawal,
+    serializer: S
+) -> Result<S::Ok, S::Error>
where + S: Serializer,
Expand description

Serialize the payload attributes for the beacon API.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/index.html b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/index.html new file mode 100644 index 000000000000..040737c50049 --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::eth::withdrawal::beacon_api_withdrawals - Rust +
Expand description

A helper serde module to convert from/to the Beacon API which uses quoted decimals rather than +big-endian hex.

+

Functions

  • Deserialize the payload attributes for the beacon API.
  • Serialize the payload attributes for the beacon API.
\ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/sidebar-items.js b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/sidebar-items.js new file mode 100644 index 000000000000..4ed511eceead --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/beacon_api_withdrawals/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize","serialize"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/constant.GWEI_TO_WEI.html b/alloy_rpc_types/eth/withdrawal/constant.GWEI_TO_WEI.html new file mode 100644 index 000000000000..253d04a565e7 --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/constant.GWEI_TO_WEI.html @@ -0,0 +1,3 @@ +GWEI_TO_WEI in alloy_rpc_types::eth::withdrawal - Rust +
pub const GWEI_TO_WEI: u64 = 1_000_000_000;
Expand description

Multiplier for converting gwei to wei.

+
\ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/index.html b/alloy_rpc_types/eth/withdrawal/index.html new file mode 100644 index 000000000000..17c60c99b6b7 --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/index.html @@ -0,0 +1,5 @@ +alloy_rpc_types::eth::withdrawal - Rust +
Expand description

Withdrawal type and serde helpers.

+

Modules

  • A helper serde module to convert from/to the Beacon API which uses quoted decimals rather than +big-endian hex.

Structs

  • Same as Withdrawal but respects the Beacon API format which uses snake-case and quoted +decimals.
  • Withdrawal represents a validator withdrawal from the consensus layer.

Constants

\ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/sidebar-items.js b/alloy_rpc_types/eth/withdrawal/sidebar-items.js new file mode 100644 index 000000000000..826d5b0247d0 --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["GWEI_TO_WEI"],"mod":["beacon_api_withdrawals"],"struct":["BeaconAPIWithdrawal","Withdrawal"]}; \ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/struct.BeaconAPIWithdrawal.html b/alloy_rpc_types/eth/withdrawal/struct.BeaconAPIWithdrawal.html new file mode 100644 index 000000000000..6cad7d9ff3a8 --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/struct.BeaconAPIWithdrawal.html @@ -0,0 +1,33 @@ +BeaconAPIWithdrawal in alloy_rpc_types::eth::withdrawal - Rust +
pub(crate) struct BeaconAPIWithdrawal {
+    index: u64,
+    validator_index: u64,
+    address: Address,
+    amount: u64,
+}
Expand description

Same as Withdrawal but respects the Beacon API format which uses snake-case and quoted +decimals.

+

Fields§

§index: u64§validator_index: u64§address: Address§amount: u64

Trait Implementations§

source§

impl<'de> Deserialize<'de> for BeaconAPIWithdrawal

source§

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<'de> DeserializeAs<'de, Withdrawal> for BeaconAPIWithdrawal

source§

fn deserialize_as<D>(deserializer: D) -> Result<Withdrawal, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
source§

impl Serialize for BeaconAPIWithdrawal

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl SerializeAs<Withdrawal> for BeaconAPIWithdrawal

source§

fn serialize_as<S>( + source: &Withdrawal, + serializer: S +) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/eth/withdrawal/struct.Withdrawal.html b/alloy_rpc_types/eth/withdrawal/struct.Withdrawal.html new file mode 100644 index 000000000000..d8de4223c947 --- /dev/null +++ b/alloy_rpc_types/eth/withdrawal/struct.Withdrawal.html @@ -0,0 +1,44 @@ +Withdrawal in alloy_rpc_types::eth::withdrawal - Rust +
pub struct Withdrawal {
+    pub index: u64,
+    pub validator_index: u64,
+    pub address: Address,
+    pub amount: u64,
+}
Expand description

Withdrawal represents a validator withdrawal from the consensus layer.

+

Fields§

§index: u64

Monotonically increasing identifier issued by consensus layer.

+
§validator_index: u64

Index of validator associated with withdrawal.

+
§address: Address

Target address for withdrawn ether.

+
§amount: u64

Value of the withdrawal in gwei.

+

Implementations§

source§

impl Withdrawal

source§

impl Withdrawal

source

pub fn amount_wei(&self) -> U256

Return the withdrawal amount in wei.

+
source

pub fn size(&self) -> usize

Calculate a heuristic for the in-memory size of the Withdrawal.

+

Trait Implementations§

source§

impl Clone for Withdrawal

source§

fn clone(&self) -> Withdrawal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Withdrawal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Withdrawal

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for Withdrawal

source§

fn default() -> Withdrawal

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Withdrawal

source§

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<'de> DeserializeAs<'de, Withdrawal> for BeaconAPIWithdrawal

source§

fn deserialize_as<D>(deserializer: D) -> Result<Withdrawal, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
source§

impl Encodable for Withdrawal

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl Hash for Withdrawal

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Withdrawal

source§

fn eq(&self, other: &Withdrawal) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Withdrawal

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl SerializeAs<Withdrawal> for BeaconAPIWithdrawal

source§

fn serialize_as<S>( + source: &Withdrawal, + serializer: S +) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer.
source§

impl Eq for Withdrawal

source§

impl StructuralEq for Withdrawal

source§

impl StructuralPartialEq for Withdrawal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/fn.from_int_or_hex.html b/alloy_rpc_types/fn.from_int_or_hex.html new file mode 100644 index 000000000000..ef4eafeec719 --- /dev/null +++ b/alloy_rpc_types/fn.from_int_or_hex.html @@ -0,0 +1,5 @@ +from_int_or_hex in alloy_rpc_types - Rust +
pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result<U256, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +arbitrary precision, defined by serde_json’s Number.

+
\ No newline at end of file diff --git a/alloy_rpc_types/fn.logs_bloom.html b/alloy_rpc_types/fn.logs_bloom.html new file mode 100644 index 000000000000..9759c9530d30 --- /dev/null +++ b/alloy_rpc_types/fn.logs_bloom.html @@ -0,0 +1,4 @@ +logs_bloom in alloy_rpc_types - Rust +
pub fn logs_bloom<'a, It>(logs: It) -> Bloom
where + It: IntoIterator<Item = &'a Log>,
Expand description

Calculate receipt logs bloom.

+
\ No newline at end of file diff --git a/alloy_rpc_types/fn.serialize_hex_string_no_prefix.html b/alloy_rpc_types/fn.serialize_hex_string_no_prefix.html new file mode 100644 index 000000000000..ba91f2242a04 --- /dev/null +++ b/alloy_rpc_types/fn.serialize_hex_string_no_prefix.html @@ -0,0 +1,9 @@ +serialize_hex_string_no_prefix in alloy_rpc_types - Rust +
pub fn serialize_hex_string_no_prefix<S, T>(
+    x: T,
+    s: S
+) -> Result<S::Ok, S::Error>
where + S: Serializer, + T: AsRef<[u8]>,
Expand description

Serialize a byte vec as a hex string without the “0x” prefix.

+

This behaves the same as hex::encode.

+
\ No newline at end of file diff --git a/alloy_rpc_types/index.html b/alloy_rpc_types/index.html new file mode 100644 index 000000000000..b0d889497c1f --- /dev/null +++ b/alloy_rpc_types/index.html @@ -0,0 +1,21 @@ +alloy_rpc_types - Rust +

Crate alloy_rpc_types

source ·
Expand description

Alloy RPC type definitions.

+

Provides all relevant types for the various RPC endpoints, grouped by namespace.

+

Modules

Structs

Enums

Constants

Functions

Type Aliases

  • Block number and hash of the forked block.
  • A Block representation that allows to include additional fields
  • Header representation with additional info.
  • A single topic
\ No newline at end of file diff --git a/alloy_rpc_types/json_u256/fn.deserialize_json_u256.html b/alloy_rpc_types/json_u256/fn.deserialize_json_u256.html new file mode 100644 index 000000000000..ddaa91ddd1bf --- /dev/null +++ b/alloy_rpc_types/json_u256/fn.deserialize_json_u256.html @@ -0,0 +1,4 @@ +deserialize_json_u256 in alloy_rpc_types::json_u256 - Rust +
pub fn deserialize_json_u256<'de, D>(deserializer: D) -> Result<U256, D::Error>
where + D: Deserializer<'de>,
Expand description

Supports parsing U256 numbers as strings via JsonU256

+
\ No newline at end of file diff --git a/alloy_rpc_types/json_u256/index.html b/alloy_rpc_types/json_u256/index.html new file mode 100644 index 000000000000..20d50d9cff74 --- /dev/null +++ b/alloy_rpc_types/json_u256/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::json_u256 - Rust +
Expand description

Json U256 serde helpers.

+

Structs

  • Wrapper around primitive U256 type that also supports deserializing numbers

Functions

\ No newline at end of file diff --git a/alloy_rpc_types/json_u256/sidebar-items.js b/alloy_rpc_types/json_u256/sidebar-items.js new file mode 100644 index 000000000000..6b0e1038cd2d --- /dev/null +++ b/alloy_rpc_types/json_u256/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize_json_u256"],"struct":["JsonU256"]}; \ No newline at end of file diff --git a/alloy_rpc_types/json_u256/struct.JsonU256.html b/alloy_rpc_types/json_u256/struct.JsonU256.html new file mode 100644 index 000000000000..7629c222749b --- /dev/null +++ b/alloy_rpc_types/json_u256/struct.JsonU256.html @@ -0,0 +1,32 @@ +JsonU256 in alloy_rpc_types::json_u256 - Rust +
pub struct JsonU256(pub U256);
Expand description

Wrapper around primitive U256 type that also supports deserializing numbers

+

Tuple Fields§

§0: U256

Trait Implementations§

source§

impl Clone for JsonU256

source§

fn clone(&self) -> JsonU256

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JsonU256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for JsonU256

source§

fn default() -> JsonU256

Returns the “default value” for a type. Read more
source§

impl<'a> Deserialize<'a> for JsonU256

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where + D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<JsonU256> for U256

source§

fn from(value: JsonU256) -> Self

Converts to this type from the input type.
source§

impl From<Uint<256, 4>> for JsonU256

source§

fn from(value: U256) -> Self

Converts to this type from the input type.
source§

impl Hash for JsonU256

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for JsonU256

source§

fn cmp(&self, other: &JsonU256) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for JsonU256

source§

fn eq(&self, other: &JsonU256) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for JsonU256

source§

fn partial_cmp(&self, other: &JsonU256) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for JsonU256

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for JsonU256

source§

impl Eq for JsonU256

source§

impl StructuralEq for JsonU256

source§

impl StructuralPartialEq for JsonU256

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/num/enum.NumberOrHexU256.html b/alloy_rpc_types/num/enum.NumberOrHexU256.html new file mode 100644 index 000000000000..fe80e0c1a078 --- /dev/null +++ b/alloy_rpc_types/num/enum.NumberOrHexU256.html @@ -0,0 +1,27 @@ +NumberOrHexU256 in alloy_rpc_types::num - Rust +
pub enum NumberOrHexU256 {
+    Int(Number),
+    Hex(U256),
+}
Expand description

An enum that represents either a serde_json::Number integer, or a hex [U256].

+

Variants§

§

Int(Number)

An integer

+
§

Hex(U256)

A hex U256

+

Implementations§

source§

impl NumberOrHexU256

source

pub fn try_into_u256<E: Error>(self) -> Result<U256, E>

Tries to convert this into a [U256]].

+

Trait Implementations§

source§

impl Debug for NumberOrHexU256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NumberOrHexU256

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Int: 16 bytes
  • Hex: 32 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/num/fn.from_int_or_hex.html b/alloy_rpc_types/num/fn.from_int_or_hex.html new file mode 100644 index 000000000000..4a6841ad1165 --- /dev/null +++ b/alloy_rpc_types/num/fn.from_int_or_hex.html @@ -0,0 +1,5 @@ +from_int_or_hex in alloy_rpc_types::num - Rust +
pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result<U256, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +arbitrary precision, defined by serde_json’s Number.

+
\ No newline at end of file diff --git a/alloy_rpc_types/num/fn.from_int_or_hex_opt.html b/alloy_rpc_types/num/fn.from_int_or_hex_opt.html new file mode 100644 index 000000000000..2d6f024347e9 --- /dev/null +++ b/alloy_rpc_types/num/fn.from_int_or_hex_opt.html @@ -0,0 +1,7 @@ +from_int_or_hex_opt in alloy_rpc_types::num - Rust +
pub fn from_int_or_hex_opt<'de, D>(
+    deserializer: D
+) -> Result<Option<U256>, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into an Option<U256>, using from_int_or_hex to deserialize the +inner value.

+
\ No newline at end of file diff --git a/alloy_rpc_types/num/index.html b/alloy_rpc_types/num/index.html new file mode 100644 index 000000000000..62622f1321c5 --- /dev/null +++ b/alloy_rpc_types/num/index.html @@ -0,0 +1,5 @@ +alloy_rpc_types::num - Rust +

Module alloy_rpc_types::num

source ·
Expand description

Numeric serde helpers.

+

Modules

Structs

  • A u64 wrapper type that deserializes from hex or a u64 and serializes as hex.

Enums

Functions

  • Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +arbitrary precision, defined by serde_json’s Number.
  • Deserializes the input into an Option<U256>, using from_int_or_hex to deserialize the +inner value.
\ No newline at end of file diff --git a/alloy_rpc_types/num/sidebar-items.js b/alloy_rpc_types/num/sidebar-items.js new file mode 100644 index 000000000000..cd2c60201524 --- /dev/null +++ b/alloy_rpc_types/num/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["NumberOrHexU256"],"fn":["from_int_or_hex","from_int_or_hex_opt"],"mod":["u64_hex_or_decimal_opt"],"struct":["U64HexOrNumber"]}; \ No newline at end of file diff --git a/alloy_rpc_types/num/struct.U64HexOrNumber.html b/alloy_rpc_types/num/struct.U64HexOrNumber.html new file mode 100644 index 000000000000..90bad1c07db8 --- /dev/null +++ b/alloy_rpc_types/num/struct.U64HexOrNumber.html @@ -0,0 +1,42 @@ +U64HexOrNumber in alloy_rpc_types::num - Rust +
pub struct U64HexOrNumber(U64);
Expand description

A u64 wrapper type that deserializes from hex or a u64 and serializes as hex.

+ +
use alloy_rpc_types::num::U64HexOrNumber;
+let number_json = "100";
+let hex_json = "\"0x64\"";
+
+let number: U64HexOrNumber = serde_json::from_str(number_json).unwrap();
+let hex: U64HexOrNumber = serde_json::from_str(hex_json).unwrap();
+assert_eq!(number, hex);
+assert_eq!(hex.to(), 100);
+

Tuple Fields§

§0: U64

Implementations§

source§

impl U64HexOrNumber

source

pub fn to(self) -> u64

Returns the wrapped u64

+

Trait Implementations§

source§

impl Clone for U64HexOrNumber

source§

fn clone(&self) -> U64HexOrNumber

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for U64HexOrNumber

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for U64HexOrNumber

source§

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<U64HexOrNumber> for U64

source§

fn from(value: U64HexOrNumber) -> Self

Converts to this type from the input type.
source§

impl From<U64HexOrNumber> for u64

source§

fn from(value: U64HexOrNumber) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for U64HexOrNumber

source§

fn from(value: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for U64HexOrNumber

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl Hash for U64HexOrNumber

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for U64HexOrNumber

source§

fn cmp(&self, other: &U64HexOrNumber) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for U64HexOrNumber

source§

fn eq(&self, other: &U64HexOrNumber) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for U64HexOrNumber

source§

fn partial_cmp(&self, other: &U64HexOrNumber) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for U64HexOrNumber

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for U64HexOrNumber

source§

impl Eq for U64HexOrNumber

source§

impl StructuralEq for U64HexOrNumber

source§

impl StructuralPartialEq for U64HexOrNumber

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 8 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/num/u64_hex_or_decimal_opt/fn.deserialize.html b/alloy_rpc_types/num/u64_hex_or_decimal_opt/fn.deserialize.html new file mode 100644 index 000000000000..44f56ecd17d8 --- /dev/null +++ b/alloy_rpc_types/num/u64_hex_or_decimal_opt/fn.deserialize.html @@ -0,0 +1,5 @@ +deserialize in alloy_rpc_types::num::u64_hex_or_decimal_opt - Rust +
pub fn deserialize<'de, D>(deserializer: D) -> Result<Option<u64>, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes an u64 accepting a hex quantity string with optional 0x prefix or +a number

+
\ No newline at end of file diff --git a/alloy_rpc_types/num/u64_hex_or_decimal_opt/fn.serialize.html b/alloy_rpc_types/num/u64_hex_or_decimal_opt/fn.serialize.html new file mode 100644 index 000000000000..5e802c0ee3f4 --- /dev/null +++ b/alloy_rpc_types/num/u64_hex_or_decimal_opt/fn.serialize.html @@ -0,0 +1,6 @@ +serialize in alloy_rpc_types::num::u64_hex_or_decimal_opt - Rust +
pub fn serialize<S: Serializer>(
+    value: &Option<u64>,
+    s: S
+) -> Result<S::Ok, S::Error>
Expand description

Serializes u64 as hex string

+
\ No newline at end of file diff --git a/alloy_rpc_types/num/u64_hex_or_decimal_opt/index.html b/alloy_rpc_types/num/u64_hex_or_decimal_opt/index.html new file mode 100644 index 000000000000..d7893da52b69 --- /dev/null +++ b/alloy_rpc_types/num/u64_hex_or_decimal_opt/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::num::u64_hex_or_decimal_opt - Rust +
Expand description

serde functions for handling primitive optional u64 as [U64]

+

Functions

  • Deserializes an u64 accepting a hex quantity string with optional 0x prefix or +a number
  • Serializes u64 as hex string
\ No newline at end of file diff --git a/alloy_rpc_types/num/u64_hex_or_decimal_opt/sidebar-items.js b/alloy_rpc_types/num/u64_hex_or_decimal_opt/sidebar-items.js new file mode 100644 index 000000000000..4ed511eceead --- /dev/null +++ b/alloy_rpc_types/num/u64_hex_or_decimal_opt/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize","serialize"]}; \ No newline at end of file diff --git a/alloy_rpc_types/other/index.html b/alloy_rpc_types/other/index.html new file mode 100644 index 000000000000..42aaedc6d0ee --- /dev/null +++ b/alloy_rpc_types/other/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::other - Rust +

Module alloy_rpc_types::other

source ·
Expand description

Support for capturing other fields

+

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/other/sidebar-items.js b/alloy_rpc_types/other/sidebar-items.js new file mode 100644 index 000000000000..4e9f8e04286a --- /dev/null +++ b/alloy_rpc_types/other/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["OtherFields"]}; \ No newline at end of file diff --git a/alloy_rpc_types/other/struct.OtherFields.html b/alloy_rpc_types/other/struct.OtherFields.html new file mode 100644 index 000000000000..7f2a8fc238c5 --- /dev/null +++ b/alloy_rpc_types/other/struct.OtherFields.html @@ -0,0 +1,581 @@ +OtherFields in alloy_rpc_types::other - Rust +
pub struct OtherFields {
+    inner: BTreeMap<String, Value>,
+}
Expand description

A type that is supposed to capture additional fields that are not native to ethereum but included in ethereum adjacent networks, for example fields the optimism eth_getTransactionByHash request returns additional fields that this type will capture

+

This type is supposed to be used with #[serde(flatten)

+

Fields§

§inner: BTreeMap<String, Value>

Contains all unknown fields

+

Implementations§

source§

impl OtherFields

source

pub fn get_with<F, V>(&self, key: impl AsRef<str>, with: F) -> Option<V>
where + F: FnOnce(Value) -> V,

Returns the deserialized value of the field, if it exists. +Deserializes the value with the given closure

+
source

pub fn get_deserialized<V: DeserializeOwned>( + &self, + key: impl AsRef<str> +) -> Option<Result<V>>

Returns the deserialized value of the field, if it exists

+
source

pub fn remove_deserialized<V: DeserializeOwned>( + &mut self, + key: impl AsRef<str> +) -> Option<Result<V>>

Removes the deserialized value of the field, if it exists

+

Note: this will also remove the value if deserializing it resulted in an error

+
source

pub fn remove_with<F, V>(&mut self, key: impl AsRef<str>, with: F) -> Option<V>
where + F: FnOnce(Value) -> V,

Removes the deserialized value of the field, if it exists. +Deserializes the value with the given closure

+

Note: this will also remove the value if deserializing it resulted in an error

+
source

pub fn remove_entry_deserialized<V: DeserializeOwned>( + &mut self, + key: impl AsRef<str> +) -> Option<(String, Result<V>)>

Removes the deserialized value of the field, if it exists and also returns the key

+

Note: this will also remove the value if deserializing it resulted in an error

+
source

pub fn deserialize_into<T: DeserializeOwned>(self) -> Result<T>

Deserialized this type into another container type

+

Methods from Deref<Target = BTreeMap<String, Value>>§

1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.clear();
+assert!(a.is_empty());
+
1.0.0 · source

pub fn get<Q>(&self, key: &Q) -> Option<&V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get(&1), Some(&"a"));
+assert_eq!(map.get(&2), None);
+
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns the key-value pair corresponding to the supplied key.

+

The supplied key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
+assert_eq!(map.get_key_value(&2), None);
+
1.66.0 · source

pub fn first_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the first key-value pair in the map. +The key in this pair is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.first_key_value(), None);
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.first_key_value(), Some((&1, &"b")));
+
1.66.0 · source

pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the first entry in the map for in-place manipulation. +The key of this entry is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.first_entry() {
+    if *entry.key() > 0 {
+        entry.insert("first");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "first");
+assert_eq!(*map.get(&2).unwrap(), "b");
+
1.66.0 · source

pub fn pop_first(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the first element in the map. +The key of this element is the minimum key that was in the map.

+
Examples
+

Draining elements in ascending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_first() {
+    assert!(map.iter().all(|(k, _v)| *k > key));
+}
+assert!(map.is_empty());
+
1.66.0 · source

pub fn last_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the last key-value pair in the map. +The key in this pair is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.last_key_value(), Some((&2, &"a")));
+
1.66.0 · source

pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the last entry in the map for in-place manipulation. +The key of this entry is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.last_entry() {
+    if *entry.key() > 0 {
+        entry.insert("last");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "a");
+assert_eq!(*map.get(&2).unwrap(), "last");
+
1.66.0 · source

pub fn pop_last(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the last element in the map. +The key of this element is the maximum key that was in the map.

+
Examples
+

Draining elements in descending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_last() {
+    assert!(map.iter().all(|(k, _v)| *k < key));
+}
+assert!(map.is_empty());
+
1.0.0 · source

pub fn contains_key<Q>(&self, key: &Q) -> bool
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns true if the map contains a value for the specified key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.contains_key(&1), true);
+assert_eq!(map.contains_key(&2), false);
+
1.0.0 · source

pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a mutable reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+if let Some(x) = map.get_mut(&1) {
+    *x = "b";
+}
+assert_eq!(map[&1], "b");
+
1.0.0 · source

pub fn insert(&mut self, key: K, value: V) -> Option<V>
where + K: Ord,

Inserts a key-value pair into the map.

+

If the map did not have this key present, None is returned.

+

If the map did have this key present, the value is updated, and the old +value is returned. The key is not updated, though; this matters for +types that can be == without being identical. See the module-level +documentation for more.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.insert(37, "a"), None);
+assert_eq!(map.is_empty(), false);
+
+map.insert(37, "b");
+assert_eq!(map.insert(37, "c"), Some("b"));
+assert_eq!(map[&37], "c");
+
source

pub fn try_insert( + &mut self, + key: K, + value: V +) -> Result<&mut V, OccupiedError<'_, K, V, A>>
where + K: Ord,

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns +a mutable reference to the value in the entry.

+

If the map already had this key present, nothing is updated, and +an error containing the occupied entry and the value is returned.

+
Examples
+
#![feature(map_try_insert)]
+
+use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.try_insert(37, "a").unwrap(), &"a");
+
+let err = map.try_insert(37, "b").unwrap_err();
+assert_eq!(err.entry.key(), &37);
+assert_eq!(err.entry.get(), &"a");
+assert_eq!(err.value, "b");
+
1.0.0 · source

pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the value at the key if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove(&1), Some("a"));
+assert_eq!(map.remove(&1), None);
+
1.45.0 · source

pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the stored key and value if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove_entry(&1), Some((1, "a")));
+assert_eq!(map.remove_entry(&1), None);
+
1.53.0 · source

pub fn retain<F>(&mut self, f: F)
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

+

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false. +The elements are visited in ascending key order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
+// Keep only the elements with even-numbered keys.
+map.retain(|&k, _| k % 2 == 0);
+assert!(map.into_iter().eq(vec![(0, 0), (2, 20), (4, 40), (6, 60)]));
+
1.11.0 · source

pub fn append(&mut self, other: &mut BTreeMap<K, V, A>)
where + K: Ord, + A: Clone,

Moves all elements from other into self, leaving other empty.

+

If a key from other is already present in self, the respective +value from self will be overwritten with the respective value from other.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c"); // Note: Key (3) also present in b.
+
+let mut b = BTreeMap::new();
+b.insert(3, "d"); // Note: Key (3) also present in a.
+b.insert(4, "e");
+b.insert(5, "f");
+
+a.append(&mut b);
+
+assert_eq!(a.len(), 5);
+assert_eq!(b.len(), 0);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+assert_eq!(a[&3], "d"); // Note: "c" has been overwritten.
+assert_eq!(a[&4], "e");
+assert_eq!(a[&5], "f");
+
1.17.0 · source

pub fn range<T, R>(&self, range: R) -> Range<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+use std::ops::Bound::Included;
+
+let mut map = BTreeMap::new();
+map.insert(3, "a");
+map.insert(5, "b");
+map.insert(8, "c");
+for (&key, &value) in map.range((Included(&4), Included(&8))) {
+    println!("{key}: {value}");
+}
+assert_eq!(Some((&5, &"b")), map.range(4..).next());
+
1.17.0 · source

pub fn range_mut<T, R>(&mut self, range: R) -> RangeMut<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a mutable double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<&str, i32> =
+    [("Alice", 0), ("Bob", 0), ("Carol", 0), ("Cheryl", 0)].into();
+for (_, balance) in map.range_mut("B".."Cheryl") {
+    *balance += 100;
+}
+for (name, balance) in &map {
+    println!("{name} => {balance}");
+}
+
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A>
where + K: Ord,

Gets the given key’s corresponding entry in the map for in-place manipulation.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut count: BTreeMap<&str, usize> = BTreeMap::new();
+
+// count the number of occurrences of letters in the vec
+for x in ["a", "b", "a", "c", "a", "b"] {
+    count.entry(x).and_modify(|curr| *curr += 1).or_insert(1);
+}
+
+assert_eq!(count["a"], 3);
+assert_eq!(count["b"], 2);
+assert_eq!(count["c"], 1);
+
1.11.0 · source

pub fn split_off<Q>(&mut self, key: &Q) -> BTreeMap<K, V, A>
where + Q: Ord + ?Sized, + K: Borrow<Q> + Ord, + A: Clone,

Splits the collection into two at the given key. Returns everything after the given key, +including the key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(17, "d");
+a.insert(41, "e");
+
+let b = a.split_off(&3);
+
+assert_eq!(a.len(), 2);
+assert_eq!(b.len(), 3);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+
+assert_eq!(b[&3], "c");
+assert_eq!(b[&17], "d");
+assert_eq!(b[&41], "e");
+
source

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A>
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (btree_extract_if)

Creates an iterator that visits all elements (key-value pairs) in +ascending key order and uses a closure to determine if an element should +be removed. If the closure returns true, the element is removed from +the map and yielded. If the closure returns false, or panics, the +element remains in the map and will not be yielded.

+

The iterator also lets you mutate the value of each element in the +closure, regardless of whether you choose to keep or remove it.

+

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating +or the iteration short-circuits, then the remaining elements will be retained. +Use retain with a negated predicate if you do not need the returned iterator.

+
Examples
+

Splitting a map into even and odd keys, reusing the original map:

+ +
#![feature(btree_extract_if)]
+use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
+let evens: BTreeMap<_, _> = map.extract_if(|k, _v| k % 2 == 0).collect();
+let odds = map;
+assert_eq!(evens.keys().copied().collect::<Vec<_>>(), [0, 2, 4, 6]);
+assert_eq!(odds.keys().copied().collect::<Vec<_>>(), [1, 3, 5, 7]);
+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

Gets an iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(3, "c");
+map.insert(2, "b");
+map.insert(1, "a");
+
+for (key, value) in map.iter() {
+    println!("{key}: {value}");
+}
+
+let (first_key, first_value) = map.iter().next().unwrap();
+assert_eq!((*first_key, *first_value), (1, "a"));
+
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

Gets a mutable iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::from([
+   ("a", 1),
+   ("b", 2),
+   ("c", 3),
+]);
+
+// add 10 to the value if the key isn't "a"
+for (key, value) in map.iter_mut() {
+    if key != &"a" {
+        *value += 10;
+    }
+}
+
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

Gets an iterator over the keys of the map, in sorted order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(2, "b");
+a.insert(1, "a");
+
+let keys: Vec<_> = a.keys().cloned().collect();
+assert_eq!(keys, [1, 2]);
+
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

Gets an iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "hello");
+a.insert(2, "goodbye");
+
+let values: Vec<&str> = a.values().cloned().collect();
+assert_eq!(values, ["hello", "goodbye"]);
+
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

Gets a mutable iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, String::from("hello"));
+a.insert(2, String::from("goodbye"));
+
+for value in a.values_mut() {
+    value.push_str("!");
+}
+
+let values: Vec<String> = a.values().cloned().collect();
+assert_eq!(values, [String::from("hello!"),
+                    String::from("goodbye!")]);
+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert_eq!(a.len(), 0);
+a.insert(1, "a");
+assert_eq!(a.len(), 1);
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert!(a.is_empty());
+a.insert(1, "a");
+assert!(!a.is_empty());
+
source

pub fn lower_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn lower_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound_mut(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound_mut(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn upper_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+
source

pub fn upper_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound_mut(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound_mut(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+

Trait Implementations§

source§

impl AsRef<BTreeMap<String, Value>> for OtherFields

source§

fn as_ref(&self) -> &BTreeMap<String, Value>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for OtherFields

source§

fn clone(&self) -> OtherFields

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OtherFields

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for OtherFields

source§

fn default() -> OtherFields

Returns the “default value” for a type. Read more
source§

impl Deref for OtherFields

§

type Target = BTreeMap<String, Value>

The resulting type after dereferencing.
source§

fn deref(&self) -> &BTreeMap<String, Value>

Dereferences the value.
source§

impl DerefMut for OtherFields

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for OtherFields

source§

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<'a> IntoIterator for &'a OtherFields

§

type Item = (&'a String, &'a Value)

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, String, Value>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl IntoIterator for OtherFields

§

type Item = (String, Value)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<String, Value>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq for OtherFields

source§

fn eq(&self, other: &OtherFields) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for OtherFields

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for OtherFields

source§

impl StructuralEq for OtherFields

source§

impl StructuralPartialEq for OtherFields

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/pubsub/enum.Params.html b/alloy_rpc_types/pubsub/enum.Params.html new file mode 100644 index 000000000000..0833f3bf8de2 --- /dev/null +++ b/alloy_rpc_types/pubsub/enum.Params.html @@ -0,0 +1,34 @@ +Params in alloy_rpc_types::pubsub - Rust +
pub enum Params {
+    None,
+    Logs(Box<Filter>),
+    Bool(bool),
+}
Expand description

Any additional parameters for a subscription.

+

Variants§

§

None

No parameters passed.

+
§

Logs(Box<Filter>)

Log parameters.

+
§

Bool(bool)

Boolean parameter for new pending transactions.

+

Implementations§

source§

impl Params

source

pub fn is_bool(&self) -> bool

Returns true if it’s a bool parameter.

+
source

pub fn is_logs(&self) -> bool

Returns true if it’s a log parameter.

+

Trait Implementations§

source§

impl Clone for Params

source§

fn clone(&self) -> Params

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Params

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Params

source§

fn default() -> Params

Returns the “default value” for a type. Read more
source§

impl<'a> Deserialize<'a> for Params

source§

fn deserialize<D>(deserializer: D) -> Result<Params, D::Error>
where + D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Params

source§

fn eq(&self, other: &Params) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Params

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Params

source§

impl StructuralEq for Params

source§

impl StructuralPartialEq for Params

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

Size for each variant:

  • None: 0 bytes
  • Logs: 15 bytes
  • Bool: 1 byte
\ No newline at end of file diff --git a/alloy_rpc_types/pubsub/enum.PubSubSyncStatus.html b/alloy_rpc_types/pubsub/enum.PubSubSyncStatus.html new file mode 100644 index 000000000000..a66f2060bb08 --- /dev/null +++ b/alloy_rpc_types/pubsub/enum.PubSubSyncStatus.html @@ -0,0 +1,30 @@ +PubSubSyncStatus in alloy_rpc_types::pubsub - Rust +
pub enum PubSubSyncStatus {
+    Simple(bool),
+    Detailed(SyncStatusMetadata),
+}
Expand description

Response type for a SyncStatus subscription

+

Variants§

§

Simple(bool)

If not currently syncing, this should always be false

+
§

Detailed(SyncStatusMetadata)

Current Stats about syncing

+

Trait Implementations§

source§

impl Clone for PubSubSyncStatus

source§

fn clone(&self) -> PubSubSyncStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PubSubSyncStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PubSubSyncStatus

source§

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 PartialEq for PubSubSyncStatus

source§

fn eq(&self, other: &PubSubSyncStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PubSubSyncStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PubSubSyncStatus

source§

impl StructuralEq for PubSubSyncStatus

source§

impl StructuralPartialEq for PubSubSyncStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Simple: 9 bytes
  • Detailed: 40 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/pubsub/enum.SubscriptionKind.html b/alloy_rpc_types/pubsub/enum.SubscriptionKind.html new file mode 100644 index 000000000000..f5bb1dcd8b72 --- /dev/null +++ b/alloy_rpc_types/pubsub/enum.SubscriptionKind.html @@ -0,0 +1,52 @@ +SubscriptionKind in alloy_rpc_types::pubsub - Rust +
pub enum SubscriptionKind {
+    NewHeads,
+    Logs,
+    NewPendingTransactions,
+    Syncing,
+}
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

source§

fn clone(&self) -> SubscriptionKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SubscriptionKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SubscriptionKind

source§

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 Hash for SubscriptionKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for SubscriptionKind

source§

fn eq(&self, other: &SubscriptionKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SubscriptionKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SubscriptionKind

source§

impl StructuralEq for SubscriptionKind

source§

impl StructuralPartialEq for SubscriptionKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • NewHeads: 0 bytes
  • Logs: 0 bytes
  • NewPendingTransactions: 0 bytes
  • Syncing: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/pubsub/enum.SubscriptionResult.html b/alloy_rpc_types/pubsub/enum.SubscriptionResult.html new file mode 100644 index 000000000000..a267e4fe7f60 --- /dev/null +++ b/alloy_rpc_types/pubsub/enum.SubscriptionResult.html @@ -0,0 +1,36 @@ +SubscriptionResult in alloy_rpc_types::pubsub - Rust +
pub enum SubscriptionResult {
+    Header(Box<RichHeader>),
+    Log(Box<Log>),
+    TransactionHash(B256),
+    FullTransaction(Box<Transaction>),
+    SyncState(PubSubSyncStatus),
+}
Expand description

Subscription result.

+

Variants§

§

Header(Box<RichHeader>)

New block header.

+
§

Log(Box<Log>)

Log

+
§

TransactionHash(B256)

Transaction hash

+
§

FullTransaction(Box<Transaction>)

Full Transaction

+
§

SyncState(PubSubSyncStatus)

SyncStatus

+

Trait Implementations§

source§

impl Clone for SubscriptionResult

source§

fn clone(&self) -> SubscriptionResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SubscriptionResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SubscriptionResult

source§

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 PartialEq for SubscriptionResult

source§

fn eq(&self, other: &SubscriptionResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SubscriptionResult

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SubscriptionResult

source§

impl StructuralEq for SubscriptionResult

source§

impl StructuralPartialEq for SubscriptionResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Header: 16 bytes
  • Log: 16 bytes
  • TransactionHash: 40 bytes
  • FullTransaction: 16 bytes
  • SyncState: 40 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/pubsub/index.html b/alloy_rpc_types/pubsub/index.html new file mode 100644 index 000000000000..3fc6e6e1120f --- /dev/null +++ b/alloy_rpc_types/pubsub/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::pubsub - Rust +

Module alloy_rpc_types::pubsub

source ·
Expand description

Ethereum types for pub-sub

+

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/pubsub/sidebar-items.js b/alloy_rpc_types/pubsub/sidebar-items.js new file mode 100644 index 000000000000..32602c620eb8 --- /dev/null +++ b/alloy_rpc_types/pubsub/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Params","PubSubSyncStatus","SubscriptionKind","SubscriptionResult"],"struct":["SyncStatusMetadata"]}; \ No newline at end of file diff --git a/alloy_rpc_types/pubsub/struct.SyncStatusMetadata.html b/alloy_rpc_types/pubsub/struct.SyncStatusMetadata.html new file mode 100644 index 000000000000..33faa0680aa5 --- /dev/null +++ b/alloy_rpc_types/pubsub/struct.SyncStatusMetadata.html @@ -0,0 +1,30 @@ +SyncStatusMetadata in alloy_rpc_types::pubsub - Rust +
pub struct SyncStatusMetadata {
+    pub syncing: bool,
+    pub starting_block: u64,
+    pub current_block: u64,
+    pub highest_block: Option<u64>,
+}
Expand description

Sync status infos

+

Fields§

§syncing: bool§starting_block: u64§current_block: u64§highest_block: Option<u64>

Trait Implementations§

source§

impl Clone for SyncStatusMetadata

source§

fn clone(&self) -> SyncStatusMetadata

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SyncStatusMetadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SyncStatusMetadata

source§

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 PartialEq for SyncStatusMetadata

source§

fn eq(&self, other: &SyncStatusMetadata) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SyncStatusMetadata

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SyncStatusMetadata

source§

impl StructuralEq for SyncStatusMetadata

source§

impl StructuralPartialEq for SyncStatusMetadata

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/raw_log/fn.logs_bloom.html b/alloy_rpc_types/raw_log/fn.logs_bloom.html new file mode 100644 index 000000000000..6d28d6ca176a --- /dev/null +++ b/alloy_rpc_types/raw_log/fn.logs_bloom.html @@ -0,0 +1,4 @@ +logs_bloom in alloy_rpc_types::raw_log - Rust +
pub fn logs_bloom<'a, It>(logs: It) -> Bloom
where + It: IntoIterator<Item = &'a Log>,
Expand description

Calculate receipt logs bloom.

+
\ No newline at end of file diff --git a/alloy_rpc_types/raw_log/index.html b/alloy_rpc_types/raw_log/index.html new file mode 100644 index 000000000000..724e020ac68f --- /dev/null +++ b/alloy_rpc_types/raw_log/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::raw_log - Rust +
Expand description

Ethereum log object.

+

Structs

  • Ethereum Log

Functions

\ No newline at end of file diff --git a/alloy_rpc_types/raw_log/sidebar-items.js b/alloy_rpc_types/raw_log/sidebar-items.js new file mode 100644 index 000000000000..b8c2ee7115b9 --- /dev/null +++ b/alloy_rpc_types/raw_log/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["logs_bloom"],"struct":["Log"]}; \ No newline at end of file diff --git a/alloy_rpc_types/raw_log/struct.Log.html b/alloy_rpc_types/raw_log/struct.Log.html new file mode 100644 index 000000000000..c47597e0e25d --- /dev/null +++ b/alloy_rpc_types/raw_log/struct.Log.html @@ -0,0 +1,30 @@ +Log in alloy_rpc_types::raw_log - Rust +
pub struct Log {
+    pub address: Address,
+    pub topics: Vec<B256>,
+    pub data: Bytes,
+}
Expand description

Ethereum Log

+

Fields§

§address: Address

Contract that emitted this log.

+
§topics: Vec<B256>

Topics of the log. The number of logs depend on what LOG opcode is used.

+
§data: Bytes

Arbitrary length data.

+

Implementations§

Trait Implementations§

source§

impl Clone for Log

source§

fn clone(&self) -> Log

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Log

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Log

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for Log

source§

fn default() -> Log

Returns the “default value” for a type. Read more
source§

impl Encodable for Log

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl PartialEq for Log

source§

fn eq(&self, other: &Log) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Log

source§

impl StructuralEq for Log

source§

impl StructuralPartialEq for Log

Auto Trait Implementations§

§

impl RefUnwindSafe for Log

§

impl Send for Log

§

impl Sync for Log

§

impl Unpin for Log

§

impl UnwindSafe for Log

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/rpc/index.html b/alloy_rpc_types/rpc/index.html new file mode 100644 index 000000000000..117a2910aa6f --- /dev/null +++ b/alloy_rpc_types/rpc/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::rpc - Rust +

Module alloy_rpc_types::rpc

source ·

Structs

  • Represents the rpc_modules response, which returns the +list of all available modules on that transport and their version
\ No newline at end of file diff --git a/alloy_rpc_types/rpc/sidebar-items.js b/alloy_rpc_types/rpc/sidebar-items.js new file mode 100644 index 000000000000..36d850be73a4 --- /dev/null +++ b/alloy_rpc_types/rpc/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["RpcModules"]}; \ No newline at end of file diff --git a/alloy_rpc_types/rpc/struct.RpcModules.html b/alloy_rpc_types/rpc/struct.RpcModules.html new file mode 100644 index 000000000000..fc6b545d9dbc --- /dev/null +++ b/alloy_rpc_types/rpc/struct.RpcModules.html @@ -0,0 +1,30 @@ +RpcModules in alloy_rpc_types::rpc - Rust +
pub struct RpcModules {
+    module_map: HashMap<String, String>,
+}
Expand description

Represents the rpc_modules response, which returns the +list of all available modules on that transport and their version

+

Fields§

§module_map: HashMap<String, String>

Implementations§

source§

impl RpcModules

source

pub fn new(module_map: HashMap<String, String>) -> Self

Create a new instance of RPCModules

+
source

pub fn into_modules(self) -> HashMap<String, String>

Consumes self and returns the inner hashmap mapping module names to their versions

+

Trait Implementations§

source§

impl Clone for RpcModules

source§

fn clone(&self) -> RpcModules

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RpcModules

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RpcModules

source§

fn default() -> RpcModules

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for RpcModules

source§

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 PartialEq for RpcModules

source§

fn eq(&self, other: &RpcModules) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RpcModules

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RpcModules

source§

impl StructuralEq for RpcModules

source§

impl StructuralPartialEq for RpcModules

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/fn.from_int_or_hex.html b/alloy_rpc_types/serde_helpers/fn.from_int_or_hex.html new file mode 100644 index 000000000000..9882e836b004 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/fn.from_int_or_hex.html @@ -0,0 +1,5 @@ +from_int_or_hex in alloy_rpc_types::serde_helpers - Rust +
pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result<U256, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +arbitrary precision, defined by serde_json’s Number.

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/fn.serialize_hex_string_no_prefix.html b/alloy_rpc_types/serde_helpers/fn.serialize_hex_string_no_prefix.html new file mode 100644 index 000000000000..c7b3f41f4d2b --- /dev/null +++ b/alloy_rpc_types/serde_helpers/fn.serialize_hex_string_no_prefix.html @@ -0,0 +1,9 @@ +serialize_hex_string_no_prefix in alloy_rpc_types::serde_helpers - Rust +
pub fn serialize_hex_string_no_prefix<S, T>(
+    x: T,
+    s: S
+) -> Result<S::Ok, S::Error>
where + S: Serializer, + T: AsRef<[u8]>,
Expand description

Serialize a byte vec as a hex string without the “0x” prefix.

+

This behaves the same as hex::encode.

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/index.html b/alloy_rpc_types/serde_helpers/index.html new file mode 100644 index 000000000000..c405ef4fdeff --- /dev/null +++ b/alloy_rpc_types/serde_helpers/index.html @@ -0,0 +1,5 @@ +alloy_rpc_types::serde_helpers - Rust +
Expand description

Serde helpers for primitive types.

+

Modules

  • Json U256 serde helpers.
  • Numeric serde helpers.
  • Storage related helpers.
  • Helper to deserialize an u64 from [U64] accepting a hex quantity string with optional 0x +prefix

Functions

  • Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +arbitrary precision, defined by serde_json’s Number.
  • Serialize a byte vec as a hex string without the “0x” prefix.
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/json_u256/fn.deserialize_json_u256.html b/alloy_rpc_types/serde_helpers/json_u256/fn.deserialize_json_u256.html new file mode 100644 index 000000000000..82ee573492bd --- /dev/null +++ b/alloy_rpc_types/serde_helpers/json_u256/fn.deserialize_json_u256.html @@ -0,0 +1,4 @@ +deserialize_json_u256 in alloy_rpc_types::serde_helpers::json_u256 - Rust +
pub fn deserialize_json_u256<'de, D>(deserializer: D) -> Result<U256, D::Error>
where + D: Deserializer<'de>,
Expand description

Supports parsing U256 numbers as strings via JsonU256

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/json_u256/index.html b/alloy_rpc_types/serde_helpers/json_u256/index.html new file mode 100644 index 000000000000..1d31addb4966 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/json_u256/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::serde_helpers::json_u256 - Rust +
Expand description

Json U256 serde helpers.

+

Structs

Functions

\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/json_u256/sidebar-items.js b/alloy_rpc_types/serde_helpers/json_u256/sidebar-items.js new file mode 100644 index 000000000000..b92d9f6375ba --- /dev/null +++ b/alloy_rpc_types/serde_helpers/json_u256/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize_json_u256"],"struct":["JsonU256","JsonU256Visitor"]}; \ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/json_u256/struct.JsonU256.html b/alloy_rpc_types/serde_helpers/json_u256/struct.JsonU256.html new file mode 100644 index 000000000000..aadc8d689112 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/json_u256/struct.JsonU256.html @@ -0,0 +1,32 @@ +JsonU256 in alloy_rpc_types::serde_helpers::json_u256 - Rust +
pub struct JsonU256(pub U256);
Expand description

Wrapper around primitive U256 type that also supports deserializing numbers

+

Tuple Fields§

§0: U256

Trait Implementations§

source§

impl Clone for JsonU256

source§

fn clone(&self) -> JsonU256

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JsonU256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for JsonU256

source§

fn default() -> JsonU256

Returns the “default value” for a type. Read more
source§

impl<'a> Deserialize<'a> for JsonU256

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where + D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<JsonU256> for U256

source§

fn from(value: JsonU256) -> Self

Converts to this type from the input type.
source§

impl From<Uint<256, 4>> for JsonU256

source§

fn from(value: U256) -> Self

Converts to this type from the input type.
source§

impl Hash for JsonU256

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for JsonU256

source§

fn cmp(&self, other: &JsonU256) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for JsonU256

source§

fn eq(&self, other: &JsonU256) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for JsonU256

source§

fn partial_cmp(&self, other: &JsonU256) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for JsonU256

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for JsonU256

source§

impl Eq for JsonU256

source§

impl StructuralEq for JsonU256

source§

impl StructuralPartialEq for JsonU256

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/json_u256/struct.JsonU256Visitor.html b/alloy_rpc_types/serde_helpers/json_u256/struct.JsonU256Visitor.html new file mode 100644 index 000000000000..1118dd1d465d --- /dev/null +++ b/alloy_rpc_types/serde_helpers/json_u256/struct.JsonU256Visitor.html @@ -0,0 +1,68 @@ +JsonU256Visitor in alloy_rpc_types::serde_helpers::json_u256 - Rust +
struct JsonU256Visitor;

Trait Implementations§

source§

impl<'a> Visitor<'a> for JsonU256Visitor

§

type Value = JsonU256

The value produced by this visitor.
source§

fn expecting(&self, formatter: &mut Formatter<'_>) -> Result

Format a message stating what data this Visitor expects to receive. Read more
source§

fn visit_u64<E>(self, value: u64) -> Result<Self::Value, E>
where + E: Error,

The input contains a u64. Read more
source§

fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>
where + E: Error,

The input contains a string. The lifetime of the string is ephemeral and +it may be destroyed after this method returns. Read more
source§

fn visit_string<E>(self, value: String) -> Result<Self::Value, E>
where + E: Error,

Available on crate features std or alloc only.
The input contains a string and ownership of the string is being given +to the Visitor. Read more
source§

fn visit_bool<E>(self, v: bool) -> Result<Self::Value, E>
where + E: Error,

The input contains a boolean. Read more
source§

fn visit_i8<E>(self, v: i8) -> Result<Self::Value, E>
where + E: Error,

The input contains an i8. Read more
source§

fn visit_i16<E>(self, v: i16) -> Result<Self::Value, E>
where + E: Error,

The input contains an i16. Read more
source§

fn visit_i32<E>(self, v: i32) -> Result<Self::Value, E>
where + E: Error,

The input contains an i32. Read more
source§

fn visit_i64<E>(self, v: i64) -> Result<Self::Value, E>
where + E: Error,

The input contains an i64. Read more
source§

fn visit_i128<E>(self, v: i128) -> Result<Self::Value, E>
where + E: Error,

The input contains a i128. Read more
source§

fn visit_u8<E>(self, v: u8) -> Result<Self::Value, E>
where + E: Error,

The input contains a u8. Read more
source§

fn visit_u16<E>(self, v: u16) -> Result<Self::Value, E>
where + E: Error,

The input contains a u16. Read more
source§

fn visit_u32<E>(self, v: u32) -> Result<Self::Value, E>
where + E: Error,

The input contains a u32. Read more
source§

fn visit_u128<E>(self, v: u128) -> Result<Self::Value, E>
where + E: Error,

The input contains a u128. Read more
source§

fn visit_f32<E>(self, v: f32) -> Result<Self::Value, E>
where + E: Error,

The input contains an f32. Read more
source§

fn visit_f64<E>(self, v: f64) -> Result<Self::Value, E>
where + E: Error,

The input contains an f64. Read more
source§

fn visit_char<E>(self, v: char) -> Result<Self::Value, E>
where + E: Error,

The input contains a char. Read more
source§

fn visit_borrowed_str<E>(self, v: &'de str) -> Result<Self::Value, E>
where + E: Error,

The input contains a string that lives at least as long as the +Deserializer. Read more
source§

fn visit_bytes<E>(self, v: &[u8]) -> Result<Self::Value, E>
where + E: Error,

The input contains a byte array. The lifetime of the byte array is +ephemeral and it may be destroyed after this method returns. Read more
source§

fn visit_borrowed_bytes<E>(self, v: &'de [u8]) -> Result<Self::Value, E>
where + E: Error,

The input contains a byte array that lives at least as long as the +Deserializer. Read more
source§

fn visit_byte_buf<E>(self, v: Vec<u8>) -> Result<Self::Value, E>
where + E: Error,

Available on crate features std or alloc only.
The input contains a byte array and ownership of the byte array is being +given to the Visitor. Read more
source§

fn visit_none<E>(self) -> Result<Self::Value, E>
where + E: Error,

The input contains an optional that is absent. Read more
source§

fn visit_some<D>( + self, + deserializer: D +) -> Result<Self::Value, <D as Deserializer<'de>>::Error>
where + D: Deserializer<'de>,

The input contains an optional that is present. Read more
source§

fn visit_unit<E>(self) -> Result<Self::Value, E>
where + E: Error,

The input contains a unit (). Read more
source§

fn visit_newtype_struct<D>( + self, + deserializer: D +) -> Result<Self::Value, <D as Deserializer<'de>>::Error>
where + D: Deserializer<'de>,

The input contains a newtype struct. Read more
source§

fn visit_seq<A>( + self, + seq: A +) -> Result<Self::Value, <A as SeqAccess<'de>>::Error>
where + A: SeqAccess<'de>,

The input contains a sequence of elements. Read more
source§

fn visit_map<A>( + self, + map: A +) -> Result<Self::Value, <A as MapAccess<'de>>::Error>
where + A: MapAccess<'de>,

The input contains a key-value map. Read more
source§

fn visit_enum<A>( + self, + data: A +) -> Result<Self::Value, <A as EnumAccess<'de>>::Error>
where + A: EnumAccess<'de>,

The input contains an enum. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<'de, T> Expected for T
where + T: Visitor<'de>,

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result<(), Error>

Format an explanation of what data was being expected. Same signature as +the Display and Debug traits.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/enum.NumberOrHexU256.html b/alloy_rpc_types/serde_helpers/num/enum.NumberOrHexU256.html new file mode 100644 index 000000000000..f35580aec2eb --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/enum.NumberOrHexU256.html @@ -0,0 +1,27 @@ +NumberOrHexU256 in alloy_rpc_types::serde_helpers::num - Rust +
pub enum NumberOrHexU256 {
+    Int(Number),
+    Hex(U256),
+}
Expand description

An enum that represents either a serde_json::Number integer, or a hex [U256].

+

Variants§

§

Int(Number)

An integer

+
§

Hex(U256)

A hex U256

+

Implementations§

source§

impl NumberOrHexU256

source

pub fn try_into_u256<E: Error>(self) -> Result<U256, E>

Tries to convert this into a [U256]].

+

Trait Implementations§

source§

impl Debug for NumberOrHexU256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for NumberOrHexU256

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

Size for each variant:

  • Int: 16 bytes
  • Hex: 32 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/fn.from_int_or_hex.html b/alloy_rpc_types/serde_helpers/num/fn.from_int_or_hex.html new file mode 100644 index 000000000000..0f009f71f36c --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/fn.from_int_or_hex.html @@ -0,0 +1,5 @@ +from_int_or_hex in alloy_rpc_types::serde_helpers::num - Rust +
pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result<U256, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +arbitrary precision, defined by serde_json’s Number.

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/fn.from_int_or_hex_opt.html b/alloy_rpc_types/serde_helpers/num/fn.from_int_or_hex_opt.html new file mode 100644 index 000000000000..d9876087e189 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/fn.from_int_or_hex_opt.html @@ -0,0 +1,7 @@ +from_int_or_hex_opt in alloy_rpc_types::serde_helpers::num - Rust +
pub fn from_int_or_hex_opt<'de, D>(
+    deserializer: D
+) -> Result<Option<U256>, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into an Option<U256>, using from_int_or_hex to deserialize the +inner value.

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/index.html b/alloy_rpc_types/serde_helpers/num/index.html new file mode 100644 index 000000000000..37f0571d0b4d --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/index.html @@ -0,0 +1,5 @@ +alloy_rpc_types::serde_helpers::num - Rust +
Expand description

Numeric serde helpers.

+

Modules

Structs

  • A u64 wrapper type that deserializes from hex or a u64 and serializes as hex.

Enums

Functions

  • Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with +arbitrary precision, defined by serde_json’s Number.
  • Deserializes the input into an Option<U256>, using from_int_or_hex to deserialize the +inner value.
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/sidebar-items.js b/alloy_rpc_types/serde_helpers/num/sidebar-items.js new file mode 100644 index 000000000000..cd2c60201524 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["NumberOrHexU256"],"fn":["from_int_or_hex","from_int_or_hex_opt"],"mod":["u64_hex_or_decimal_opt"],"struct":["U64HexOrNumber"]}; \ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/struct.U64HexOrNumber.html b/alloy_rpc_types/serde_helpers/num/struct.U64HexOrNumber.html new file mode 100644 index 000000000000..c6bdded176cd --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/struct.U64HexOrNumber.html @@ -0,0 +1,42 @@ +U64HexOrNumber in alloy_rpc_types::serde_helpers::num - Rust +
pub struct U64HexOrNumber(U64);
Expand description

A u64 wrapper type that deserializes from hex or a u64 and serializes as hex.

+ +
use alloy_rpc_types::num::U64HexOrNumber;
+let number_json = "100";
+let hex_json = "\"0x64\"";
+
+let number: U64HexOrNumber = serde_json::from_str(number_json).unwrap();
+let hex: U64HexOrNumber = serde_json::from_str(hex_json).unwrap();
+assert_eq!(number, hex);
+assert_eq!(hex.to(), 100);
+

Tuple Fields§

§0: U64

Implementations§

source§

impl U64HexOrNumber

source

pub fn to(self) -> u64

Returns the wrapped u64

+

Trait Implementations§

source§

impl Clone for U64HexOrNumber

source§

fn clone(&self) -> U64HexOrNumber

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for U64HexOrNumber

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for U64HexOrNumber

source§

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<U64HexOrNumber> for U64

source§

fn from(value: U64HexOrNumber) -> Self

Converts to this type from the input type.
source§

impl From<U64HexOrNumber> for u64

source§

fn from(value: U64HexOrNumber) -> Self

Converts to this type from the input type.
source§

impl From<Uint<64, 1>> for U64HexOrNumber

source§

fn from(value: U64) -> Self

Converts to this type from the input type.
source§

impl From<u64> for U64HexOrNumber

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl Hash for U64HexOrNumber

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for U64HexOrNumber

source§

fn cmp(&self, other: &U64HexOrNumber) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for U64HexOrNumber

source§

fn eq(&self, other: &U64HexOrNumber) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for U64HexOrNumber

source§

fn partial_cmp(&self, other: &U64HexOrNumber) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Serialize for U64HexOrNumber

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for U64HexOrNumber

source§

impl Eq for U64HexOrNumber

source§

impl StructuralEq for U64HexOrNumber

source§

impl StructuralPartialEq for U64HexOrNumber

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 8 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/fn.deserialize.html b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/fn.deserialize.html new file mode 100644 index 000000000000..2e3cbc1a01f2 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/fn.deserialize.html @@ -0,0 +1,5 @@ +deserialize in alloy_rpc_types::serde_helpers::num::u64_hex_or_decimal_opt - Rust +
pub fn deserialize<'de, D>(deserializer: D) -> Result<Option<u64>, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes an u64 accepting a hex quantity string with optional 0x prefix or +a number

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/fn.serialize.html b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/fn.serialize.html new file mode 100644 index 000000000000..a97b3f9e5af5 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/fn.serialize.html @@ -0,0 +1,6 @@ +serialize in alloy_rpc_types::serde_helpers::num::u64_hex_or_decimal_opt - Rust +
pub fn serialize<S: Serializer>(
+    value: &Option<u64>,
+    s: S
+) -> Result<S::Ok, S::Error>
Expand description

Serializes u64 as hex string

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/index.html b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/index.html new file mode 100644 index 000000000000..5efd34d2af0e --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::serde_helpers::num::u64_hex_or_decimal_opt - Rust +
Expand description

serde functions for handling primitive optional u64 as [U64]

+

Functions

  • Deserializes an u64 accepting a hex quantity string with optional 0x prefix or +a number
  • Serializes u64 as hex string
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/sidebar-items.js b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/sidebar-items.js new file mode 100644 index 000000000000..4ed511eceead --- /dev/null +++ b/alloy_rpc_types/serde_helpers/num/u64_hex_or_decimal_opt/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize","serialize"]}; \ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/sidebar-items.js b/alloy_rpc_types/serde_helpers/sidebar-items.js new file mode 100644 index 000000000000..ea7d46c6abe8 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["from_int_or_hex","serialize_hex_string_no_prefix"],"mod":["json_u256","num","storage","u64_hex"]}; \ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/storage/fn.deserialize_storage_map.html b/alloy_rpc_types/serde_helpers/storage/fn.deserialize_storage_map.html new file mode 100644 index 000000000000..24e4d2888b54 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/storage/fn.deserialize_storage_map.html @@ -0,0 +1,10 @@ +deserialize_storage_map in alloy_rpc_types::serde_helpers::storage - Rust +
pub fn deserialize_storage_map<'de, D>(
+    deserializer: D
+) -> Result<Option<HashMap<B256, B256>>, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into an Option<HashMap<B256, B256>>, using from_bytes_to_b256 which +allows cropped values:

+
 {
+     "0x0000000000000000000000000000000000000000000000000000000000000001": "0x22"
+  }
+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/storage/fn.from_bytes_to_b256.html b/alloy_rpc_types/serde_helpers/storage/fn.from_bytes_to_b256.html new file mode 100644 index 000000000000..30ed9c86b79d --- /dev/null +++ b/alloy_rpc_types/serde_helpers/storage/fn.from_bytes_to_b256.html @@ -0,0 +1,5 @@ +from_bytes_to_b256 in alloy_rpc_types::serde_helpers::storage - Rust +
pub fn from_bytes_to_b256<'de, D>(bytes: Bytes) -> Result<B256, D::Error>
where + D: Deserializer<'de>,
Expand description

Converts a Bytes value into a B256, accepting inputs that are less than 32 bytes long. These +inputs will be left padded with zeros.

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/storage/index.html b/alloy_rpc_types/serde_helpers/storage/index.html new file mode 100644 index 000000000000..a1bab9c836ec --- /dev/null +++ b/alloy_rpc_types/serde_helpers/storage/index.html @@ -0,0 +1,6 @@ +alloy_rpc_types::serde_helpers::storage - Rust +
Expand description

Storage related helpers.

+

Structs

  • A storage key type that can be serialized to and from a hex string up to 32 bytes. Used for +eth_getStorageAt and eth_getProof RPCs.

Functions

\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/storage/sidebar-items.js b/alloy_rpc_types/serde_helpers/storage/sidebar-items.js new file mode 100644 index 000000000000..d2a8a38b63d9 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/storage/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize_storage_map","from_bytes_to_b256"],"struct":["JsonStorageKey"]}; \ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/storage/struct.JsonStorageKey.html b/alloy_rpc_types/serde_helpers/storage/struct.JsonStorageKey.html new file mode 100644 index 000000000000..951713d33c5a --- /dev/null +++ b/alloy_rpc_types/serde_helpers/storage/struct.JsonStorageKey.html @@ -0,0 +1,41 @@ +JsonStorageKey in alloy_rpc_types::serde_helpers::storage - Rust +
pub struct JsonStorageKey(pub B256);
Expand description

A storage key type that can be serialized to and from a hex string up to 32 bytes. Used for +eth_getStorageAt and eth_getProof RPCs.

+

This is a wrapper type meant to mirror geth’s serialization and deserialization behavior for +storage keys.

+

In eth_getStorageAt, this is used for deserialization of the index field. Internally, the +index is a [B256], but in eth_getStorageAt requests, its serialization can be up to 32 +bytes. To support this, the storage key is deserialized first as a U256, and converted to a +B256 for use internally.

+

eth_getProof also takes storage keys up to 32 bytes as input, so the keys field is +similarly deserialized. However, geth populates the storage proof key fields in the response +by mirroring the key field used in the input.

+ +

The contained [B256] and From implementation for String are used to preserve the input and +implement this behavior from geth.

+

Tuple Fields§

§0: B256

Trait Implementations§

source§

impl Clone for JsonStorageKey

source§

fn clone(&self) -> JsonStorageKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JsonStorageKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for JsonStorageKey

source§

fn default() -> JsonStorageKey

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for JsonStorageKey

source§

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<JsonStorageKey> for String

source§

fn from(value: JsonStorageKey) -> Self

Converts to this type from the input type.
source§

impl From<Uint<256, 4>> for JsonStorageKey

source§

fn from(value: U256) -> Self

Converts to this type from the input type.
source§

impl PartialEq for JsonStorageKey

source§

fn eq(&self, other: &JsonStorageKey) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for JsonStorageKey

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for JsonStorageKey

source§

impl Eq for JsonStorageKey

source§

impl StructuralEq for JsonStorageKey

source§

impl StructuralPartialEq for JsonStorageKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/u64_hex/fn.deserialize.html b/alloy_rpc_types/serde_helpers/u64_hex/fn.deserialize.html new file mode 100644 index 000000000000..d3305b811caa --- /dev/null +++ b/alloy_rpc_types/serde_helpers/u64_hex/fn.deserialize.html @@ -0,0 +1,4 @@ +deserialize in alloy_rpc_types::serde_helpers::u64_hex - Rust +
pub fn deserialize<'de, D>(deserializer: D) -> Result<u64, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes an u64 from [U64] accepting a hex quantity string with optional 0x prefix

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/u64_hex/fn.serialize.html b/alloy_rpc_types/serde_helpers/u64_hex/fn.serialize.html new file mode 100644 index 000000000000..e46a07233a0d --- /dev/null +++ b/alloy_rpc_types/serde_helpers/u64_hex/fn.serialize.html @@ -0,0 +1,3 @@ +serialize in alloy_rpc_types::serde_helpers::u64_hex - Rust +
pub fn serialize<S: Serializer>(value: &u64, s: S) -> Result<S::Ok, S::Error>
Expand description

Serializes u64 as hex string

+
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/u64_hex/index.html b/alloy_rpc_types/serde_helpers/u64_hex/index.html new file mode 100644 index 000000000000..c788eca6ba92 --- /dev/null +++ b/alloy_rpc_types/serde_helpers/u64_hex/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::serde_helpers::u64_hex - Rust +
Expand description

Helper to deserialize an u64 from [U64] accepting a hex quantity string with optional 0x +prefix

+

Functions

  • Deserializes an u64 from [U64] accepting a hex quantity string with optional 0x prefix
  • Serializes u64 as hex string
\ No newline at end of file diff --git a/alloy_rpc_types/serde_helpers/u64_hex/sidebar-items.js b/alloy_rpc_types/serde_helpers/u64_hex/sidebar-items.js new file mode 100644 index 000000000000..4ed511eceead --- /dev/null +++ b/alloy_rpc_types/serde_helpers/u64_hex/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize","serialize"]}; \ No newline at end of file diff --git a/alloy_rpc_types/sidebar-items.js b/alloy_rpc_types/sidebar-items.js new file mode 100644 index 000000000000..8bbc0e9134e4 --- /dev/null +++ b/alloy_rpc_types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["EIP1559_TX_TYPE_ID","EIP2930_TX_TYPE_ID","EIP4844_TX_TYPE_ID","LEGACY_TX_TYPE_ID"],"enum":["BlockError","BlockHashOrNumber","BlockId","BlockNumberOrTag","BlockTransactions","BlockTransactionsKind","FilterBlockOption","FilterChanges","FilterId","LogError","ParseBlockNumberError","PeerCount","PendingTransactionFilterKind","SyncStatus","TransactionKind","TxType","TypedTransactionRequest","ValueOrArray"],"fn":["from_int_or_hex","logs_bloom","serialize_hex_string_no_prefix"],"mod":["account","eth","json_u256","num","other","pubsub","raw_log","rpc","serde_helpers","state","storage","trace","txpool","u64_hex","withdrawal"],"struct":["AccessList","AccessListItem","AccessListWithGasUsed","AccountInfo","Block","BlockNumHash","BlockOverrides","BlockTransactionHashes","BlockTransactionHashesMut","BloomFilter","Bundle","CallInput","CallInputError","CallRequest","ChainStatus","EIP1186AccountProofResponse","EIP1186StorageProof","EIP1559TransactionRequest","EIP2930TransactionRequest","EthCallResponse","ExtAccountInfo","FeeHistory","Filter","FilterSet","FilteredParams","Header","HexStringMissingPrefixError","LegacyTransactionRequest","Log","Parity","ParseBlockHashOrNumberError","PeerEthProtocolInfo","PeerInfo","PeerNetworkInfo","PeerProtocolsInfo","Peers","PipProtocolInfo","RawLog","RecoveredAccount","Rich","RpcBlockHash","RpcModules","Signature","StateContext","SyncInfo","Transaction","TransactionInfo","TransactionReceipt","TransactionRequest","TransactionStats","TxGasAndReward","TxpoolContent","TxpoolContentFrom","TxpoolInspect","TxpoolInspectSummary","TxpoolStatus","Withdrawal"],"type":["ForkBlock","RichBlock","RichHeader","Topic"]}; \ No newline at end of file diff --git a/alloy_rpc_types/state/index.html b/alloy_rpc_types/state/index.html new file mode 100644 index 000000000000..ccbcb4bdd428 --- /dev/null +++ b/alloy_rpc_types/state/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::state - Rust +

Module alloy_rpc_types::state

source ·
Expand description

bindings for state overrides in eth_call

+

Structs

Type Aliases

\ No newline at end of file diff --git a/alloy_rpc_types/state/sidebar-items.js b/alloy_rpc_types/state/sidebar-items.js new file mode 100644 index 000000000000..0b1926665459 --- /dev/null +++ b/alloy_rpc_types/state/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AccountOverride"],"type":["StateOverride"]}; \ No newline at end of file diff --git a/alloy_rpc_types/state/struct.AccountOverride.html b/alloy_rpc_types/state/struct.AccountOverride.html new file mode 100644 index 000000000000..1add5f6945b5 --- /dev/null +++ b/alloy_rpc_types/state/struct.AccountOverride.html @@ -0,0 +1,39 @@ +AccountOverride in alloy_rpc_types::state - Rust +
pub struct AccountOverride {
+    pub balance: Option<U256>,
+    pub nonce: Option<U64>,
+    pub code: Option<Bytes>,
+    pub state: Option<HashMap<B256, U256>>,
+    pub state_diff: Option<HashMap<B256, U256>>,
+}
Expand description

Custom account override used in call

+

Fields§

§balance: Option<U256>

Fake balance to set for the account before executing the call.

+
§nonce: Option<U64>

Fake nonce to set for the account before executing the call.

+
§code: Option<Bytes>

Fake EVM bytecode to inject into the account before executing the call.

+
§state: Option<HashMap<B256, U256>>

Fake key-value mapping to override all slots in the account storage before executing the +call.

+
§state_diff: Option<HashMap<B256, U256>>

Fake key-value mapping to override individual slots in the account storage before executing +the call.

+

Trait Implementations§

source§

impl Clone for AccountOverride

source§

fn clone(&self) -> AccountOverride

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountOverride

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountOverride

source§

fn default() -> AccountOverride

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountOverride

source§

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 PartialEq for AccountOverride

source§

fn eq(&self, other: &AccountOverride) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountOverride

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountOverride

source§

impl StructuralEq for AccountOverride

source§

impl StructuralPartialEq for AccountOverride

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 184 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/state/type.StateOverride.html b/alloy_rpc_types/state/type.StateOverride.html new file mode 100644 index 000000000000..e6c839755b78 --- /dev/null +++ b/alloy_rpc_types/state/type.StateOverride.html @@ -0,0 +1,5 @@ +StateOverride in alloy_rpc_types::state - Rust +
pub type StateOverride = HashMap<Address, AccountOverride>;
Expand description

A set of account overrides

+

Aliased Type§

struct StateOverride {
+    base: HashMap<Address, AccountOverride, RandomState>,
+}

Fields§

§base: HashMap<Address, AccountOverride, RandomState>

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/storage/fn.deserialize_storage_map.html b/alloy_rpc_types/storage/fn.deserialize_storage_map.html new file mode 100644 index 000000000000..c1eeaff840e8 --- /dev/null +++ b/alloy_rpc_types/storage/fn.deserialize_storage_map.html @@ -0,0 +1,10 @@ +deserialize_storage_map in alloy_rpc_types::storage - Rust +
pub fn deserialize_storage_map<'de, D>(
+    deserializer: D
+) -> Result<Option<HashMap<B256, B256>>, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes the input into an Option<HashMap<B256, B256>>, using from_bytes_to_b256 which +allows cropped values:

+
 {
+     "0x0000000000000000000000000000000000000000000000000000000000000001": "0x22"
+  }
+
\ No newline at end of file diff --git a/alloy_rpc_types/storage/fn.from_bytes_to_b256.html b/alloy_rpc_types/storage/fn.from_bytes_to_b256.html new file mode 100644 index 000000000000..1065f8d25d4f --- /dev/null +++ b/alloy_rpc_types/storage/fn.from_bytes_to_b256.html @@ -0,0 +1,5 @@ +from_bytes_to_b256 in alloy_rpc_types::storage - Rust +
pub fn from_bytes_to_b256<'de, D>(bytes: Bytes) -> Result<B256, D::Error>
where + D: Deserializer<'de>,
Expand description

Converts a Bytes value into a B256, accepting inputs that are less than 32 bytes long. These +inputs will be left padded with zeros.

+
\ No newline at end of file diff --git a/alloy_rpc_types/storage/index.html b/alloy_rpc_types/storage/index.html new file mode 100644 index 000000000000..9b970528aa29 --- /dev/null +++ b/alloy_rpc_types/storage/index.html @@ -0,0 +1,6 @@ +alloy_rpc_types::storage - Rust +
Expand description

Storage related helpers.

+

Structs

  • A storage key type that can be serialized to and from a hex string up to 32 bytes. Used for +eth_getStorageAt and eth_getProof RPCs.

Functions

\ No newline at end of file diff --git a/alloy_rpc_types/storage/sidebar-items.js b/alloy_rpc_types/storage/sidebar-items.js new file mode 100644 index 000000000000..d2a8a38b63d9 --- /dev/null +++ b/alloy_rpc_types/storage/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize_storage_map","from_bytes_to_b256"],"struct":["JsonStorageKey"]}; \ No newline at end of file diff --git a/alloy_rpc_types/storage/struct.JsonStorageKey.html b/alloy_rpc_types/storage/struct.JsonStorageKey.html new file mode 100644 index 000000000000..4f69aa62c91b --- /dev/null +++ b/alloy_rpc_types/storage/struct.JsonStorageKey.html @@ -0,0 +1,41 @@ +JsonStorageKey in alloy_rpc_types::storage - Rust +
pub struct JsonStorageKey(pub B256);
Expand description

A storage key type that can be serialized to and from a hex string up to 32 bytes. Used for +eth_getStorageAt and eth_getProof RPCs.

+

This is a wrapper type meant to mirror geth’s serialization and deserialization behavior for +storage keys.

+

In eth_getStorageAt, this is used for deserialization of the index field. Internally, the +index is a [B256], but in eth_getStorageAt requests, its serialization can be up to 32 +bytes. To support this, the storage key is deserialized first as a U256, and converted to a +B256 for use internally.

+

eth_getProof also takes storage keys up to 32 bytes as input, so the keys field is +similarly deserialized. However, geth populates the storage proof key fields in the response +by mirroring the key field used in the input.

+ +

The contained [B256] and From implementation for String are used to preserve the input and +implement this behavior from geth.

+

Tuple Fields§

§0: B256

Trait Implementations§

source§

impl Clone for JsonStorageKey

source§

fn clone(&self) -> JsonStorageKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JsonStorageKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for JsonStorageKey

source§

fn default() -> JsonStorageKey

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for JsonStorageKey

source§

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<JsonStorageKey> for String

source§

fn from(value: JsonStorageKey) -> Self

Converts to this type from the input type.
source§

impl From<Uint<256, 4>> for JsonStorageKey

source§

fn from(value: U256) -> Self

Converts to this type from the input type.
source§

impl PartialEq for JsonStorageKey

source§

fn eq(&self, other: &JsonStorageKey) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for JsonStorageKey

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for JsonStorageKey

source§

impl Eq for JsonStorageKey

source§

impl StructuralEq for JsonStorageKey

source§

impl StructuralPartialEq for JsonStorageKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.AccessList.html b/alloy_rpc_types/struct.AccessList.html new file mode 100644 index 000000000000..e2340cc6f304 --- /dev/null +++ b/alloy_rpc_types/struct.AccessList.html @@ -0,0 +1,33 @@ +AccessList in alloy_rpc_types - Rust +
pub struct AccessList(pub Vec<AccessListItem>);
Expand description

AccessList as defined in EIP-2930

+

Tuple Fields§

§0: Vec<AccessListItem>

Implementations§

source§

impl AccessList

source§

impl AccessList

source

pub fn flattened(&self) -> Vec<(Address, Vec<U256>)>

Converts the list into a vec, expected by revm

+
source

pub fn into_flattened(self) -> Vec<(Address, Vec<U256>)>

Consumes the type and converts the list into a vec, expected by revm

+
source

pub fn into_flatten(self) -> impl Iterator<Item = (Address, Vec<U256>)>

Consumes the type and returns an iterator over the list’s addresses and storage keys.

+
source

pub fn flatten(&self) -> impl Iterator<Item = (Address, Vec<U256>)> + '_

Returns an iterator over the list’s addresses and storage keys.

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the AccessList.

+

Trait Implementations§

source§

impl Clone for AccessList

source§

fn clone(&self) -> AccessList

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessList

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for AccessList

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for AccessList

source§

fn default() -> AccessList

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccessList

source§

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 Encodable for AccessList

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl Hash for AccessList

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccessList

source§

fn eq(&self, other: &AccessList) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccessList

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccessList

source§

impl StructuralEq for AccessList

source§

impl StructuralPartialEq for AccessList

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.AccessListItem.html b/alloy_rpc_types/struct.AccessListItem.html new file mode 100644 index 000000000000..1d65753f4b35 --- /dev/null +++ b/alloy_rpc_types/struct.AccessListItem.html @@ -0,0 +1,35 @@ +AccessListItem in alloy_rpc_types - Rust +
pub struct AccessListItem {
+    pub address: Address,
+    pub storage_keys: Vec<B256>,
+}
Expand description

A list of addresses and storage keys that the transaction plans to access. +Accesses outside the list are possible, but become more expensive.

+

Fields§

§address: Address

Account addresses that would be loaded at the start of execution

+
§storage_keys: Vec<B256>

Keys of storage that would be loaded at the start of execution

+

Implementations§

source§

impl AccessListItem

source§

impl AccessListItem

source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the AccessListItem.

+

Trait Implementations§

source§

impl Clone for AccessListItem

source§

fn clone(&self) -> AccessListItem

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessListItem

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for AccessListItem

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for AccessListItem

source§

fn default() -> AccessListItem

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccessListItem

source§

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 Encodable for AccessListItem

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl Hash for AccessListItem

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccessListItem

source§

fn eq(&self, other: &AccessListItem) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccessListItem

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccessListItem

source§

impl StructuralEq for AccessListItem

source§

impl StructuralPartialEq for AccessListItem

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.AccessListWithGasUsed.html b/alloy_rpc_types/struct.AccessListWithGasUsed.html new file mode 100644 index 000000000000..d1f44789bd7e --- /dev/null +++ b/alloy_rpc_types/struct.AccessListWithGasUsed.html @@ -0,0 +1,30 @@ +AccessListWithGasUsed in alloy_rpc_types - Rust +
pub struct AccessListWithGasUsed {
+    pub access_list: AccessList,
+    pub gas_used: U256,
+}
Expand description

Access list with gas used appended.

+

Fields§

§access_list: AccessList

List with accounts accessed during transaction.

+
§gas_used: U256

Estimated gas used with access list.

+

Trait Implementations§

source§

impl Clone for AccessListWithGasUsed

source§

fn clone(&self) -> AccessListWithGasUsed

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccessListWithGasUsed

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccessListWithGasUsed

source§

fn default() -> AccessListWithGasUsed

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccessListWithGasUsed

source§

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 PartialEq for AccessListWithGasUsed

source§

fn eq(&self, other: &AccessListWithGasUsed) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccessListWithGasUsed

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccessListWithGasUsed

source§

impl StructuralEq for AccessListWithGasUsed

source§

impl StructuralPartialEq for AccessListWithGasUsed

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.AccountInfo.html b/alloy_rpc_types/struct.AccountInfo.html new file mode 100644 index 000000000000..9ec8bddee201 --- /dev/null +++ b/alloy_rpc_types/struct.AccountInfo.html @@ -0,0 +1,28 @@ +AccountInfo in alloy_rpc_types - Rust +
pub struct AccountInfo {
+    pub name: String,
+}
Expand description

Account information.

+

Fields§

§name: String

Account name

+

Trait Implementations§

source§

impl Clone for AccountInfo

source§

fn clone(&self) -> AccountInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountInfo

source§

fn default() -> AccountInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountInfo

source§

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 PartialEq for AccountInfo

source§

fn eq(&self, other: &AccountInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountInfo

source§

impl StructuralEq for AccountInfo

source§

impl StructuralPartialEq for AccountInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Block.html b/alloy_rpc_types/struct.Block.html new file mode 100644 index 000000000000..a0862d35339a --- /dev/null +++ b/alloy_rpc_types/struct.Block.html @@ -0,0 +1,42 @@ +Block in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Block

source ·
pub struct Block {
+    pub header: Header,
+    pub total_difficulty: Option<U256>,
+    pub uncles: Vec<B256>,
+    pub transactions: BlockTransactions,
+    pub size: Option<U256>,
+    pub withdrawals: Option<Vec<Withdrawal>>,
+    pub other: OtherFields,
+}
Expand description

Block representation

+

Fields§

§header: Header

Header of the block.

+
§total_difficulty: Option<U256>

Total difficulty, this field is None only if representing +an Uncle block.

+
§uncles: Vec<B256>

Uncles’ hashes.

+
§transactions: BlockTransactions

Transactions.

+
§size: Option<U256>

Integer the size of this block in bytes.

+
§withdrawals: Option<Vec<Withdrawal>>

Withdrawals in the block.

+
§other: OtherFields

Support for arbitrary additional fields.

+

Implementations§

source§

impl Block

source

pub fn into_full_block(self, txs: Vec<Transaction>) -> Self

Converts a block with Tx hashes into a full block.

+

Trait Implementations§

source§

impl Clone for Block

source§

fn clone(&self) -> Block

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Block

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Block

source§

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<Block> for RichBlock

source§

fn from(block: Block) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Block

source§

fn eq(&self, other: &Block) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Block

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Block

source§

impl StructuralEq for Block

source§

impl StructuralPartialEq for Block

Auto Trait Implementations§

§

impl RefUnwindSafe for Block

§

impl Send for Block

§

impl Sync for Block

§

impl Unpin for Block

§

impl UnwindSafe for Block

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1040 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.BlockNumHash.html b/alloy_rpc_types/struct.BlockNumHash.html new file mode 100644 index 000000000000..0922d5d88aa1 --- /dev/null +++ b/alloy_rpc_types/struct.BlockNumHash.html @@ -0,0 +1,32 @@ +BlockNumHash in alloy_rpc_types - Rust +
pub struct BlockNumHash {
+    pub number: BlockNumber,
+    pub hash: BlockHash,
+}
Expand description

Block number and hash.

+

Fields§

§number: BlockNumber

Block number

+
§hash: BlockHash

Block hash

+

Implementations§

source§

impl BlockNumHash

source

pub fn new(number: BlockNumber, hash: BlockHash) -> Self

Creates a new BlockNumHash from a block number and hash.

+
source

pub fn into_components(self) -> (BlockNumber, BlockHash)

Consumes Self and returns [BlockNumber], [BlockHash]

+
source

pub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool

Returns whether or not the block matches the given BlockHashOrNumber.

+

Trait Implementations§

source§

impl Clone for BlockNumHash

source§

fn clone(&self) -> BlockNumHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockNumHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockNumHash

source§

fn default() -> BlockNumHash

Returns the “default value” for a type. Read more
source§

impl From<(FixedBytes<32>, u64)> for BlockNumHash

source§

fn from(val: (BlockHash, BlockNumber)) -> Self

Converts to this type from the input type.
source§

impl From<(u64, FixedBytes<32>)> for BlockNumHash

source§

fn from(val: (BlockNumber, BlockHash)) -> Self

Converts to this type from the input type.
source§

impl Hash for BlockNumHash

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for BlockNumHash

source§

fn eq(&self, other: &BlockNumHash) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for BlockNumHash

source§

impl Eq for BlockNumHash

source§

impl StructuralEq for BlockNumHash

source§

impl StructuralPartialEq for BlockNumHash

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.BlockOverrides.html b/alloy_rpc_types/struct.BlockOverrides.html new file mode 100644 index 000000000000..048813306843 --- /dev/null +++ b/alloy_rpc_types/struct.BlockOverrides.html @@ -0,0 +1,46 @@ +BlockOverrides in alloy_rpc_types - Rust +
pub struct BlockOverrides {
+    pub number: Option<U256>,
+    pub difficulty: Option<U256>,
+    pub time: Option<U64>,
+    pub gas_limit: Option<U64>,
+    pub coinbase: Option<Address>,
+    pub random: Option<B256>,
+    pub base_fee: Option<U256>,
+    pub block_hash: Option<BTreeMap<u64, B256>>,
+}
Expand description

BlockOverrides is a set of header fields to override.

+

Fields§

§number: Option<U256>

Overrides the block number.

+

For eth_callMany this will be the block number of the first simulated block. Each +following block increments its block number by 1

+
§difficulty: Option<U256>

Overrides the difficulty of the block.

+
§time: Option<U64>

Overrides the timestamp of the block.

+
§gas_limit: Option<U64>

Overrides the gas limit of the block.

+
§coinbase: Option<Address>

Overrides the coinbase address of the block.

+
§random: Option<B256>

Overrides the prevrandao of the block.

+
§base_fee: Option<U256>

Overrides the basefee of the block.

+
§block_hash: Option<BTreeMap<u64, B256>>

A dictionary that maps blockNumber to a user-defined hash. It could be queried from the +solidity opcode BLOCKHASH.

+

Trait Implementations§

source§

impl Clone for BlockOverrides

source§

fn clone(&self) -> BlockOverrides

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockOverrides

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockOverrides

source§

fn default() -> BlockOverrides

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockOverrides

source§

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 PartialEq for BlockOverrides

source§

fn eq(&self, other: &BlockOverrides) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockOverrides

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlockOverrides

source§

impl StructuralEq for BlockOverrides

source§

impl StructuralPartialEq for BlockOverrides

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 240 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.BlockTransactionHashes.html b/alloy_rpc_types/struct.BlockTransactionHashes.html new file mode 100644 index 000000000000..3e4190bf900f --- /dev/null +++ b/alloy_rpc_types/struct.BlockTransactionHashes.html @@ -0,0 +1,623 @@ +BlockTransactionHashes in alloy_rpc_types - Rust +
pub struct BlockTransactionHashes<'a>(BlockTransactionHashesInner<'a>);
Expand description

An iterator over the transaction hashes of a block.

+

See BlockTransactions::hashes.

+

Tuple Fields§

§0: BlockTransactionHashesInner<'a>

Implementations§

Trait Implementations§

source§

impl<'a> Clone for BlockTransactionHashes<'a>

source§

fn clone(&self) -> BlockTransactionHashes<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for BlockTransactionHashes<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DoubleEndedIterator for BlockTransactionHashes<'_>

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.37.0 · source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
1.27.0 · source§

fn rfold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
1.27.0 · source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

impl ExactSizeIterator for BlockTransactionHashes<'_>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<'a> Iterator for BlockTransactionHashes<'a>

§

type Item = &'a FixedBytes<32>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>, + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where + Self: Sized, + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where + T: 'a, + Self: Sized + DoubleEndedIterator<Item = &'a mut T>, + P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, +such that all those that return true precede all those that return false. +Returns the number of true elements found. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(Self::Item) -> bool, + Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its +index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn rev(self) -> Rev<Self>
where + Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
1.0.0 · source§

fn cycle(self) -> Cycle<Self>
where + Self: Sized + Clone,

Repeats an iterator endlessly. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<'a> FusedIterator for BlockTransactionHashes<'a>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<I> IteratorRandom for I
where + I: Iterator,

source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where + R: Rng + ?Sized,

Collects values at random from the iterator into a supplied buffer +until that buffer is filled. Read more
source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where + R: Rng + ?Sized,

Available on crate feature alloc only.
Collects amount values at random from the iterator into a vector. Read more
source§

impl<T> Itertools for T
where + T: Iterator + ?Sized,

source§

fn interleave<J>( + self, + other: J +) -> Interleave<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until both have run out. Read more
source§

fn interleave_shortest<J>( + self, + other: J +) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until at least one of them has run +out. Read more
source§

fn intersperse( + self, + element: Self::Item +) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
where + Self: Sized, + Self::Item: Clone,

An iterator adaptor to insert a particular value +between each element of the adapted iterator. Read more
source§

fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
where + Self: Sized, + F: FnMut() -> Self::Item,

An iterator adaptor to insert a particular value created by a function +between each element of the adapted iterator. Read more
source§

fn zip_longest<J>( + self, + other: J +) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of two optional elements. Read more
source§

fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of elements. Read more
source§

fn batching<B, F>(self, f: F) -> Batching<Self, F>
where + F: FnMut(&mut Self) -> Option<B>, + Self: Sized,

A “meta iterator adaptor”. Its closure receives a reference to the +iterator and may pick off as many elements as it likes, to produce the +next iterator element. Read more
source§

fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> K, + K: PartialEq,

Available on crate feature use_alloc only.
Return an iterable that can group iterator elements. +Consecutive elements that map to the same key (“runs”), are assigned +to the same group. Read more
source§

fn chunks(self, size: usize) -> IntoChunks<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
Return an iterable that can chunk the iterator. Read more
source§

fn tuple_windows<T>(self) -> TupleWindows<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple, + <T as TupleCollect>::Item: Clone,

Return an iterator over all contiguous windows producing tuples of +a specific size (up to 12). Read more
source§

fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>
where + Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator, + T: TupleCollect + Clone, + <T as TupleCollect>::Item: Clone,

Return an iterator over all windows, wrapping back to the first +elements when the window would otherwise exceed the length of the +iterator, producing tuples of a specific size (up to 12). Read more
source§

fn tuples<T>(self) -> Tuples<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Return an iterator that groups the items in tuples of a specific size +(up to 12). Read more
source§

fn tee(self) -> (Tee<Self>, Tee<Self>)
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Split into an iterator pair that both yield all elements from +the original iterator. Read more
source§

fn step(self, n: usize) -> Step<Self>
where + Self: Sized,

👎Deprecated since 0.8.0: Use std .step_by() instead
Return an iterator adaptor that steps n elements in the base iterator +for each iteration. Read more
source§

fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
where + Self: Sized, + Self::Item: Into<R>,

Convert each item of the iterator using the Into trait. Read more
source§

fn map_results<F, T, U, E>( + self, + f: F +) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

👎Deprecated since 0.10.0: Use .map_ok() instead
source§

fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

Return an iterator adaptor that applies the provided closure +to every Result::Ok value. Result::Err values are +unchanged. Read more
source§

fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(&T) -> bool,

Return an iterator adaptor that filters every Result::Ok +value with the provided closure. Result::Err values are +unchanged. Read more
source§

fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> Option<U>,

Return an iterator adaptor that filters and transforms every +Result::Ok value with the provided closure. Result::Err +values are unchanged. Read more
source§

fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + T: IntoIterator,

Return an iterator adaptor that flattens every Result::Ok value into +a series of Result::Ok values. Result::Err values are unchanged. Read more
source§

fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnOnce(ProcessResults<'_, Self, E>) -> R,

“Lift” a function of the values of the current iterator so as to process +an iterator of Result values instead. Read more
source§

fn merge<J>( + self, + other: J +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
where + Self: Sized, + Self::Item: PartialOrd, + J: IntoIterator<Item = Self::Item>,

Return an iterator adaptor that merges the two base iterators in +ascending order. If both base iterators are sorted (ascending), the +result is sorted. Read more
source§

fn merge_by<J, F>( + self, + other: J, + is_first: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
where + Self: Sized, + J: IntoIterator<Item = Self::Item>, + F: FnMut(&Self::Item, &Self::Item) -> bool,

Return an iterator adaptor that merges the two base iterators in order. +This is much like .merge() but allows for a custom ordering. Read more
source§

fn merge_join_by<J, F, T>( + self, + other: J, + cmp_fn: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>>
where + J: IntoIterator, + F: FnMut(&Self::Item, &<J as IntoIterator>::Item) -> T, + Self: Sized,

Create an iterator that merges items from both this and the specified +iterator in ascending order. Read more
source§

fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::Item: PartialOrd,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them in ascending order. Read more
source§

fn kmerge_by<F>( + self, + first: F +) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>
where + Self: Sized, + Self::Item: IntoIterator, + F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them according to the given closure. Read more
source§

fn cartesian_product<J>( + self, + other: J +) -> Product<Self, <J as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: Clone, + J: IntoIterator, + <J as IntoIterator>::IntoIter: Clone,

Return an iterator adaptor that iterates over the cartesian product of +the element sets of two iterators self and J. Read more
source§

fn multi_cartesian_product( + self +) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::IntoIter: Clone, + <Self::Item as IntoIterator>::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the cartesian product of +all subiterators returned by meta-iterator self. Read more
source§

fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Result<Self::Item, (Self::Item, Self::Item)>,

Return an iterator adaptor that uses the passed-in closure to +optionally merge together consecutive elements. Read more
source§

fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, Self::Item>
where + Self: Sized, + Self::Item: PartialEq,

Remove duplicates from sections of consecutive identical elements. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, Self::Item>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, +determining equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_with_count( + self +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, (usize, Self::Item)>
where + Self: Sized,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by_with_count<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, (usize, Self::Item)>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +This will determine equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn unique(self) -> Unique<Self>
where + Self: Sized, + Self::Item: Clone + Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Duplicates +are detected using hash and equality. Read more
source§

fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Read more
source§

fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
where + Self: Sized + PeekingNext, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from this iterator and +takes items while the closure accept returns true. Read more
source§

fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
where + Self: Clone, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from a Clone-able iterator +to only pick off elements while the predicate accept returns true. Read more
source§

fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> bool,

Returns an iterator adaptor that consumes elements while the given +predicate is true, including the element for which the predicate +first returned false. Read more
source§

fn while_some<A>(self) -> WhileSome<Self>
where + Self: Sized + Iterator<Item = Option<A>>,

Return an iterator adaptor that filters Option<A> iterator elements +and produces A. Stops on the first None encountered. Read more
source§

fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
where + Self: Sized + Clone, + Self::Item: Clone, + T: HasCombination<Self>,

Return an iterator adaptor that iterates over the combinations of the +elements from an iterator. Read more
source§

fn combinations(self, k: usize) -> Combinations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the k-length combinations of +the elements from an iterator. Read more
source§

fn combinations_with_replacement( + self, + k: usize +) -> CombinationsWithReplacement<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates over the k-length combinations of +the elements from an iterator, with replacement. Read more
source§

fn permutations(self, k: usize) -> Permutations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over all k-permutations of the +elements from an iterator. Read more
source§

fn powerset(self) -> Powerset<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates through the powerset of the elements from an +iterator. Read more
source§

fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
where + Self: Sized, + F: FnMut(usize) -> Self::Item,

Return an iterator adaptor that pads the sequence to a minimum length of +min by filling missing elements using a closure f. Read more
source§

fn with_position(self) -> WithPosition<Self>
where + Self: Sized,

Return an iterator adaptor that combines each element with a Position to +ease special-case handling of the first or last elements. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Return an iterator adaptor that yields the indices of all elements +satisfying a predicate, counted from the start of the iterator. Read more
source§

fn update<F>(self, updater: F) -> Update<Self, F>
where + Self: Sized, + F: FnMut(&mut Self::Item),

Return an iterator adaptor that applies a mutating function +to each element before yielding it. Read more
source§

fn next_tuple<T>(&mut self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Advances the iterator and returns the next items grouped in a tuple of +a specific size (up to 12). Read more
source§

fn collect_tuple<T>(self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Collects all items from the iterator into a tuple of a specific size +(up to 12). Read more
source§

fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
where + P: FnMut(&Self::Item) -> bool,

Find the position and value of the first element satisfying a predicate. Read more
source§

fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the last element, if any. Read more
source§

fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the first element, if any. Read more
source§

fn contains<Q>(&mut self, query: &Q) -> bool
where + Self: Sized, + Self::Item: Borrow<Q>, + Q: PartialEq,

Returns true if the given item is present in this iterator. Read more
source§

fn all_equal(&mut self) -> bool
where + Self: Sized, + Self::Item: PartialEq,

Check whether all elements compare equal. Read more
source§

fn all_equal_value( + &mut self +) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
where + Self: Sized, + Self::Item: PartialEq,

If there are elements and they are all equal, return a single copy of that element. +If there are no elements, return an Error containing None. +If there are elements and they are not all equal, return a tuple containing the first +two non-equal elements found. Read more
source§

fn all_unique(&mut self) -> bool
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Check whether all elements are unique (non equal). Read more
source§

fn dropping(self, n: usize) -> Self
where + Self: Sized,

Consume the first n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn dropping_back(self, n: usize) -> Self
where + Self: Sized + DoubleEndedIterator,

Consume the last n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn foreach<F>(self, f: F)
where + F: FnMut(Self::Item), + Self: Sized,

👎Deprecated since 0.8.0: Use .for_each() instead
Run the closure f eagerly on each element of the iterator. Read more
source§

fn concat(self) -> Self::Item
where + Self: Sized, + Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Combine all an iterator’s elements into one element by using Extend. Read more
source§

fn collect_vec(self) -> Vec<Self::Item>
where + Self: Sized,

Available on crate feature use_alloc only.
.collect_vec() is simply a type specialization of Iterator::collect, +for convenience.
source§

fn try_collect<T, U, E>(self) -> Result<U, E>
where + Self: Sized + Iterator<Item = Result<T, E>>, + Result<U, E>: FromIterator<Result<T, E>>,

.try_collect() is more convenient way of writing +.collect::<Result<_, _>>() Read more
source§

fn set_from<'a, A, J>(&mut self, from: J) -> usize
where + A: 'a, + Self: Iterator<Item = &'a mut A>, + J: IntoIterator<Item = A>,

Assign to each reference in self from the from iterator, +stopping at the shortest of the two iterators. Read more
source§

fn join(&mut self, sep: &str) -> String
where + Self::Item: Display,

Available on crate feature use_alloc only.
Combine all iterator elements into one String, separated by sep. Read more
source§

fn format(self, sep: &str) -> Format<'_, Self>
where + Self: Sized,

Format all iterator elements, separated by sep. Read more
source§

fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
where + Self: Sized, + F: FnMut(Self::Item, &mut dyn FnMut(&dyn Display) -> Result<(), Error>) -> Result<(), Error>,

Format all iterator elements, separated by sep. Read more
source§

fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

👎Deprecated since 0.10.0: Use .fold_ok() instead
source§

fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

Fold Result values from an iterator. Read more
source§

fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
where + Self: Iterator<Item = Option<A>>, + F: FnMut(B, A) -> B,

Fold Option values from an iterator. Read more
source§

fn fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

👎Deprecated since 0.10.2: Use Iterator::reduce instead
Accumulator of the elements in the iterator. Read more
source§

fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

Accumulate the elements in the iterator in a tree-like manner. Read more
source§

fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
where + Self: Sized, + F: FnMut(B, Self::Item) -> FoldWhile<B>,

An iterator method that applies a function, producing a single, final value. Read more
source§

fn sum1<S>(self) -> Option<S>
where + Self: Sized, + S: Sum<Self::Item>,

Iterate over the entire iterator and add all the elements. Read more
source§

fn product1<P>(self) -> Option<P>
where + Self: Sized, + P: Product<Self::Item>,

Iterate over the entire iterator and multiply all the elements. Read more
source§

fn sorted_unstable(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. The key function is +called exactly once per key. Read more
source§

fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort the k smallest elements into a new iterator, in ascending order. Read more
source§

fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
where + Self: Sized, + F: FnMut(Self::Item) -> Either<L, R>, + A: Default + Extend<L>, + B: Default + Extend<R>,

Collect all iterator elements into one of two +partitions. Unlike Iterator::partition, each partition may +have a distinct type. Read more
source§

fn partition_result<A, B, T, E>(self) -> (A, B)
where + Self: Iterator<Item = Result<T, E>> + Sized, + A: Default + Extend<T>, + B: Default + Extend<E>,

Partition a sequence of Results into one list of all the Ok elements +and another list of all the Err elements. Read more
source§

fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Return a HashMap of keys mapped to Vecs of values. Keys and values +are taken from (Key, Value) tuple pairs yielded by the input iterator. Read more
source§

fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: Fn(&V) -> K,

Available on crate feature use_std only.
Return an Iterator on a HashMap. Keys mapped to Vecs of values. The key is specified +in the closure. Read more
source§

fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn into_grouping_map_by<K, V, F>( + self, + key_mapper: F +) -> GroupingMap<MapForGrouping<Self, F>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: FnMut(&V) -> K,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn min_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator. Read more
source§

fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator. Read more
source§

fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn minmax(self) -> MinMaxResult<Self::Item>
where + Self: Sized, + Self::Item: PartialOrd,

Return the minimum and maximum elements in the iterator. Read more
source§

fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the minimum and maximum element of an iterator, as determined by +the specified function. Read more
source§

fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the minimum and maximum element of an iterator, as determined by +the specified comparison function. Read more
source§

fn position_max(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the maximum element in the iterator. Read more
source§

fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the maximum element in the iterator, as +determined by the specified function. Read more
source§

fn position_max_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the maximum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_min(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the minimum element in the iterator. Read more
source§

fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the minimum element in the iterator, as +determined by the specified function. Read more
source§

fn position_min_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the minimum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_minmax(self) -> MinMaxResult<usize>
where + Self: Sized, + Self::Item: PartialOrd,

Return the positions of the minimum and maximum elements in +the iterator. Read more
source§

fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified function. Read more
source§

fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified comparison function. Read more
source§

fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields exactly one element, that element will be returned, otherwise +an error will be returned containing an iterator that has the same output as the input +iterator. Read more
source§

fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields no elements, Ok(None) will be returned. If the iterator yields +exactly one element, that element will be returned, otherwise an error will be returned +containing an iterator that has the same output as the input iterator. Read more
source§

fn multipeek(self) -> MultiPeek<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
An iterator adaptor that allows the user to peek at multiple .next() +values without advancing the base iterator. Read more
source§

fn counts(self) -> HashMap<Self::Item, usize>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears. Read more
source§

fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
where + Self: Sized, + K: Eq + Hash, + F: FnMut(Self::Item) -> K,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears, +determining identity using a keying function. Read more
source§

fn multiunzip<FromI>(self) -> FromI
where + Self: Sized + MultiUnzip<FromI>,

Converts an iterator of tuples into a tuple of containers. Read more
source§

fn try_len(&self) -> Result<usize, (usize, Option<usize>)>

Returns the length of the iterator if one exists. +Otherwise return self.size_hint(). Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.BlockTransactionHashesMut.html b/alloy_rpc_types/struct.BlockTransactionHashesMut.html new file mode 100644 index 000000000000..8b71203e4cfb --- /dev/null +++ b/alloy_rpc_types/struct.BlockTransactionHashesMut.html @@ -0,0 +1,621 @@ +BlockTransactionHashesMut in alloy_rpc_types - Rust +
pub struct BlockTransactionHashesMut<'a>(BlockTransactionHashesInnerMut<'a>);
Expand description

An Iterator over the transaction hashes of a block.

+

See BlockTransactions::hashes_mut.

+

Tuple Fields§

§0: BlockTransactionHashesInnerMut<'a>

Implementations§

Trait Implementations§

source§

impl<'a> Debug for BlockTransactionHashesMut<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DoubleEndedIterator for BlockTransactionHashesMut<'_>

source§

fn next_back(&mut self) -> Option<Self::Item>

Removes and returns an element from the end of the iterator. Read more
source§

fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator from the back by n elements. Read more
1.37.0 · source§

fn nth_back(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element from the end of the iterator. Read more
1.27.0 · source§

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes +elements starting from the back of the iterator. Read more
1.27.0 · source§

fn rfold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

An iterator method that reduces the iterator’s elements to a single, +final value, starting from the back. Read more
1.27.0 · source§

fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator from the back that satisfies a predicate. Read more
source§

impl ExactSizeIterator for BlockTransactionHashesMut<'_>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<'a> Iterator for BlockTransactionHashesMut<'a>

§

type Item = &'a mut FixedBytes<32>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( + &mut self +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +to look at the next element of the iterator without consuming it. See +their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>, + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where + Self: Sized, + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where + T: 'a, + Self: Sized + DoubleEndedIterator<Item = &'a mut T>, + P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, +such that all those that return true precede all those that return false. +Returns the number of true elements found. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( + &mut self, + f: F +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · source§

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where + P: FnMut(Self::Item) -> bool, + Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its +index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn rev(self) -> Rev<Self>
where + Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit +evaluation, returning a result without comparing the remaining elements. +As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more
source§

impl<'a> FusedIterator for BlockTransactionHashesMut<'a>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<I> IteratorRandom for I
where + I: Iterator,

source§

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where + R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
source§

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where + R: Rng + ?Sized,

Collects values at random from the iterator into a supplied buffer +until that buffer is filled. Read more
source§

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where + R: Rng + ?Sized,

Available on crate feature alloc only.
Collects amount values at random from the iterator into a vector. Read more
source§

impl<T> Itertools for T
where + T: Iterator + ?Sized,

source§

fn interleave<J>( + self, + other: J +) -> Interleave<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until both have run out. Read more
source§

fn interleave_shortest<J>( + self, + other: J +) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator<Item = Self::Item>, + Self: Sized,

Alternate elements from two iterators until at least one of them has run +out. Read more
source§

fn intersperse( + self, + element: Self::Item +) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>>
where + Self: Sized, + Self::Item: Clone,

An iterator adaptor to insert a particular value +between each element of the adapted iterator. Read more
source§

fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F>
where + Self: Sized, + F: FnMut() -> Self::Item,

An iterator adaptor to insert a particular value created by a function +between each element of the adapted iterator. Read more
source§

fn zip_longest<J>( + self, + other: J +) -> ZipLongest<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of two optional elements. Read more
source§

fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter>
where + J: IntoIterator, + Self: Sized,

Create an iterator which iterates over both this and the specified +iterator simultaneously, yielding pairs of elements. Read more
source§

fn batching<B, F>(self, f: F) -> Batching<Self, F>
where + F: FnMut(&mut Self) -> Option<B>, + Self: Sized,

A “meta iterator adaptor”. Its closure receives a reference to the +iterator and may pick off as many elements as it likes, to produce the +next iterator element. Read more
source§

fn group_by<K, F>(self, key: F) -> GroupBy<K, Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> K, + K: PartialEq,

Available on crate feature use_alloc only.
Return an iterable that can group iterator elements. +Consecutive elements that map to the same key (“runs”), are assigned +to the same group. Read more
source§

fn chunks(self, size: usize) -> IntoChunks<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
Return an iterable that can chunk the iterator. Read more
source§

fn tuple_windows<T>(self) -> TupleWindows<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple, + <T as TupleCollect>::Item: Clone,

Return an iterator over all contiguous windows producing tuples of +a specific size (up to 12). Read more
source§

fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T>
where + Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator, + T: TupleCollect + Clone, + <T as TupleCollect>::Item: Clone,

Return an iterator over all windows, wrapping back to the first +elements when the window would otherwise exceed the length of the +iterator, producing tuples of a specific size (up to 12). Read more
source§

fn tuples<T>(self) -> Tuples<Self, T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Return an iterator that groups the items in tuples of a specific size +(up to 12). Read more
source§

fn tee(self) -> (Tee<Self>, Tee<Self>)
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Split into an iterator pair that both yield all elements from +the original iterator. Read more
source§

fn step(self, n: usize) -> Step<Self>
where + Self: Sized,

👎Deprecated since 0.8.0: Use std .step_by() instead
Return an iterator adaptor that steps n elements in the base iterator +for each iteration. Read more
source§

fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
where + Self: Sized, + Self::Item: Into<R>,

Convert each item of the iterator using the Into trait. Read more
source§

fn map_results<F, T, U, E>( + self, + f: F +) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

👎Deprecated since 0.10.0: Use .map_ok() instead
source§

fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> U,

Return an iterator adaptor that applies the provided closure +to every Result::Ok value. Result::Err values are +unchanged. Read more
source§

fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(&T) -> bool,

Return an iterator adaptor that filters every Result::Ok +value with the provided closure. Result::Err values are +unchanged. Read more
source§

fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnMut(T) -> Option<U>,

Return an iterator adaptor that filters and transforms every +Result::Ok value with the provided closure. Result::Err +values are unchanged. Read more
source§

fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + T: IntoIterator,

Return an iterator adaptor that flattens every Result::Ok value into +a series of Result::Ok values. Result::Err values are unchanged. Read more
source§

fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
where + Self: Iterator<Item = Result<T, E>> + Sized, + F: FnOnce(ProcessResults<'_, Self, E>) -> R,

“Lift” a function of the values of the current iterator so as to process +an iterator of Result values instead. Read more
source§

fn merge<J>( + self, + other: J +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte>
where + Self: Sized, + Self::Item: PartialOrd, + J: IntoIterator<Item = Self::Item>,

Return an iterator adaptor that merges the two base iterators in +ascending order. If both base iterators are sorted (ascending), the +result is sorted. Read more
source§

fn merge_by<J, F>( + self, + other: J, + is_first: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F>
where + Self: Sized, + J: IntoIterator<Item = Self::Item>, + F: FnMut(&Self::Item, &Self::Item) -> bool,

Return an iterator adaptor that merges the two base iterators in order. +This is much like .merge() but allows for a custom ordering. Read more
source§

fn merge_join_by<J, F, T>( + self, + other: J, + cmp_fn: F +) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>>
where + J: IntoIterator, + F: FnMut(&Self::Item, &<J as IntoIterator>::Item) -> T, + Self: Sized,

Create an iterator that merges items from both this and the specified +iterator in ascending order. Read more
source§

fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::Item: PartialOrd,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them in ascending order. Read more
source§

fn kmerge_by<F>( + self, + first: F +) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F>
where + Self: Sized, + Self::Item: IntoIterator, + F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,

Available on crate feature use_alloc only.
Return an iterator adaptor that flattens an iterator of iterators by +merging them according to the given closure. Read more
source§

fn cartesian_product<J>( + self, + other: J +) -> Product<Self, <J as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: Clone, + J: IntoIterator, + <J as IntoIterator>::IntoIter: Clone,

Return an iterator adaptor that iterates over the cartesian product of +the element sets of two iterators self and J. Read more
source§

fn multi_cartesian_product( + self +) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter>
where + Self: Sized, + Self::Item: IntoIterator, + <Self::Item as IntoIterator>::IntoIter: Clone, + <Self::Item as IntoIterator>::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the cartesian product of +all subiterators returned by meta-iterator self. Read more
source§

fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Result<Self::Item, (Self::Item, Self::Item)>,

Return an iterator adaptor that uses the passed-in closure to +optionally merge together consecutive elements. Read more
source§

fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, Self::Item>
where + Self: Sized, + Self::Item: PartialEq,

Remove duplicates from sections of consecutive identical elements. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, Self::Item>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, +determining equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_with_count( + self +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, (usize, Self::Item)>
where + Self: Sized,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +If the iterator is sorted, all elements will be unique. Read more
source§

fn dedup_by_with_count<Cmp>( + self, + cmp: Cmp +) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, (usize, Self::Item)>
where + Self: Sized, + Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, while keeping a count of +how many repeated elements were present. +This will determine equality using a comparison function. +If the iterator is sorted, all elements will be unique. Read more
source§

fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that produces elements that appear more than once during the +iteration. Duplicates are detected using hash and equality. Read more
source§

fn unique(self) -> Unique<Self>
where + Self: Sized, + Self::Item: Clone + Eq + Hash,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Duplicates +are detected using hash and equality. Read more
source§

fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F>
where + Self: Sized, + V: Eq + Hash, + F: FnMut(&Self::Item) -> V,

Available on crate feature use_std only.
Return an iterator adaptor that filters out elements that have +already been produced once during the iteration. Read more
source§

fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
where + Self: Sized + PeekingNext, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from this iterator and +takes items while the closure accept returns true. Read more
source§

fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
where + Self: Clone, + F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from a Clone-able iterator +to only pick off elements while the predicate accept returns true. Read more
source§

fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item) -> bool,

Returns an iterator adaptor that consumes elements while the given +predicate is true, including the element for which the predicate +first returned false. Read more
source§

fn while_some<A>(self) -> WhileSome<Self>
where + Self: Sized + Iterator<Item = Option<A>>,

Return an iterator adaptor that filters Option<A> iterator elements +and produces A. Stops on the first None encountered. Read more
source§

fn tuple_combinations<T>(self) -> TupleCombinations<Self, T>
where + Self: Sized + Clone, + Self::Item: Clone, + T: HasCombination<Self>,

Return an iterator adaptor that iterates over the combinations of the +elements from an iterator. Read more
source§

fn combinations(self, k: usize) -> Combinations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over the k-length combinations of +the elements from an iterator. Read more
source§

fn combinations_with_replacement( + self, + k: usize +) -> CombinationsWithReplacement<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates over the k-length combinations of +the elements from an iterator, with replacement. Read more
source§

fn permutations(self, k: usize) -> Permutations<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator adaptor that iterates over all k-permutations of the +elements from an iterator. Read more
source§

fn powerset(self) -> Powerset<Self>
where + Self: Sized, + Self::Item: Clone,

Available on crate feature use_alloc only.
Return an iterator that iterates through the powerset of the elements from an +iterator. Read more
source§

fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F>
where + Self: Sized, + F: FnMut(usize) -> Self::Item,

Return an iterator adaptor that pads the sequence to a minimum length of +min by filling missing elements using a closure f. Read more
source§

fn with_position(self) -> WithPosition<Self>
where + Self: Sized,

Return an iterator adaptor that combines each element with a Position to +ease special-case handling of the first or last elements. Read more
source§

fn positions<P>(self, predicate: P) -> Positions<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Return an iterator adaptor that yields the indices of all elements +satisfying a predicate, counted from the start of the iterator. Read more
source§

fn update<F>(self, updater: F) -> Update<Self, F>
where + Self: Sized, + F: FnMut(&mut Self::Item),

Return an iterator adaptor that applies a mutating function +to each element before yielding it. Read more
source§

fn next_tuple<T>(&mut self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Advances the iterator and returns the next items grouped in a tuple of +a specific size (up to 12). Read more
source§

fn collect_tuple<T>(self) -> Option<T>
where + Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, + T: HomogeneousTuple,

Collects all items from the iterator into a tuple of a specific size +(up to 12). Read more
source§

fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
where + P: FnMut(&Self::Item) -> bool,

Find the position and value of the first element satisfying a predicate. Read more
source§

fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the last element, if any. Read more
source§

fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Find the value of the first element satisfying a predicate or return the first element, if any. Read more
source§

fn contains<Q>(&mut self, query: &Q) -> bool
where + Self: Sized, + Self::Item: Borrow<Q>, + Q: PartialEq,

Returns true if the given item is present in this iterator. Read more
source§

fn all_equal(&mut self) -> bool
where + Self: Sized, + Self::Item: PartialEq,

Check whether all elements compare equal. Read more
source§

fn all_equal_value( + &mut self +) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
where + Self: Sized, + Self::Item: PartialEq,

If there are elements and they are all equal, return a single copy of that element. +If there are no elements, return an Error containing None. +If there are elements and they are not all equal, return a tuple containing the first +two non-equal elements found. Read more
source§

fn all_unique(&mut self) -> bool
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Check whether all elements are unique (non equal). Read more
source§

fn dropping(self, n: usize) -> Self
where + Self: Sized,

Consume the first n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn dropping_back(self, n: usize) -> Self
where + Self: Sized + DoubleEndedIterator,

Consume the last n elements from the iterator eagerly, +and return the same iterator again. Read more
source§

fn foreach<F>(self, f: F)
where + F: FnMut(Self::Item), + Self: Sized,

👎Deprecated since 0.8.0: Use .for_each() instead
Run the closure f eagerly on each element of the iterator. Read more
source§

fn concat(self) -> Self::Item
where + Self: Sized, + Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Combine all an iterator’s elements into one element by using Extend. Read more
source§

fn collect_vec(self) -> Vec<Self::Item>
where + Self: Sized,

Available on crate feature use_alloc only.
.collect_vec() is simply a type specialization of Iterator::collect, +for convenience.
source§

fn try_collect<T, U, E>(self) -> Result<U, E>
where + Self: Sized + Iterator<Item = Result<T, E>>, + Result<U, E>: FromIterator<Result<T, E>>,

.try_collect() is more convenient way of writing +.collect::<Result<_, _>>() Read more
source§

fn set_from<'a, A, J>(&mut self, from: J) -> usize
where + A: 'a, + Self: Iterator<Item = &'a mut A>, + J: IntoIterator<Item = A>,

Assign to each reference in self from the from iterator, +stopping at the shortest of the two iterators. Read more
source§

fn join(&mut self, sep: &str) -> String
where + Self::Item: Display,

Available on crate feature use_alloc only.
Combine all iterator elements into one String, separated by sep. Read more
source§

fn format(self, sep: &str) -> Format<'_, Self>
where + Self: Sized,

Format all iterator elements, separated by sep. Read more
source§

fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
where + Self: Sized, + F: FnMut(Self::Item, &mut dyn FnMut(&dyn Display) -> Result<(), Error>) -> Result<(), Error>,

Format all iterator elements, separated by sep. Read more
source§

fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

👎Deprecated since 0.10.0: Use .fold_ok() instead
source§

fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where + Self: Iterator<Item = Result<A, E>>, + F: FnMut(B, A) -> B,

Fold Result values from an iterator. Read more
source§

fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
where + Self: Iterator<Item = Option<A>>, + F: FnMut(B, A) -> B,

Fold Option values from an iterator. Read more
source§

fn fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

👎Deprecated since 0.10.2: Use Iterator::reduce instead
Accumulator of the elements in the iterator. Read more
source§

fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
where + F: FnMut(Self::Item, Self::Item) -> Self::Item, + Self: Sized,

Accumulate the elements in the iterator in a tree-like manner. Read more
source§

fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
where + Self: Sized, + F: FnMut(B, Self::Item) -> FoldWhile<B>,

An iterator method that applies a function, producing a single, final value. Read more
source§

fn sum1<S>(self) -> Option<S>
where + Self: Sized, + S: Sum<Self::Item>,

Iterate over the entire iterator and add all the elements. Read more
source§

fn product1<P>(self) -> Option<P>
where + Self: Sized, + P: Product<Self::Item>,

Iterate over the entire iterator and multiply all the elements. Read more
source§

fn sorted_unstable(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted(self) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. Read more
source§

fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Sort all iterator elements into a new iterator in ascending order. The key function is +called exactly once per key. Read more
source§

fn k_smallest(self, k: usize) -> IntoIter<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Sort the k smallest elements into a new iterator, in ascending order. Read more
source§

fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
where + Self: Sized, + F: FnMut(Self::Item) -> Either<L, R>, + A: Default + Extend<L>, + B: Default + Extend<R>,

Collect all iterator elements into one of two +partitions. Unlike Iterator::partition, each partition may +have a distinct type. Read more
source§

fn partition_result<A, B, T, E>(self) -> (A, B)
where + Self: Iterator<Item = Result<T, E>> + Sized, + A: Default + Extend<T>, + B: Default + Extend<E>,

Partition a sequence of Results into one list of all the Ok elements +and another list of all the Err elements. Read more
source§

fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Return a HashMap of keys mapped to Vecs of values. Keys and values +are taken from (Key, Value) tuple pairs yielded by the input iterator. Read more
source§

fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: Fn(&V) -> K,

Available on crate feature use_std only.
Return an Iterator on a HashMap. Keys mapped to Vecs of values. The key is specified +in the closure. Read more
source§

fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
where + Self: Iterator<Item = (K, V)> + Sized, + K: Hash + Eq,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn into_grouping_map_by<K, V, F>( + self, + key_mapper: F +) -> GroupingMap<MapForGrouping<Self, F>>
where + Self: Iterator<Item = V> + Sized, + K: Hash + Eq, + F: FnMut(&V) -> K,

Available on crate feature use_std only.
Constructs a GroupingMap to be used later with one of the efficient +group-and-fold operations it allows to perform. Read more
source§

fn min_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator. Read more
source§

fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all minimum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set(self) -> Vec<Self::Item>
where + Self: Sized, + Self::Item: Ord,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator. Read more
source§

fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Available on crate feature use_alloc only.
Return all maximum elements of an iterator, as determined by +the specified function. Read more
source§

fn minmax(self) -> MinMaxResult<Self::Item>
where + Self: Sized, + Self::Item: PartialOrd,

Return the minimum and maximum elements in the iterator. Read more
source§

fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the minimum and maximum element of an iterator, as determined by +the specified function. Read more
source§

fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the minimum and maximum element of an iterator, as determined by +the specified comparison function. Read more
source§

fn position_max(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the maximum element in the iterator. Read more
source§

fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the maximum element in the iterator, as +determined by the specified function. Read more
source§

fn position_max_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the maximum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_min(self) -> Option<usize>
where + Self: Sized, + Self::Item: Ord,

Return the position of the minimum element in the iterator. Read more
source§

fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
where + Self: Sized, + K: Ord, + F: FnMut(&Self::Item) -> K,

Return the position of the minimum element in the iterator, as +determined by the specified function. Read more
source§

fn position_min_by<F>(self, compare: F) -> Option<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the minimum element in the iterator, as +determined by the specified comparison function. Read more
source§

fn position_minmax(self) -> MinMaxResult<usize>
where + Self: Sized, + Self::Item: PartialOrd,

Return the positions of the minimum and maximum elements in +the iterator. Read more
source§

fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
where + Self: Sized, + K: PartialOrd, + F: FnMut(&Self::Item) -> K,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified function. Read more
source§

fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the postions of the minimum and maximum elements of an +iterator, as determined by the specified comparison function. Read more
source§

fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields exactly one element, that element will be returned, otherwise +an error will be returned containing an iterator that has the same output as the input +iterator. Read more
source§

fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>
where + Self: Sized,

If the iterator yields no elements, Ok(None) will be returned. If the iterator yields +exactly one element, that element will be returned, otherwise an error will be returned +containing an iterator that has the same output as the input iterator. Read more
source§

fn multipeek(self) -> MultiPeek<Self>
where + Self: Sized,

Available on crate feature use_alloc only.
An iterator adaptor that allows the user to peek at multiple .next() +values without advancing the base iterator. Read more
source§

fn counts(self) -> HashMap<Self::Item, usize>
where + Self: Sized, + Self::Item: Eq + Hash,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears. Read more
source§

fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
where + Self: Sized, + K: Eq + Hash, + F: FnMut(Self::Item) -> K,

Available on crate feature use_std only.
Collect the items in this iterator and return a HashMap which +contains each item that appears in the iterator and the number +of times it appears, +determining identity using a keying function. Read more
source§

fn multiunzip<FromI>(self) -> FromI
where + Self: Sized + MultiUnzip<FromI>,

Converts an iterator of tuples into a tuple of containers. Read more
source§

fn try_len(&self) -> Result<usize, (usize, Option<usize>)>

Returns the length of the iterator if one exists. +Otherwise return self.size_hint(). Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.BloomFilter.html b/alloy_rpc_types/struct.BloomFilter.html new file mode 100644 index 000000000000..8e820b4f7d43 --- /dev/null +++ b/alloy_rpc_types/struct.BloomFilter.html @@ -0,0 +1,22 @@ +BloomFilter in alloy_rpc_types - Rust +
pub struct BloomFilter(Vec<Bloom>);
Expand description

Helper type to represent a bloom filter used for matching logs.

+

Tuple Fields§

§0: Vec<Bloom>

Implementations§

source§

impl BloomFilter

source

pub fn matches(&self, bloom: Bloom) -> bool

Returns whether the given bloom matches the list of Blooms in the current filter. +If the filter is empty (the list is empty), then any bloom matches +Otherwise, there must be at least one matche for the BloomFilter to match.

+

Trait Implementations§

source§

impl Debug for BloomFilter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BloomFilter

source§

fn default() -> BloomFilter

Returns the “default value” for a type. Read more
source§

impl From<Vec<Bloom>> for BloomFilter

source§

fn from(src: Vec<Bloom>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Bundle.html b/alloy_rpc_types/struct.Bundle.html new file mode 100644 index 000000000000..983163b557f6 --- /dev/null +++ b/alloy_rpc_types/struct.Bundle.html @@ -0,0 +1,31 @@ +Bundle in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Bundle

source ·
pub struct Bundle {
+    pub transactions: Vec<CallRequest>,
+    pub block_override: Option<BlockOverrides>,
+}
Expand description

Bundle of transactions

+

Fields§

§transactions: Vec<CallRequest>

Transactions

+
§block_override: Option<BlockOverrides>

Block overides

+

Trait Implementations§

source§

impl Clone for Bundle

source§

fn clone(&self) -> Bundle

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Bundle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Bundle

source§

fn default() -> Bundle

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Bundle
where + Bundle: Default,

source§

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 PartialEq for Bundle

source§

fn eq(&self, other: &Bundle) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Bundle

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Bundle

source§

impl StructuralEq for Bundle

source§

impl StructuralPartialEq for Bundle

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 264 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.CallInput.html b/alloy_rpc_types/struct.CallInput.html new file mode 100644 index 000000000000..2e067b49bdd8 --- /dev/null +++ b/alloy_rpc_types/struct.CallInput.html @@ -0,0 +1,45 @@ +CallInput in alloy_rpc_types - Rust +
pub struct CallInput {
+    pub input: Option<Bytes>,
+    pub data: Option<Bytes>,
+}
Expand description

Helper type that supports both data and input fields that map to transaction input data.

+

This is done for compatibility reasons where older implementations used data instead of the +newer, recommended input field.

+

If both fields are set, it is expected that they contain the same value, otherwise an error is +returned.

+

Fields§

§input: Option<Bytes>

Transaction data

+
§data: Option<Bytes>

Transaction data

+

This is the same as input but is used for backwards compatibility: https://github.com/ethereum/go-ethereum/issues/15628

+

Implementations§

source§

impl CallInput

source

pub fn new(data: Bytes) -> Self

Creates a new instance with the given input data.

+
source

pub fn maybe_input(input: Option<Bytes>) -> Self

Creates a new instance with the given input data.

+
source

pub fn into_input(self) -> Option<Bytes>

Consumes the type and returns the optional input data.

+
source

pub fn try_into_unique_input(self) -> Result<Option<Bytes>, CallInputError>

Consumes the type and returns the optional input data.

+

Returns an error if both data and input fields are set and not equal.

+
source

pub fn input(&self) -> Option<&Bytes>

Returns the optional input data.

+
source

pub fn unique_input(&self) -> Result<Option<&Bytes>, CallInputError>

Returns the optional input data.

+

Returns an error if both data and input fields are set and not equal.

+
source

fn check_unique_input(&self) -> Result<(), CallInputError>

Trait Implementations§

source§

impl Clone for CallInput

source§

fn clone(&self) -> CallInput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallInput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallInput

source§

fn default() -> CallInput

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallInput

source§

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<Bytes> for CallInput

source§

fn from(input: Bytes) -> Self

Converts to this type from the input type.
source§

impl From<Option<Bytes>> for CallInput

source§

fn from(input: Option<Bytes>) -> Self

Converts to this type from the input type.
source§

impl Hash for CallInput

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for CallInput

source§

fn eq(&self, other: &CallInput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallInput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallInput

source§

impl StructuralEq for CallInput

source§

impl StructuralPartialEq for CallInput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.CallInputError.html b/alloy_rpc_types/struct.CallInputError.html new file mode 100644 index 000000000000..c3f63794f642 --- /dev/null +++ b/alloy_rpc_types/struct.CallInputError.html @@ -0,0 +1,20 @@ +CallInputError in alloy_rpc_types - Rust +
#[non_exhaustive]
pub struct CallInputError;
Expand description

Error thrown when both data and input fields are set and not equal.

+

Trait Implementations§

source§

impl Debug for CallInputError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallInputError

source§

fn default() -> CallInputError

Returns the “default value” for a type. Read more
source§

impl Display for CallInputError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CallInputError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.CallRequest.html b/alloy_rpc_types/struct.CallRequest.html new file mode 100644 index 000000000000..7f346328dc99 --- /dev/null +++ b/alloy_rpc_types/struct.CallRequest.html @@ -0,0 +1,60 @@ +CallRequest in alloy_rpc_types - Rust +
pub struct CallRequest {
Show 14 fields + pub from: Option<Address>, + pub to: Option<Address>, + pub gas_price: Option<U256>, + pub max_fee_per_gas: Option<U256>, + pub max_priority_fee_per_gas: Option<U256>, + pub gas: Option<U256>, + pub value: Option<U256>, + pub input: CallInput, + pub nonce: Option<U64>, + pub chain_id: Option<U64>, + pub access_list: Option<AccessList>, + pub max_fee_per_blob_gas: Option<U256>, + pub blob_versioned_hashes: Option<Vec<B256>>, + pub transaction_type: Option<U8>, +
}
Expand description

Call request for eth_call and adjacent methods.

+

Fields§

§from: Option<Address>

From

+
§to: Option<Address>

To

+
§gas_price: Option<U256>

Gas Price

+
§max_fee_per_gas: Option<U256>

EIP-1559 Max base fee the caller is willing to pay

+
§max_priority_fee_per_gas: Option<U256>

EIP-1559 Priority fee the caller is paying to the block author

+
§gas: Option<U256>

Gas

+
§value: Option<U256>

Value

+
§input: CallInput

Transaction input data

+
§nonce: Option<U64>

Nonce

+
§chain_id: Option<U64>

chain id

+
§access_list: Option<AccessList>

AccessList

+
§max_fee_per_blob_gas: Option<U256>

Max Fee per Blob gas for EIP-4844 transactions

+
§blob_versioned_hashes: Option<Vec<B256>>

Blob Versioned Hashes for EIP-4844 transactions

+
§transaction_type: Option<U8>

EIP-2718 type

+

Implementations§

source§

impl CallRequest

source

pub fn fee_cap(&self) -> Option<U256>

Returns the configured fee cap, if any.

+

The returns gas_price (legacy) if set or max_fee_per_gas (EIP1559)

+
source

pub fn has_empty_blob_hashes(&self) -> bool

Returns true if the request has a blobVersionedHashes field but it is empty.

+

Trait Implementations§

source§

impl Clone for CallRequest

source§

fn clone(&self) -> CallRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallRequest

source§

fn default() -> CallRequest

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallRequest

source§

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 Hash for CallRequest

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for CallRequest

source§

fn eq(&self, other: &CallRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallRequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallRequest

source§

impl StructuralEq for CallRequest

source§

impl StructuralPartialEq for CallRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 448 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.ChainStatus.html b/alloy_rpc_types/struct.ChainStatus.html new file mode 100644 index 000000000000..a2aff1f9ea42 --- /dev/null +++ b/alloy_rpc_types/struct.ChainStatus.html @@ -0,0 +1,24 @@ +ChainStatus in alloy_rpc_types - Rust +
pub struct ChainStatus {
+    pub block_gap: Option<(U256, U256)>,
+}
Expand description

Chain status.

+

Fields§

§block_gap: Option<(U256, U256)>

Describes the gap in the blockchain, if there is one: (first, last)

+

Trait Implementations§

source§

impl Clone for ChainStatus

source§

fn clone(&self) -> ChainStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ChainStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ChainStatus

source§

fn default() -> ChainStatus

Returns the “default value” for a type. Read more
source§

impl Serialize for ChainStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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

\ No newline at end of file diff --git a/alloy_rpc_types/struct.EIP1186AccountProofResponse.html b/alloy_rpc_types/struct.EIP1186AccountProofResponse.html new file mode 100644 index 000000000000..d8f90363636b --- /dev/null +++ b/alloy_rpc_types/struct.EIP1186AccountProofResponse.html @@ -0,0 +1,33 @@ +EIP1186AccountProofResponse in alloy_rpc_types - Rust +
pub struct EIP1186AccountProofResponse {
+    pub address: Address,
+    pub balance: U256,
+    pub code_hash: B256,
+    pub nonce: U64,
+    pub storage_hash: B256,
+    pub account_proof: Vec<Bytes>,
+    pub storage_proof: Vec<EIP1186StorageProof>,
+}
Expand description

Response for EIP-1186 account proof eth_getProof

+

Fields§

§address: Address§balance: U256§code_hash: B256§nonce: U64§storage_hash: B256§account_proof: Vec<Bytes>§storage_proof: Vec<EIP1186StorageProof>

Trait Implementations§

source§

impl Clone for EIP1186AccountProofResponse

source§

fn clone(&self) -> EIP1186AccountProofResponse

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1186AccountProofResponse

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EIP1186AccountProofResponse

source§

fn default() -> EIP1186AccountProofResponse

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EIP1186AccountProofResponse

source§

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 PartialEq for EIP1186AccountProofResponse

source§

fn eq(&self, other: &EIP1186AccountProofResponse) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EIP1186AccountProofResponse

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EIP1186AccountProofResponse

source§

impl StructuralEq for EIP1186AccountProofResponse

source§

impl StructuralPartialEq for EIP1186AccountProofResponse

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.EIP1186StorageProof.html b/alloy_rpc_types/struct.EIP1186StorageProof.html new file mode 100644 index 000000000000..5e9aafbd1a6e --- /dev/null +++ b/alloy_rpc_types/struct.EIP1186StorageProof.html @@ -0,0 +1,32 @@ +EIP1186StorageProof in alloy_rpc_types - Rust +
pub struct EIP1186StorageProof {
+    pub key: JsonStorageKey,
+    pub value: U256,
+    pub proof: Vec<Bytes>,
+}
Expand description

Data structure with proof for one single storage-entry

+

Fields§

§key: JsonStorageKey

Storage key.

+
§value: U256

Value that the key holds

+
§proof: Vec<Bytes>

proof for the pair

+

Trait Implementations§

source§

impl Clone for EIP1186StorageProof

source§

fn clone(&self) -> EIP1186StorageProof

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1186StorageProof

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EIP1186StorageProof

source§

fn default() -> EIP1186StorageProof

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EIP1186StorageProof

source§

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 PartialEq for EIP1186StorageProof

source§

fn eq(&self, other: &EIP1186StorageProof) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EIP1186StorageProof

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EIP1186StorageProof

source§

impl StructuralEq for EIP1186StorageProof

source§

impl StructuralPartialEq for EIP1186StorageProof

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 88 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.EIP1559TransactionRequest.html b/alloy_rpc_types/struct.EIP1559TransactionRequest.html new file mode 100644 index 000000000000..2c74951b925e --- /dev/null +++ b/alloy_rpc_types/struct.EIP1559TransactionRequest.html @@ -0,0 +1,67 @@ +EIP1559TransactionRequest in alloy_rpc_types - Rust +
pub struct EIP1559TransactionRequest {
+    pub chain_id: u64,
+    pub nonce: U64,
+    pub max_priority_fee_per_gas: U128,
+    pub max_fee_per_gas: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub access_list: AccessList,
+}
Expand description

Represents an EIP-1559 transaction request

+

Fields§

§chain_id: u64§nonce: U64§max_priority_fee_per_gas: U128§max_fee_per_gas: U128§gas_limit: U256§kind: TransactionKind§value: U256§input: Bytes§access_list: AccessList

Implementations§

source§

impl EIP1559TransactionRequest

source

pub fn decode_inner(buf: &mut &[u8]) -> Result<Self>

Decodes the inner fields from RLP bytes.

+

NOTE: This assumes a RLP header has already been decoded, and just decodes the following +RLP fields in the following order:

+
    +
  • chain_id
  • +
  • nonce
  • +
  • max_priority_fee_per_gas
  • +
  • max_fee_per_gas
  • +
  • gas_limit
  • +
  • to
  • +
  • value
  • +
  • data (input)
  • +
  • access_list
  • +
+
source

pub fn fields_len(&self) -> usize

Encodes only the transaction’s fields into the desired buffer, without a RLP header.

+
source

pub fn encode_fields(&self, out: &mut dyn BufMut)

Encodes only the transaction’s fields into the desired buffer, without a RLP header.

+
source

pub fn encode_with_signature( + &self, + signature: &Signature, + out: &mut dyn BufMut, + with_header: bool +)

Inner encoding function that is used for both rlp [Encodable] trait and for calculating +hash that for eip2718 does not require rlp header

+
source

pub fn payload_len_with_signature_without_header( + &self, + signature: &Signature +) -> usize

Output the length of the RLP signed transaction encoding, without a RLP string header.

+
source

pub fn payload_len_with_signature(&self, signature: &Signature) -> usize

Output the length of the RLP signed transaction encoding. This encodes with a RLP header.

+
source

pub fn tx_type(&self) -> TxType

Get transaction type

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the transaction.

+
source

pub fn encode_for_signing(&self, out: &mut dyn BufMut)

Encodes the legacy transaction in RLP for signing.

+
source

pub fn payload_len_for_signature(&self) -> usize

Outputs the length of the signature RLP encoding for the transaction.

+
source

pub fn signature_hash(&self) -> B256

Outputs the signature hash of the transaction by first encoding without a signature, then +hashing.

+

Trait Implementations§

source§

impl Clone for EIP1559TransactionRequest

source§

fn clone(&self) -> EIP1559TransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP1559TransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for EIP1559TransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for EIP1559TransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for EIP1559TransactionRequest

source§

fn eq(&self, other: &EIP1559TransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for EIP1559TransactionRequest

source§

impl StructuralEq for EIP1559TransactionRequest

source§

impl StructuralPartialEq for EIP1559TransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 192 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.EIP2930TransactionRequest.html b/alloy_rpc_types/struct.EIP2930TransactionRequest.html new file mode 100644 index 000000000000..efa9cd847da9 --- /dev/null +++ b/alloy_rpc_types/struct.EIP2930TransactionRequest.html @@ -0,0 +1,65 @@ +EIP2930TransactionRequest in alloy_rpc_types - Rust +
pub struct EIP2930TransactionRequest {
+    pub chain_id: u64,
+    pub nonce: U64,
+    pub gas_price: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub access_list: AccessList,
+}
Expand description

Represents an EIP-2930 transaction request

+

Fields§

§chain_id: u64§nonce: U64§gas_price: U128§gas_limit: U256§kind: TransactionKind§value: U256§input: Bytes§access_list: AccessList

Implementations§

source§

impl EIP2930TransactionRequest

source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the transaction.

+
source

pub fn decode_inner(buf: &mut &[u8]) -> Result<Self>

Decodes the inner fields from RLP bytes.

+

NOTE: This assumes a RLP header has already been decoded, and just decodes the following +RLP fields in the following order:

+
    +
  • chain_id
  • +
  • nonce
  • +
  • gas_price
  • +
  • gas_limit
  • +
  • to
  • +
  • value
  • +
  • data (input)
  • +
  • access_list
  • +
+
source

pub fn fields_len(&self) -> usize

Outputs the length of the transaction’s fields, without a RLP header.

+
source

pub fn encode_fields(&self, out: &mut dyn BufMut)

Encodes only the transaction’s fields into the desired buffer, without a RLP header.

+
source

pub fn encode_with_signature( + &self, + signature: &Signature, + out: &mut dyn BufMut, + with_header: bool +)

Inner encoding function that is used for both rlp [Encodable] trait and for calculating +hash that for eip2718 does not require rlp header

+
source

pub fn payload_len_with_signature_without_header( + &self, + signature: &Signature +) -> usize

Output the length of the RLP signed transaction encoding, without a RLP string header.

+
source

pub fn payload_len_with_signature(&self, signature: &Signature) -> usize

Output the length of the RLP signed transaction encoding. This encodes with a RLP header.

+
source

pub fn tx_type(&self) -> TxType

Get transaction type

+
source

pub fn encode_for_signing(&self, out: &mut dyn BufMut)

Encodes the EIP-2930 transaction in RLP for signing.

+
source

pub fn payload_len_for_signature(&self) -> usize

Outputs the length of the signature RLP encoding for the transaction.

+
source

pub fn signature_hash(&self) -> B256

Outputs the signature hash of the transaction by first encoding without a signature, then +hashing.

+

Trait Implementations§

source§

impl Clone for EIP2930TransactionRequest

source§

fn clone(&self) -> EIP2930TransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EIP2930TransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for EIP2930TransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for EIP2930TransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for EIP2930TransactionRequest

source§

fn eq(&self, other: &EIP2930TransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for EIP2930TransactionRequest

source§

impl StructuralEq for EIP2930TransactionRequest

source§

impl StructuralPartialEq for EIP2930TransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.EthCallResponse.html b/alloy_rpc_types/struct.EthCallResponse.html new file mode 100644 index 000000000000..d7bb9d9e7f42 --- /dev/null +++ b/alloy_rpc_types/struct.EthCallResponse.html @@ -0,0 +1,31 @@ +EthCallResponse in alloy_rpc_types - Rust +
pub struct EthCallResponse {
+    pub output: Option<Bytes>,
+    pub error: Option<String>,
+}
Expand description

CallResponse for eth_callMany

+

Fields§

§output: Option<Bytes>

eth_call output (if no error)

+
§error: Option<String>

eth_call output (if error)

+

Trait Implementations§

source§

impl Clone for EthCallResponse

source§

fn clone(&self) -> EthCallResponse

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EthCallResponse

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for EthCallResponse

source§

fn default() -> EthCallResponse

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for EthCallResponse

source§

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 PartialEq for EthCallResponse

source§

fn eq(&self, other: &EthCallResponse) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for EthCallResponse

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for EthCallResponse

source§

impl StructuralEq for EthCallResponse

source§

impl StructuralPartialEq for EthCallResponse

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.ExtAccountInfo.html b/alloy_rpc_types/struct.ExtAccountInfo.html new file mode 100644 index 000000000000..1ab2caad918d --- /dev/null +++ b/alloy_rpc_types/struct.ExtAccountInfo.html @@ -0,0 +1,32 @@ +ExtAccountInfo in alloy_rpc_types - Rust +
pub struct ExtAccountInfo {
+    pub name: String,
+    pub meta: String,
+    pub uuid: Option<String>,
+}
Expand description

Extended account information (used by parity_allAccountInfo).

+

Fields§

§name: String

Account name

+
§meta: String

Account meta JSON

+
§uuid: Option<String>

Account UUID (None for address book entries)

+

Trait Implementations§

source§

impl Clone for ExtAccountInfo

source§

fn clone(&self) -> ExtAccountInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExtAccountInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ExtAccountInfo

source§

fn default() -> ExtAccountInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ExtAccountInfo

source§

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 PartialEq for ExtAccountInfo

source§

fn eq(&self, other: &ExtAccountInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ExtAccountInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ExtAccountInfo

source§

impl StructuralEq for ExtAccountInfo

source§

impl StructuralPartialEq for ExtAccountInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/struct.FeeHistory.html b/alloy_rpc_types/struct.FeeHistory.html new file mode 100644 index 000000000000..cb3467b83b6d --- /dev/null +++ b/alloy_rpc_types/struct.FeeHistory.html @@ -0,0 +1,44 @@ +FeeHistory in alloy_rpc_types - Rust +
pub struct FeeHistory {
+    pub base_fee_per_gas: Vec<U256>,
+    pub gas_used_ratio: Vec<f64>,
+    pub oldest_block: U256,
+    pub reward: Option<Vec<Vec<U256>>>,
+}
Expand description

Response type for eth_feeHistory

+

Fields§

§base_fee_per_gas: Vec<U256>

An array of block base fees per gas. +This includes the next block after the newest of the returned range, +because this value can be derived from the newest block. Zeroes are +returned for pre-EIP-1559 blocks.

+

Note

+

The Option is only for compatability with Erigon and Geth. +Empty list is skipped only for compatability with Erigon and Geth.

+
§gas_used_ratio: Vec<f64>

An array of block gas used ratios. These are calculated as the ratio +of gasUsed and gasLimit.

+

Note

+

The Option is only for compatability with Erigon and Geth.

+
§oldest_block: U256

Lowest number block of the returned range.

+
§reward: Option<Vec<Vec<U256>>>

An (optional) array of effective priority fee per gas data points from a single +block. All zeroes are returned if the block is empty.

+

Trait Implementations§

source§

impl Clone for FeeHistory

source§

fn clone(&self) -> FeeHistory

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FeeHistory

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FeeHistory

source§

fn default() -> FeeHistory

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FeeHistory

source§

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 PartialEq for FeeHistory

source§

fn eq(&self, other: &FeeHistory) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FeeHistory

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for FeeHistory

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 104 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Filter.html b/alloy_rpc_types/struct.Filter.html new file mode 100644 index 000000000000..01b6749c63d5 --- /dev/null +++ b/alloy_rpc_types/struct.Filter.html @@ -0,0 +1,88 @@ +Filter in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Filter

source ·
pub struct Filter {
+    pub block_option: FilterBlockOption,
+    pub address: FilterSet<Address>,
+    pub topics: [Topic; 4],
+}
Expand description

Filter for logs.

+

Fields§

§block_option: FilterBlockOption

Filter block options, specifying on which blocks the filter should +match.

+
§address: FilterSet<Address>

Address

+
§topics: [Topic; 4]

Topics (maxmimum of 4)

+

Implementations§

source§

impl Filter

source

pub fn new() -> Self

Creates a new, empty filter

+
source

pub fn select(self, filter: impl Into<FilterBlockOption>) -> Self

Sets the inner filter object

+

NOTE: ranges are always inclusive

+
Examples
+

Match only a specific block

+ +
let filter = Filter::new().select(69u64);
+

This is the same as Filter::new().from_block(1337u64).to_block(1337u64)

+

Match the latest block only

+ +
let filter = Filter::new().select(BlockNumberOrTag::Latest);
+

Match a block by its hash

+ +
let filter = Filter::new().select(B256::ZERO);
+

This is the same as at_block_hash

+

Match a range of blocks

+ +
let filter = Filter::new().select(0u64..100u64);
+

Match all blocks in range (1337..BlockNumberOrTag::Latest)

+ +
let filter = Filter::new().select(1337u64..);
+

Match all blocks in range (BlockNumberOrTag::Earliest..1337)

+ +
let filter = Filter::new().select(..1337u64);
+
source

pub fn from_block<T: Into<BlockNumberOrTag>>(self, block: T) -> Self

Sets the from block number

+
source

pub fn to_block<T: Into<BlockNumberOrTag>>(self, block: T) -> Self

Sets the to block number

+
source

pub fn at_block_hash<T: Into<B256>>(self, hash: T) -> Self

Pins the block hash for the filter

+
source

pub fn address<T: Into<ValueOrArray<Address>>>(self, address: T) -> Self

Sets the inner filter object

+

NOTE: ranges are always inclusive

+
Examples
+

Match only a specific address ("0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF")

+ +
let filter = Filter::new()
+    .address("0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF".parse::<Address>().unwrap());
+

Match all addresses in array (vec!["0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF", "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8"])

+ +
let addresses = vec![
+    "0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF".parse::<Address>().unwrap(),
+    "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8".parse::<Address>().unwrap(),
+];
+let filter = Filter::new().address(addresses);
+
source

pub fn event(self, event_name: &str) -> Self

Given the event signature in string form, it hashes it and adds it to the topics to monitor

+
source

pub fn events(self, events: impl IntoIterator<Item = impl AsRef<[u8]>>) -> Self

Hashes all event signatures and sets them as array to event_signature(topic0)

+
source

pub fn event_signature<T: Into<Topic>>(self, topic: T) -> Self

Sets event_signature(topic0) (the event name for non-anonymous events)

+
source

pub fn topic0<T: Into<Topic>>(self, topic: T) -> Self

👎Deprecated: use event_signature instead

Sets topic0 (the event name for non-anonymous events)

+
source

pub fn topic1<T: Into<Topic>>(self, topic: T) -> Self

Sets the 1st indexed topic

+
source

pub fn topic2<T: Into<Topic>>(self, topic: T) -> Self

Sets the 2nd indexed topic

+
source

pub fn topic3<T: Into<Topic>>(self, topic: T) -> Self

Sets the 3rd indexed topic

+
source

pub fn is_paginatable(&self) -> bool

Returns true if this is a range filter and has a from block

+
source

pub fn get_to_block(&self) -> Option<u64>

Returns the numeric value of the toBlock field

+
source

pub fn get_from_block(&self) -> Option<u64>

Returns the numeric value of the fromBlock field

+
source

pub fn get_block_hash(&self) -> Option<B256>

Returns the numeric value of the fromBlock field

+
source

pub fn has_topics(&self) -> bool

Returns true if at least one topic is set

+

Trait Implementations§

source§

impl Clone for Filter

source§

fn clone(&self) -> Filter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Filter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Filter

source§

fn default() -> Filter

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Filter

source§

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 Hash for Filter

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Filter

source§

fn eq(&self, other: &Filter) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Filter

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Filter

source§

impl StructuralEq for Filter

source§

impl StructuralPartialEq for Filter

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 280 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.FilterSet.html b/alloy_rpc_types/struct.FilterSet.html new file mode 100644 index 000000000000..3937d668e690 --- /dev/null +++ b/alloy_rpc_types/struct.FilterSet.html @@ -0,0 +1,43 @@ +FilterSet in alloy_rpc_types - Rust +
pub struct FilterSet<T: Eq + Hash>(HashSet<T>);
Expand description

FilterSet is a set of values that will be used to filter logs

+

Tuple Fields§

§0: HashSet<T>

Implementations§

source§

impl<T: Eq + Hash> FilterSet<T>

source

pub fn is_empty(&self) -> bool

Returns wheter the filter is empty

+
source

pub fn matches(&self, value: &T) -> bool

Returns whether the given value matches the filter. It the filter is empty +any value matches. Otherwise, the filter must include the value

+
source§

impl<T: AsRef<[u8]> + Eq + Hash> FilterSet<T>

source

pub fn to_bloom_filter(&self) -> BloomFilter

Returns a list of Bloom (BloomFilter) corresponding to the filter’s values

+
source§

impl<T: Clone + Eq + Hash> FilterSet<T>

source

pub fn to_value_or_array(&self) -> Option<ValueOrArray<T>>

Returns a ValueOrArray inside an Option, so that:

+
    +
  • If the filter is empty, it returns None
  • +
  • If the filter has only 1 value, it returns the single value
  • +
  • Otherwise it returns an array of values +This should be useful for serialization
  • +
+

Trait Implementations§

source§

impl<T: Clone + Eq + Hash> Clone for FilterSet<T>

source§

fn clone(&self) -> FilterSet<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Eq + Hash> Debug for FilterSet<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default + Eq + Hash> Default for FilterSet<T>

source§

fn default() -> FilterSet<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for FilterSet<T>
where + T: Deserialize<'de> + Eq + Hash,

source§

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<T: Eq + Hash> From<T> for FilterSet<T>

source§

fn from(src: T) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>

source§

fn from(src: ValueOrArray<Option<T>>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>

source§

fn from(src: ValueOrArray<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> From<Vec<T>> for FilterSet<T>

source§

fn from(src: Vec<T>) -> Self

Converts to this type from the input type.
source§

impl<T: Eq + Hash> Hash for FilterSet<T>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: PartialEq + Eq + Hash> PartialEq for FilterSet<T>

source§

fn eq(&self, other: &FilterSet<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T: Eq + Eq + Hash> Eq for FilterSet<T>

source§

impl<T: Eq + Hash> StructuralEq for FilterSet<T>

source§

impl<T: Eq + Hash> StructuralPartialEq for FilterSet<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for FilterSet<T>
where + T: RefUnwindSafe,

§

impl<T> Send for FilterSet<T>
where + T: Send,

§

impl<T> Sync for FilterSet<T>
where + T: Sync,

§

impl<T> Unpin for FilterSet<T>
where + T: Unpin,

§

impl<T> UnwindSafe for FilterSet<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<!> for T

source§

fn from(t: !) -> T

Converts to this type from the input type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.FilteredParams.html b/alloy_rpc_types/struct.FilteredParams.html new file mode 100644 index 000000000000..3d6f980601f8 --- /dev/null +++ b/alloy_rpc_types/struct.FilteredParams.html @@ -0,0 +1,33 @@ +FilteredParams in alloy_rpc_types - Rust +
pub struct FilteredParams {
+    pub filter: Option<Filter>,
+}
Expand description

Support for matching Filters

+

Fields§

§filter: Option<Filter>

The original filter, if any

+

Implementations§

source§

impl FilteredParams

source

pub fn new(filter: Option<Filter>) -> Self

Creates a new wrapper type for a Filter, if any with flattened topics, that can be used +for matching

+
source

pub fn address_filter(address: &FilterSet<Address>) -> BloomFilter

Returns the BloomFilter for the given address

+
source

pub fn topics_filter(topics: &[FilterSet<B256>]) -> Vec<BloomFilter>

Returns the BloomFilter for the given topics

+
source

pub fn matches_topics(bloom: Bloom, topic_filters: &[BloomFilter]) -> bool

Returns true if the bloom matches the topics

+
source

pub fn matches_address(bloom: Bloom, address_filter: &BloomFilter) -> bool

Returns true if the bloom contains one of the address blooms, or the address blooms +list is empty (thus, no filters)

+
source

pub fn filter_block_range(&self, block_number: u64) -> bool

Returns true if the filter matches the given block number

+
source

pub fn filter_block_hash(&self, block_hash: B256) -> bool

Returns true if the filter matches the given block hash.

+
source

pub fn filter_address(&self, log: &Log) -> bool

Returns true if the filter matches the given log.

+
source

pub fn filter_topics(&self, log: &Log) -> bool

Returns true if the log matches the filter’s topics

+

Trait Implementations§

source§

impl Debug for FilteredParams

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FilteredParams

source§

fn default() -> FilteredParams

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 280 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Header.html b/alloy_rpc_types/struct.Header.html new file mode 100644 index 000000000000..78ddfe82b089 --- /dev/null +++ b/alloy_rpc_types/struct.Header.html @@ -0,0 +1,76 @@ +Header in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Header

source ·
pub struct Header {
Show 21 fields + pub hash: Option<B256>, + pub parent_hash: B256, + pub uncles_hash: B256, + pub miner: Address, + pub state_root: B256, + pub transactions_root: B256, + pub receipts_root: B256, + pub logs_bloom: Bloom, + pub difficulty: U256, + pub number: Option<U256>, + pub gas_limit: U256, + pub gas_used: U256, + pub timestamp: U256, + pub extra_data: Bytes, + pub mix_hash: Option<B256>, + pub nonce: Option<B64>, + pub base_fee_per_gas: Option<U256>, + pub withdrawals_root: Option<B256>, + pub blob_gas_used: Option<U64>, + pub excess_blob_gas: Option<U64>, + pub parent_beacon_block_root: Option<B256>, +
}
Expand description

Block header representation.

+

Fields§

§hash: Option<B256>

Hash of the block

+
§parent_hash: B256

Hash of the parent

+
§uncles_hash: B256

Hash of the uncles

+
§miner: Address

Alias of author

+
§state_root: B256

State root hash

+
§transactions_root: B256

Transactions root hash

+
§receipts_root: B256

Transactions receipts root hash

+
§logs_bloom: Bloom

Logs bloom

+
§difficulty: U256

Difficulty

+
§number: Option<U256>

Block number

+
§gas_limit: U256

Gas Limit

+
§gas_used: U256

Gas Used

+
§timestamp: U256

Timestamp

+
§extra_data: Bytes

Extra data

+
§mix_hash: Option<B256>

Mix Hash

+

Before the merge this proves, combined with the nonce, that a sufficient amount of +computation has been carried out on this block: the Proof-of-Work (PoF).

+

After the merge this is prevRandao: Randomness value for the generated payload.

+

This is an Option because it is not always set by non-ethereum networks.

+

See also https://eips.ethereum.org/EIPS/eip-4399 +And https://github.com/ethereum/execution-apis/issues/328

+
§nonce: Option<B64>

Nonce

+
§base_fee_per_gas: Option<U256>

Base fee per unit of gas (if past London)

+
§withdrawals_root: Option<B256>

Withdrawals root hash added by EIP-4895 and is ignored in legacy headers.

+
§blob_gas_used: Option<U64>

Blob gas used

+
§excess_blob_gas: Option<U64>

Excess blob gas

+
§parent_beacon_block_root: Option<B256>

Parent beacon block root

+

Trait Implementations§

source§

impl Clone for Header

source§

fn clone(&self) -> Header

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Header

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Header

source§

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<Header> for RichHeader

source§

fn from(header: Header) -> Self

Converts to this type from the input type.
source§

impl Hash for Header

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Header

source§

fn eq(&self, other: &Header) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Header

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Header

source§

impl StructuralEq for Header

source§

impl StructuralPartialEq for Header

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 856 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.HexStringMissingPrefixError.html b/alloy_rpc_types/struct.HexStringMissingPrefixError.html new file mode 100644 index 000000000000..44167ebeba2b --- /dev/null +++ b/alloy_rpc_types/struct.HexStringMissingPrefixError.html @@ -0,0 +1,21 @@ +HexStringMissingPrefixError in alloy_rpc_types - Rust +
#[non_exhaustive]
pub struct HexStringMissingPrefixError;
Expand description

Thrown when a 0x-prefixed hex string was expected

+

Trait Implementations§

source§

impl Clone for HexStringMissingPrefixError

source§

fn clone(&self) -> HexStringMissingPrefixError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HexStringMissingPrefixError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for HexStringMissingPrefixError

source§

fn default() -> HexStringMissingPrefixError

Returns the “default value” for a type. Read more
source§

impl Display for HexStringMissingPrefixError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for HexStringMissingPrefixError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<HexStringMissingPrefixError> for ParseBlockNumberError

source§

fn from(source: HexStringMissingPrefixError) -> Self

Converts to this type from the input type.
source§

impl Copy for HexStringMissingPrefixError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 0 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.LegacyTransactionRequest.html b/alloy_rpc_types/struct.LegacyTransactionRequest.html new file mode 100644 index 000000000000..ac60cdaddb05 --- /dev/null +++ b/alloy_rpc_types/struct.LegacyTransactionRequest.html @@ -0,0 +1,46 @@ +LegacyTransactionRequest in alloy_rpc_types - Rust +
pub struct LegacyTransactionRequest {
+    pub nonce: U64,
+    pub gas_price: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub chain_id: Option<u64>,
+}
Expand description

Represents a legacy transaction request

+

Fields§

§nonce: U64§gas_price: U128§gas_limit: U256§kind: TransactionKind§value: U256§input: Bytes§chain_id: Option<u64>

Implementations§

source§

impl LegacyTransactionRequest

source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the LegacyTransactionRequest transaction.

+
source

pub fn fields_len(&self) -> usize

Outputs the length of the transaction’s fields, without a RLP header or length of the +eip155 fields.

+
source

pub fn encode_fields(&self, out: &mut dyn BufMut)

Encodes only the transaction’s fields into the desired buffer, without a RLP header or +eip155 fields.

+
source

pub fn eip155_fields_len(&self) -> usize

Outputs the length of EIP-155 fields. Only outputs a non-zero value for EIP-155 legacy +transactions.

+
source

pub fn encode_eip155_fields(&self, out: &mut dyn BufMut)

Encodes EIP-155 arguments into the desired buffer. Only encodes values for legacy +transactions.

+
source

pub fn encode_for_signing(&self, out: &mut dyn BufMut)

Encodes the legacy transaction in RLP for signing, including the EIP-155 fields if possible.

+
source

pub fn payload_len_for_signature(&self) -> usize

Outputs the length of the signature RLP encoding for the transaction, including the length +of the EIP-155 fields if possible.

+
source

pub fn signature_hash(&self) -> B256

Outputs the signature hash of the transaction by first encoding without a signature, then +hashing.

+

See Self::encode_for_signing for more information on the encoding format.

+

Trait Implementations§

source§

impl Clone for LegacyTransactionRequest

source§

fn clone(&self) -> LegacyTransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LegacyTransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for LegacyTransactionRequest

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Encodable for LegacyTransactionRequest

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl PartialEq for LegacyTransactionRequest

source§

fn eq(&self, other: &LegacyTransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for LegacyTransactionRequest

source§

impl StructuralEq for LegacyTransactionRequest

source§

impl StructuralPartialEq for LegacyTransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 160 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Log.html b/alloy_rpc_types/struct.Log.html new file mode 100644 index 000000000000..3d6c07c50931 --- /dev/null +++ b/alloy_rpc_types/struct.Log.html @@ -0,0 +1,46 @@ +Log in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Log

source ·
pub struct Log {
+    pub address: Address,
+    pub topics: Vec<B256>,
+    pub data: Bytes,
+    pub block_hash: Option<B256>,
+    pub block_number: Option<U256>,
+    pub transaction_hash: Option<B256>,
+    pub transaction_index: Option<U256>,
+    pub log_index: Option<U256>,
+    pub removed: bool,
+}
Expand description

Ethereum Log emitted by a transaction

+

Fields§

§address: Address

Address

+
§topics: Vec<B256>

All topics of the log

+
§data: Bytes

Additional data fields of the log

+
§block_hash: Option<B256>

Hash of the block the transaction that emitted this log was mined in

+
§block_number: Option<U256>

Number of the block the transaction that emitted this log was mined in

+
§transaction_hash: Option<B256>

Transaction Hash

+
§transaction_index: Option<U256>

Index of the Transaction in the block

+
§log_index: Option<U256>

Log Index in Block

+
§removed: bool

Geth Compatibility Field: whether this log was removed

+

Trait Implementations§

source§

impl Clone for Log

source§

fn clone(&self) -> Log

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Log

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Log

source§

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 Hash for Log

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Log

source§

fn eq(&self, other: &Log) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Log

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<Log> for Log

§

type Error = LogError

The type returned in the event of a conversion error.
source§

fn try_from(value: Log) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for Log

source§

impl StructuralEq for Log

source§

impl StructuralPartialEq for Log

Auto Trait Implementations§

§

impl RefUnwindSafe for Log

§

impl Send for Log

§

impl Sync for Log

§

impl Unpin for Log

§

impl UnwindSafe for Log

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 264 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Parity.html b/alloy_rpc_types/struct.Parity.html new file mode 100644 index 000000000000..44ba51f796c8 --- /dev/null +++ b/alloy_rpc_types/struct.Parity.html @@ -0,0 +1,29 @@ +Parity in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Parity

source ·
pub struct Parity(pub bool);
Expand description

Type that represents the signature parity byte, meant for use in RPC.

+

This will be serialized as “0x0” if false, and “0x1” if true.

+

Tuple Fields§

§0: bool

Trait Implementations§

source§

impl Clone for Parity

source§

fn clone(&self) -> Parity

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Parity

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Parity

source§

fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl<'de> Deserialize<'de> for Parity

source§

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 Encodable for Parity

source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

impl From<Parity> for U256

source§

fn from(p: Parity) -> Self

Converts to this type from the input type.
source§

impl From<Parity> for u64

source§

fn from(p: Parity) -> Self

Converts to this type from the input type.
source§

impl From<Parity> for u8

source§

fn from(value: Parity) -> Self

Converts to this type from the input type.
source§

impl From<Uint<256, 4>> for Parity

source§

fn from(value: U256) -> Self

Converts to this type from the input type.
source§

impl From<bool> for Parity

source§

fn from(b: bool) -> Self

Converts to this type from the input type.
source§

impl Hash for Parity

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Parity

source§

fn eq(&self, other: &Parity) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Parity

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Parity

source§

impl Eq for Parity

source§

impl StructuralEq for Parity

source§

impl StructuralPartialEq for Parity

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

\ No newline at end of file diff --git a/alloy_rpc_types/struct.ParseBlockHashOrNumberError.html b/alloy_rpc_types/struct.ParseBlockHashOrNumberError.html new file mode 100644 index 000000000000..f108ec6481f6 --- /dev/null +++ b/alloy_rpc_types/struct.ParseBlockHashOrNumberError.html @@ -0,0 +1,24 @@ +ParseBlockHashOrNumberError in alloy_rpc_types - Rust +
pub struct ParseBlockHashOrNumberError {
+    input: String,
+    parse_int_error: ParseIntError,
+    hex_error: FromHexError,
+}
Expand description

Error thrown when parsing a BlockHashOrNumber from a string.

+

Fields§

§input: String§parse_int_error: ParseIntError§hex_error: FromHexError

Trait Implementations§

source§

impl Debug for ParseBlockHashOrNumberError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ParseBlockHashOrNumberError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for ParseBlockHashOrNumberError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.PeerEthProtocolInfo.html b/alloy_rpc_types/struct.PeerEthProtocolInfo.html new file mode 100644 index 000000000000..9b845bdf7a3a --- /dev/null +++ b/alloy_rpc_types/struct.PeerEthProtocolInfo.html @@ -0,0 +1,30 @@ +PeerEthProtocolInfo in alloy_rpc_types - Rust +
pub struct PeerEthProtocolInfo {
+    pub version: u32,
+    pub difficulty: Option<U256>,
+    pub head: String,
+}
Expand description

Peer Ethereum protocol information

+

Fields§

§version: u32

Negotiated ethereum protocol version

+
§difficulty: Option<U256>

Peer total difficulty if known

+
§head: String

SHA3 of peer best block hash

+

Trait Implementations§

source§

impl Clone for PeerEthProtocolInfo

source§

fn clone(&self) -> PeerEthProtocolInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerEthProtocolInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerEthProtocolInfo

source§

fn default() -> PeerEthProtocolInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerEthProtocolInfo

source§

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 Serialize for PeerEthProtocolInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/struct.PeerInfo.html b/alloy_rpc_types/struct.PeerInfo.html new file mode 100644 index 000000000000..88ae26459d55 --- /dev/null +++ b/alloy_rpc_types/struct.PeerInfo.html @@ -0,0 +1,34 @@ +PeerInfo in alloy_rpc_types - Rust +
pub struct PeerInfo {
+    pub id: Option<String>,
+    pub name: String,
+    pub caps: Vec<String>,
+    pub network: PeerNetworkInfo,
+    pub protocols: PeerProtocolsInfo,
+}
Expand description

Peer connection information

+

Fields§

§id: Option<String>

Public node id

+
§name: String

Node client ID

+
§caps: Vec<String>

Capabilities

+
§network: PeerNetworkInfo

Network information

+
§protocols: PeerProtocolsInfo

Protocols information

+

Trait Implementations§

source§

impl Clone for PeerInfo

source§

fn clone(&self) -> PeerInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerInfo

source§

fn default() -> PeerInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerInfo

source§

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 Serialize for PeerInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 256 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.PeerNetworkInfo.html b/alloy_rpc_types/struct.PeerNetworkInfo.html new file mode 100644 index 000000000000..55b9034b1a61 --- /dev/null +++ b/alloy_rpc_types/struct.PeerNetworkInfo.html @@ -0,0 +1,28 @@ +PeerNetworkInfo in alloy_rpc_types - Rust +
pub struct PeerNetworkInfo {
+    pub remote_address: String,
+    pub local_address: String,
+}
Expand description

Peer network information

+

Fields§

§remote_address: String

Remote endpoint address

+
§local_address: String

Local endpoint address

+

Trait Implementations§

source§

impl Clone for PeerNetworkInfo

source§

fn clone(&self) -> PeerNetworkInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerNetworkInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerNetworkInfo

source§

fn default() -> PeerNetworkInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerNetworkInfo

source§

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 Serialize for PeerNetworkInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.PeerProtocolsInfo.html b/alloy_rpc_types/struct.PeerProtocolsInfo.html new file mode 100644 index 000000000000..e47b7f1b7eca --- /dev/null +++ b/alloy_rpc_types/struct.PeerProtocolsInfo.html @@ -0,0 +1,28 @@ +PeerProtocolsInfo in alloy_rpc_types - Rust +
pub struct PeerProtocolsInfo {
+    pub eth: Option<PeerEthProtocolInfo>,
+    pub pip: Option<PipProtocolInfo>,
+}
Expand description

Peer protocols information

+

Fields§

§eth: Option<PeerEthProtocolInfo>

Ethereum protocol information

+
§pip: Option<PipProtocolInfo>

PIP protocol information.

+

Trait Implementations§

source§

impl Clone for PeerProtocolsInfo

source§

fn clone(&self) -> PeerProtocolsInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PeerProtocolsInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PeerProtocolsInfo

source§

fn default() -> PeerProtocolsInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PeerProtocolsInfo

source§

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 Serialize for PeerProtocolsInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Peers.html b/alloy_rpc_types/struct.Peers.html new file mode 100644 index 000000000000..371a1e8acdfe --- /dev/null +++ b/alloy_rpc_types/struct.Peers.html @@ -0,0 +1,30 @@ +Peers in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Peers

source ·
pub struct Peers {
+    pub active: usize,
+    pub connected: usize,
+    pub max: u32,
+    pub peers: Vec<PeerInfo>,
+}
Expand description

Peers info

+

Fields§

§active: usize

Number of active peers

+
§connected: usize

Number of connected peers

+
§max: u32

Max number of peers

+
§peers: Vec<PeerInfo>

Detailed information on peers

+

Trait Implementations§

source§

impl Clone for Peers

source§

fn clone(&self) -> Peers

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Peers

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Peers

source§

fn default() -> Peers

Returns the “default value” for a type. Read more
source§

impl Serialize for Peers

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for Peers

§

impl Send for Peers

§

impl Sync for Peers

§

impl Unpin for Peers

§

impl UnwindSafe for Peers

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.PipProtocolInfo.html b/alloy_rpc_types/struct.PipProtocolInfo.html new file mode 100644 index 000000000000..9e0d14b2a773 --- /dev/null +++ b/alloy_rpc_types/struct.PipProtocolInfo.html @@ -0,0 +1,30 @@ +PipProtocolInfo in alloy_rpc_types - Rust +
pub struct PipProtocolInfo {
+    pub version: u32,
+    pub difficulty: U256,
+    pub head: String,
+}
Expand description

Peer PIP protocol information

+

Fields§

§version: u32

Negotiated PIP protocol version

+
§difficulty: U256

Peer total difficulty

+
§head: String

SHA3 of peer best block hash

+

Trait Implementations§

source§

impl Clone for PipProtocolInfo

source§

fn clone(&self) -> PipProtocolInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PipProtocolInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PipProtocolInfo

source§

fn default() -> PipProtocolInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PipProtocolInfo

source§

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 Serialize for PipProtocolInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.RawLog.html b/alloy_rpc_types/struct.RawLog.html new file mode 100644 index 000000000000..b58616528b8d --- /dev/null +++ b/alloy_rpc_types/struct.RawLog.html @@ -0,0 +1,30 @@ +RawLog in alloy_rpc_types - Rust +

Struct alloy_rpc_types::RawLog

source ·
pub struct RawLog {
+    pub address: Address,
+    pub topics: Vec<B256>,
+    pub data: Bytes,
+}
Expand description

Ethereum Log

+

Fields§

§address: Address

Contract that emitted this log.

+
§topics: Vec<B256>

Topics of the log. The number of logs depend on what LOG opcode is used.

+
§data: Bytes

Arbitrary length data.

+

Implementations§

Trait Implementations§

source§

impl Clone for Log

source§

fn clone(&self) -> Log

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Log

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Log

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for Log

source§

fn default() -> Log

Returns the “default value” for a type. Read more
source§

impl Encodable for Log

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl PartialEq for Log

source§

fn eq(&self, other: &Log) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Log

source§

impl StructuralEq for Log

source§

impl StructuralPartialEq for Log

Auto Trait Implementations§

§

impl RefUnwindSafe for Log

§

impl Send for Log

§

impl Sync for Log

§

impl Unpin for Log

§

impl UnwindSafe for Log

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.RecoveredAccount.html b/alloy_rpc_types/struct.RecoveredAccount.html new file mode 100644 index 000000000000..5df4712a7a07 --- /dev/null +++ b/alloy_rpc_types/struct.RecoveredAccount.html @@ -0,0 +1,34 @@ +RecoveredAccount in alloy_rpc_types - Rust +
pub struct RecoveredAccount {
+    pub address: Address,
+    pub public_key: B512,
+    pub is_valid_for_current_chain: bool,
+}
Expand description

account derived from a signature +as well as information that tells if it is valid for +the current chain

+

Fields§

§address: Address

address of the recovered account

+
§public_key: B512

public key of the recovered account

+
§is_valid_for_current_chain: bool

If the signature contains chain replay protection, +And the chain_id encoded within the signature +matches the current chain this would be true, otherwise false.

+

Trait Implementations§

source§

impl Clone for RecoveredAccount

source§

fn clone(&self) -> RecoveredAccount

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RecoveredAccount

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RecoveredAccount

source§

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 Serialize for RecoveredAccount

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 85 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Rich.html b/alloy_rpc_types/struct.Rich.html new file mode 100644 index 000000000000..c14b175d772d --- /dev/null +++ b/alloy_rpc_types/struct.Rich.html @@ -0,0 +1,36 @@ +Rich in alloy_rpc_types - Rust +

Struct alloy_rpc_types::Rich

source ·
pub struct Rich<T> {
+    pub inner: T,
+    pub extra_info: BTreeMap<String, Value>,
+}
Expand description

Value representation with additional info

+

Fields§

§inner: T

Standard value.

+
§extra_info: BTreeMap<String, Value>

Additional fields that should be serialized into the Block object

+

Trait Implementations§

source§

impl<T: Clone> Clone for Rich<T>

source§

fn clone(&self) -> Rich<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Rich<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Deref for Rich<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'de, T> Deserialize<'de> for Rich<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for Rich<T>

source§

fn eq(&self, other: &Rich<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T: Serialize> Serialize for Rich<T>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for Rich<T>

source§

impl<T> StructuralEq for Rich<T>

source§

impl<T> StructuralPartialEq for Rich<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Rich<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Rich<T>
where + T: Send,

§

impl<T> Sync for Rich<T>
where + T: Sync,

§

impl<T> Unpin for Rich<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Rich<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/struct.RpcBlockHash.html b/alloy_rpc_types/struct.RpcBlockHash.html new file mode 100644 index 000000000000..c6f569ef04ed --- /dev/null +++ b/alloy_rpc_types/struct.RpcBlockHash.html @@ -0,0 +1,38 @@ +RpcBlockHash in alloy_rpc_types - Rust +
pub struct RpcBlockHash {
+    pub block_hash: B256,
+    pub require_canonical: Option<bool>,
+}
Expand description

A block hash which may have +a boolean requireCanonical field. +If false, an RPC call should raise if a block +matching the hash is not found. +If true, an RPC call should additionaly raise if +the block is not in the canonical chain. +https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md#specification

+

Fields§

§block_hash: B256

A block hash

+
§require_canonical: Option<bool>

Whether the block must be a canonical block

+

Implementations§

source§

impl RpcBlockHash

source

pub const fn from_hash( + block_hash: B256, + require_canonical: Option<bool> +) -> Self

Returns an RpcBlockHash from a [B256].

+

Trait Implementations§

source§

impl AsRef<FixedBytes<32>> for RpcBlockHash

source§

fn as_ref(&self) -> &B256

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for RpcBlockHash

source§

fn clone(&self) -> RpcBlockHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RpcBlockHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<FixedBytes<32>> for RpcBlockHash

source§

fn from(value: B256) -> Self

Converts to this type from the input type.
source§

impl From<RpcBlockHash> for B256

source§

fn from(value: RpcBlockHash) -> Self

Converts to this type from the input type.
source§

impl PartialEq for RpcBlockHash

source§

fn eq(&self, other: &RpcBlockHash) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RpcBlockHash

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for RpcBlockHash

source§

impl Eq for RpcBlockHash

source§

impl StructuralEq for RpcBlockHash

source§

impl StructuralPartialEq for RpcBlockHash

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 33 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.RpcModules.html b/alloy_rpc_types/struct.RpcModules.html new file mode 100644 index 000000000000..fe0b9b3b8b0b --- /dev/null +++ b/alloy_rpc_types/struct.RpcModules.html @@ -0,0 +1,30 @@ +RpcModules in alloy_rpc_types - Rust +
pub struct RpcModules {
+    module_map: HashMap<String, String>,
+}
Expand description

Represents the rpc_modules response, which returns the +list of all available modules on that transport and their version

+

Fields§

§module_map: HashMap<String, String>

Implementations§

source§

impl RpcModules

source

pub fn new(module_map: HashMap<String, String>) -> Self

Create a new instance of RPCModules

+
source

pub fn into_modules(self) -> HashMap<String, String>

Consumes self and returns the inner hashmap mapping module names to their versions

+

Trait Implementations§

source§

impl Clone for RpcModules

source§

fn clone(&self) -> RpcModules

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RpcModules

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for RpcModules

source§

fn default() -> RpcModules

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for RpcModules

source§

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 PartialEq for RpcModules

source§

fn eq(&self, other: &RpcModules) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RpcModules

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RpcModules

source§

impl StructuralEq for RpcModules

source§

impl StructuralPartialEq for RpcModules

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Signature.html b/alloy_rpc_types/struct.Signature.html new file mode 100644 index 000000000000..901a20a6fbb3 --- /dev/null +++ b/alloy_rpc_types/struct.Signature.html @@ -0,0 +1,61 @@ +Signature in alloy_rpc_types - Rust +
pub struct Signature {
+    pub r: U256,
+    pub s: U256,
+    pub v: U256,
+    pub y_parity: Option<Parity>,
+}
Expand description

Container type for all signature fields in RPC

+

Fields§

§r: U256

The R field of the signature; the point on the curve.

+
§s: U256

The S field of the signature; the point on the curve.

+
§v: U256

For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0 for even, 1 for +odd) of the y-value of the secp256k1 signature.

+

For legacy transactions, this is the recovery id

+

See also https://ethereum.github.io/execution-apis/api-documentation/ and https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash

+
§y_parity: Option<Parity>

The y parity of the signature. This is only used for typed (non-legacy) transactions.

+

Implementations§

source§

impl Signature

source

pub fn payload_len_with_eip155_chain_id(&self, chain_id: Option<u64>) -> usize

Output the length of the signature without the length of the RLP header, using the legacy +scheme with EIP-155 support depends on chain_id.

+
source

pub fn encode_with_eip155_chain_id( + &self, + out: &mut dyn BufMut, + chain_id: Option<u64> +)

Encode the v, r, s values without a RLP header. +Encodes the v value using the legacy scheme with EIP-155 support depends on chain_id.

+
source

pub fn v(&self, chain_id: Option<u64>) -> u64

Output the v of the signature depends on chain_id

+
source

pub fn decode_with_eip155_chain_id( + buf: &mut &[u8] +) -> Result<(Self, Option<u64>)>

Decodes the v, r, s values without a RLP header. +This will return a chain ID if the v value is EIP-155 compatible.

+
source

pub fn payload_len(&self) -> usize

Output the length of the signature without the length of the RLP header

+
source

pub fn encode(&self, out: &mut dyn BufMut)

Encode the y_parity, r, s values without a RLP header. +Panics if the y parity is not set.

+
source

pub fn decode(buf: &mut &[u8]) -> Result<Self>

Decodes the y_parity, r, s values without a RLP header.

+
source

pub fn to_bytes(&self) -> [u8; 65]

Turn this signature into its byte +(hex) representation. +Panics: if the y_parity field is not set.

+
source

pub fn to_hex_bytes(&self) -> Bytes

Turn this signature into its hex-encoded representation.

+
source

pub fn size(&self) -> usize

Calculates a heuristic for the in-memory size of the Signature.

+

Trait Implementations§

source§

impl Clone for Signature

source§

fn clone(&self) -> Signature

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Signature

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Signature

source§

fn default() -> Signature

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Signature

source§

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 Hash for Signature

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Signature

source§

fn eq(&self, other: &Signature) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Signature

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Signature

source§

impl StructuralEq for Signature

source§

impl StructuralPartialEq for Signature

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 104 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.StateContext.html b/alloy_rpc_types/struct.StateContext.html new file mode 100644 index 000000000000..1e14c8633b96 --- /dev/null +++ b/alloy_rpc_types/struct.StateContext.html @@ -0,0 +1,31 @@ +StateContext in alloy_rpc_types - Rust +
pub struct StateContext {
+    pub block_number: Option<BlockId>,
+    pub transaction_index: Option<TransactionIndex>,
+}
Expand description

State context for callMany

+

Fields§

§block_number: Option<BlockId>

Block Number

+
§transaction_index: Option<TransactionIndex>

Inclusive number of tx to replay in block. -1 means replay all

+

Trait Implementations§

source§

impl Clone for StateContext

source§

fn clone(&self) -> StateContext

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StateContext

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StateContext

source§

fn default() -> StateContext

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for StateContext

source§

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 PartialEq for StateContext

source§

fn eq(&self, other: &StateContext) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StateContext

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StateContext

source§

impl StructuralEq for StateContext

source§

impl StructuralPartialEq for StateContext

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.SyncInfo.html b/alloy_rpc_types/struct.SyncInfo.html new file mode 100644 index 000000000000..32aec7c01553 --- /dev/null +++ b/alloy_rpc_types/struct.SyncInfo.html @@ -0,0 +1,36 @@ +SyncInfo in alloy_rpc_types - Rust +
pub struct SyncInfo {
+    pub starting_block: U256,
+    pub current_block: U256,
+    pub highest_block: U256,
+    pub warp_chunks_amount: Option<U256>,
+    pub warp_chunks_processed: Option<U256>,
+}
Expand description

Syncing info

+

Fields§

§starting_block: U256

Starting block

+
§current_block: U256

Current block

+
§highest_block: U256

Highest block seen so far

+
§warp_chunks_amount: Option<U256>

Warp sync snapshot chunks total.

+
§warp_chunks_processed: Option<U256>

Warp sync snapshot chunks processed.

+

Trait Implementations§

source§

impl Clone for SyncInfo

source§

fn clone(&self) -> SyncInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SyncInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SyncInfo

source§

fn default() -> SyncInfo

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for SyncInfo

source§

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 PartialEq for SyncInfo

source§

fn eq(&self, other: &SyncInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SyncInfo

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SyncInfo

source§

impl StructuralEq for SyncInfo

source§

impl StructuralPartialEq for SyncInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Transaction.html b/alloy_rpc_types/struct.Transaction.html new file mode 100644 index 000000000000..7c40bb47e575 --- /dev/null +++ b/alloy_rpc_types/struct.Transaction.html @@ -0,0 +1,68 @@ +Transaction in alloy_rpc_types - Rust +
pub struct Transaction {
Show 20 fields + pub hash: B256, + pub nonce: U64, + pub block_hash: Option<B256>, + pub block_number: Option<U256>, + pub transaction_index: Option<U256>, + pub from: Address, + pub to: Option<Address>, + pub value: U256, + pub gas_price: Option<U128>, + pub gas: U256, + pub max_fee_per_gas: Option<U128>, + pub max_priority_fee_per_gas: Option<U128>, + pub max_fee_per_blob_gas: Option<U128>, + pub input: Bytes, + pub signature: Option<Signature>, + pub chain_id: Option<U64>, + pub blob_versioned_hashes: Vec<B256>, + pub access_list: Option<Vec<AccessListItem>>, + pub transaction_type: Option<U64>, + pub other: OtherFields, +
}
Expand description

Transaction object used in RPC

+

Fields§

§hash: B256

Hash

+
§nonce: U64

Nonce

+
§block_hash: Option<B256>

Block hash

+
§block_number: Option<U256>

Block number

+
§transaction_index: Option<U256>

Transaction Index

+
§from: Address

Sender

+
§to: Option<Address>

Recipient

+
§value: U256

Transferred value

+
§gas_price: Option<U128>

Gas Price

+
§gas: U256

Gas amount

+
§max_fee_per_gas: Option<U128>

Max BaseFeePerGas the user is willing to pay.

+
§max_priority_fee_per_gas: Option<U128>

The miner’s tip.

+
§max_fee_per_blob_gas: Option<U128>

Configured max fee per blob gas for eip-4844 transactions

+
§input: Bytes

Data

+
§signature: Option<Signature>

All flattened fields of the transaction signature.

+

Note: this is an option so special transaction types without a signature (e.g. https://github.com/ethereum-optimism/optimism/blob/0bf643c4147b43cd6f25a759d331ef3a2a61a2a3/specs/deposits.md#the-deposited-transaction-type) can be supported.

+
§chain_id: Option<U64>

The chain id of the transaction, if any.

+
§blob_versioned_hashes: Vec<B256>

Contains the blob hashes for eip-4844 transactions.

+
§access_list: Option<Vec<AccessListItem>>

EIP2930

+

Pre-pay to warm storage access.

+
§transaction_type: Option<U64>

EIP2718

+
§other: OtherFields

Arbitrary extra fields.

+

Trait Implementations§

source§

impl Clone for Transaction

source§

fn clone(&self) -> Transaction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Transaction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Transaction

source§

fn default() -> Transaction

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Transaction

source§

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 PartialEq for Transaction

source§

fn eq(&self, other: &Transaction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Transaction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Transaction

source§

impl StructuralEq for Transaction

source§

impl StructuralPartialEq for Transaction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 600 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TransactionInfo.html b/alloy_rpc_types/struct.TransactionInfo.html new file mode 100644 index 000000000000..732336383af1 --- /dev/null +++ b/alloy_rpc_types/struct.TransactionInfo.html @@ -0,0 +1,33 @@ +TransactionInfo in alloy_rpc_types - Rust +
pub struct TransactionInfo {
+    pub hash: Option<TxHash>,
+    pub index: Option<u64>,
+    pub block_hash: Option<B256>,
+    pub block_number: Option<u64>,
+    pub base_fee: Option<u64>,
+}
Expand description

Additional fields in the context of a block that contains this transaction.

+

Fields§

§hash: Option<TxHash>

Hash of the transaction.

+
§index: Option<u64>

Index of the transaction in the block

+
§block_hash: Option<B256>

Hash of the block.

+
§block_number: Option<u64>

Number of the block.

+
§base_fee: Option<u64>

Base fee of the block.

+

Trait Implementations§

source§

impl Clone for TransactionInfo

source§

fn clone(&self) -> TransactionInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TransactionInfo

source§

fn default() -> TransactionInfo

Returns the “default value” for a type. Read more
source§

impl PartialEq for TransactionInfo

source§

fn eq(&self, other: &TransactionInfo) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for TransactionInfo

source§

impl Eq for TransactionInfo

source§

impl StructuralEq for TransactionInfo

source§

impl StructuralPartialEq for TransactionInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TransactionReceipt.html b/alloy_rpc_types/struct.TransactionReceipt.html new file mode 100644 index 000000000000..fd3f2679af1c --- /dev/null +++ b/alloy_rpc_types/struct.TransactionReceipt.html @@ -0,0 +1,66 @@ +TransactionReceipt in alloy_rpc_types - Rust +
pub struct TransactionReceipt {
Show 18 fields + pub transaction_hash: Option<B256>, + pub transaction_index: U64, + pub block_hash: Option<B256>, + pub block_number: Option<U256>, + pub cumulative_gas_used: U256, + pub gas_used: Option<U256>, + pub effective_gas_price: U128, + pub blob_gas_used: Option<U128>, + pub blob_gas_price: Option<U128>, + pub from: Address, + pub to: Option<Address>, + pub contract_address: Option<Address>, + pub logs: Vec<Log>, + pub logs_bloom: Bloom, + pub state_root: Option<B256>, + pub status_code: Option<U64>, + pub transaction_type: U8, + pub other: OtherFields, +
}
Expand description

Transaction receipt

+

Fields§

§transaction_hash: Option<B256>

Transaction Hash.

+
§transaction_index: U64

Index within the block.

+
§block_hash: Option<B256>

Hash of the block this transaction was included within.

+
§block_number: Option<U256>

Number of the block this transaction was included within.

+
§cumulative_gas_used: U256

Cumulative gas used within the block after this was executed.

+
§gas_used: Option<U256>

Gas used by this transaction alone.

+
§effective_gas_price: U128

The price paid post-execution by the transaction (i.e. base fee + priority fee). Both +fields in 1559-style transactions are maximums (max fee + max priority fee), the amount +that’s actually paid by users can only be determined post-execution

+
§blob_gas_used: Option<U128>

Blob gas used by the eip-4844 transaction

+

This is None for non eip-4844 transactions

+
§blob_gas_price: Option<U128>

The price paid by the eip-4844 transaction per blob gas.

+
§from: Address

Address of the sender

+
§to: Option<Address>

Address of the receiver. null when its a contract creation transaction.

+
§contract_address: Option<Address>

Contract address created, or None if not a deployment.

+
§logs: Vec<Log>

Logs emitted by this transaction.

+
§logs_bloom: Bloom

Logs bloom

+
§state_root: Option<B256>

The post-transaction stateroot (pre Byzantium)

+

EIP98 makes this optional field, if it’s missing then skip serializing it

+
§status_code: Option<U64>

Status: either 1 (success) or 0 (failure). Only present after activation of EIP-658

+
§transaction_type: U8

EIP-2718 Transaction type, Some(1) for AccessList transaction, None for Legacy

+
§other: OtherFields

Support for arbitrary additional fields.

+

Trait Implementations§

source§

impl Clone for TransactionReceipt

source§

fn clone(&self) -> TransactionReceipt

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionReceipt

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransactionReceipt

source§

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 PartialEq for TransactionReceipt

source§

fn eq(&self, other: &TransactionReceipt) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionReceipt

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionReceipt

source§

impl StructuralEq for TransactionReceipt

source§

impl StructuralPartialEq for TransactionReceipt

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 680 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TransactionRequest.html b/alloy_rpc_types/struct.TransactionRequest.html new file mode 100644 index 000000000000..572d0f59c8ab --- /dev/null +++ b/alloy_rpc_types/struct.TransactionRequest.html @@ -0,0 +1,60 @@ +TransactionRequest in alloy_rpc_types - Rust +
pub struct TransactionRequest {
+    pub from: Option<Address>,
+    pub to: Option<Address>,
+    pub gas_price: Option<U128>,
+    pub max_fee_per_gas: Option<U128>,
+    pub max_priority_fee_per_gas: Option<U128>,
+    pub gas: Option<U256>,
+    pub value: Option<U256>,
+    pub data: Option<Bytes>,
+    pub nonce: Option<U64>,
+    pub access_list: Option<AccessList>,
+    pub transaction_type: Option<U8>,
+}
Expand description

Represents all transaction requests received from RPC

+

Fields§

§from: Option<Address>

from address

+
§to: Option<Address>

to address

+
§gas_price: Option<U128>

legacy, gas Price

+
§max_fee_per_gas: Option<U128>

max base fee per gas sender is willing to pay

+
§max_priority_fee_per_gas: Option<U128>

miner tip

+
§gas: Option<U256>

gas

+
§value: Option<U256>

value of th tx in wei

+
§data: Option<Bytes>

Any additional data sent

+
§nonce: Option<U64>

Transaction nonce

+
§access_list: Option<AccessList>

warm storage access pre-payment

+
§transaction_type: Option<U8>

EIP-2718 type

+

Implementations§

source§

impl TransactionRequest

source

pub fn into_typed_request(self) -> Option<TypedTransactionRequest>

Converts the request into a TypedTransactionRequest

+

Returns None if mutual exclusive fields gasPrice and max_fee_per_gas are either missing +or both set.

+
source

pub fn gas_limit(self, gas_limit: u64) -> Self

Sets the gas limit for the transaction.

+
source

pub fn nonce(self, nonce: u64) -> Self

Sets the nonce for the transaction.

+
source

pub fn max_fee_per_gas(self, max_fee_per_gas: u128) -> Self

Sets the maximum fee per gas for the transaction.

+
source

pub fn max_priority_fee_per_gas(self, max_priority_fee_per_gas: u128) -> Self

Sets the maximum priority fee per gas for the transaction.

+
source

pub fn to(self, to: Address) -> Self

Sets the recipient address for the transaction.

+
source

pub fn value(self, value: u128) -> Self

Sets the value (amount) for the transaction.

+
source

pub fn access_list(self, access_list: AccessList) -> Self

Sets the access list for the transaction.

+
source

pub fn input(self, input: Bytes) -> Self

Sets the input data for the transaction.

+
source

pub fn transaction_type(self, transaction_type: u8) -> Self

Sets the transactions type for the transactions.

+

Trait Implementations§

source§

impl Clone for TransactionRequest

source§

fn clone(&self) -> TransactionRequest

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TransactionRequest

source§

fn default() -> TransactionRequest

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TransactionRequest

source§

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 PartialEq for TransactionRequest

source§

fn eq(&self, other: &TransactionRequest) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionRequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionRequest

source§

impl StructuralEq for TransactionRequest

source§

impl StructuralPartialEq for TransactionRequest

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 288 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TransactionStats.html b/alloy_rpc_types/struct.TransactionStats.html new file mode 100644 index 000000000000..1391416abf1f --- /dev/null +++ b/alloy_rpc_types/struct.TransactionStats.html @@ -0,0 +1,26 @@ +TransactionStats in alloy_rpc_types - Rust +
pub struct TransactionStats {
+    pub first_seen: u64,
+    pub propagated_to: BTreeMap<B512, usize>,
+}
Expand description

Propagation statistics for pending transaction.

+

Fields§

§first_seen: u64

Block no this transaction was first seen.

+
§propagated_to: BTreeMap<B512, usize>

Peers this transaction was propagated to with count.

+

Trait Implementations§

source§

impl Clone for TransactionStats

source§

fn clone(&self) -> TransactionStats

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionStats

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TransactionStats

source§

fn default() -> TransactionStats

Returns the “default value” for a type. Read more
source§

impl Serialize for TransactionStats

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TxGasAndReward.html b/alloy_rpc_types/struct.TxGasAndReward.html new file mode 100644 index 000000000000..9e9e7048855d --- /dev/null +++ b/alloy_rpc_types/struct.TxGasAndReward.html @@ -0,0 +1,32 @@ +TxGasAndReward in alloy_rpc_types - Rust +
pub struct TxGasAndReward {
+    pub gas_used: u64,
+    pub reward: u128,
+}
Expand description

Internal struct to calculate reward percentiles

+

Fields§

§gas_used: u64

Gas used by the transaction

+
§reward: u128

The effective gas tip by the transaction

+

Trait Implementations§

source§

impl Clone for TxGasAndReward

source§

fn clone(&self) -> TxGasAndReward

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxGasAndReward

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for TxGasAndReward

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for TxGasAndReward

source§

fn eq(&self, other: &TxGasAndReward) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for TxGasAndReward

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Eq for TxGasAndReward

source§

impl StructuralEq for TxGasAndReward

source§

impl StructuralPartialEq for TxGasAndReward

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TxpoolContent.html b/alloy_rpc_types/struct.TxpoolContent.html new file mode 100644 index 000000000000..bbd85d52868b --- /dev/null +++ b/alloy_rpc_types/struct.TxpoolContent.html @@ -0,0 +1,35 @@ +TxpoolContent in alloy_rpc_types - Rust +
pub struct TxpoolContent {
+    pub pending: BTreeMap<Address, BTreeMap<String, Transaction>>,
+    pub queued: BTreeMap<Address, BTreeMap<String, Transaction>>,
+}
Expand description

Transaction Pool Content

+

The content inspection property can be queried to list the exact details of all +the transactions currently pending for inclusion in the next block(s), as well +as the ones that are being scheduled for future execution only.

+

See here for more details

+

Fields§

§pending: BTreeMap<Address, BTreeMap<String, Transaction>>

pending tx

+
§queued: BTreeMap<Address, BTreeMap<String, Transaction>>

queued tx

+

Implementations§

source§

impl TxpoolContent

source

pub fn remove_from(&mut self, sender: &Address) -> TxpoolContentFrom

Removes the transactions from the given sender

+

Trait Implementations§

source§

impl Clone for TxpoolContent

source§

fn clone(&self) -> TxpoolContent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolContent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolContent

source§

fn default() -> TxpoolContent

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolContent

source§

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 PartialEq for TxpoolContent

source§

fn eq(&self, other: &TxpoolContent) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolContent

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolContent

source§

impl StructuralEq for TxpoolContent

source§

impl StructuralPartialEq for TxpoolContent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TxpoolContentFrom.html b/alloy_rpc_types/struct.TxpoolContentFrom.html new file mode 100644 index 000000000000..6de34d39e1e3 --- /dev/null +++ b/alloy_rpc_types/struct.TxpoolContentFrom.html @@ -0,0 +1,32 @@ +TxpoolContentFrom in alloy_rpc_types - Rust +
pub struct TxpoolContentFrom {
+    pub pending: BTreeMap<String, Transaction>,
+    pub queued: BTreeMap<String, Transaction>,
+}
Expand description

Transaction Pool Content From

+

Same as TxpoolContent but for a specific address.

+

See here for more details

+

Fields§

§pending: BTreeMap<String, Transaction>

pending tx

+
§queued: BTreeMap<String, Transaction>

queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolContentFrom

source§

fn clone(&self) -> TxpoolContentFrom

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolContentFrom

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolContentFrom

source§

fn default() -> TxpoolContentFrom

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolContentFrom

source§

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 PartialEq for TxpoolContentFrom

source§

fn eq(&self, other: &TxpoolContentFrom) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolContentFrom

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolContentFrom

source§

impl StructuralEq for TxpoolContentFrom

source§

impl StructuralPartialEq for TxpoolContentFrom

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TxpoolInspect.html b/alloy_rpc_types/struct.TxpoolInspect.html new file mode 100644 index 000000000000..1fcd4ba063d1 --- /dev/null +++ b/alloy_rpc_types/struct.TxpoolInspect.html @@ -0,0 +1,36 @@ +TxpoolInspect in alloy_rpc_types - Rust +
pub struct TxpoolInspect {
+    pub pending: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+    pub queued: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+}
Expand description

Transaction Pool Inspect

+

The inspect inspection property can be queried to list a textual summary +of all the transactions currently pending for inclusion in the next block(s), +as well as the ones that are being scheduled for future execution only. +This is a method specifically tailored to developers to quickly see the +transactions in the pool and find any potential issues.

+

See here for more details

+

Fields§

§pending: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>

pending tx

+
§queued: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>

queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolInspect

source§

fn clone(&self) -> TxpoolInspect

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolInspect

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolInspect

source§

fn default() -> TxpoolInspect

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolInspect

source§

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 PartialEq for TxpoolInspect

source§

fn eq(&self, other: &TxpoolInspect) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolInspect

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolInspect

source§

impl StructuralEq for TxpoolInspect

source§

impl StructuralPartialEq for TxpoolInspect

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TxpoolInspectSummary.html b/alloy_rpc_types/struct.TxpoolInspectSummary.html new file mode 100644 index 000000000000..5a68f5f6b166 --- /dev/null +++ b/alloy_rpc_types/struct.TxpoolInspectSummary.html @@ -0,0 +1,37 @@ +TxpoolInspectSummary in alloy_rpc_types - Rust +
pub struct TxpoolInspectSummary {
+    pub to: Option<Address>,
+    pub value: U256,
+    pub gas: U256,
+    pub gas_price: U256,
+}
Expand description

Transaction summary as found in the Txpool Inspection property.

+

Fields§

§to: Option<Address>

Recipient (None when contract creation)

+
§value: U256

Transferred value

+
§gas: U256

Gas amount

+
§gas_price: U256

Gas Price

+

Trait Implementations§

source§

impl Clone for TxpoolInspectSummary

source§

fn clone(&self) -> TxpoolInspectSummary

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolInspectSummary

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TxpoolInspectSummary

Implement the Deserialize trait for TxpoolInspectSummary struct.

+
source§

fn deserialize<D>(deserializer: D) -> Result<TxpoolInspectSummary, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for TxpoolInspectSummary

source§

fn eq(&self, other: &TxpoolInspectSummary) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolInspectSummary

Implement the Serialize trait for TxpoolInspectSummary struct so that the +format matches the one from geth.

+
source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolInspectSummary

source§

impl StructuralEq for TxpoolInspectSummary

source§

impl StructuralPartialEq for TxpoolInspectSummary

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.TxpoolStatus.html b/alloy_rpc_types/struct.TxpoolStatus.html new file mode 100644 index 000000000000..c01152012456 --- /dev/null +++ b/alloy_rpc_types/struct.TxpoolStatus.html @@ -0,0 +1,34 @@ +TxpoolStatus in alloy_rpc_types - Rust +
pub struct TxpoolStatus {
+    pub pending: U64,
+    pub queued: U64,
+}
Expand description

Transaction Pool Status

+

The status inspection property can be queried for the number of transactions +currently pending for inclusion in the next block(s), as well as the ones that +are being scheduled for future execution only.

+

See here for more details

+

Fields§

§pending: U64

number of pending tx

+
§queued: U64

number of queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolStatus

source§

fn clone(&self) -> TxpoolStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolStatus

source§

fn default() -> TxpoolStatus

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolStatus

source§

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 PartialEq for TxpoolStatus

source§

fn eq(&self, other: &TxpoolStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolStatus

source§

impl StructuralEq for TxpoolStatus

source§

impl StructuralPartialEq for TxpoolStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/struct.Withdrawal.html b/alloy_rpc_types/struct.Withdrawal.html new file mode 100644 index 000000000000..95d2d3c7cbf5 --- /dev/null +++ b/alloy_rpc_types/struct.Withdrawal.html @@ -0,0 +1,44 @@ +Withdrawal in alloy_rpc_types - Rust +
pub struct Withdrawal {
+    pub index: u64,
+    pub validator_index: u64,
+    pub address: Address,
+    pub amount: u64,
+}
Expand description

Withdrawal represents a validator withdrawal from the consensus layer.

+

Fields§

§index: u64

Monotonically increasing identifier issued by consensus layer.

+
§validator_index: u64

Index of validator associated with withdrawal.

+
§address: Address

Target address for withdrawn ether.

+
§amount: u64

Value of the withdrawal in gwei.

+

Implementations§

source§

impl Withdrawal

source§

impl Withdrawal

source

pub fn amount_wei(&self) -> U256

Return the withdrawal amount in wei.

+
source

pub fn size(&self) -> usize

Calculate a heuristic for the in-memory size of the Withdrawal.

+

Trait Implementations§

source§

impl Clone for Withdrawal

source§

fn clone(&self) -> Withdrawal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Withdrawal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Withdrawal

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for Withdrawal

source§

fn default() -> Withdrawal

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Withdrawal

source§

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<'de> DeserializeAs<'de, Withdrawal> for BeaconAPIWithdrawal

source§

fn deserialize_as<D>(deserializer: D) -> Result<Withdrawal, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
source§

impl Encodable for Withdrawal

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl Hash for Withdrawal

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Withdrawal

source§

fn eq(&self, other: &Withdrawal) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Withdrawal

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl SerializeAs<Withdrawal> for BeaconAPIWithdrawal

source§

fn serialize_as<S>( + source: &Withdrawal, + serializer: S +) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer.
source§

impl Eq for Withdrawal

source§

impl StructuralEq for Withdrawal

source§

impl StructuralPartialEq for Withdrawal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/call/index.html b/alloy_rpc_types/trace/call/index.html new file mode 100644 index 000000000000..0360ad9baa54 --- /dev/null +++ b/alloy_rpc_types/trace/call/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::trace::call - Rust +

Module alloy_rpc_types::trace::call

source ·

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/trace/call/sidebar-items.js b/alloy_rpc_types/trace/call/sidebar-items.js new file mode 100644 index 000000000000..6ccba397fe52 --- /dev/null +++ b/alloy_rpc_types/trace/call/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["CallConfig","CallFrame","CallLogFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/call/struct.CallConfig.html b/alloy_rpc_types/trace/call/struct.CallConfig.html new file mode 100644 index 000000000000..b5ad08716110 --- /dev/null +++ b/alloy_rpc_types/trace/call/struct.CallConfig.html @@ -0,0 +1,31 @@ +CallConfig in alloy_rpc_types::trace::call - Rust +
pub struct CallConfig {
+    pub only_top_call: Option<bool>,
+    pub with_log: Option<bool>,
+}

Fields§

§only_top_call: Option<bool>

When set to true, this will only trace the primary (top-level) call and not any sub-calls. +It eliminates the additional processing for each call frame

+
§with_log: Option<bool>

Implementations§

source§

impl CallConfig

source

pub fn only_top_call(self) -> Self

Sets the only top call flag

+
source

pub fn with_log(self) -> Self

Sets the with log flag

+

Trait Implementations§

source§

impl Clone for CallConfig

source§

fn clone(&self) -> CallConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallConfig

source§

fn default() -> CallConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallConfig

source§

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 PartialEq for CallConfig

source§

fn eq(&self, other: &CallConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallConfig

source§

impl StructuralEq for CallConfig

source§

impl StructuralPartialEq for CallConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 2 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/call/struct.CallFrame.html b/alloy_rpc_types/trace/call/struct.CallFrame.html new file mode 100644 index 000000000000..c4abbfcf4230 --- /dev/null +++ b/alloy_rpc_types/trace/call/struct.CallFrame.html @@ -0,0 +1,39 @@ +CallFrame in alloy_rpc_types::trace::call - Rust +
pub struct CallFrame {
+    pub from: Address,
+    pub gas: U256,
+    pub gas_used: U256,
+    pub to: Option<Address>,
+    pub input: Bytes,
+    pub output: Option<Bytes>,
+    pub error: Option<String>,
+    pub revert_reason: Option<String>,
+    pub calls: Vec<CallFrame>,
+    pub logs: Vec<CallLogFrame>,
+    pub value: Option<U256>,
+    pub typ: String,
+}
Expand description

The response object for debug_traceTransaction with "tracer": "callTracer"

+

https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/call.go#L44

+

Fields§

§from: Address§gas: U256§gas_used: U256§to: Option<Address>§input: Bytes§output: Option<Bytes>§error: Option<String>§revert_reason: Option<String>§calls: Vec<CallFrame>§logs: Vec<CallLogFrame>§value: Option<U256>§typ: String

Trait Implementations§

source§

impl Clone for CallFrame

source§

fn clone(&self) -> CallFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallFrame

source§

fn default() -> CallFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallFrame

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CallFrame

source§

fn eq(&self, other: &CallFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallFrame

source§

impl StructuralEq for CallFrame

source§

impl StructuralPartialEq for CallFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/call/struct.CallLogFrame.html b/alloy_rpc_types/trace/call/struct.CallLogFrame.html new file mode 100644 index 000000000000..f3090c1be66d --- /dev/null +++ b/alloy_rpc_types/trace/call/struct.CallLogFrame.html @@ -0,0 +1,28 @@ +CallLogFrame in alloy_rpc_types::trace::call - Rust +
pub struct CallLogFrame {
+    pub address: Option<Address>,
+    pub topics: Option<Vec<B256>>,
+    pub data: Option<Bytes>,
+}

Fields§

§address: Option<Address>§topics: Option<Vec<B256>>§data: Option<Bytes>

Trait Implementations§

source§

impl Clone for CallLogFrame

source§

fn clone(&self) -> CallLogFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallLogFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallLogFrame

source§

fn default() -> CallLogFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallLogFrame

source§

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 PartialEq for CallLogFrame

source§

fn eq(&self, other: &CallLogFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallLogFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallLogFrame

source§

impl StructuralEq for CallLogFrame

source§

impl StructuralPartialEq for CallLogFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/common/enum.TraceResult.html b/alloy_rpc_types/trace/common/enum.TraceResult.html new file mode 100644 index 000000000000..ccfe79147f9c --- /dev/null +++ b/alloy_rpc_types/trace/common/enum.TraceResult.html @@ -0,0 +1,48 @@ +TraceResult in alloy_rpc_types::trace::common - Rust +
pub enum TraceResult<Ok, Err> {
+    Success {
+        result: Ok,
+    },
+    Error {
+        error: Err,
+    },
+}
Expand description

The result of a single transaction trace.

+

Variants§

§

Success

Fields

§result: Ok

Untagged success variant

+
§

Error

Fields

§error: Err

Untagged error variant

+

Trait Implementations§

source§

impl<Ok: Clone, Err: Clone> Clone for TraceResult<Ok, Err>

source§

fn clone(&self) -> TraceResult<Ok, Err>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Ok: Debug, Err: Debug> Debug for TraceResult<Ok, Err>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, Ok, Err> Deserialize<'de> for TraceResult<Ok, Err>
where + Ok: Deserialize<'de>, + Err: Deserialize<'de>,

source§

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<Ok: PartialEq, Err: PartialEq> PartialEq for TraceResult<Ok, Err>

source§

fn eq(&self, other: &TraceResult<Ok, Err>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<Ok, Err> Serialize for TraceResult<Ok, Err>
where + Ok: Serialize, + Err: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Ok: Eq, Err: Eq> Eq for TraceResult<Ok, Err>

source§

impl<Ok, Err> StructuralEq for TraceResult<Ok, Err>

source§

impl<Ok, Err> StructuralPartialEq for TraceResult<Ok, Err>

Auto Trait Implementations§

§

impl<Ok, Err> RefUnwindSafe for TraceResult<Ok, Err>
where + Err: RefUnwindSafe, + Ok: RefUnwindSafe,

§

impl<Ok, Err> Send for TraceResult<Ok, Err>
where + Err: Send, + Ok: Send,

§

impl<Ok, Err> Sync for TraceResult<Ok, Err>
where + Err: Sync, + Ok: Sync,

§

impl<Ok, Err> Unpin for TraceResult<Ok, Err>
where + Err: Unpin, + Ok: Unpin,

§

impl<Ok, Err> UnwindSafe for TraceResult<Ok, Err>
where + Err: UnwindSafe, + Ok: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/trace/common/index.html b/alloy_rpc_types/trace/common/index.html new file mode 100644 index 000000000000..62d6e5ca47a3 --- /dev/null +++ b/alloy_rpc_types/trace/common/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::trace::common - Rust +
Expand description

Types used by tracing backends

+

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/trace/common/sidebar-items.js b/alloy_rpc_types/trace/common/sidebar-items.js new file mode 100644 index 000000000000..93aaa7289543 --- /dev/null +++ b/alloy_rpc_types/trace/common/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TraceResult"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.AccountChangeKind.html b/alloy_rpc_types/trace/enum.AccountChangeKind.html new file mode 100644 index 000000000000..cf9ea3298f39 --- /dev/null +++ b/alloy_rpc_types/trace/enum.AccountChangeKind.html @@ -0,0 +1,34 @@ +AccountChangeKind in alloy_rpc_types::trace - Rust +
pub enum AccountChangeKind {
+    Modify,
+    Create,
+    SelfDestruct,
+}
Expand description

Helper type to track the kind of change of an AccountState.

+

Variants§

§

Modify

§

Create

§

SelfDestruct

Implementations§

source§

impl AccountChangeKind

source

pub fn is_created(&self) -> bool

Returns true if the account was created

+
source

pub fn is_modified(&self) -> bool

Returns true the account was modified

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true the account was modified

+

Trait Implementations§

source§

impl Clone for AccountChangeKind

source§

fn clone(&self) -> AccountChangeKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountChangeKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountChangeKind

source§

fn default() -> AccountChangeKind

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountChangeKind

source§

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 Hash for AccountChangeKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountChangeKind

source§

fn eq(&self, other: &AccountChangeKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountChangeKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountChangeKind

source§

impl StructuralEq for AccountChangeKind

source§

impl StructuralPartialEq for AccountChangeKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Modify: 0 bytes
  • Create: 0 bytes
  • SelfDestruct: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.Action.html b/alloy_rpc_types/trace/enum.Action.html new file mode 100644 index 000000000000..08913e7997d3 --- /dev/null +++ b/alloy_rpc_types/trace/enum.Action.html @@ -0,0 +1,40 @@ +Action in alloy_rpc_types::trace - Rust +
pub enum Action {
+    Call(CallAction),
+    Create(CreateAction),
+    Selfdestruct(SelfdestructAction),
+    Reward(RewardAction),
+}
Expand description

Action

+

Variants§

§

Call(CallAction)

Call

+
§

Create(CreateAction)

Create

+
§

Selfdestruct(SelfdestructAction)

Parity style traces never renamed suicide to selfdestruct: https://eips.ethereum.org/EIPS/eip-6

+

For compatibility reasons, this is serialized as suicide: https://github.com/paradigmxyz/reth/issues/3721

+
§

Reward(RewardAction)

Reward

+

Implementations§

source§

impl Action

source

pub fn is_call(&self) -> bool

Returns true if this is a call action

+
source

pub fn is_create(&self) -> bool

Returns true if this is a create action

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true if this is a selfdestruct action

+
source

pub fn is_reward(&self) -> bool

Returns true if this is a reward action

+
source

pub fn kind(&self) -> ActionType

Returns what kind of action this is

+

Trait Implementations§

source§

impl Clone for Action

source§

fn clone(&self) -> Action

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Action

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Action

source§

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 PartialEq for Action

source§

fn eq(&self, other: &Action) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Action

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Action

source§

impl StructuralEq for Action

source§

impl StructuralPartialEq for Action

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

Size for each variant:

  • Call: 120 bytes
  • Create: 96 bytes
  • Selfdestruct: 72 bytes
  • Reward: 56 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.ActionType.html b/alloy_rpc_types/trace/enum.ActionType.html new file mode 100644 index 000000000000..c7c770eee7e7 --- /dev/null +++ b/alloy_rpc_types/trace/enum.ActionType.html @@ -0,0 +1,35 @@ +ActionType in alloy_rpc_types::trace - Rust +
pub enum ActionType {
+    Call,
+    Create,
+    Selfdestruct,
+    Reward,
+}
Expand description

An external action type.

+

Used as enum identifier for Action

+

Variants§

§

Call

Contract call.

+
§

Create

Contract creation.

+
§

Selfdestruct

Contract suicide/selfdestruct.

+
§

Reward

A block reward.

+

Trait Implementations§

source§

impl Clone for ActionType

source§

fn clone(&self) -> ActionType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ActionType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ActionType

source§

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 PartialEq for ActionType

source§

fn eq(&self, other: &ActionType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ActionType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ActionType

source§

impl StructuralEq for ActionType

source§

impl StructuralPartialEq for ActionType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Call: 0 bytes
  • Create: 0 bytes
  • Selfdestruct: 0 bytes
  • Reward: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.CallType.html b/alloy_rpc_types/trace/enum.CallType.html new file mode 100644 index 000000000000..c2318714851a --- /dev/null +++ b/alloy_rpc_types/trace/enum.CallType.html @@ -0,0 +1,36 @@ +CallType in alloy_rpc_types::trace - Rust +
pub enum CallType {
+    None,
+    Call,
+    CallCode,
+    DelegateCall,
+    StaticCall,
+}
Expand description

Call type.

+

Variants§

§

None

None

+
§

Call

Call

+
§

CallCode

Call code

+
§

DelegateCall

Delegate call

+
§

StaticCall

Static call

+

Trait Implementations§

source§

impl Clone for CallType

source§

fn clone(&self) -> CallType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallType

source§

fn default() -> CallType

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallType

source§

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 PartialEq for CallType

source§

fn eq(&self, other: &CallType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallType

source§

impl StructuralEq for CallType

source§

impl StructuralPartialEq for CallType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • None: 0 bytes
  • Call: 0 bytes
  • CallCode: 0 bytes
  • DelegateCall: 0 bytes
  • StaticCall: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.Delta.html b/alloy_rpc_types/trace/enum.Delta.html new file mode 100644 index 000000000000..327648e47fb9 --- /dev/null +++ b/alloy_rpc_types/trace/enum.Delta.html @@ -0,0 +1,46 @@ +Delta in alloy_rpc_types::trace - Rust +
pub enum Delta<T> {
+    Unchanged,
+    Added(T),
+    Removed(T),
+    Changed(ChangedType<T>),
+}
Expand description

Delta type

+

Variants§

§

Unchanged

Unchanged variant.

+
§

Added(T)

Added variant.

+
§

Removed(T)

Removed variant.

+
§

Changed(ChangedType<T>)

Changed variant.

+

Implementations§

source§

impl<T> Delta<T>

source

pub fn changed(from: T, to: T) -> Self

Creates a new Delta::Changed variant

+
source

pub fn is_unchanged(&self) -> bool

Returns true if the value is unchanged

+
source

pub fn is_added(&self) -> bool

Returns true if the value is added

+
source

pub fn is_removed(&self) -> bool

Returns true if the value is removed

+
source

pub fn is_changed(&self) -> bool

Returns true if the value is changed

+

Trait Implementations§

source§

impl<T: Clone> Clone for Delta<T>

source§

fn clone(&self) -> Delta<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Delta<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for Delta<T>

source§

fn default() -> Delta<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for Delta<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for Delta<T>

source§

fn eq(&self, other: &Delta<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for Delta<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for Delta<T>

source§

impl<T> StructuralEq for Delta<T>

source§

impl<T> StructuralPartialEq for Delta<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Delta<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Delta<T>
where + T: Send,

§

impl<T> Sync for Delta<T>
where + T: Sync,

§

impl<T> Unpin for Delta<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Delta<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.DiffStateKind.html b/alloy_rpc_types/trace/enum.DiffStateKind.html new file mode 100644 index 000000000000..6fe1a1858b67 --- /dev/null +++ b/alloy_rpc_types/trace/enum.DiffStateKind.html @@ -0,0 +1,29 @@ +DiffStateKind in alloy_rpc_types::trace - Rust +
pub enum DiffStateKind {
+    Pre,
+    Post,
+}
Expand description

Helper type for DiffMode to represent a specific set

+

Variants§

§

Pre

Corresponds to the pre state of the DiffMode

+
§

Post

Corresponds to the post state of the DiffMode

+

Implementations§

source§

impl DiffStateKind

source

pub fn is_pre(&self) -> bool

Returns true if this is the pre state of the DiffMode

+
source

pub fn is_post(&self) -> bool

Returns true if this is the post state of the DiffMode

+

Trait Implementations§

source§

impl Clone for DiffStateKind

source§

fn clone(&self) -> DiffStateKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffStateKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DiffStateKind

source§

fn eq(&self, other: &DiffStateKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for DiffStateKind

source§

impl Eq for DiffStateKind

source§

impl StructuralEq for DiffStateKind

source§

impl StructuralPartialEq for DiffStateKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • Pre: 0 bytes
  • Post: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.GethDebugBuiltInTracerType.html b/alloy_rpc_types/trace/enum.GethDebugBuiltInTracerType.html new file mode 100644 index 000000000000..633e6beee01e --- /dev/null +++ b/alloy_rpc_types/trace/enum.GethDebugBuiltInTracerType.html @@ -0,0 +1,47 @@ +GethDebugBuiltInTracerType in alloy_rpc_types::trace - Rust +
pub enum GethDebugBuiltInTracerType {
+    FourByteTracer,
+    CallTracer,
+    PreStateTracer,
+    NoopTracer,
+}
Expand description

Variants§

§

FourByteTracer

The 4byteTracer collects the function selectors of every function executed in the lifetime +of a transaction, along with the size of the supplied call data. The result is a +FourByteFrame where the keys are SELECTOR-CALLDATASIZE and the values are number of +occurrences of this key.

+
§

CallTracer

The callTracer tracks all the call frames executed during a transaction, including depth 0. +The result will be a nested list of call frames, resembling how EVM works. They form a tree +with the top-level call at root and sub-calls as children of the higher levels.

+
§

PreStateTracer

The prestate tracer has two modes: prestate and diff. The prestate mode returns the +accounts necessary to execute a given transaction. diff mode returns the differences +between the transaction’s pre and post-state (i.e. what changed because the transaction +happened). The prestateTracer defaults to prestate mode. It reexecutes the given +transaction and tracks every part of state that is touched. This is similar to the concept +of a stateless witness, the difference being this tracer doesn’t return any cryptographic +proof, rather only the trie leaves. The result is an object. The keys are addresses of +accounts.

+
§

NoopTracer

This tracer is noop. It returns an empty object and is only meant for testing the setup.

+

Trait Implementations§

source§

impl Clone for GethDebugBuiltInTracerType

source§

fn clone(&self) -> GethDebugBuiltInTracerType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugBuiltInTracerType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethDebugBuiltInTracerType

source§

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<GethDebugBuiltInTracerType> for GethDebugTracerType

source§

fn from(value: GethDebugBuiltInTracerType) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugBuiltInTracerType

source§

fn eq(&self, other: &GethDebugBuiltInTracerType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugBuiltInTracerType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugBuiltInTracerType

source§

impl StructuralEq for GethDebugBuiltInTracerType

source§

impl StructuralPartialEq for GethDebugBuiltInTracerType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • FourByteTracer: 0 bytes
  • CallTracer: 0 bytes
  • PreStateTracer: 0 bytes
  • NoopTracer: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.GethDebugTracerType.html b/alloy_rpc_types/trace/enum.GethDebugTracerType.html new file mode 100644 index 000000000000..570bb87bda95 --- /dev/null +++ b/alloy_rpc_types/trace/enum.GethDebugTracerType.html @@ -0,0 +1,31 @@ +GethDebugTracerType in alloy_rpc_types::trace - Rust +
pub enum GethDebugTracerType {
+    BuiltInTracer(GethDebugBuiltInTracerType),
+    JsTracer(String),
+}
Expand description

Variants§

§

BuiltInTracer(GethDebugBuiltInTracerType)

built-in tracer

+
§

JsTracer(String)

custom JS tracer

+

Trait Implementations§

source§

impl Clone for GethDebugTracerType

source§

fn clone(&self) -> GethDebugTracerType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracerType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracerType

source§

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<GethDebugBuiltInTracerType> for GethDebugTracerType

source§

fn from(value: GethDebugBuiltInTracerType) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugTracerType

source§

fn eq(&self, other: &GethDebugTracerType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracerType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracerType

source§

impl StructuralEq for GethDebugTracerType

source§

impl StructuralPartialEq for GethDebugTracerType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

Size for each variant:

  • BuiltInTracer: 9 bytes
  • JsTracer: 24 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.GethTrace.html b/alloy_rpc_types/trace/enum.GethTrace.html new file mode 100644 index 000000000000..fbb53cf93461 --- /dev/null +++ b/alloy_rpc_types/trace/enum.GethTrace.html @@ -0,0 +1,41 @@ +GethTrace in alloy_rpc_types::trace - Rust +
pub enum GethTrace {
+    Default(DefaultFrame),
+    CallTracer(CallFrame),
+    FourByteTracer(FourByteFrame),
+    PreStateTracer(PreStateFrame),
+    NoopTracer(NoopFrame),
+    JS(Value),
+}
Expand description

Tracing response objects

+

Note: This deserializes untagged, so it’s possible that a custom javascript tracer response +matches another variant, for example a js tracer that returns {} would be deserialized as +GethTrace::NoopTracer

+

Variants§

§

Default(DefaultFrame)

The response for the default struct log tracer

+
§

CallTracer(CallFrame)

The response for call tracer

+
§

FourByteTracer(FourByteFrame)

The response for four byte tracer

+
§

PreStateTracer(PreStateFrame)

The response for pre-state byte tracer

+
§

NoopTracer(NoopFrame)

An empty json response

+
§

JS(Value)

Any other trace response, such as custom javascript response objects

+

Trait Implementations§

source§

impl Clone for GethTrace

source§

fn clone(&self) -> GethTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethTrace

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl From<DefaultFrame> for GethTrace

source§

fn from(value: DefaultFrame) -> Self

Converts to this type from the input type.
source§

impl From<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl From<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl From<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethTrace

source§

fn eq(&self, other: &GethTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethTrace

source§

impl StructuralEq for GethTrace

source§

impl StructuralPartialEq for GethTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

Size for each variant:

  • Default: 80 bytes
  • CallTracer: 336 bytes
  • FourByteTracer: 32 bytes
  • PreStateTracer: 64 bytes
  • NoopTracer: 32 bytes
  • JS: 40 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.PreStateFrame.html b/alloy_rpc_types/trace/enum.PreStateFrame.html new file mode 100644 index 000000000000..1dd87bba776c --- /dev/null +++ b/alloy_rpc_types/trace/enum.PreStateFrame.html @@ -0,0 +1,40 @@ +PreStateFrame in alloy_rpc_types::trace - Rust +
pub enum PreStateFrame {
+    Default(PreStateMode),
+    Diff(DiffMode),
+}
Expand description

Variants§

§

Default(PreStateMode)

The default mode returns the accounts necessary to execute a given transaction.

+

It re-executes the given transaction and tracks every part of state that is touched.

+
§

Diff(DiffMode)

Diff mode returns the differences between the transaction’s pre and post-state (i.e. what +changed because the transaction happened).

+

Implementations§

source§

impl PreStateFrame

source

pub fn is_default(&self) -> bool

Returns true if this trace was requested without diffmode.

+
source

pub fn is_diff(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn as_default(&self) -> Option<&PreStateMode>

Returns the account states after the transaction is executed if this trace was requested +without diffmode.

+
source

pub fn as_diff(&self) -> Option<&DiffMode>

Returns the account states before and after the transaction is executed if this trace was +requested with diffmode.

+

Trait Implementations§

source§

impl Clone for PreStateFrame

source§

fn clone(&self) -> PreStateFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PreStateFrame

source§

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<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PreStateFrame

source§

fn eq(&self, other: &PreStateFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateFrame

source§

impl StructuralEq for PreStateFrame

source§

impl StructuralPartialEq for PreStateFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

Size for each variant:

  • Default: 24 bytes
  • Diff: 48 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.RewardType.html b/alloy_rpc_types/trace/enum.RewardType.html new file mode 100644 index 000000000000..f84ca1224457 --- /dev/null +++ b/alloy_rpc_types/trace/enum.RewardType.html @@ -0,0 +1,30 @@ +RewardType in alloy_rpc_types::trace - Rust +
pub enum RewardType {
+    Block,
+    Uncle,
+}
Expand description

Reward type.

+

Variants§

§

Block

Block

+
§

Uncle

Uncle

+

Trait Implementations§

source§

impl Clone for RewardType

source§

fn clone(&self) -> RewardType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RewardType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RewardType

source§

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 PartialEq for RewardType

source§

fn eq(&self, other: &RewardType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RewardType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RewardType

source§

impl StructuralEq for RewardType

source§

impl StructuralPartialEq for RewardType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Block: 0 bytes
  • Uncle: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.TraceFilterMode.html b/alloy_rpc_types/trace/enum.TraceFilterMode.html new file mode 100644 index 000000000000..a9f4131fa80a --- /dev/null +++ b/alloy_rpc_types/trace/enum.TraceFilterMode.html @@ -0,0 +1,30 @@ +TraceFilterMode in alloy_rpc_types::trace - Rust +
pub enum TraceFilterMode {
+    Union,
+    Intersection,
+}
Expand description

How to apply from_address and to_address filters.

+

Variants§

§

Union

Return traces for transactions with matching from OR to addresses.

+
§

Intersection

Only return traces for transactions with matching from and to addresses.

+

Trait Implementations§

source§

impl Clone for TraceFilterMode

source§

fn clone(&self) -> TraceFilterMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilterMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceFilterMode

source§

fn default() -> TraceFilterMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceFilterMode

source§

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 PartialEq for TraceFilterMode

source§

fn eq(&self, other: &TraceFilterMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceFilterMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TraceFilterMode

source§

impl Eq for TraceFilterMode

source§

impl StructuralEq for TraceFilterMode

source§

impl StructuralPartialEq for TraceFilterMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Union: 0 bytes
  • Intersection: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.TraceOutput.html b/alloy_rpc_types/trace/enum.TraceOutput.html new file mode 100644 index 000000000000..2edddfa1a5c0 --- /dev/null +++ b/alloy_rpc_types/trace/enum.TraceOutput.html @@ -0,0 +1,32 @@ +TraceOutput in alloy_rpc_types::trace - Rust +
pub enum TraceOutput {
+    Call(CallOutput),
+    Create(CreateOutput),
+}
Expand description

Represents the output of a trace.

+

Variants§

§

Call(CallOutput)

Output of a regular call transaction.

+
§

Create(CreateOutput)

Output of a CREATE transaction.

+

Implementations§

source§

impl TraceOutput

source

pub fn gas_used(&self) -> U64

Returns the gas used by this trace.

+
source

pub fn set_gas_used(&mut self, gas_used: u64)

Sets the gas used by this trace.

+

Trait Implementations§

source§

impl Clone for TraceOutput

source§

fn clone(&self) -> TraceOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceOutput

source§

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 PartialEq for TraceOutput

source§

fn eq(&self, other: &TraceOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceOutput

source§

impl StructuralEq for TraceOutput

source§

impl StructuralPartialEq for TraceOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

Size for each variant:

  • Call: 48 bytes
  • Create: 64 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/enum.TraceType.html b/alloy_rpc_types/trace/enum.TraceType.html new file mode 100644 index 000000000000..0b132ff440df --- /dev/null +++ b/alloy_rpc_types/trace/enum.TraceType.html @@ -0,0 +1,36 @@ +TraceType in alloy_rpc_types::trace - Rust +
pub enum TraceType {
+    Trace,
+    VmTrace,
+    StateDiff,
+}
Expand description

Different Trace diagnostic targets.

+

Variants§

§

Trace

Default trace

+
§

VmTrace

Provides a full trace of the VM’s state throughout the execution of the transaction, +including for any subcalls.

+
§

StateDiff

Provides information detailing all altered portions of the Ethereum state made due to the +execution of the transaction.

+

Trait Implementations§

source§

impl Clone for TraceType

source§

fn clone(&self) -> TraceType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceType

source§

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 Hash for TraceType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for TraceType

source§

fn eq(&self, other: &TraceType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceType

source§

impl StructuralEq for TraceType

source§

impl StructuralPartialEq for TraceType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Trace: 0 bytes
  • VmTrace: 0 bytes
  • StateDiff: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/filter/enum.TraceFilterMode.html b/alloy_rpc_types/trace/filter/enum.TraceFilterMode.html new file mode 100644 index 000000000000..7303cdb7ed94 --- /dev/null +++ b/alloy_rpc_types/trace/filter/enum.TraceFilterMode.html @@ -0,0 +1,30 @@ +TraceFilterMode in alloy_rpc_types::trace::filter - Rust +
pub enum TraceFilterMode {
+    Union,
+    Intersection,
+}
Expand description

How to apply from_address and to_address filters.

+

Variants§

§

Union

Return traces for transactions with matching from OR to addresses.

+
§

Intersection

Only return traces for transactions with matching from and to addresses.

+

Trait Implementations§

source§

impl Clone for TraceFilterMode

source§

fn clone(&self) -> TraceFilterMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilterMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceFilterMode

source§

fn default() -> TraceFilterMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceFilterMode

source§

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 PartialEq for TraceFilterMode

source§

fn eq(&self, other: &TraceFilterMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceFilterMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for TraceFilterMode

source§

impl Eq for TraceFilterMode

source§

impl StructuralEq for TraceFilterMode

source§

impl StructuralPartialEq for TraceFilterMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Union: 0 bytes
  • Intersection: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/filter/index.html b/alloy_rpc_types/trace/filter/index.html new file mode 100644 index 000000000000..040e9e7ca79d --- /dev/null +++ b/alloy_rpc_types/trace/filter/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::trace::filter - Rust +
Expand description

trace_filter types and support

+

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/trace/filter/sidebar-items.js b/alloy_rpc_types/trace/filter/sidebar-items.js new file mode 100644 index 000000000000..0e2c7b75bb46 --- /dev/null +++ b/alloy_rpc_types/trace/filter/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TraceFilterMode"],"struct":["TraceFilter","TraceFilterMatcher"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/filter/struct.TraceFilter.html b/alloy_rpc_types/trace/filter/struct.TraceFilter.html new file mode 100644 index 000000000000..b31a8ba2ae7d --- /dev/null +++ b/alloy_rpc_types/trace/filter/struct.TraceFilter.html @@ -0,0 +1,41 @@ +TraceFilter in alloy_rpc_types::trace::filter - Rust +
pub struct TraceFilter {
+    pub from_block: Option<u64>,
+    pub to_block: Option<u64>,
+    pub from_address: Vec<Address>,
+    pub to_address: Vec<Address>,
+    pub mode: TraceFilterMode,
+    pub after: Option<u64>,
+    pub count: Option<u64>,
+}
Expand description

Trace filter.

+

Fields§

§from_block: Option<u64>

From block

+
§to_block: Option<u64>

To block

+
§from_address: Vec<Address>

From address

+
§to_address: Vec<Address>

To address

+
§mode: TraceFilterMode

How to apply from_address and to_address filters.

+
§after: Option<u64>

Output offset

+
§count: Option<u64>

Output amount

+

Implementations§

source§

impl TraceFilter

source

pub fn matcher(&self) -> TraceFilterMatcher

Returns a TraceFilterMatcher for this filter.

+

Trait Implementations§

source§

impl Clone for TraceFilter

source§

fn clone(&self) -> TraceFilter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceFilter

source§

fn default() -> TraceFilter

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceFilter

source§

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 PartialEq for TraceFilter

source§

fn eq(&self, other: &TraceFilter) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceFilter

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceFilter

source§

impl StructuralEq for TraceFilter

source§

impl StructuralPartialEq for TraceFilter

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/filter/struct.TraceFilterMatcher.html b/alloy_rpc_types/trace/filter/struct.TraceFilterMatcher.html new file mode 100644 index 000000000000..4fb0c9e30e06 --- /dev/null +++ b/alloy_rpc_types/trace/filter/struct.TraceFilterMatcher.html @@ -0,0 +1,27 @@ +TraceFilterMatcher in alloy_rpc_types::trace::filter - Rust +
pub struct TraceFilterMatcher {
+    mode: TraceFilterMode,
+    from_addresses: HashSet<Address>,
+    to_addresses: HashSet<Address>,
+}
Expand description

Helper type for matching from and to addresses. Empty sets match all addresses.

+

Fields§

§mode: TraceFilterMode§from_addresses: HashSet<Address>§to_addresses: HashSet<Address>

Implementations§

source§

impl TraceFilterMatcher

source

pub fn matches(&self, from: Address, to: Option<Address>) -> bool

Returns true if the given from and to addresses match this filter.

+

Trait Implementations§

source§

impl Clone for TraceFilterMatcher

source§

fn clone(&self) -> TraceFilterMatcher

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilterMatcher

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for TraceFilterMatcher

source§

fn eq(&self, other: &TraceFilterMatcher) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for TraceFilterMatcher

source§

impl StructuralEq for TraceFilterMatcher

source§

impl StructuralPartialEq for TraceFilterMatcher

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 104 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/four_byte/index.html b/alloy_rpc_types/trace/four_byte/index.html new file mode 100644 index 000000000000..fa29380b94ad --- /dev/null +++ b/alloy_rpc_types/trace/four_byte/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::trace::four_byte - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/trace/four_byte/sidebar-items.js b/alloy_rpc_types/trace/four_byte/sidebar-items.js new file mode 100644 index 000000000000..6976f866f430 --- /dev/null +++ b/alloy_rpc_types/trace/four_byte/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["FourByteFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/four_byte/struct.FourByteFrame.html b/alloy_rpc_types/trace/four_byte/struct.FourByteFrame.html new file mode 100644 index 000000000000..50dd4b5bbf24 --- /dev/null +++ b/alloy_rpc_types/trace/four_byte/struct.FourByteFrame.html @@ -0,0 +1,25 @@ +FourByteFrame in alloy_rpc_types::trace::four_byte - Rust +
pub struct FourByteFrame(pub BTreeMap<String, u64>);
Expand description

Tuple Fields§

§0: BTreeMap<String, u64>

Trait Implementations§

source§

impl Clone for FourByteFrame

source§

fn clone(&self) -> FourByteFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FourByteFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FourByteFrame

source§

fn default() -> FourByteFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FourByteFrame

source§

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<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for FourByteFrame

source§

fn eq(&self, other: &FourByteFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FourByteFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FourByteFrame

source§

impl StructuralEq for FourByteFrame

source§

impl StructuralPartialEq for FourByteFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/call/index.html b/alloy_rpc_types/trace/geth/call/index.html new file mode 100644 index 000000000000..757f9db964e1 --- /dev/null +++ b/alloy_rpc_types/trace/geth/call/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::trace::geth::call - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/call/sidebar-items.js b/alloy_rpc_types/trace/geth/call/sidebar-items.js new file mode 100644 index 000000000000..6ccba397fe52 --- /dev/null +++ b/alloy_rpc_types/trace/geth/call/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["CallConfig","CallFrame","CallLogFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/call/struct.CallConfig.html b/alloy_rpc_types/trace/geth/call/struct.CallConfig.html new file mode 100644 index 000000000000..37cb7ed75835 --- /dev/null +++ b/alloy_rpc_types/trace/geth/call/struct.CallConfig.html @@ -0,0 +1,31 @@ +CallConfig in alloy_rpc_types::trace::geth::call - Rust +
pub struct CallConfig {
+    pub only_top_call: Option<bool>,
+    pub with_log: Option<bool>,
+}

Fields§

§only_top_call: Option<bool>

When set to true, this will only trace the primary (top-level) call and not any sub-calls. +It eliminates the additional processing for each call frame

+
§with_log: Option<bool>

Implementations§

source§

impl CallConfig

source

pub fn only_top_call(self) -> Self

Sets the only top call flag

+
source

pub fn with_log(self) -> Self

Sets the with log flag

+

Trait Implementations§

source§

impl Clone for CallConfig

source§

fn clone(&self) -> CallConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallConfig

source§

fn default() -> CallConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallConfig

source§

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 PartialEq for CallConfig

source§

fn eq(&self, other: &CallConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallConfig

source§

impl StructuralEq for CallConfig

source§

impl StructuralPartialEq for CallConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 2 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/call/struct.CallFrame.html b/alloy_rpc_types/trace/geth/call/struct.CallFrame.html new file mode 100644 index 000000000000..700c31dd5530 --- /dev/null +++ b/alloy_rpc_types/trace/geth/call/struct.CallFrame.html @@ -0,0 +1,39 @@ +CallFrame in alloy_rpc_types::trace::geth::call - Rust +
pub struct CallFrame {
+    pub from: Address,
+    pub gas: U256,
+    pub gas_used: U256,
+    pub to: Option<Address>,
+    pub input: Bytes,
+    pub output: Option<Bytes>,
+    pub error: Option<String>,
+    pub revert_reason: Option<String>,
+    pub calls: Vec<CallFrame>,
+    pub logs: Vec<CallLogFrame>,
+    pub value: Option<U256>,
+    pub typ: String,
+}
Expand description

The response object for debug_traceTransaction with "tracer": "callTracer"

+

https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/call.go#L44

+

Fields§

§from: Address§gas: U256§gas_used: U256§to: Option<Address>§input: Bytes§output: Option<Bytes>§error: Option<String>§revert_reason: Option<String>§calls: Vec<CallFrame>§logs: Vec<CallLogFrame>§value: Option<U256>§typ: String

Trait Implementations§

source§

impl Clone for CallFrame

source§

fn clone(&self) -> CallFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallFrame

source§

fn default() -> CallFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallFrame

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CallFrame

source§

fn eq(&self, other: &CallFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallFrame

source§

impl StructuralEq for CallFrame

source§

impl StructuralPartialEq for CallFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/call/struct.CallLogFrame.html b/alloy_rpc_types/trace/geth/call/struct.CallLogFrame.html new file mode 100644 index 000000000000..125764e974d6 --- /dev/null +++ b/alloy_rpc_types/trace/geth/call/struct.CallLogFrame.html @@ -0,0 +1,28 @@ +CallLogFrame in alloy_rpc_types::trace::geth::call - Rust +
pub struct CallLogFrame {
+    pub address: Option<Address>,
+    pub topics: Option<Vec<B256>>,
+    pub data: Option<Bytes>,
+}

Fields§

§address: Option<Address>§topics: Option<Vec<B256>>§data: Option<Bytes>

Trait Implementations§

source§

impl Clone for CallLogFrame

source§

fn clone(&self) -> CallLogFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallLogFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallLogFrame

source§

fn default() -> CallLogFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallLogFrame

source§

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 PartialEq for CallLogFrame

source§

fn eq(&self, other: &CallLogFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallLogFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallLogFrame

source§

impl StructuralEq for CallLogFrame

source§

impl StructuralPartialEq for CallLogFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/enum.AccountChangeKind.html b/alloy_rpc_types/trace/geth/enum.AccountChangeKind.html new file mode 100644 index 000000000000..3a64fa599589 --- /dev/null +++ b/alloy_rpc_types/trace/geth/enum.AccountChangeKind.html @@ -0,0 +1,34 @@ +AccountChangeKind in alloy_rpc_types::trace::geth - Rust +
pub enum AccountChangeKind {
+    Modify,
+    Create,
+    SelfDestruct,
+}
Expand description

Helper type to track the kind of change of an AccountState.

+

Variants§

§

Modify

§

Create

§

SelfDestruct

Implementations§

source§

impl AccountChangeKind

source

pub fn is_created(&self) -> bool

Returns true if the account was created

+
source

pub fn is_modified(&self) -> bool

Returns true the account was modified

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true the account was modified

+

Trait Implementations§

source§

impl Clone for AccountChangeKind

source§

fn clone(&self) -> AccountChangeKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountChangeKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountChangeKind

source§

fn default() -> AccountChangeKind

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountChangeKind

source§

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 Hash for AccountChangeKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountChangeKind

source§

fn eq(&self, other: &AccountChangeKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountChangeKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountChangeKind

source§

impl StructuralEq for AccountChangeKind

source§

impl StructuralPartialEq for AccountChangeKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Modify: 0 bytes
  • Create: 0 bytes
  • SelfDestruct: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/enum.DiffStateKind.html b/alloy_rpc_types/trace/geth/enum.DiffStateKind.html new file mode 100644 index 000000000000..e027527fd685 --- /dev/null +++ b/alloy_rpc_types/trace/geth/enum.DiffStateKind.html @@ -0,0 +1,29 @@ +DiffStateKind in alloy_rpc_types::trace::geth - Rust +
pub enum DiffStateKind {
+    Pre,
+    Post,
+}
Expand description

Helper type for DiffMode to represent a specific set

+

Variants§

§

Pre

Corresponds to the pre state of the DiffMode

+
§

Post

Corresponds to the post state of the DiffMode

+

Implementations§

source§

impl DiffStateKind

source

pub fn is_pre(&self) -> bool

Returns true if this is the pre state of the DiffMode

+
source

pub fn is_post(&self) -> bool

Returns true if this is the post state of the DiffMode

+

Trait Implementations§

source§

impl Clone for DiffStateKind

source§

fn clone(&self) -> DiffStateKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffStateKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DiffStateKind

source§

fn eq(&self, other: &DiffStateKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for DiffStateKind

source§

impl Eq for DiffStateKind

source§

impl StructuralEq for DiffStateKind

source§

impl StructuralPartialEq for DiffStateKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • Pre: 0 bytes
  • Post: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/enum.GethDebugBuiltInTracerType.html b/alloy_rpc_types/trace/geth/enum.GethDebugBuiltInTracerType.html new file mode 100644 index 000000000000..34d9023a7c50 --- /dev/null +++ b/alloy_rpc_types/trace/geth/enum.GethDebugBuiltInTracerType.html @@ -0,0 +1,47 @@ +GethDebugBuiltInTracerType in alloy_rpc_types::trace::geth - Rust +
pub enum GethDebugBuiltInTracerType {
+    FourByteTracer,
+    CallTracer,
+    PreStateTracer,
+    NoopTracer,
+}
Expand description

Variants§

§

FourByteTracer

The 4byteTracer collects the function selectors of every function executed in the lifetime +of a transaction, along with the size of the supplied call data. The result is a +FourByteFrame where the keys are SELECTOR-CALLDATASIZE and the values are number of +occurrences of this key.

+
§

CallTracer

The callTracer tracks all the call frames executed during a transaction, including depth 0. +The result will be a nested list of call frames, resembling how EVM works. They form a tree +with the top-level call at root and sub-calls as children of the higher levels.

+
§

PreStateTracer

The prestate tracer has two modes: prestate and diff. The prestate mode returns the +accounts necessary to execute a given transaction. diff mode returns the differences +between the transaction’s pre and post-state (i.e. what changed because the transaction +happened). The prestateTracer defaults to prestate mode. It reexecutes the given +transaction and tracks every part of state that is touched. This is similar to the concept +of a stateless witness, the difference being this tracer doesn’t return any cryptographic +proof, rather only the trie leaves. The result is an object. The keys are addresses of +accounts.

+
§

NoopTracer

This tracer is noop. It returns an empty object and is only meant for testing the setup.

+

Trait Implementations§

source§

impl Clone for GethDebugBuiltInTracerType

source§

fn clone(&self) -> GethDebugBuiltInTracerType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugBuiltInTracerType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethDebugBuiltInTracerType

source§

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<GethDebugBuiltInTracerType> for GethDebugTracerType

source§

fn from(value: GethDebugBuiltInTracerType) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugBuiltInTracerType

source§

fn eq(&self, other: &GethDebugBuiltInTracerType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugBuiltInTracerType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugBuiltInTracerType

source§

impl StructuralEq for GethDebugBuiltInTracerType

source§

impl StructuralPartialEq for GethDebugBuiltInTracerType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • FourByteTracer: 0 bytes
  • CallTracer: 0 bytes
  • PreStateTracer: 0 bytes
  • NoopTracer: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/enum.GethDebugTracerType.html b/alloy_rpc_types/trace/geth/enum.GethDebugTracerType.html new file mode 100644 index 000000000000..8c14f2b13aa9 --- /dev/null +++ b/alloy_rpc_types/trace/geth/enum.GethDebugTracerType.html @@ -0,0 +1,31 @@ +GethDebugTracerType in alloy_rpc_types::trace::geth - Rust +
pub enum GethDebugTracerType {
+    BuiltInTracer(GethDebugBuiltInTracerType),
+    JsTracer(String),
+}
Expand description

Variants§

§

BuiltInTracer(GethDebugBuiltInTracerType)

built-in tracer

+
§

JsTracer(String)

custom JS tracer

+

Trait Implementations§

source§

impl Clone for GethDebugTracerType

source§

fn clone(&self) -> GethDebugTracerType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracerType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracerType

source§

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<GethDebugBuiltInTracerType> for GethDebugTracerType

source§

fn from(value: GethDebugBuiltInTracerType) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugTracerType

source§

fn eq(&self, other: &GethDebugTracerType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracerType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracerType

source§

impl StructuralEq for GethDebugTracerType

source§

impl StructuralPartialEq for GethDebugTracerType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

Size for each variant:

  • BuiltInTracer: 9 bytes
  • JsTracer: 24 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/enum.GethTrace.html b/alloy_rpc_types/trace/geth/enum.GethTrace.html new file mode 100644 index 000000000000..ad17e9a7349e --- /dev/null +++ b/alloy_rpc_types/trace/geth/enum.GethTrace.html @@ -0,0 +1,41 @@ +GethTrace in alloy_rpc_types::trace::geth - Rust +
pub enum GethTrace {
+    Default(DefaultFrame),
+    CallTracer(CallFrame),
+    FourByteTracer(FourByteFrame),
+    PreStateTracer(PreStateFrame),
+    NoopTracer(NoopFrame),
+    JS(Value),
+}
Expand description

Tracing response objects

+

Note: This deserializes untagged, so it’s possible that a custom javascript tracer response +matches another variant, for example a js tracer that returns {} would be deserialized as +GethTrace::NoopTracer

+

Variants§

§

Default(DefaultFrame)

The response for the default struct log tracer

+
§

CallTracer(CallFrame)

The response for call tracer

+
§

FourByteTracer(FourByteFrame)

The response for four byte tracer

+
§

PreStateTracer(PreStateFrame)

The response for pre-state byte tracer

+
§

NoopTracer(NoopFrame)

An empty json response

+
§

JS(Value)

Any other trace response, such as custom javascript response objects

+

Trait Implementations§

source§

impl Clone for GethTrace

source§

fn clone(&self) -> GethTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GethTrace

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl From<DefaultFrame> for GethTrace

source§

fn from(value: DefaultFrame) -> Self

Converts to this type from the input type.
source§

impl From<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl From<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl From<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethTrace

source§

fn eq(&self, other: &GethTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethTrace

source§

impl StructuralEq for GethTrace

source§

impl StructuralPartialEq for GethTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

Size for each variant:

  • Default: 80 bytes
  • CallTracer: 336 bytes
  • FourByteTracer: 32 bytes
  • PreStateTracer: 64 bytes
  • NoopTracer: 32 bytes
  • JS: 40 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/enum.PreStateFrame.html b/alloy_rpc_types/trace/geth/enum.PreStateFrame.html new file mode 100644 index 000000000000..611fe1b78619 --- /dev/null +++ b/alloy_rpc_types/trace/geth/enum.PreStateFrame.html @@ -0,0 +1,40 @@ +PreStateFrame in alloy_rpc_types::trace::geth - Rust +
pub enum PreStateFrame {
+    Default(PreStateMode),
+    Diff(DiffMode),
+}
Expand description

Variants§

§

Default(PreStateMode)

The default mode returns the accounts necessary to execute a given transaction.

+

It re-executes the given transaction and tracks every part of state that is touched.

+
§

Diff(DiffMode)

Diff mode returns the differences between the transaction’s pre and post-state (i.e. what +changed because the transaction happened).

+

Implementations§

source§

impl PreStateFrame

source

pub fn is_default(&self) -> bool

Returns true if this trace was requested without diffmode.

+
source

pub fn is_diff(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn as_default(&self) -> Option<&PreStateMode>

Returns the account states after the transaction is executed if this trace was requested +without diffmode.

+
source

pub fn as_diff(&self) -> Option<&DiffMode>

Returns the account states before and after the transaction is executed if this trace was +requested with diffmode.

+

Trait Implementations§

source§

impl Clone for PreStateFrame

source§

fn clone(&self) -> PreStateFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PreStateFrame

source§

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<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PreStateFrame

source§

fn eq(&self, other: &PreStateFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateFrame

source§

impl StructuralEq for PreStateFrame

source§

impl StructuralPartialEq for PreStateFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

Size for each variant:

  • Default: 24 bytes
  • Diff: 48 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/four_byte/index.html b/alloy_rpc_types/trace/geth/four_byte/index.html new file mode 100644 index 000000000000..8704aefb4ae7 --- /dev/null +++ b/alloy_rpc_types/trace/geth/four_byte/index.html @@ -0,0 +1,2 @@ +alloy_rpc_types::trace::geth::four_byte - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/four_byte/sidebar-items.js b/alloy_rpc_types/trace/geth/four_byte/sidebar-items.js new file mode 100644 index 000000000000..6976f866f430 --- /dev/null +++ b/alloy_rpc_types/trace/geth/four_byte/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["FourByteFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/four_byte/struct.FourByteFrame.html b/alloy_rpc_types/trace/geth/four_byte/struct.FourByteFrame.html new file mode 100644 index 000000000000..accf15dd06e3 --- /dev/null +++ b/alloy_rpc_types/trace/geth/four_byte/struct.FourByteFrame.html @@ -0,0 +1,25 @@ +FourByteFrame in alloy_rpc_types::trace::geth::four_byte - Rust +
pub struct FourByteFrame(pub BTreeMap<String, u64>);
Expand description

Tuple Fields§

§0: BTreeMap<String, u64>

Trait Implementations§

source§

impl Clone for FourByteFrame

source§

fn clone(&self) -> FourByteFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FourByteFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FourByteFrame

source§

fn default() -> FourByteFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FourByteFrame

source§

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<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for FourByteFrame

source§

fn eq(&self, other: &FourByteFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FourByteFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FourByteFrame

source§

impl StructuralEq for FourByteFrame

source§

impl StructuralPartialEq for FourByteFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/index.html b/alloy_rpc_types/trace/geth/index.html new file mode 100644 index 000000000000..d1786a2032e3 --- /dev/null +++ b/alloy_rpc_types/trace/geth/index.html @@ -0,0 +1,6 @@ +alloy_rpc_types::trace::geth - Rust +

Module alloy_rpc_types::trace::geth

source ·
Expand description

Geth tracing types

+

Modules

Structs

Enums

Type Aliases

  • Result type for geth style transaction trace
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/noop/index.html b/alloy_rpc_types/trace/geth/noop/index.html new file mode 100644 index 000000000000..783cfe9cba72 --- /dev/null +++ b/alloy_rpc_types/trace/geth/noop/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::trace::geth::noop - Rust +

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/noop/sidebar-items.js b/alloy_rpc_types/trace/geth/noop/sidebar-items.js new file mode 100644 index 000000000000..42deba610ab8 --- /dev/null +++ b/alloy_rpc_types/trace/geth/noop/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["NoopFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/noop/struct.NoopFrame.html b/alloy_rpc_types/trace/geth/noop/struct.NoopFrame.html new file mode 100644 index 000000000000..d73a02e675d5 --- /dev/null +++ b/alloy_rpc_types/trace/geth/noop/struct.NoopFrame.html @@ -0,0 +1,26 @@ +NoopFrame in alloy_rpc_types::trace::geth::noop - Rust +
pub struct NoopFrame(BTreeMap<Null, Null>);
Expand description

Tuple Fields§

§0: BTreeMap<Null, Null>

Trait Implementations§

source§

impl Clone for NoopFrame

source§

fn clone(&self) -> NoopFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NoopFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for NoopFrame

source§

fn default() -> NoopFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for NoopFrame

source§

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<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for NoopFrame

source§

fn eq(&self, other: &NoopFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NoopFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NoopFrame

source§

impl StructuralEq for NoopFrame

source§

impl StructuralPartialEq for NoopFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/enum.AccountChangeKind.html b/alloy_rpc_types/trace/geth/pre_state/enum.AccountChangeKind.html new file mode 100644 index 000000000000..dfa7bb4a84fb --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/enum.AccountChangeKind.html @@ -0,0 +1,34 @@ +AccountChangeKind in alloy_rpc_types::trace::geth::pre_state - Rust +
pub enum AccountChangeKind {
+    Modify,
+    Create,
+    SelfDestruct,
+}
Expand description

Helper type to track the kind of change of an AccountState.

+

Variants§

§

Modify

§

Create

§

SelfDestruct

Implementations§

source§

impl AccountChangeKind

source

pub fn is_created(&self) -> bool

Returns true if the account was created

+
source

pub fn is_modified(&self) -> bool

Returns true the account was modified

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true the account was modified

+

Trait Implementations§

source§

impl Clone for AccountChangeKind

source§

fn clone(&self) -> AccountChangeKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountChangeKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountChangeKind

source§

fn default() -> AccountChangeKind

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountChangeKind

source§

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 Hash for AccountChangeKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountChangeKind

source§

fn eq(&self, other: &AccountChangeKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountChangeKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountChangeKind

source§

impl StructuralEq for AccountChangeKind

source§

impl StructuralPartialEq for AccountChangeKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Modify: 0 bytes
  • Create: 0 bytes
  • SelfDestruct: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/enum.DiffStateKind.html b/alloy_rpc_types/trace/geth/pre_state/enum.DiffStateKind.html new file mode 100644 index 000000000000..379130bf3094 --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/enum.DiffStateKind.html @@ -0,0 +1,29 @@ +DiffStateKind in alloy_rpc_types::trace::geth::pre_state - Rust +
pub enum DiffStateKind {
+    Pre,
+    Post,
+}
Expand description

Helper type for DiffMode to represent a specific set

+

Variants§

§

Pre

Corresponds to the pre state of the DiffMode

+
§

Post

Corresponds to the post state of the DiffMode

+

Implementations§

source§

impl DiffStateKind

source

pub fn is_pre(&self) -> bool

Returns true if this is the pre state of the DiffMode

+
source

pub fn is_post(&self) -> bool

Returns true if this is the post state of the DiffMode

+

Trait Implementations§

source§

impl Clone for DiffStateKind

source§

fn clone(&self) -> DiffStateKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffStateKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DiffStateKind

source§

fn eq(&self, other: &DiffStateKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for DiffStateKind

source§

impl Eq for DiffStateKind

source§

impl StructuralEq for DiffStateKind

source§

impl StructuralPartialEq for DiffStateKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • Pre: 0 bytes
  • Post: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/enum.PreStateFrame.html b/alloy_rpc_types/trace/geth/pre_state/enum.PreStateFrame.html new file mode 100644 index 000000000000..8714bc55cedd --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/enum.PreStateFrame.html @@ -0,0 +1,40 @@ +PreStateFrame in alloy_rpc_types::trace::geth::pre_state - Rust +
pub enum PreStateFrame {
+    Default(PreStateMode),
+    Diff(DiffMode),
+}
Expand description

Variants§

§

Default(PreStateMode)

The default mode returns the accounts necessary to execute a given transaction.

+

It re-executes the given transaction and tracks every part of state that is touched.

+
§

Diff(DiffMode)

Diff mode returns the differences between the transaction’s pre and post-state (i.e. what +changed because the transaction happened).

+

Implementations§

source§

impl PreStateFrame

source

pub fn is_default(&self) -> bool

Returns true if this trace was requested without diffmode.

+
source

pub fn is_diff(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn as_default(&self) -> Option<&PreStateMode>

Returns the account states after the transaction is executed if this trace was requested +without diffmode.

+
source

pub fn as_diff(&self) -> Option<&DiffMode>

Returns the account states before and after the transaction is executed if this trace was +requested with diffmode.

+

Trait Implementations§

source§

impl Clone for PreStateFrame

source§

fn clone(&self) -> PreStateFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PreStateFrame

source§

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<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PreStateFrame

source§

fn eq(&self, other: &PreStateFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateFrame

source§

impl StructuralEq for PreStateFrame

source§

impl StructuralPartialEq for PreStateFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

Size for each variant:

  • Default: 24 bytes
  • Diff: 48 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/index.html b/alloy_rpc_types/trace/geth/pre_state/index.html new file mode 100644 index 000000000000..86a23b2e4f61 --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::trace::geth::pre_state - Rust +

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/sidebar-items.js b/alloy_rpc_types/trace/geth/pre_state/sidebar-items.js new file mode 100644 index 000000000000..2e63ad48aa29 --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AccountChangeKind","DiffStateKind","PreStateFrame"],"struct":["AccountState","DiffMode","PreStateConfig","PreStateMode"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/struct.AccountState.html b/alloy_rpc_types/trace/geth/pre_state/struct.AccountState.html new file mode 100644 index 000000000000..4da8093b4e25 --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/struct.AccountState.html @@ -0,0 +1,38 @@ +AccountState in alloy_rpc_types::trace::geth::pre_state - Rust +
pub struct AccountState {
+    pub balance: Option<U256>,
+    pub code: Option<Bytes>,
+    pub nonce: Option<u64>,
+    pub storage: BTreeMap<B256, B256>,
+}
Expand description

Represents the state of an account

+

Fields§

§balance: Option<U256>§code: Option<Bytes>§nonce: Option<u64>§storage: BTreeMap<B256, B256>

Implementations§

source§

impl AccountState

source

pub fn from_account_info(nonce: u64, balance: U256, code: Option<Bytes>) -> Self

Creates a new AccountState with the given account info.

+

If balance is zero, it will be omitted. +If nonce is zero, it will be omitted. +If code is empty, it will be omitted.

+
source

pub fn remove_matching_account_info(&mut self, other: &AccountState)

Removes balance,nonce or code if they match the given account info.

+

This is useful for comparing pre vs post state and only keep changed values in post state.

+

Trait Implementations§

source§

impl Clone for AccountState

source§

fn clone(&self) -> AccountState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountState

source§

fn default() -> AccountState

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountState

source§

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 Hash for AccountState

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountState

source§

fn eq(&self, other: &AccountState) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountState

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountState

source§

impl StructuralEq for AccountState

source§

impl StructuralPartialEq for AccountState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/struct.DiffMode.html b/alloy_rpc_types/trace/geth/pre_state/struct.DiffMode.html new file mode 100644 index 000000000000..6d1c184b6830 --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/struct.DiffMode.html @@ -0,0 +1,37 @@ +DiffMode in alloy_rpc_types::trace::geth::pre_state - Rust +
pub struct DiffMode {
+    pub post: BTreeMap<Address, AccountState>,
+    pub pre: BTreeMap<Address, AccountState>,
+}
Expand description

Represents the account states before and after the transaction is executed.

+

This corresponds to the DiffMode of the PreStateConfig.

+

This will only contain changed AccountStates, created accounts will not be included in the pre +state and selfdestructed accounts will not be included in the post state.

+

Fields§

§post: BTreeMap<Address, AccountState>

The account states after the transaction is executed.

+
§pre: BTreeMap<Address, AccountState>

The account states before the transaction is executed.

+

Implementations§

source§

impl DiffMode

source

pub fn retain_changed(&mut self) -> &mut Self

The sets of the DiffMode should only contain changed AccountStates.

+

This will remove all unchanged AccountStates from the sets.

+

In other words it removes entries that are equal (unchanged) in both the pre and post sets.

+
source

pub fn remove_zero_storage_values(&mut self)

Removes all zero values from the storage of the AccountStates.

+

Trait Implementations§

source§

impl Clone for DiffMode

source§

fn clone(&self) -> DiffMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DiffMode

source§

fn default() -> DiffMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DiffMode

source§

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 PartialEq for DiffMode

source§

fn eq(&self, other: &DiffMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DiffMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DiffMode

source§

impl StructuralEq for DiffMode

source§

impl StructuralPartialEq for DiffMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/struct.PreStateConfig.html b/alloy_rpc_types/trace/geth/pre_state/struct.PreStateConfig.html new file mode 100644 index 000000000000..11a6b2ca6e58 --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/struct.PreStateConfig.html @@ -0,0 +1,32 @@ +PreStateConfig in alloy_rpc_types::trace::geth::pre_state - Rust +
pub struct PreStateConfig {
+    pub diff_mode: Option<bool>,
+}
Expand description

The config for the prestate tracer.

+

If diffMode is set to true, the response frame includes all the account and storage diffs for +the transaction. If it’s missing or set to false it only returns the accounts and storage +necessary to execute the transaction.

+

Fields§

§diff_mode: Option<bool>

Implementations§

source§

impl PreStateConfig

source

pub fn is_diff_mode(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn is_default_mode(&self) -> bool

Is default mode if diff_mode is not set

+

Trait Implementations§

source§

impl Clone for PreStateConfig

source§

fn clone(&self) -> PreStateConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateConfig

source§

fn default() -> PreStateConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateConfig

source§

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 PartialEq for PreStateConfig

source§

fn eq(&self, other: &PreStateConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateConfig

source§

impl StructuralEq for PreStateConfig

source§

impl StructuralPartialEq for PreStateConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/pre_state/struct.PreStateMode.html b/alloy_rpc_types/trace/geth/pre_state/struct.PreStateMode.html new file mode 100644 index 000000000000..cd76e2f8ccad --- /dev/null +++ b/alloy_rpc_types/trace/geth/pre_state/struct.PreStateMode.html @@ -0,0 +1,24 @@ +PreStateMode in alloy_rpc_types::trace::geth::pre_state - Rust +
pub struct PreStateMode(pub BTreeMap<Address, AccountState>);

Tuple Fields§

§0: BTreeMap<Address, AccountState>

Trait Implementations§

source§

impl Clone for PreStateMode

source§

fn clone(&self) -> PreStateMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateMode

source§

fn default() -> PreStateMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateMode

source§

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 PartialEq for PreStateMode

source§

fn eq(&self, other: &PreStateMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateMode

source§

impl StructuralEq for PreStateMode

source§

impl StructuralPartialEq for PreStateMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/sidebar-items.js b/alloy_rpc_types/trace/geth/sidebar-items.js new file mode 100644 index 000000000000..e49a74381604 --- /dev/null +++ b/alloy_rpc_types/trace/geth/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AccountChangeKind","DiffStateKind","GethDebugBuiltInTracerType","GethDebugTracerType","GethTrace","PreStateFrame"],"mod":["call","four_byte","noop","pre_state"],"struct":["AccountState","BlockTraceResult","CallConfig","CallFrame","CallLogFrame","DefaultFrame","DiffMode","FourByteFrame","GethDebugTracerConfig","GethDebugTracingCallOptions","GethDebugTracingOptions","GethDefaultTracingOptions","NoopFrame","PreStateConfig","PreStateMode","StructLog"],"type":["TraceResult"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.AccountState.html b/alloy_rpc_types/trace/geth/struct.AccountState.html new file mode 100644 index 000000000000..8bbf4aabc5ef --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.AccountState.html @@ -0,0 +1,38 @@ +AccountState in alloy_rpc_types::trace::geth - Rust +
pub struct AccountState {
+    pub balance: Option<U256>,
+    pub code: Option<Bytes>,
+    pub nonce: Option<u64>,
+    pub storage: BTreeMap<B256, B256>,
+}
Expand description

Represents the state of an account

+

Fields§

§balance: Option<U256>§code: Option<Bytes>§nonce: Option<u64>§storage: BTreeMap<B256, B256>

Implementations§

source§

impl AccountState

source

pub fn from_account_info(nonce: u64, balance: U256, code: Option<Bytes>) -> Self

Creates a new AccountState with the given account info.

+

If balance is zero, it will be omitted. +If nonce is zero, it will be omitted. +If code is empty, it will be omitted.

+
source

pub fn remove_matching_account_info(&mut self, other: &AccountState)

Removes balance,nonce or code if they match the given account info.

+

This is useful for comparing pre vs post state and only keep changed values in post state.

+

Trait Implementations§

source§

impl Clone for AccountState

source§

fn clone(&self) -> AccountState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountState

source§

fn default() -> AccountState

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountState

source§

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 Hash for AccountState

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountState

source§

fn eq(&self, other: &AccountState) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountState

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountState

source§

impl StructuralEq for AccountState

source§

impl StructuralPartialEq for AccountState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.BlockTraceResult.html b/alloy_rpc_types/trace/geth/struct.BlockTraceResult.html new file mode 100644 index 000000000000..a7a722d4c5e7 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.BlockTraceResult.html @@ -0,0 +1,33 @@ +BlockTraceResult in alloy_rpc_types::trace::geth - Rust +
pub struct BlockTraceResult {
+    pub block: U256,
+    pub hash: B256,
+    pub traces: Vec<TraceResult>,
+}
Expand description

blockTraceResult represents the results of tracing a single block when an entire chain is being +traced. ref https://github.com/ethereum/go-ethereum/blob/ee530c0d5aa70d2c00ab5691a89ab431b73f8165/eth/tracers/api.go#L218-L222

+

Fields§

§block: U256

Block number corresponding to the trace task

+
§hash: B256

Block hash corresponding to the trace task

+
§traces: Vec<TraceResult>

Trace results produced by the trace task

+

Trait Implementations§

source§

impl Clone for BlockTraceResult

source§

fn clone(&self) -> BlockTraceResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockTraceResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockTraceResult

source§

fn default() -> BlockTraceResult

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockTraceResult

source§

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 PartialEq for BlockTraceResult

source§

fn eq(&self, other: &BlockTraceResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockTraceResult

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlockTraceResult

source§

impl StructuralEq for BlockTraceResult

source§

impl StructuralPartialEq for BlockTraceResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 88 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.CallConfig.html b/alloy_rpc_types/trace/geth/struct.CallConfig.html new file mode 100644 index 000000000000..a9be552753e3 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.CallConfig.html @@ -0,0 +1,31 @@ +CallConfig in alloy_rpc_types::trace::geth - Rust +
pub struct CallConfig {
+    pub only_top_call: Option<bool>,
+    pub with_log: Option<bool>,
+}

Fields§

§only_top_call: Option<bool>

When set to true, this will only trace the primary (top-level) call and not any sub-calls. +It eliminates the additional processing for each call frame

+
§with_log: Option<bool>

Implementations§

source§

impl CallConfig

source

pub fn only_top_call(self) -> Self

Sets the only top call flag

+
source

pub fn with_log(self) -> Self

Sets the with log flag

+

Trait Implementations§

source§

impl Clone for CallConfig

source§

fn clone(&self) -> CallConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallConfig

source§

fn default() -> CallConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallConfig

source§

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 PartialEq for CallConfig

source§

fn eq(&self, other: &CallConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallConfig

source§

impl StructuralEq for CallConfig

source§

impl StructuralPartialEq for CallConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 2 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.CallFrame.html b/alloy_rpc_types/trace/geth/struct.CallFrame.html new file mode 100644 index 000000000000..492632064cfe --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.CallFrame.html @@ -0,0 +1,39 @@ +CallFrame in alloy_rpc_types::trace::geth - Rust +
pub struct CallFrame {
+    pub from: Address,
+    pub gas: U256,
+    pub gas_used: U256,
+    pub to: Option<Address>,
+    pub input: Bytes,
+    pub output: Option<Bytes>,
+    pub error: Option<String>,
+    pub revert_reason: Option<String>,
+    pub calls: Vec<CallFrame>,
+    pub logs: Vec<CallLogFrame>,
+    pub value: Option<U256>,
+    pub typ: String,
+}
Expand description

The response object for debug_traceTransaction with "tracer": "callTracer"

+

https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/call.go#L44

+

Fields§

§from: Address§gas: U256§gas_used: U256§to: Option<Address>§input: Bytes§output: Option<Bytes>§error: Option<String>§revert_reason: Option<String>§calls: Vec<CallFrame>§logs: Vec<CallLogFrame>§value: Option<U256>§typ: String

Trait Implementations§

source§

impl Clone for CallFrame

source§

fn clone(&self) -> CallFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallFrame

source§

fn default() -> CallFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallFrame

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CallFrame

source§

fn eq(&self, other: &CallFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallFrame

source§

impl StructuralEq for CallFrame

source§

impl StructuralPartialEq for CallFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.CallLogFrame.html b/alloy_rpc_types/trace/geth/struct.CallLogFrame.html new file mode 100644 index 000000000000..6bd73962f827 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.CallLogFrame.html @@ -0,0 +1,28 @@ +CallLogFrame in alloy_rpc_types::trace::geth - Rust +
pub struct CallLogFrame {
+    pub address: Option<Address>,
+    pub topics: Option<Vec<B256>>,
+    pub data: Option<Bytes>,
+}

Fields§

§address: Option<Address>§topics: Option<Vec<B256>>§data: Option<Bytes>

Trait Implementations§

source§

impl Clone for CallLogFrame

source§

fn clone(&self) -> CallLogFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallLogFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallLogFrame

source§

fn default() -> CallLogFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallLogFrame

source§

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 PartialEq for CallLogFrame

source§

fn eq(&self, other: &CallLogFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallLogFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallLogFrame

source§

impl StructuralEq for CallLogFrame

source§

impl StructuralPartialEq for CallLogFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.DefaultFrame.html b/alloy_rpc_types/trace/geth/struct.DefaultFrame.html new file mode 100644 index 000000000000..822c9118e3ac --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.DefaultFrame.html @@ -0,0 +1,31 @@ +DefaultFrame in alloy_rpc_types::trace::geth - Rust +
pub struct DefaultFrame {
+    pub failed: bool,
+    pub gas: u64,
+    pub return_value: Bytes,
+    pub struct_logs: Vec<StructLog>,
+}
Expand description

Fields§

§failed: bool§gas: u64§return_value: Bytes§struct_logs: Vec<StructLog>

Trait Implementations§

source§

impl Clone for DefaultFrame

source§

fn clone(&self) -> DefaultFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DefaultFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DefaultFrame

source§

fn default() -> DefaultFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DefaultFrame

source§

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<DefaultFrame> for GethTrace

source§

fn from(value: DefaultFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for DefaultFrame

source§

fn eq(&self, other: &DefaultFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DefaultFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DefaultFrame

source§

impl StructuralEq for DefaultFrame

source§

impl StructuralPartialEq for DefaultFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.DiffMode.html b/alloy_rpc_types/trace/geth/struct.DiffMode.html new file mode 100644 index 000000000000..33f37edba11c --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.DiffMode.html @@ -0,0 +1,37 @@ +DiffMode in alloy_rpc_types::trace::geth - Rust +
pub struct DiffMode {
+    pub post: BTreeMap<Address, AccountState>,
+    pub pre: BTreeMap<Address, AccountState>,
+}
Expand description

Represents the account states before and after the transaction is executed.

+

This corresponds to the DiffMode of the PreStateConfig.

+

This will only contain changed AccountStates, created accounts will not be included in the pre +state and selfdestructed accounts will not be included in the post state.

+

Fields§

§post: BTreeMap<Address, AccountState>

The account states after the transaction is executed.

+
§pre: BTreeMap<Address, AccountState>

The account states before the transaction is executed.

+

Implementations§

source§

impl DiffMode

source

pub fn retain_changed(&mut self) -> &mut Self

The sets of the DiffMode should only contain changed AccountStates.

+

This will remove all unchanged AccountStates from the sets.

+

In other words it removes entries that are equal (unchanged) in both the pre and post sets.

+
source

pub fn remove_zero_storage_values(&mut self)

Removes all zero values from the storage of the AccountStates.

+

Trait Implementations§

source§

impl Clone for DiffMode

source§

fn clone(&self) -> DiffMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DiffMode

source§

fn default() -> DiffMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DiffMode

source§

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 PartialEq for DiffMode

source§

fn eq(&self, other: &DiffMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DiffMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DiffMode

source§

impl StructuralEq for DiffMode

source§

impl StructuralPartialEq for DiffMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.FourByteFrame.html b/alloy_rpc_types/trace/geth/struct.FourByteFrame.html new file mode 100644 index 000000000000..92c997ef9dc2 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.FourByteFrame.html @@ -0,0 +1,25 @@ +FourByteFrame in alloy_rpc_types::trace::geth - Rust +
pub struct FourByteFrame(pub BTreeMap<String, u64>);
Expand description

Tuple Fields§

§0: BTreeMap<String, u64>

Trait Implementations§

source§

impl Clone for FourByteFrame

source§

fn clone(&self) -> FourByteFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FourByteFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FourByteFrame

source§

fn default() -> FourByteFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FourByteFrame

source§

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<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for FourByteFrame

source§

fn eq(&self, other: &FourByteFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FourByteFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FourByteFrame

source§

impl StructuralEq for FourByteFrame

source§

impl StructuralPartialEq for FourByteFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.GethDebugTracerConfig.html b/alloy_rpc_types/trace/geth/struct.GethDebugTracerConfig.html new file mode 100644 index 000000000000..05664cc48962 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.GethDebugTracerConfig.html @@ -0,0 +1,32 @@ +GethDebugTracerConfig in alloy_rpc_types::trace::geth - Rust +
pub struct GethDebugTracerConfig(pub Value);
Expand description

Configuration of the tracer

+

This is a simple wrapper around serde_json::Value. +with helpers for deserializing tracer configs.

+

Tuple Fields§

§0: Value

Implementations§

source§

impl GethDebugTracerConfig

source

pub fn is_null(&self) -> bool

Returns if this is a null object

+
source

pub fn from_value<T: DeserializeOwned>(self) -> Result<T, Error>

Consumes the config and tries to deserialize it into the given type.

+
source

pub fn into_call_config(self) -> Result<CallConfig, Error>

Returns the CallConfig if it is a call config.

+
source

pub fn into_json(self) -> Value

Returns the raw json value

+
source

pub fn into_pre_state_config(self) -> Result<PreStateConfig, Error>

Returns the PreStateConfig if it is a call config.

+

Trait Implementations§

source§

impl Clone for GethDebugTracerConfig

source§

fn clone(&self) -> GethDebugTracerConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracerConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracerConfig

source§

fn default() -> GethDebugTracerConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracerConfig

source§

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<Value> for GethDebugTracerConfig

source§

fn from(value: Value) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugTracerConfig

source§

fn eq(&self, other: &GethDebugTracerConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracerConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracerConfig

source§

impl StructuralEq for GethDebugTracerConfig

source§

impl StructuralPartialEq for GethDebugTracerConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.GethDebugTracingCallOptions.html b/alloy_rpc_types/trace/geth/struct.GethDebugTracingCallOptions.html new file mode 100644 index 000000000000..218baa5b30b9 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.GethDebugTracingCallOptions.html @@ -0,0 +1,32 @@ +GethDebugTracingCallOptions in alloy_rpc_types::trace::geth - Rust +
pub struct GethDebugTracingCallOptions {
+    pub tracing_options: GethDebugTracingOptions,
+    pub state_overrides: Option<StateOverride>,
+    pub block_overrides: Option<BlockOverrides>,
+}
Expand description

Bindings for additional debug_traceCall options

+

See https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracecall

+

Fields§

§tracing_options: GethDebugTracingOptions§state_overrides: Option<StateOverride>

The state overrides to apply

+
§block_overrides: Option<BlockOverrides>

The block overrides to apply

+

Trait Implementations§

source§

impl Clone for GethDebugTracingCallOptions

source§

fn clone(&self) -> GethDebugTracingCallOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracingCallOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracingCallOptions

source§

fn default() -> GethDebugTracingCallOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracingCallOptions

source§

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 PartialEq for GethDebugTracingCallOptions

source§

fn eq(&self, other: &GethDebugTracingCallOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracingCallOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracingCallOptions

source§

impl StructuralEq for GethDebugTracingCallOptions

source§

impl StructuralPartialEq for GethDebugTracingCallOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 400 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.GethDebugTracingOptions.html b/alloy_rpc_types/trace/geth/struct.GethDebugTracingOptions.html new file mode 100644 index 000000000000..633f24a14eed --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.GethDebugTracingOptions.html @@ -0,0 +1,44 @@ +GethDebugTracingOptions in alloy_rpc_types::trace::geth - Rust +
pub struct GethDebugTracingOptions {
+    pub config: GethDefaultTracingOptions,
+    pub tracer: Option<GethDebugTracerType>,
+    pub tracer_config: GethDebugTracerConfig,
+    pub timeout: Option<String>,
+}
Expand description

Bindings for additional debug_traceTransaction options

+

See https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracetransaction

+

Fields§

§config: GethDefaultTracingOptions§tracer: Option<GethDebugTracerType>

The custom tracer to use.

+

If None then the default structlog tracer is used.

+
§tracer_config: GethDebugTracerConfig

Config specific to given tracer.

+

Note default struct logger config are historically embedded in main object.

+

tracerConfig is slated for Geth v1.11.0 +See https://github.com/ethereum/go-ethereum/issues/26513

+

This could be CallConfig or PreStateConfig depending on the tracer.

+
§timeout: Option<String>

A string of decimal integers that overrides the JavaScript-based tracing calls default +timeout of 5 seconds.

+

Implementations§

source§

impl GethDebugTracingOptions

source

pub fn with_tracer(self, tracer: GethDebugTracerType) -> Self

Sets the tracer to use

+
source

pub fn with_timeout(self, duration: Duration) -> Self

Sets the timeout to use for tracing

+
source

pub fn call_config(self, config: CallConfig) -> Self

Configures a CallConfig

+
source

pub fn prestate_config(self, config: PreStateConfig) -> Self

Configures a PreStateConfig

+

Trait Implementations§

source§

impl Clone for GethDebugTracingOptions

source§

fn clone(&self) -> GethDebugTracingOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracingOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracingOptions

source§

fn default() -> GethDebugTracingOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracingOptions

source§

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 PartialEq for GethDebugTracingOptions

source§

fn eq(&self, other: &GethDebugTracingOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracingOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracingOptions

source§

impl StructuralEq for GethDebugTracingOptions

source§

impl StructuralPartialEq for GethDebugTracingOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.GethDefaultTracingOptions.html b/alloy_rpc_types/trace/geth/struct.GethDefaultTracingOptions.html new file mode 100644 index 000000000000..6e3bbb9a610b --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.GethDefaultTracingOptions.html @@ -0,0 +1,73 @@ +GethDefaultTracingOptions in alloy_rpc_types::trace::geth - Rust +
pub struct GethDefaultTracingOptions {
+    pub enable_memory: Option<bool>,
+    pub disable_memory: Option<bool>,
+    pub disable_stack: Option<bool>,
+    pub disable_storage: Option<bool>,
+    pub enable_return_data: Option<bool>,
+    pub disable_return_data: Option<bool>,
+    pub debug: Option<bool>,
+    pub limit: Option<u64>,
+}
Expand description

Default tracing options for the struct looger.

+

These are all known general purpose tracer options that may or not be supported by a given +tracer. For example, the enableReturnData option is a noop on regular +debug_trace{Transaction,Block} calls.

+

Fields§

§enable_memory: Option<bool>

enable memory capture

+
§disable_memory: Option<bool>

Disable memory capture

+

This is the opposite of enable_memory.

+

Note: memory capture used to be enabled by default on geth, but has since been flipped https://github.com/ethereum/go-ethereum/pull/23558 and is now disabled by default. +However, at the time of writing this, erigon still defaults to enabled and supports the +disableMemory option. So we keep this option for compatibility, but if it’s missing +OR enableMemory is present enableMemory takes precedence.

+

See also https://github.com/paradigmxyz/reth/issues/3033

+
§disable_stack: Option<bool>

disable stack capture

+
§disable_storage: Option<bool>

Disable storage capture

+
§enable_return_data: Option<bool>

Enable return data capture

+
§disable_return_data: Option<bool>

Disable return data capture

+

This is the opposite of enable_return_data, and only supported for compatibility reasons. +See also disable_memory.

+

If enable_return_data is present, enable_return_data always takes precedence.

+
§debug: Option<bool>

print output during capture end

+
§limit: Option<u64>

maximum length of output, but zero means unlimited

+

Implementations§

source§

impl GethDefaultTracingOptions

source

pub fn enable_memory(self) -> Self

Enables memory capture.

+
source

pub fn disable_memory(self) -> Self

Disables memory capture.

+
source

pub fn disable_stack(self) -> Self

Disables stack capture.

+
source

pub fn disable_storage(self) -> Self

Disables storage capture.

+
source

pub fn enable_return_data(self) -> Self

Enables return data capture.

+
source

pub fn disable_return_data(self) -> Self

Disables return data capture.

+
source

pub fn debug(self) -> Self

Enables debug mode.

+
source

pub fn with_enable_memory(self, enable: bool) -> Self

Sets the enable_memory field.

+
source

pub fn with_disable_memory(self, disable: bool) -> Self

Sets the disable_memory field.

+
source

pub fn with_disable_stack(self, disable: bool) -> Self

Sets the disable_stack field.

+
source

pub fn with_disable_storage(self, disable: bool) -> Self

Sets the disable_storage field.

+
source

pub fn with_enable_return_data(self, enable: bool) -> Self

Sets the enable_return_data field.

+
source

pub fn with_disable_return_data(self, disable: bool) -> Self

Sets the disable_return_data field.

+
source

pub fn with_debug(self, debug: bool) -> Self

Sets the debug field.

+
source

pub fn with_limit(self, limit: u64) -> Self

Sets the limit field.

+
source

pub fn is_return_data_enabled(&self) -> bool

Returns true if return data capture is enabled

+
source

pub fn is_memory_enabled(&self) -> bool

Returns true if memory capture is enabled

+
source

pub fn is_stack_enabled(&self) -> bool

Returns true if stack capture is enabled

+
source

pub fn is_storage_enabled(&self) -> bool

Returns true if storage capture is enabled

+

Trait Implementations§

source§

impl Clone for GethDefaultTracingOptions

source§

fn clone(&self) -> GethDefaultTracingOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDefaultTracingOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDefaultTracingOptions

source§

fn default() -> GethDefaultTracingOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDefaultTracingOptions

source§

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 PartialEq for GethDefaultTracingOptions

source§

fn eq(&self, other: &GethDefaultTracingOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDefaultTracingOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDefaultTracingOptions

source§

impl StructuralEq for GethDefaultTracingOptions

source§

impl StructuralPartialEq for GethDefaultTracingOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.NoopFrame.html b/alloy_rpc_types/trace/geth/struct.NoopFrame.html new file mode 100644 index 000000000000..d0181a5f83f8 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.NoopFrame.html @@ -0,0 +1,26 @@ +NoopFrame in alloy_rpc_types::trace::geth - Rust +
pub struct NoopFrame(BTreeMap<Null, Null>);
Expand description

Tuple Fields§

§0: BTreeMap<Null, Null>

Trait Implementations§

source§

impl Clone for NoopFrame

source§

fn clone(&self) -> NoopFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NoopFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for NoopFrame

source§

fn default() -> NoopFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for NoopFrame

source§

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<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for NoopFrame

source§

fn eq(&self, other: &NoopFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NoopFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NoopFrame

source§

impl StructuralEq for NoopFrame

source§

impl StructuralPartialEq for NoopFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.PreStateConfig.html b/alloy_rpc_types/trace/geth/struct.PreStateConfig.html new file mode 100644 index 000000000000..42892d25b2c8 --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.PreStateConfig.html @@ -0,0 +1,32 @@ +PreStateConfig in alloy_rpc_types::trace::geth - Rust +
pub struct PreStateConfig {
+    pub diff_mode: Option<bool>,
+}
Expand description

The config for the prestate tracer.

+

If diffMode is set to true, the response frame includes all the account and storage diffs for +the transaction. If it’s missing or set to false it only returns the accounts and storage +necessary to execute the transaction.

+

Fields§

§diff_mode: Option<bool>

Implementations§

source§

impl PreStateConfig

source

pub fn is_diff_mode(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn is_default_mode(&self) -> bool

Is default mode if diff_mode is not set

+

Trait Implementations§

source§

impl Clone for PreStateConfig

source§

fn clone(&self) -> PreStateConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateConfig

source§

fn default() -> PreStateConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateConfig

source§

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 PartialEq for PreStateConfig

source§

fn eq(&self, other: &PreStateConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateConfig

source§

impl StructuralEq for PreStateConfig

source§

impl StructuralPartialEq for PreStateConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.PreStateMode.html b/alloy_rpc_types/trace/geth/struct.PreStateMode.html new file mode 100644 index 000000000000..77361ca27ebd --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.PreStateMode.html @@ -0,0 +1,24 @@ +PreStateMode in alloy_rpc_types::trace::geth - Rust +
pub struct PreStateMode(pub BTreeMap<Address, AccountState>);

Tuple Fields§

§0: BTreeMap<Address, AccountState>

Trait Implementations§

source§

impl Clone for PreStateMode

source§

fn clone(&self) -> PreStateMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateMode

source§

fn default() -> PreStateMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateMode

source§

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 PartialEq for PreStateMode

source§

fn eq(&self, other: &PreStateMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateMode

source§

impl StructuralEq for PreStateMode

source§

impl StructuralPartialEq for PreStateMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/struct.StructLog.html b/alloy_rpc_types/trace/geth/struct.StructLog.html new file mode 100644 index 000000000000..d6f5739dce7c --- /dev/null +++ b/alloy_rpc_types/trace/geth/struct.StructLog.html @@ -0,0 +1,52 @@ +StructLog in alloy_rpc_types::trace::geth - Rust +
pub struct StructLog {
+    pub pc: u64,
+    pub op: String,
+    pub gas: u64,
+    pub gas_cost: u64,
+    pub memory: Option<Vec<String>>,
+    pub memory_size: Option<u64>,
+    pub stack: Option<Vec<U256>>,
+    pub return_data: Option<Bytes>,
+    pub storage: Option<BTreeMap<B256, B256>>,
+    pub depth: u64,
+    pub refund_counter: Option<u64>,
+    pub error: Option<String>,
+}
Expand description

Fields§

§pc: u64

program counter

+
§op: String

opcode to be executed

+
§gas: u64

remaining gas

+
§gas_cost: u64

cost for executing op

+
§memory: Option<Vec<String>>§memory_size: Option<u64>

Size of memory.

+
§stack: Option<Vec<U256>>

EVM stack

+
§return_data: Option<Bytes>

Last call’s return data. Enabled via enableReturnData

+
§storage: Option<BTreeMap<B256, B256>>

Storage slots of current contract read from and written to. Only emitted for SLOAD and +SSTORE. Disabled via disableStorage

+
§depth: u64

Current call depth

+
§refund_counter: Option<u64>

Refund counter

+
§error: Option<String>

Error message if any

+

Trait Implementations§

source§

impl Clone for StructLog

source§

fn clone(&self) -> StructLog

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StructLog

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StructLog

source§

fn default() -> StructLog

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for StructLog

source§

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 PartialEq for StructLog

source§

fn eq(&self, other: &StructLog) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StructLog

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StructLog

source§

impl StructuralEq for StructLog

source§

impl StructuralPartialEq for StructLog

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 224 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/geth/type.TraceResult.html b/alloy_rpc_types/trace/geth/type.TraceResult.html new file mode 100644 index 000000000000..b55d030dd8e8 --- /dev/null +++ b/alloy_rpc_types/trace/geth/type.TraceResult.html @@ -0,0 +1,12 @@ +TraceResult in alloy_rpc_types::trace::geth - Rust +
pub type TraceResult = TraceResult<GethTrace, String>;
Expand description

Result type for geth style transaction trace

+

Aliased Type§

enum TraceResult {
+    Success {
+        result: GethTrace,
+    },
+    Error {
+        error: String,
+    },
+}

Variants§

§

Success

Fields

§result: GethTrace

Untagged success variant

+
§

Error

Fields

§error: String

Untagged error variant

+

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: 336 bytes

Size for each variant:

  • Success: 336 bytes
  • Error: 32 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/index.html b/alloy_rpc_types/trace/index.html new file mode 100644 index 000000000000..1491c477e546 --- /dev/null +++ b/alloy_rpc_types/trace/index.html @@ -0,0 +1,6 @@ +alloy_rpc_types::trace - Rust +

Module alloy_rpc_types::trace

source ·
Expand description

Types for tracing

+

Modules

Structs

Enums

Type Aliases

  • Result type for geth style transaction trace
\ No newline at end of file diff --git a/alloy_rpc_types/trace/noop/index.html b/alloy_rpc_types/trace/noop/index.html new file mode 100644 index 000000000000..c108908acfdd --- /dev/null +++ b/alloy_rpc_types/trace/noop/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::trace::noop - Rust +

Module alloy_rpc_types::trace::noop

source ·

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/trace/noop/sidebar-items.js b/alloy_rpc_types/trace/noop/sidebar-items.js new file mode 100644 index 000000000000..42deba610ab8 --- /dev/null +++ b/alloy_rpc_types/trace/noop/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["NoopFrame"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/noop/struct.NoopFrame.html b/alloy_rpc_types/trace/noop/struct.NoopFrame.html new file mode 100644 index 000000000000..512a0cdc9a51 --- /dev/null +++ b/alloy_rpc_types/trace/noop/struct.NoopFrame.html @@ -0,0 +1,26 @@ +NoopFrame in alloy_rpc_types::trace::noop - Rust +
pub struct NoopFrame(BTreeMap<Null, Null>);
Expand description

Tuple Fields§

§0: BTreeMap<Null, Null>

Trait Implementations§

source§

impl Clone for NoopFrame

source§

fn clone(&self) -> NoopFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NoopFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for NoopFrame

source§

fn default() -> NoopFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for NoopFrame

source§

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<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for NoopFrame

source§

fn eq(&self, other: &NoopFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NoopFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NoopFrame

source§

impl StructuralEq for NoopFrame

source§

impl StructuralPartialEq for NoopFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/enum.Action.html b/alloy_rpc_types/trace/parity/enum.Action.html new file mode 100644 index 000000000000..76b6117638fc --- /dev/null +++ b/alloy_rpc_types/trace/parity/enum.Action.html @@ -0,0 +1,40 @@ +Action in alloy_rpc_types::trace::parity - Rust +
pub enum Action {
+    Call(CallAction),
+    Create(CreateAction),
+    Selfdestruct(SelfdestructAction),
+    Reward(RewardAction),
+}
Expand description

Action

+

Variants§

§

Call(CallAction)

Call

+
§

Create(CreateAction)

Create

+
§

Selfdestruct(SelfdestructAction)

Parity style traces never renamed suicide to selfdestruct: https://eips.ethereum.org/EIPS/eip-6

+

For compatibility reasons, this is serialized as suicide: https://github.com/paradigmxyz/reth/issues/3721

+
§

Reward(RewardAction)

Reward

+

Implementations§

source§

impl Action

source

pub fn is_call(&self) -> bool

Returns true if this is a call action

+
source

pub fn is_create(&self) -> bool

Returns true if this is a create action

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true if this is a selfdestruct action

+
source

pub fn is_reward(&self) -> bool

Returns true if this is a reward action

+
source

pub fn kind(&self) -> ActionType

Returns what kind of action this is

+

Trait Implementations§

source§

impl Clone for Action

source§

fn clone(&self) -> Action

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Action

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Action

source§

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 PartialEq for Action

source§

fn eq(&self, other: &Action) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Action

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Action

source§

impl StructuralEq for Action

source§

impl StructuralPartialEq for Action

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

Size for each variant:

  • Call: 120 bytes
  • Create: 96 bytes
  • Selfdestruct: 72 bytes
  • Reward: 56 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/enum.ActionType.html b/alloy_rpc_types/trace/parity/enum.ActionType.html new file mode 100644 index 000000000000..940da38f2f26 --- /dev/null +++ b/alloy_rpc_types/trace/parity/enum.ActionType.html @@ -0,0 +1,35 @@ +ActionType in alloy_rpc_types::trace::parity - Rust +
pub enum ActionType {
+    Call,
+    Create,
+    Selfdestruct,
+    Reward,
+}
Expand description

An external action type.

+

Used as enum identifier for Action

+

Variants§

§

Call

Contract call.

+
§

Create

Contract creation.

+
§

Selfdestruct

Contract suicide/selfdestruct.

+
§

Reward

A block reward.

+

Trait Implementations§

source§

impl Clone for ActionType

source§

fn clone(&self) -> ActionType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ActionType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ActionType

source§

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 PartialEq for ActionType

source§

fn eq(&self, other: &ActionType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ActionType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ActionType

source§

impl StructuralEq for ActionType

source§

impl StructuralPartialEq for ActionType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Call: 0 bytes
  • Create: 0 bytes
  • Selfdestruct: 0 bytes
  • Reward: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/enum.CallType.html b/alloy_rpc_types/trace/parity/enum.CallType.html new file mode 100644 index 000000000000..1516aaca9c99 --- /dev/null +++ b/alloy_rpc_types/trace/parity/enum.CallType.html @@ -0,0 +1,36 @@ +CallType in alloy_rpc_types::trace::parity - Rust +
pub enum CallType {
+    None,
+    Call,
+    CallCode,
+    DelegateCall,
+    StaticCall,
+}
Expand description

Call type.

+

Variants§

§

None

None

+
§

Call

Call

+
§

CallCode

Call code

+
§

DelegateCall

Delegate call

+
§

StaticCall

Static call

+

Trait Implementations§

source§

impl Clone for CallType

source§

fn clone(&self) -> CallType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallType

source§

fn default() -> CallType

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallType

source§

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 PartialEq for CallType

source§

fn eq(&self, other: &CallType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallType

source§

impl StructuralEq for CallType

source§

impl StructuralPartialEq for CallType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • None: 0 bytes
  • Call: 0 bytes
  • CallCode: 0 bytes
  • DelegateCall: 0 bytes
  • StaticCall: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/enum.Delta.html b/alloy_rpc_types/trace/parity/enum.Delta.html new file mode 100644 index 000000000000..c40e0e21d1e8 --- /dev/null +++ b/alloy_rpc_types/trace/parity/enum.Delta.html @@ -0,0 +1,46 @@ +Delta in alloy_rpc_types::trace::parity - Rust +
pub enum Delta<T> {
+    Unchanged,
+    Added(T),
+    Removed(T),
+    Changed(ChangedType<T>),
+}
Expand description

Delta type

+

Variants§

§

Unchanged

Unchanged variant.

+
§

Added(T)

Added variant.

+
§

Removed(T)

Removed variant.

+
§

Changed(ChangedType<T>)

Changed variant.

+

Implementations§

source§

impl<T> Delta<T>

source

pub fn changed(from: T, to: T) -> Self

Creates a new Delta::Changed variant

+
source

pub fn is_unchanged(&self) -> bool

Returns true if the value is unchanged

+
source

pub fn is_added(&self) -> bool

Returns true if the value is added

+
source

pub fn is_removed(&self) -> bool

Returns true if the value is removed

+
source

pub fn is_changed(&self) -> bool

Returns true if the value is changed

+

Trait Implementations§

source§

impl<T: Clone> Clone for Delta<T>

source§

fn clone(&self) -> Delta<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Delta<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for Delta<T>

source§

fn default() -> Delta<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for Delta<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for Delta<T>

source§

fn eq(&self, other: &Delta<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for Delta<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for Delta<T>

source§

impl<T> StructuralEq for Delta<T>

source§

impl<T> StructuralPartialEq for Delta<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Delta<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Delta<T>
where + T: Send,

§

impl<T> Sync for Delta<T>
where + T: Sync,

§

impl<T> Unpin for Delta<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Delta<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/enum.RewardType.html b/alloy_rpc_types/trace/parity/enum.RewardType.html new file mode 100644 index 000000000000..aaa94fc32fa6 --- /dev/null +++ b/alloy_rpc_types/trace/parity/enum.RewardType.html @@ -0,0 +1,30 @@ +RewardType in alloy_rpc_types::trace::parity - Rust +
pub enum RewardType {
+    Block,
+    Uncle,
+}
Expand description

Reward type.

+

Variants§

§

Block

Block

+
§

Uncle

Uncle

+

Trait Implementations§

source§

impl Clone for RewardType

source§

fn clone(&self) -> RewardType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RewardType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RewardType

source§

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 PartialEq for RewardType

source§

fn eq(&self, other: &RewardType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RewardType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RewardType

source§

impl StructuralEq for RewardType

source§

impl StructuralPartialEq for RewardType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Block: 0 bytes
  • Uncle: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/enum.TraceOutput.html b/alloy_rpc_types/trace/parity/enum.TraceOutput.html new file mode 100644 index 000000000000..fa8ee85f9e26 --- /dev/null +++ b/alloy_rpc_types/trace/parity/enum.TraceOutput.html @@ -0,0 +1,32 @@ +TraceOutput in alloy_rpc_types::trace::parity - Rust +
pub enum TraceOutput {
+    Call(CallOutput),
+    Create(CreateOutput),
+}
Expand description

Represents the output of a trace.

+

Variants§

§

Call(CallOutput)

Output of a regular call transaction.

+
§

Create(CreateOutput)

Output of a CREATE transaction.

+

Implementations§

source§

impl TraceOutput

source

pub fn gas_used(&self) -> U64

Returns the gas used by this trace.

+
source

pub fn set_gas_used(&mut self, gas_used: u64)

Sets the gas used by this trace.

+

Trait Implementations§

source§

impl Clone for TraceOutput

source§

fn clone(&self) -> TraceOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceOutput

source§

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 PartialEq for TraceOutput

source§

fn eq(&self, other: &TraceOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceOutput

source§

impl StructuralEq for TraceOutput

source§

impl StructuralPartialEq for TraceOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

Size for each variant:

  • Call: 48 bytes
  • Create: 64 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/enum.TraceType.html b/alloy_rpc_types/trace/parity/enum.TraceType.html new file mode 100644 index 000000000000..bb8130af178a --- /dev/null +++ b/alloy_rpc_types/trace/parity/enum.TraceType.html @@ -0,0 +1,36 @@ +TraceType in alloy_rpc_types::trace::parity - Rust +
pub enum TraceType {
+    Trace,
+    VmTrace,
+    StateDiff,
+}
Expand description

Different Trace diagnostic targets.

+

Variants§

§

Trace

Default trace

+
§

VmTrace

Provides a full trace of the VM’s state throughout the execution of the transaction, +including for any subcalls.

+
§

StateDiff

Provides information detailing all altered portions of the Ethereum state made due to the +execution of the transaction.

+

Trait Implementations§

source§

impl Clone for TraceType

source§

fn clone(&self) -> TraceType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceType

source§

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 Hash for TraceType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for TraceType

source§

fn eq(&self, other: &TraceType) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceType

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceType

source§

impl StructuralEq for TraceType

source§

impl StructuralPartialEq for TraceType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Trace: 0 bytes
  • VmTrace: 0 bytes
  • StateDiff: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/index.html b/alloy_rpc_types/trace/parity/index.html new file mode 100644 index 000000000000..2f06039608f6 --- /dev/null +++ b/alloy_rpc_types/trace/parity/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::trace::parity - Rust +
Expand description

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/sidebar-items.js b/alloy_rpc_types/trace/parity/sidebar-items.js new file mode 100644 index 000000000000..5d61ff31162b --- /dev/null +++ b/alloy_rpc_types/trace/parity/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Action","ActionType","CallType","Delta","RewardType","TraceOutput","TraceType"],"struct":["AccountDiff","CallAction","CallOutput","ChangedType","CreateAction","CreateOutput","LocalizedTransactionTrace","MemoryDelta","RewardAction","SelfdestructAction","StateDiff","StorageDelta","TraceResults","TraceResultsWithTransactionHash","TransactionTrace","VmExecutedOperation","VmInstruction","VmTrace"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.AccountDiff.html b/alloy_rpc_types/trace/parity/struct.AccountDiff.html new file mode 100644 index 000000000000..aabb9c43d1e0 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.AccountDiff.html @@ -0,0 +1,34 @@ +AccountDiff in alloy_rpc_types::trace::parity - Rust +
pub struct AccountDiff {
+    pub balance: Delta<U256>,
+    pub code: Delta<Bytes>,
+    pub nonce: Delta<U64>,
+    pub storage: BTreeMap<B256, Delta<B256>>,
+}
Expand description

Serde-friendly AccountDiff shadow.

+

Fields§

§balance: Delta<U256>

Balance change.

+
§code: Delta<Bytes>

Code change.

+
§nonce: Delta<U64>

Nonce change.

+
§storage: BTreeMap<B256, Delta<B256>>

Storage changes.

+

Trait Implementations§

source§

impl Clone for AccountDiff

source§

fn clone(&self) -> AccountDiff

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountDiff

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountDiff

source§

fn default() -> AccountDiff

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountDiff

source§

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 PartialEq for AccountDiff

source§

fn eq(&self, other: &AccountDiff) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountDiff

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountDiff

source§

impl StructuralEq for AccountDiff

source§

impl StructuralPartialEq for AccountDiff

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 192 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.CallAction.html b/alloy_rpc_types/trace/parity/struct.CallAction.html new file mode 100644 index 000000000000..a157fb9cb360 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.CallAction.html @@ -0,0 +1,38 @@ +CallAction in alloy_rpc_types::trace::parity - Rust +
pub struct CallAction {
+    pub from: Address,
+    pub call_type: CallType,
+    pub gas: U64,
+    pub input: Bytes,
+    pub to: Address,
+    pub value: U256,
+}
Expand description

Represents a certain CallType of a call or message transaction.

+

Fields§

§from: Address

Address of the sending account.

+
§call_type: CallType

The type of the call.

+
§gas: U64

The gas available for executing the call.

+
§input: Bytes

The input data provided to the call.

+
§to: Address

Address of the destination/target account.

+
§value: U256

Value transferred to the destination account.

+

Trait Implementations§

source§

impl Clone for CallAction

source§

fn clone(&self) -> CallAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CallAction

source§

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 PartialEq for CallAction

source§

fn eq(&self, other: &CallAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallAction

source§

impl StructuralEq for CallAction

source§

impl StructuralPartialEq for CallAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.CallOutput.html b/alloy_rpc_types/trace/parity/struct.CallOutput.html new file mode 100644 index 000000000000..11a44fc0058d --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.CallOutput.html @@ -0,0 +1,30 @@ +CallOutput in alloy_rpc_types::trace::parity - Rust +
pub struct CallOutput {
+    pub gas_used: U64,
+    pub output: Bytes,
+}
Expand description

Call out put type

+

Fields§

§gas_used: U64

Gas Used.

+
§output: Bytes

Output

+

Trait Implementations§

source§

impl Clone for CallOutput

source§

fn clone(&self) -> CallOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CallOutput

source§

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 PartialEq for CallOutput

source§

fn eq(&self, other: &CallOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallOutput

source§

impl StructuralEq for CallOutput

source§

impl StructuralPartialEq for CallOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.ChangedType.html b/alloy_rpc_types/trace/parity/struct.ChangedType.html new file mode 100644 index 000000000000..caaf349e4f0e --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.ChangedType.html @@ -0,0 +1,37 @@ +ChangedType in alloy_rpc_types::trace::parity - Rust +
pub struct ChangedType<T> {
+    pub from: T,
+    pub to: T,
+}
Expand description

Aux type for Diff::Changed.

+

Fields§

§from: T

Previous value.

+
§to: T

Current value.

+

Trait Implementations§

source§

impl<T: Clone> Clone for ChangedType<T>

source§

fn clone(&self) -> ChangedType<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for ChangedType<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, T> Deserialize<'de> for ChangedType<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for ChangedType<T>

source§

fn eq(&self, other: &ChangedType<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for ChangedType<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for ChangedType<T>

source§

impl<T> StructuralEq for ChangedType<T>

source§

impl<T> StructuralPartialEq for ChangedType<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ChangedType<T>
where + T: RefUnwindSafe,

§

impl<T> Send for ChangedType<T>
where + T: Send,

§

impl<T> Sync for ChangedType<T>
where + T: Sync,

§

impl<T> Unpin for ChangedType<T>
where + T: Unpin,

§

impl<T> UnwindSafe for ChangedType<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.CreateAction.html b/alloy_rpc_types/trace/parity/struct.CreateAction.html new file mode 100644 index 000000000000..04eff9e90df8 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.CreateAction.html @@ -0,0 +1,34 @@ +CreateAction in alloy_rpc_types::trace::parity - Rust +
pub struct CreateAction {
+    pub from: Address,
+    pub gas: U64,
+    pub init: Bytes,
+    pub value: U256,
+}
Expand description

Represents a create action, either a CREATE operation or a CREATE transaction.

+

Fields§

§from: Address

The address of the creator.

+
§gas: U64

The gas available for the creation init code.

+
§init: Bytes

The init code.

+
§value: U256

The value with which the new account is endowed.

+

Trait Implementations§

source§

impl Clone for CreateAction

source§

fn clone(&self) -> CreateAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CreateAction

source§

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 PartialEq for CreateAction

source§

fn eq(&self, other: &CreateAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CreateAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CreateAction

source§

impl StructuralEq for CreateAction

source§

impl StructuralPartialEq for CreateAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 96 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.CreateOutput.html b/alloy_rpc_types/trace/parity/struct.CreateOutput.html new file mode 100644 index 000000000000..4af80aaf002c --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.CreateOutput.html @@ -0,0 +1,32 @@ +CreateOutput in alloy_rpc_types::trace::parity - Rust +
pub struct CreateOutput {
+    pub address: Address,
+    pub code: Bytes,
+    pub gas_used: U64,
+}
Expand description

Represents the output of a create operation.

+

Fields§

§address: Address

Address output.

+
§code: Bytes

Code data.

+
§gas_used: U64

Resulting address.

+

Trait Implementations§

source§

impl Clone for CreateOutput

source§

fn clone(&self) -> CreateOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CreateOutput

source§

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 PartialEq for CreateOutput

source§

fn eq(&self, other: &CreateOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CreateOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CreateOutput

source§

impl StructuralEq for CreateOutput

source§

impl StructuralPartialEq for CreateOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.LocalizedTransactionTrace.html b/alloy_rpc_types/trace/parity/struct.LocalizedTransactionTrace.html new file mode 100644 index 000000000000..0a9fd5762215 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.LocalizedTransactionTrace.html @@ -0,0 +1,39 @@ +LocalizedTransactionTrace in alloy_rpc_types::trace::parity - Rust +
pub struct LocalizedTransactionTrace {
+    pub trace: TransactionTrace,
+    pub block_hash: Option<B256>,
+    pub block_number: Option<u64>,
+    pub transaction_hash: Option<B256>,
+    pub transaction_position: Option<u64>,
+}
Expand description

Localized transaction trace.

+

Fields§

§trace: TransactionTrace

Trace of the transaction and its result. +Trace of the transaction and its result.

+
§block_hash: Option<B256>

Hash of the block, if not pending.

+

Note: this deviates from https://openethereum.github.io/JSONRPC-trace-module#trace_transaction which always returns a block number

+
§block_number: Option<u64>

Block number the transaction is included in, None if pending.

+

Note: this deviates from https://openethereum.github.io/JSONRPC-trace-module#trace_transaction which always returns a block number

+
§transaction_hash: Option<B256>

Hash of the transaction

+
§transaction_position: Option<u64>

Transaction index within the block, None if pending.

+

Trait Implementations§

source§

impl Clone for LocalizedTransactionTrace

source§

fn clone(&self) -> LocalizedTransactionTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LocalizedTransactionTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for LocalizedTransactionTrace

source§

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 PartialEq for LocalizedTransactionTrace

source§

fn eq(&self, other: &LocalizedTransactionTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for LocalizedTransactionTrace

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for LocalizedTransactionTrace

source§

impl StructuralEq for LocalizedTransactionTrace

source§

impl StructuralPartialEq for LocalizedTransactionTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 352 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.MemoryDelta.html b/alloy_rpc_types/trace/parity/struct.MemoryDelta.html new file mode 100644 index 000000000000..7f63d0f5aeaa --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.MemoryDelta.html @@ -0,0 +1,30 @@ +MemoryDelta in alloy_rpc_types::trace::parity - Rust +
pub struct MemoryDelta {
+    pub off: usize,
+    pub data: Bytes,
+}
Expand description

A diff of some chunk of memory.

+

Fields§

§off: usize

Offset into memory the change begins.

+
§data: Bytes

The changed data.

+

Trait Implementations§

source§

impl Clone for MemoryDelta

source§

fn clone(&self) -> MemoryDelta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MemoryDelta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for MemoryDelta

source§

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 PartialEq for MemoryDelta

source§

fn eq(&self, other: &MemoryDelta) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for MemoryDelta

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for MemoryDelta

source§

impl StructuralEq for MemoryDelta

source§

impl StructuralPartialEq for MemoryDelta

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.RewardAction.html b/alloy_rpc_types/trace/parity/struct.RewardAction.html new file mode 100644 index 000000000000..976dfe672325 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.RewardAction.html @@ -0,0 +1,32 @@ +RewardAction in alloy_rpc_types::trace::parity - Rust +
pub struct RewardAction {
+    pub author: Address,
+    pub reward_type: RewardType,
+    pub value: U256,
+}
Expand description

Reward Action.

+

Fields§

§author: Address

Author’s address.

+
§reward_type: RewardType

Reward type.

+
§value: U256

Reward amount.

+

Trait Implementations§

source§

impl Clone for RewardAction

source§

fn clone(&self) -> RewardAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RewardAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RewardAction

source§

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 PartialEq for RewardAction

source§

fn eq(&self, other: &RewardAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RewardAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RewardAction

source§

impl StructuralEq for RewardAction

source§

impl StructuralPartialEq for RewardAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.SelfdestructAction.html b/alloy_rpc_types/trace/parity/struct.SelfdestructAction.html new file mode 100644 index 000000000000..76a9e035d95b --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.SelfdestructAction.html @@ -0,0 +1,32 @@ +SelfdestructAction in alloy_rpc_types::trace::parity - Rust +
pub struct SelfdestructAction {
+    pub address: Address,
+    pub balance: U256,
+    pub refund_address: Address,
+}
Expand description

Represents a selfdestruct action fka suicide.

+

Fields§

§address: Address

destroyed/suicided address.

+
§balance: U256

Balance of the contract just before it was destroyed.

+
§refund_address: Address

destroyed contract heir.

+

Trait Implementations§

source§

impl Clone for SelfdestructAction

source§

fn clone(&self) -> SelfdestructAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SelfdestructAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SelfdestructAction

source§

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 PartialEq for SelfdestructAction

source§

fn eq(&self, other: &SelfdestructAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SelfdestructAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SelfdestructAction

source§

impl StructuralEq for SelfdestructAction

source§

impl StructuralPartialEq for SelfdestructAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.StateDiff.html b/alloy_rpc_types/trace/parity/struct.StateDiff.html new file mode 100644 index 000000000000..1baea7e7bbdb --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.StateDiff.html @@ -0,0 +1,555 @@ +StateDiff in alloy_rpc_types::trace::parity - Rust +
pub struct StateDiff(pub BTreeMap<Address, AccountDiff>);
Expand description

New-type for list of account diffs

+

Tuple Fields§

§0: BTreeMap<Address, AccountDiff>

Methods from Deref<Target = BTreeMap<Address, AccountDiff>>§

1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.clear();
+assert!(a.is_empty());
+
1.0.0 · source

pub fn get<Q>(&self, key: &Q) -> Option<&V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get(&1), Some(&"a"));
+assert_eq!(map.get(&2), None);
+
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns the key-value pair corresponding to the supplied key.

+

The supplied key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
+assert_eq!(map.get_key_value(&2), None);
+
1.66.0 · source

pub fn first_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the first key-value pair in the map. +The key in this pair is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.first_key_value(), None);
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.first_key_value(), Some((&1, &"b")));
+
1.66.0 · source

pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the first entry in the map for in-place manipulation. +The key of this entry is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.first_entry() {
+    if *entry.key() > 0 {
+        entry.insert("first");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "first");
+assert_eq!(*map.get(&2).unwrap(), "b");
+
1.66.0 · source

pub fn pop_first(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the first element in the map. +The key of this element is the minimum key that was in the map.

+
Examples
+

Draining elements in ascending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_first() {
+    assert!(map.iter().all(|(k, _v)| *k > key));
+}
+assert!(map.is_empty());
+
1.66.0 · source

pub fn last_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the last key-value pair in the map. +The key in this pair is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.last_key_value(), Some((&2, &"a")));
+
1.66.0 · source

pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the last entry in the map for in-place manipulation. +The key of this entry is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.last_entry() {
+    if *entry.key() > 0 {
+        entry.insert("last");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "a");
+assert_eq!(*map.get(&2).unwrap(), "last");
+
1.66.0 · source

pub fn pop_last(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the last element in the map. +The key of this element is the maximum key that was in the map.

+
Examples
+

Draining elements in descending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_last() {
+    assert!(map.iter().all(|(k, _v)| *k < key));
+}
+assert!(map.is_empty());
+
1.0.0 · source

pub fn contains_key<Q>(&self, key: &Q) -> bool
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns true if the map contains a value for the specified key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.contains_key(&1), true);
+assert_eq!(map.contains_key(&2), false);
+
1.0.0 · source

pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a mutable reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+if let Some(x) = map.get_mut(&1) {
+    *x = "b";
+}
+assert_eq!(map[&1], "b");
+
1.0.0 · source

pub fn insert(&mut self, key: K, value: V) -> Option<V>
where + K: Ord,

Inserts a key-value pair into the map.

+

If the map did not have this key present, None is returned.

+

If the map did have this key present, the value is updated, and the old +value is returned. The key is not updated, though; this matters for +types that can be == without being identical. See the module-level +documentation for more.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.insert(37, "a"), None);
+assert_eq!(map.is_empty(), false);
+
+map.insert(37, "b");
+assert_eq!(map.insert(37, "c"), Some("b"));
+assert_eq!(map[&37], "c");
+
source

pub fn try_insert( + &mut self, + key: K, + value: V +) -> Result<&mut V, OccupiedError<'_, K, V, A>>
where + K: Ord,

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns +a mutable reference to the value in the entry.

+

If the map already had this key present, nothing is updated, and +an error containing the occupied entry and the value is returned.

+
Examples
+
#![feature(map_try_insert)]
+
+use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.try_insert(37, "a").unwrap(), &"a");
+
+let err = map.try_insert(37, "b").unwrap_err();
+assert_eq!(err.entry.key(), &37);
+assert_eq!(err.entry.get(), &"a");
+assert_eq!(err.value, "b");
+
1.0.0 · source

pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the value at the key if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove(&1), Some("a"));
+assert_eq!(map.remove(&1), None);
+
1.45.0 · source

pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the stored key and value if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove_entry(&1), Some((1, "a")));
+assert_eq!(map.remove_entry(&1), None);
+
1.53.0 · source

pub fn retain<F>(&mut self, f: F)
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

+

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false. +The elements are visited in ascending key order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
+// Keep only the elements with even-numbered keys.
+map.retain(|&k, _| k % 2 == 0);
+assert!(map.into_iter().eq(vec![(0, 0), (2, 20), (4, 40), (6, 60)]));
+
1.11.0 · source

pub fn append(&mut self, other: &mut BTreeMap<K, V, A>)
where + K: Ord, + A: Clone,

Moves all elements from other into self, leaving other empty.

+

If a key from other is already present in self, the respective +value from self will be overwritten with the respective value from other.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c"); // Note: Key (3) also present in b.
+
+let mut b = BTreeMap::new();
+b.insert(3, "d"); // Note: Key (3) also present in a.
+b.insert(4, "e");
+b.insert(5, "f");
+
+a.append(&mut b);
+
+assert_eq!(a.len(), 5);
+assert_eq!(b.len(), 0);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+assert_eq!(a[&3], "d"); // Note: "c" has been overwritten.
+assert_eq!(a[&4], "e");
+assert_eq!(a[&5], "f");
+
1.17.0 · source

pub fn range<T, R>(&self, range: R) -> Range<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+use std::ops::Bound::Included;
+
+let mut map = BTreeMap::new();
+map.insert(3, "a");
+map.insert(5, "b");
+map.insert(8, "c");
+for (&key, &value) in map.range((Included(&4), Included(&8))) {
+    println!("{key}: {value}");
+}
+assert_eq!(Some((&5, &"b")), map.range(4..).next());
+
1.17.0 · source

pub fn range_mut<T, R>(&mut self, range: R) -> RangeMut<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a mutable double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<&str, i32> =
+    [("Alice", 0), ("Bob", 0), ("Carol", 0), ("Cheryl", 0)].into();
+for (_, balance) in map.range_mut("B".."Cheryl") {
+    *balance += 100;
+}
+for (name, balance) in &map {
+    println!("{name} => {balance}");
+}
+
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A>
where + K: Ord,

Gets the given key’s corresponding entry in the map for in-place manipulation.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut count: BTreeMap<&str, usize> = BTreeMap::new();
+
+// count the number of occurrences of letters in the vec
+for x in ["a", "b", "a", "c", "a", "b"] {
+    count.entry(x).and_modify(|curr| *curr += 1).or_insert(1);
+}
+
+assert_eq!(count["a"], 3);
+assert_eq!(count["b"], 2);
+assert_eq!(count["c"], 1);
+
1.11.0 · source

pub fn split_off<Q>(&mut self, key: &Q) -> BTreeMap<K, V, A>
where + Q: Ord + ?Sized, + K: Borrow<Q> + Ord, + A: Clone,

Splits the collection into two at the given key. Returns everything after the given key, +including the key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(17, "d");
+a.insert(41, "e");
+
+let b = a.split_off(&3);
+
+assert_eq!(a.len(), 2);
+assert_eq!(b.len(), 3);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+
+assert_eq!(b[&3], "c");
+assert_eq!(b[&17], "d");
+assert_eq!(b[&41], "e");
+
source

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A>
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (btree_extract_if)

Creates an iterator that visits all elements (key-value pairs) in +ascending key order and uses a closure to determine if an element should +be removed. If the closure returns true, the element is removed from +the map and yielded. If the closure returns false, or panics, the +element remains in the map and will not be yielded.

+

The iterator also lets you mutate the value of each element in the +closure, regardless of whether you choose to keep or remove it.

+

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating +or the iteration short-circuits, then the remaining elements will be retained. +Use retain with a negated predicate if you do not need the returned iterator.

+
Examples
+

Splitting a map into even and odd keys, reusing the original map:

+ +
#![feature(btree_extract_if)]
+use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
+let evens: BTreeMap<_, _> = map.extract_if(|k, _v| k % 2 == 0).collect();
+let odds = map;
+assert_eq!(evens.keys().copied().collect::<Vec<_>>(), [0, 2, 4, 6]);
+assert_eq!(odds.keys().copied().collect::<Vec<_>>(), [1, 3, 5, 7]);
+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

Gets an iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(3, "c");
+map.insert(2, "b");
+map.insert(1, "a");
+
+for (key, value) in map.iter() {
+    println!("{key}: {value}");
+}
+
+let (first_key, first_value) = map.iter().next().unwrap();
+assert_eq!((*first_key, *first_value), (1, "a"));
+
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

Gets a mutable iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::from([
+   ("a", 1),
+   ("b", 2),
+   ("c", 3),
+]);
+
+// add 10 to the value if the key isn't "a"
+for (key, value) in map.iter_mut() {
+    if key != &"a" {
+        *value += 10;
+    }
+}
+
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

Gets an iterator over the keys of the map, in sorted order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(2, "b");
+a.insert(1, "a");
+
+let keys: Vec<_> = a.keys().cloned().collect();
+assert_eq!(keys, [1, 2]);
+
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

Gets an iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "hello");
+a.insert(2, "goodbye");
+
+let values: Vec<&str> = a.values().cloned().collect();
+assert_eq!(values, ["hello", "goodbye"]);
+
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

Gets a mutable iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, String::from("hello"));
+a.insert(2, String::from("goodbye"));
+
+for value in a.values_mut() {
+    value.push_str("!");
+}
+
+let values: Vec<String> = a.values().cloned().collect();
+assert_eq!(values, [String::from("hello!"),
+                    String::from("goodbye!")]);
+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert_eq!(a.len(), 0);
+a.insert(1, "a");
+assert_eq!(a.len(), 1);
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert!(a.is_empty());
+a.insert(1, "a");
+assert!(!a.is_empty());
+
source

pub fn lower_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn lower_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound_mut(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound_mut(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn upper_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+
source

pub fn upper_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound_mut(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound_mut(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+

Trait Implementations§

source§

impl Clone for StateDiff

source§

fn clone(&self) -> StateDiff

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StateDiff

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StateDiff

source§

fn default() -> StateDiff

Returns the “default value” for a type. Read more
source§

impl Deref for StateDiff

§

type Target = BTreeMap<Address, AccountDiff>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for StateDiff

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for StateDiff

source§

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 PartialEq for StateDiff

source§

fn eq(&self, other: &StateDiff) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StateDiff

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StateDiff

source§

impl StructuralEq for StateDiff

source§

impl StructuralPartialEq for StateDiff

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.StorageDelta.html b/alloy_rpc_types/trace/parity/struct.StorageDelta.html new file mode 100644 index 000000000000..cafe0a48dc75 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.StorageDelta.html @@ -0,0 +1,30 @@ +StorageDelta in alloy_rpc_types::trace::parity - Rust +
pub struct StorageDelta {
+    pub key: U256,
+    pub val: U256,
+}
Expand description

A diff of some storage value.

+

Fields§

§key: U256

Key.

+
§val: U256

Value.

+

Trait Implementations§

source§

impl Clone for StorageDelta

source§

fn clone(&self) -> StorageDelta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StorageDelta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for StorageDelta

source§

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 PartialEq for StorageDelta

source§

fn eq(&self, other: &StorageDelta) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StorageDelta

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StorageDelta

source§

impl StructuralEq for StorageDelta

source§

impl StructuralPartialEq for StorageDelta

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.TraceResults.html b/alloy_rpc_types/trace/parity/struct.TraceResults.html new file mode 100644 index 000000000000..e085010ab837 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.TraceResults.html @@ -0,0 +1,37 @@ +TraceResults in alloy_rpc_types::trace::parity - Rust +
pub struct TraceResults {
+    pub output: Bytes,
+    pub state_diff: Option<StateDiff>,
+    pub trace: Vec<TransactionTrace>,
+    pub vm_trace: Option<VmTrace>,
+}
Expand description

The Outcome of a traced transaction with optional settings

+

Fields§

§output: Bytes

Output of the trace

+
§state_diff: Option<StateDiff>

Enabled if TraceType::StateDiff is provided

+
§trace: Vec<TransactionTrace>

Enabled if TraceType::Trace is provided, otherwise an empty vec

+
§vm_trace: Option<VmTrace>

Enabled if TraceType::VmTrace is provided

+

Implementations§

source§

impl TraceResults

source

pub fn set_root_trace_gas_used(&mut self, gas_used: u64)

Sets the gas used of the root trace.

+

The root trace’s gasUsed should mirror the actual gas used by the transaction.

+

This allows setting it manually by consuming the execution result’s gas for example.

+

Trait Implementations§

source§

impl Clone for TraceResults

source§

fn clone(&self) -> TraceResults

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceResults

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceResults

source§

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 PartialEq for TraceResults

source§

fn eq(&self, other: &TraceResults) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceResults

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceResults

source§

impl StructuralEq for TraceResults

source§

impl StructuralPartialEq for TraceResults

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 144 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.TraceResultsWithTransactionHash.html b/alloy_rpc_types/trace/parity/struct.TraceResultsWithTransactionHash.html new file mode 100644 index 000000000000..813b6c02a51b --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.TraceResultsWithTransactionHash.html @@ -0,0 +1,30 @@ +TraceResultsWithTransactionHash in alloy_rpc_types::trace::parity - Rust +
pub struct TraceResultsWithTransactionHash {
+    pub full_trace: TraceResults,
+    pub transaction_hash: B256,
+}
Expand description

A FullTrace with an additional transaction hash

+

Fields§

§full_trace: TraceResults

Full trace data.

+
§transaction_hash: B256

Transaction hash.

+

Trait Implementations§

source§

impl Clone for TraceResultsWithTransactionHash

source§

fn clone(&self) -> TraceResultsWithTransactionHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceResultsWithTransactionHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceResultsWithTransactionHash

source§

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 PartialEq for TraceResultsWithTransactionHash

source§

fn eq(&self, other: &TraceResultsWithTransactionHash) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceResultsWithTransactionHash

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceResultsWithTransactionHash

source§

impl StructuralEq for TraceResultsWithTransactionHash

source§

impl StructuralPartialEq for TraceResultsWithTransactionHash

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.TransactionTrace.html b/alloy_rpc_types/trace/parity/struct.TransactionTrace.html new file mode 100644 index 000000000000..fbcafb2db3d4 --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.TransactionTrace.html @@ -0,0 +1,36 @@ +TransactionTrace in alloy_rpc_types::trace::parity - Rust +
pub struct TransactionTrace {
+    pub action: Action,
+    pub error: Option<String>,
+    pub result: Option<TraceOutput>,
+    pub subtraces: usize,
+    pub trace_address: Vec<usize>,
+}
Expand description

A parity style trace of a transaction.

+

Fields§

§action: Action

Transaction action.

+
§error: Option<String>

Error message.

+
§result: Option<TraceOutput>

Execution result.

+
§subtraces: usize

Subtrace count.

+
§trace_address: Vec<usize>

Trace address path.

+

Trait Implementations§

source§

impl Clone for TransactionTrace

source§

fn clone(&self) -> TransactionTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransactionTrace

source§

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 PartialEq for TransactionTrace

source§

fn eq(&self, other: &TransactionTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionTrace

source§

impl StructuralEq for TransactionTrace

source§

impl StructuralPartialEq for TransactionTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 248 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.VmExecutedOperation.html b/alloy_rpc_types/trace/parity/struct.VmExecutedOperation.html new file mode 100644 index 000000000000..f6c2a9ee79dd --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.VmExecutedOperation.html @@ -0,0 +1,34 @@ +VmExecutedOperation in alloy_rpc_types::trace::parity - Rust +
pub struct VmExecutedOperation {
+    pub used: u64,
+    pub push: Vec<U256>,
+    pub mem: Option<MemoryDelta>,
+    pub store: Option<StorageDelta>,
+}
Expand description

A record of an executed VM operation.

+

Fields§

§used: u64

The total gas used.

+
§push: Vec<U256>

The stack item placed, if any.

+
§mem: Option<MemoryDelta>

If altered, the memory delta.

+
§store: Option<StorageDelta>

The altered storage value, if any.

+

Trait Implementations§

source§

impl Clone for VmExecutedOperation

source§

fn clone(&self) -> VmExecutedOperation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmExecutedOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for VmExecutedOperation

source§

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 PartialEq for VmExecutedOperation

source§

fn eq(&self, other: &VmExecutedOperation) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmExecutedOperation

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmExecutedOperation

source§

impl StructuralEq for VmExecutedOperation

source§

impl StructuralPartialEq for VmExecutedOperation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 144 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.VmInstruction.html b/alloy_rpc_types/trace/parity/struct.VmInstruction.html new file mode 100644 index 000000000000..6ddafdef614e --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.VmInstruction.html @@ -0,0 +1,38 @@ +VmInstruction in alloy_rpc_types::trace::parity - Rust +
pub struct VmInstruction {
+    pub cost: u64,
+    pub ex: Option<VmExecutedOperation>,
+    pub pc: usize,
+    pub sub: Option<VmTrace>,
+    pub op: Option<String>,
+    pub idx: Option<String>,
+}
Expand description

Vm instruction type.

+

Fields§

§cost: u64

The gas cost for this instruction.

+
§ex: Option<VmExecutedOperation>

Information concerning the execution of the operation.

+
§pc: usize

The program counter.

+
§sub: Option<VmTrace>

Subordinate trace of the CALL/CREATE if applicable.

+
§op: Option<String>

Stringified opcode.

+
§idx: Option<String>

Index.

+

Trait Implementations§

source§

impl Clone for VmInstruction

source§

fn clone(&self) -> VmInstruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmInstruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for VmInstruction

source§

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 PartialEq for VmInstruction

source§

fn eq(&self, other: &VmInstruction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmInstruction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmInstruction

source§

impl StructuralEq for VmInstruction

source§

impl StructuralPartialEq for VmInstruction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 264 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/parity/struct.VmTrace.html b/alloy_rpc_types/trace/parity/struct.VmTrace.html new file mode 100644 index 000000000000..af2a9992389d --- /dev/null +++ b/alloy_rpc_types/trace/parity/struct.VmTrace.html @@ -0,0 +1,30 @@ +VmTrace in alloy_rpc_types::trace::parity - Rust +
pub struct VmTrace {
+    pub code: Bytes,
+    pub ops: Vec<VmInstruction>,
+}
Expand description

A record of a full VM trace for a CALL/CREATE.

+

Fields§

§code: Bytes

The code to be executed.

+
§ops: Vec<VmInstruction>

All executed instructions.

+

Trait Implementations§

source§

impl Clone for VmTrace

source§

fn clone(&self) -> VmTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for VmTrace

source§

fn default() -> VmTrace

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for VmTrace

source§

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 PartialEq for VmTrace

source§

fn eq(&self, other: &VmTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmTrace

source§

impl StructuralEq for VmTrace

source§

impl StructuralPartialEq for VmTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/enum.AccountChangeKind.html b/alloy_rpc_types/trace/pre_state/enum.AccountChangeKind.html new file mode 100644 index 000000000000..9561f77ad814 --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/enum.AccountChangeKind.html @@ -0,0 +1,34 @@ +AccountChangeKind in alloy_rpc_types::trace::pre_state - Rust +
pub enum AccountChangeKind {
+    Modify,
+    Create,
+    SelfDestruct,
+}
Expand description

Helper type to track the kind of change of an AccountState.

+

Variants§

§

Modify

§

Create

§

SelfDestruct

Implementations§

source§

impl AccountChangeKind

source

pub fn is_created(&self) -> bool

Returns true if the account was created

+
source

pub fn is_modified(&self) -> bool

Returns true the account was modified

+
source

pub fn is_selfdestruct(&self) -> bool

Returns true the account was modified

+

Trait Implementations§

source§

impl Clone for AccountChangeKind

source§

fn clone(&self) -> AccountChangeKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountChangeKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountChangeKind

source§

fn default() -> AccountChangeKind

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountChangeKind

source§

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 Hash for AccountChangeKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountChangeKind

source§

fn eq(&self, other: &AccountChangeKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountChangeKind

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountChangeKind

source§

impl StructuralEq for AccountChangeKind

source§

impl StructuralPartialEq for AccountChangeKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

Size for each variant:

  • Modify: 0 bytes
  • Create: 0 bytes
  • SelfDestruct: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/enum.DiffStateKind.html b/alloy_rpc_types/trace/pre_state/enum.DiffStateKind.html new file mode 100644 index 000000000000..64b9b84987c6 --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/enum.DiffStateKind.html @@ -0,0 +1,29 @@ +DiffStateKind in alloy_rpc_types::trace::pre_state - Rust +
pub enum DiffStateKind {
+    Pre,
+    Post,
+}
Expand description

Helper type for DiffMode to represent a specific set

+

Variants§

§

Pre

Corresponds to the pre state of the DiffMode

+
§

Post

Corresponds to the post state of the DiffMode

+

Implementations§

source§

impl DiffStateKind

source

pub fn is_pre(&self) -> bool

Returns true if this is the pre state of the DiffMode

+
source

pub fn is_post(&self) -> bool

Returns true if this is the post state of the DiffMode

+

Trait Implementations§

source§

impl Clone for DiffStateKind

source§

fn clone(&self) -> DiffStateKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffStateKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for DiffStateKind

source§

fn eq(&self, other: &DiffStateKind) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for DiffStateKind

source§

impl Eq for DiffStateKind

source§

impl StructuralEq for DiffStateKind

source§

impl StructuralPartialEq for DiffStateKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • Pre: 0 bytes
  • Post: 0 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/enum.PreStateFrame.html b/alloy_rpc_types/trace/pre_state/enum.PreStateFrame.html new file mode 100644 index 000000000000..d642696cf6ea --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/enum.PreStateFrame.html @@ -0,0 +1,40 @@ +PreStateFrame in alloy_rpc_types::trace::pre_state - Rust +
pub enum PreStateFrame {
+    Default(PreStateMode),
+    Diff(DiffMode),
+}
Expand description

Variants§

§

Default(PreStateMode)

The default mode returns the accounts necessary to execute a given transaction.

+

It re-executes the given transaction and tracks every part of state that is touched.

+
§

Diff(DiffMode)

Diff mode returns the differences between the transaction’s pre and post-state (i.e. what +changed because the transaction happened).

+

Implementations§

source§

impl PreStateFrame

source

pub fn is_default(&self) -> bool

Returns true if this trace was requested without diffmode.

+
source

pub fn is_diff(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn as_default(&self) -> Option<&PreStateMode>

Returns the account states after the transaction is executed if this trace was requested +without diffmode.

+
source

pub fn as_diff(&self) -> Option<&DiffMode>

Returns the account states before and after the transaction is executed if this trace was +requested with diffmode.

+

Trait Implementations§

source§

impl Clone for PreStateFrame

source§

fn clone(&self) -> PreStateFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PreStateFrame

source§

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<PreStateFrame> for GethTrace

source§

fn from(value: PreStateFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PreStateFrame

source§

fn eq(&self, other: &PreStateFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateFrame

source§

impl StructuralEq for PreStateFrame

source§

impl StructuralPartialEq for PreStateFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

Size for each variant:

  • Default: 24 bytes
  • Diff: 48 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/index.html b/alloy_rpc_types/trace/pre_state/index.html new file mode 100644 index 000000000000..d40cc05de696 --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::trace::pre_state - Rust +

Structs

Enums

\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/sidebar-items.js b/alloy_rpc_types/trace/pre_state/sidebar-items.js new file mode 100644 index 000000000000..2e63ad48aa29 --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AccountChangeKind","DiffStateKind","PreStateFrame"],"struct":["AccountState","DiffMode","PreStateConfig","PreStateMode"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/struct.AccountState.html b/alloy_rpc_types/trace/pre_state/struct.AccountState.html new file mode 100644 index 000000000000..ff40870ed383 --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/struct.AccountState.html @@ -0,0 +1,38 @@ +AccountState in alloy_rpc_types::trace::pre_state - Rust +
pub struct AccountState {
+    pub balance: Option<U256>,
+    pub code: Option<Bytes>,
+    pub nonce: Option<u64>,
+    pub storage: BTreeMap<B256, B256>,
+}
Expand description

Represents the state of an account

+

Fields§

§balance: Option<U256>§code: Option<Bytes>§nonce: Option<u64>§storage: BTreeMap<B256, B256>

Implementations§

source§

impl AccountState

source

pub fn from_account_info(nonce: u64, balance: U256, code: Option<Bytes>) -> Self

Creates a new AccountState with the given account info.

+

If balance is zero, it will be omitted. +If nonce is zero, it will be omitted. +If code is empty, it will be omitted.

+
source

pub fn remove_matching_account_info(&mut self, other: &AccountState)

Removes balance,nonce or code if they match the given account info.

+

This is useful for comparing pre vs post state and only keep changed values in post state.

+

Trait Implementations§

source§

impl Clone for AccountState

source§

fn clone(&self) -> AccountState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountState

source§

fn default() -> AccountState

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountState

source§

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 Hash for AccountState

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountState

source§

fn eq(&self, other: &AccountState) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountState

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountState

source§

impl StructuralEq for AccountState

source§

impl StructuralPartialEq for AccountState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/struct.DiffMode.html b/alloy_rpc_types/trace/pre_state/struct.DiffMode.html new file mode 100644 index 000000000000..990072d0d06e --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/struct.DiffMode.html @@ -0,0 +1,37 @@ +DiffMode in alloy_rpc_types::trace::pre_state - Rust +
pub struct DiffMode {
+    pub post: BTreeMap<Address, AccountState>,
+    pub pre: BTreeMap<Address, AccountState>,
+}
Expand description

Represents the account states before and after the transaction is executed.

+

This corresponds to the DiffMode of the PreStateConfig.

+

This will only contain changed AccountStates, created accounts will not be included in the pre +state and selfdestructed accounts will not be included in the post state.

+

Fields§

§post: BTreeMap<Address, AccountState>

The account states after the transaction is executed.

+
§pre: BTreeMap<Address, AccountState>

The account states before the transaction is executed.

+

Implementations§

source§

impl DiffMode

source

pub fn retain_changed(&mut self) -> &mut Self

The sets of the DiffMode should only contain changed AccountStates.

+

This will remove all unchanged AccountStates from the sets.

+

In other words it removes entries that are equal (unchanged) in both the pre and post sets.

+
source

pub fn remove_zero_storage_values(&mut self)

Removes all zero values from the storage of the AccountStates.

+

Trait Implementations§

source§

impl Clone for DiffMode

source§

fn clone(&self) -> DiffMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DiffMode

source§

fn default() -> DiffMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DiffMode

source§

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 PartialEq for DiffMode

source§

fn eq(&self, other: &DiffMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DiffMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DiffMode

source§

impl StructuralEq for DiffMode

source§

impl StructuralPartialEq for DiffMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/struct.PreStateConfig.html b/alloy_rpc_types/trace/pre_state/struct.PreStateConfig.html new file mode 100644 index 000000000000..fdb84b50e6f8 --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/struct.PreStateConfig.html @@ -0,0 +1,32 @@ +PreStateConfig in alloy_rpc_types::trace::pre_state - Rust +
pub struct PreStateConfig {
+    pub diff_mode: Option<bool>,
+}
Expand description

The config for the prestate tracer.

+

If diffMode is set to true, the response frame includes all the account and storage diffs for +the transaction. If it’s missing or set to false it only returns the accounts and storage +necessary to execute the transaction.

+

Fields§

§diff_mode: Option<bool>

Implementations§

source§

impl PreStateConfig

source

pub fn is_diff_mode(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn is_default_mode(&self) -> bool

Is default mode if diff_mode is not set

+

Trait Implementations§

source§

impl Clone for PreStateConfig

source§

fn clone(&self) -> PreStateConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateConfig

source§

fn default() -> PreStateConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateConfig

source§

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 PartialEq for PreStateConfig

source§

fn eq(&self, other: &PreStateConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateConfig

source§

impl StructuralEq for PreStateConfig

source§

impl StructuralPartialEq for PreStateConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

\ No newline at end of file diff --git a/alloy_rpc_types/trace/pre_state/struct.PreStateMode.html b/alloy_rpc_types/trace/pre_state/struct.PreStateMode.html new file mode 100644 index 000000000000..8265b7f42ac4 --- /dev/null +++ b/alloy_rpc_types/trace/pre_state/struct.PreStateMode.html @@ -0,0 +1,24 @@ +PreStateMode in alloy_rpc_types::trace::pre_state - Rust +
pub struct PreStateMode(pub BTreeMap<Address, AccountState>);

Tuple Fields§

§0: BTreeMap<Address, AccountState>

Trait Implementations§

source§

impl Clone for PreStateMode

source§

fn clone(&self) -> PreStateMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateMode

source§

fn default() -> PreStateMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateMode

source§

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 PartialEq for PreStateMode

source§

fn eq(&self, other: &PreStateMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateMode

source§

impl StructuralEq for PreStateMode

source§

impl StructuralPartialEq for PreStateMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/sidebar-items.js b/alloy_rpc_types/trace/sidebar-items.js new file mode 100644 index 000000000000..c277efa8e79f --- /dev/null +++ b/alloy_rpc_types/trace/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AccountChangeKind","Action","ActionType","CallType","Delta","DiffStateKind","GethDebugBuiltInTracerType","GethDebugTracerType","GethTrace","PreStateFrame","RewardType","TraceFilterMode","TraceOutput","TraceType"],"mod":["call","common","filter","four_byte","geth","noop","parity","pre_state","tracerequest"],"struct":["AccountDiff","AccountState","BlockTraceResult","CallAction","CallConfig","CallFrame","CallLogFrame","CallOutput","ChangedType","CreateAction","CreateOutput","DefaultFrame","DiffMode","FourByteFrame","GethDebugTracerConfig","GethDebugTracingCallOptions","GethDebugTracingOptions","GethDefaultTracingOptions","LocalizedTransactionTrace","MemoryDelta","NoopFrame","PreStateConfig","PreStateMode","RewardAction","SelfdestructAction","StateDiff","StorageDelta","StructLog","TraceCallRequest","TraceFilter","TraceFilterMatcher","TraceResults","TraceResultsWithTransactionHash","TransactionTrace","VmExecutedOperation","VmInstruction","VmTrace"],"type":["TraceResult"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.AccountDiff.html b/alloy_rpc_types/trace/struct.AccountDiff.html new file mode 100644 index 000000000000..3d7245663bc1 --- /dev/null +++ b/alloy_rpc_types/trace/struct.AccountDiff.html @@ -0,0 +1,34 @@ +AccountDiff in alloy_rpc_types::trace - Rust +
pub struct AccountDiff {
+    pub balance: Delta<U256>,
+    pub code: Delta<Bytes>,
+    pub nonce: Delta<U64>,
+    pub storage: BTreeMap<B256, Delta<B256>>,
+}
Expand description

Serde-friendly AccountDiff shadow.

+

Fields§

§balance: Delta<U256>

Balance change.

+
§code: Delta<Bytes>

Code change.

+
§nonce: Delta<U64>

Nonce change.

+
§storage: BTreeMap<B256, Delta<B256>>

Storage changes.

+

Trait Implementations§

source§

impl Clone for AccountDiff

source§

fn clone(&self) -> AccountDiff

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountDiff

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountDiff

source§

fn default() -> AccountDiff

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountDiff

source§

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 PartialEq for AccountDiff

source§

fn eq(&self, other: &AccountDiff) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountDiff

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountDiff

source§

impl StructuralEq for AccountDiff

source§

impl StructuralPartialEq for AccountDiff

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 192 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.AccountState.html b/alloy_rpc_types/trace/struct.AccountState.html new file mode 100644 index 000000000000..a5e80b6c9d83 --- /dev/null +++ b/alloy_rpc_types/trace/struct.AccountState.html @@ -0,0 +1,38 @@ +AccountState in alloy_rpc_types::trace - Rust +
pub struct AccountState {
+    pub balance: Option<U256>,
+    pub code: Option<Bytes>,
+    pub nonce: Option<u64>,
+    pub storage: BTreeMap<B256, B256>,
+}
Expand description

Represents the state of an account

+

Fields§

§balance: Option<U256>§code: Option<Bytes>§nonce: Option<u64>§storage: BTreeMap<B256, B256>

Implementations§

source§

impl AccountState

source

pub fn from_account_info(nonce: u64, balance: U256, code: Option<Bytes>) -> Self

Creates a new AccountState with the given account info.

+

If balance is zero, it will be omitted. +If nonce is zero, it will be omitted. +If code is empty, it will be omitted.

+
source

pub fn remove_matching_account_info(&mut self, other: &AccountState)

Removes balance,nonce or code if they match the given account info.

+

This is useful for comparing pre vs post state and only keep changed values in post state.

+

Trait Implementations§

source§

impl Clone for AccountState

source§

fn clone(&self) -> AccountState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AccountState

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AccountState

source§

fn default() -> AccountState

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for AccountState

source§

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 Hash for AccountState

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for AccountState

source§

fn eq(&self, other: &AccountState) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AccountState

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for AccountState

source§

impl StructuralEq for AccountState

source§

impl StructuralPartialEq for AccountState

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.BlockTraceResult.html b/alloy_rpc_types/trace/struct.BlockTraceResult.html new file mode 100644 index 000000000000..7ebce6bbc4c6 --- /dev/null +++ b/alloy_rpc_types/trace/struct.BlockTraceResult.html @@ -0,0 +1,33 @@ +BlockTraceResult in alloy_rpc_types::trace - Rust +
pub struct BlockTraceResult {
+    pub block: U256,
+    pub hash: B256,
+    pub traces: Vec<TraceResult>,
+}
Expand description

blockTraceResult represents the results of tracing a single block when an entire chain is being +traced. ref https://github.com/ethereum/go-ethereum/blob/ee530c0d5aa70d2c00ab5691a89ab431b73f8165/eth/tracers/api.go#L218-L222

+

Fields§

§block: U256

Block number corresponding to the trace task

+
§hash: B256

Block hash corresponding to the trace task

+
§traces: Vec<TraceResult>

Trace results produced by the trace task

+

Trait Implementations§

source§

impl Clone for BlockTraceResult

source§

fn clone(&self) -> BlockTraceResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockTraceResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockTraceResult

source§

fn default() -> BlockTraceResult

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockTraceResult

source§

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 PartialEq for BlockTraceResult

source§

fn eq(&self, other: &BlockTraceResult) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockTraceResult

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for BlockTraceResult

source§

impl StructuralEq for BlockTraceResult

source§

impl StructuralPartialEq for BlockTraceResult

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 88 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.CallAction.html b/alloy_rpc_types/trace/struct.CallAction.html new file mode 100644 index 000000000000..6777af07a2ba --- /dev/null +++ b/alloy_rpc_types/trace/struct.CallAction.html @@ -0,0 +1,38 @@ +CallAction in alloy_rpc_types::trace - Rust +
pub struct CallAction {
+    pub from: Address,
+    pub call_type: CallType,
+    pub gas: U64,
+    pub input: Bytes,
+    pub to: Address,
+    pub value: U256,
+}
Expand description

Represents a certain CallType of a call or message transaction.

+

Fields§

§from: Address

Address of the sending account.

+
§call_type: CallType

The type of the call.

+
§gas: U64

The gas available for executing the call.

+
§input: Bytes

The input data provided to the call.

+
§to: Address

Address of the destination/target account.

+
§value: U256

Value transferred to the destination account.

+

Trait Implementations§

source§

impl Clone for CallAction

source§

fn clone(&self) -> CallAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CallAction

source§

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 PartialEq for CallAction

source§

fn eq(&self, other: &CallAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallAction

source§

impl StructuralEq for CallAction

source§

impl StructuralPartialEq for CallAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.CallConfig.html b/alloy_rpc_types/trace/struct.CallConfig.html new file mode 100644 index 000000000000..3cc5f00b7b5c --- /dev/null +++ b/alloy_rpc_types/trace/struct.CallConfig.html @@ -0,0 +1,31 @@ +CallConfig in alloy_rpc_types::trace - Rust +
pub struct CallConfig {
+    pub only_top_call: Option<bool>,
+    pub with_log: Option<bool>,
+}

Fields§

§only_top_call: Option<bool>

When set to true, this will only trace the primary (top-level) call and not any sub-calls. +It eliminates the additional processing for each call frame

+
§with_log: Option<bool>

Implementations§

source§

impl CallConfig

source

pub fn only_top_call(self) -> Self

Sets the only top call flag

+
source

pub fn with_log(self) -> Self

Sets the with log flag

+

Trait Implementations§

source§

impl Clone for CallConfig

source§

fn clone(&self) -> CallConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallConfig

source§

fn default() -> CallConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallConfig

source§

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 PartialEq for CallConfig

source§

fn eq(&self, other: &CallConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallConfig

source§

impl StructuralEq for CallConfig

source§

impl StructuralPartialEq for CallConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 2 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.CallFrame.html b/alloy_rpc_types/trace/struct.CallFrame.html new file mode 100644 index 000000000000..2bad5b1d077f --- /dev/null +++ b/alloy_rpc_types/trace/struct.CallFrame.html @@ -0,0 +1,39 @@ +CallFrame in alloy_rpc_types::trace - Rust +
pub struct CallFrame {
+    pub from: Address,
+    pub gas: U256,
+    pub gas_used: U256,
+    pub to: Option<Address>,
+    pub input: Bytes,
+    pub output: Option<Bytes>,
+    pub error: Option<String>,
+    pub revert_reason: Option<String>,
+    pub calls: Vec<CallFrame>,
+    pub logs: Vec<CallLogFrame>,
+    pub value: Option<U256>,
+    pub typ: String,
+}
Expand description

The response object for debug_traceTransaction with "tracer": "callTracer"

+

https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/call.go#L44

+

Fields§

§from: Address§gas: U256§gas_used: U256§to: Option<Address>§input: Bytes§output: Option<Bytes>§error: Option<String>§revert_reason: Option<String>§calls: Vec<CallFrame>§logs: Vec<CallLogFrame>§value: Option<U256>§typ: String

Trait Implementations§

source§

impl Clone for CallFrame

source§

fn clone(&self) -> CallFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallFrame

source§

fn default() -> CallFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallFrame

source§

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<CallFrame> for GethTrace

source§

fn from(value: CallFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CallFrame

source§

fn eq(&self, other: &CallFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallFrame

source§

impl StructuralEq for CallFrame

source§

impl StructuralPartialEq for CallFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 336 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.CallLogFrame.html b/alloy_rpc_types/trace/struct.CallLogFrame.html new file mode 100644 index 000000000000..07fd65788daf --- /dev/null +++ b/alloy_rpc_types/trace/struct.CallLogFrame.html @@ -0,0 +1,28 @@ +CallLogFrame in alloy_rpc_types::trace - Rust +
pub struct CallLogFrame {
+    pub address: Option<Address>,
+    pub topics: Option<Vec<B256>>,
+    pub data: Option<Bytes>,
+}

Fields§

§address: Option<Address>§topics: Option<Vec<B256>>§data: Option<Bytes>

Trait Implementations§

source§

impl Clone for CallLogFrame

source§

fn clone(&self) -> CallLogFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallLogFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CallLogFrame

source§

fn default() -> CallLogFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for CallLogFrame

source§

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 PartialEq for CallLogFrame

source§

fn eq(&self, other: &CallLogFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallLogFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallLogFrame

source§

impl StructuralEq for CallLogFrame

source§

impl StructuralPartialEq for CallLogFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 80 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.CallOutput.html b/alloy_rpc_types/trace/struct.CallOutput.html new file mode 100644 index 000000000000..5b004b04e900 --- /dev/null +++ b/alloy_rpc_types/trace/struct.CallOutput.html @@ -0,0 +1,30 @@ +CallOutput in alloy_rpc_types::trace - Rust +
pub struct CallOutput {
+    pub gas_used: U64,
+    pub output: Bytes,
+}
Expand description

Call out put type

+

Fields§

§gas_used: U64

Gas Used.

+
§output: Bytes

Output

+

Trait Implementations§

source§

impl Clone for CallOutput

source§

fn clone(&self) -> CallOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CallOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CallOutput

source§

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 PartialEq for CallOutput

source§

fn eq(&self, other: &CallOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CallOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CallOutput

source§

impl StructuralEq for CallOutput

source§

impl StructuralPartialEq for CallOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.ChangedType.html b/alloy_rpc_types/trace/struct.ChangedType.html new file mode 100644 index 000000000000..a00e0c740404 --- /dev/null +++ b/alloy_rpc_types/trace/struct.ChangedType.html @@ -0,0 +1,37 @@ +ChangedType in alloy_rpc_types::trace - Rust +
pub struct ChangedType<T> {
+    pub from: T,
+    pub to: T,
+}
Expand description

Aux type for Diff::Changed.

+

Fields§

§from: T

Previous value.

+
§to: T

Current value.

+

Trait Implementations§

source§

impl<T: Clone> Clone for ChangedType<T>

source§

fn clone(&self) -> ChangedType<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for ChangedType<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de, T> Deserialize<'de> for ChangedType<T>
where + T: Deserialize<'de>,

source§

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<T: PartialEq> PartialEq for ChangedType<T>

source§

fn eq(&self, other: &ChangedType<T>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for ChangedType<T>
where + T: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Eq> Eq for ChangedType<T>

source§

impl<T> StructuralEq for ChangedType<T>

source§

impl<T> StructuralPartialEq for ChangedType<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ChangedType<T>
where + T: RefUnwindSafe,

§

impl<T> Send for ChangedType<T>
where + T: Send,

§

impl<T> Sync for ChangedType<T>
where + T: Sync,

§

impl<T> Unpin for ChangedType<T>
where + T: Unpin,

§

impl<T> UnwindSafe for ChangedType<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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.

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.CreateAction.html b/alloy_rpc_types/trace/struct.CreateAction.html new file mode 100644 index 000000000000..069a71f998ca --- /dev/null +++ b/alloy_rpc_types/trace/struct.CreateAction.html @@ -0,0 +1,34 @@ +CreateAction in alloy_rpc_types::trace - Rust +
pub struct CreateAction {
+    pub from: Address,
+    pub gas: U64,
+    pub init: Bytes,
+    pub value: U256,
+}
Expand description

Represents a create action, either a CREATE operation or a CREATE transaction.

+

Fields§

§from: Address

The address of the creator.

+
§gas: U64

The gas available for the creation init code.

+
§init: Bytes

The init code.

+
§value: U256

The value with which the new account is endowed.

+

Trait Implementations§

source§

impl Clone for CreateAction

source§

fn clone(&self) -> CreateAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CreateAction

source§

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 PartialEq for CreateAction

source§

fn eq(&self, other: &CreateAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CreateAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CreateAction

source§

impl StructuralEq for CreateAction

source§

impl StructuralPartialEq for CreateAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 96 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.CreateOutput.html b/alloy_rpc_types/trace/struct.CreateOutput.html new file mode 100644 index 000000000000..d2178d144e3d --- /dev/null +++ b/alloy_rpc_types/trace/struct.CreateOutput.html @@ -0,0 +1,32 @@ +CreateOutput in alloy_rpc_types::trace - Rust +
pub struct CreateOutput {
+    pub address: Address,
+    pub code: Bytes,
+    pub gas_used: U64,
+}
Expand description

Represents the output of a create operation.

+

Fields§

§address: Address

Address output.

+
§code: Bytes

Code data.

+
§gas_used: U64

Resulting address.

+

Trait Implementations§

source§

impl Clone for CreateOutput

source§

fn clone(&self) -> CreateOutput

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateOutput

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CreateOutput

source§

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 PartialEq for CreateOutput

source§

fn eq(&self, other: &CreateOutput) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for CreateOutput

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for CreateOutput

source§

impl StructuralEq for CreateOutput

source§

impl StructuralPartialEq for CreateOutput

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.DefaultFrame.html b/alloy_rpc_types/trace/struct.DefaultFrame.html new file mode 100644 index 000000000000..670a84f7f841 --- /dev/null +++ b/alloy_rpc_types/trace/struct.DefaultFrame.html @@ -0,0 +1,31 @@ +DefaultFrame in alloy_rpc_types::trace - Rust +
pub struct DefaultFrame {
+    pub failed: bool,
+    pub gas: u64,
+    pub return_value: Bytes,
+    pub struct_logs: Vec<StructLog>,
+}
Expand description

Fields§

§failed: bool§gas: u64§return_value: Bytes§struct_logs: Vec<StructLog>

Trait Implementations§

source§

impl Clone for DefaultFrame

source§

fn clone(&self) -> DefaultFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DefaultFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DefaultFrame

source§

fn default() -> DefaultFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DefaultFrame

source§

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<DefaultFrame> for GethTrace

source§

fn from(value: DefaultFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for DefaultFrame

source§

fn eq(&self, other: &DefaultFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DefaultFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DefaultFrame

source§

impl StructuralEq for DefaultFrame

source§

impl StructuralPartialEq for DefaultFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.DiffMode.html b/alloy_rpc_types/trace/struct.DiffMode.html new file mode 100644 index 000000000000..bc9e1ce0aad6 --- /dev/null +++ b/alloy_rpc_types/trace/struct.DiffMode.html @@ -0,0 +1,37 @@ +DiffMode in alloy_rpc_types::trace - Rust +
pub struct DiffMode {
+    pub post: BTreeMap<Address, AccountState>,
+    pub pre: BTreeMap<Address, AccountState>,
+}
Expand description

Represents the account states before and after the transaction is executed.

+

This corresponds to the DiffMode of the PreStateConfig.

+

This will only contain changed AccountStates, created accounts will not be included in the pre +state and selfdestructed accounts will not be included in the post state.

+

Fields§

§post: BTreeMap<Address, AccountState>

The account states after the transaction is executed.

+
§pre: BTreeMap<Address, AccountState>

The account states before the transaction is executed.

+

Implementations§

source§

impl DiffMode

source

pub fn retain_changed(&mut self) -> &mut Self

The sets of the DiffMode should only contain changed AccountStates.

+

This will remove all unchanged AccountStates from the sets.

+

In other words it removes entries that are equal (unchanged) in both the pre and post sets.

+
source

pub fn remove_zero_storage_values(&mut self)

Removes all zero values from the storage of the AccountStates.

+

Trait Implementations§

source§

impl Clone for DiffMode

source§

fn clone(&self) -> DiffMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DiffMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DiffMode

source§

fn default() -> DiffMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for DiffMode

source§

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 PartialEq for DiffMode

source§

fn eq(&self, other: &DiffMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for DiffMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DiffMode

source§

impl StructuralEq for DiffMode

source§

impl StructuralPartialEq for DiffMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.FourByteFrame.html b/alloy_rpc_types/trace/struct.FourByteFrame.html new file mode 100644 index 000000000000..d4a8f4307265 --- /dev/null +++ b/alloy_rpc_types/trace/struct.FourByteFrame.html @@ -0,0 +1,25 @@ +FourByteFrame in alloy_rpc_types::trace - Rust +
pub struct FourByteFrame(pub BTreeMap<String, u64>);
Expand description

Tuple Fields§

§0: BTreeMap<String, u64>

Trait Implementations§

source§

impl Clone for FourByteFrame

source§

fn clone(&self) -> FourByteFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FourByteFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FourByteFrame

source§

fn default() -> FourByteFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for FourByteFrame

source§

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<FourByteFrame> for GethTrace

source§

fn from(value: FourByteFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for FourByteFrame

source§

fn eq(&self, other: &FourByteFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for FourByteFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for FourByteFrame

source§

impl StructuralEq for FourByteFrame

source§

impl StructuralPartialEq for FourByteFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.GethDebugTracerConfig.html b/alloy_rpc_types/trace/struct.GethDebugTracerConfig.html new file mode 100644 index 000000000000..18a7f3b8703f --- /dev/null +++ b/alloy_rpc_types/trace/struct.GethDebugTracerConfig.html @@ -0,0 +1,32 @@ +GethDebugTracerConfig in alloy_rpc_types::trace - Rust +
pub struct GethDebugTracerConfig(pub Value);
Expand description

Configuration of the tracer

+

This is a simple wrapper around serde_json::Value. +with helpers for deserializing tracer configs.

+

Tuple Fields§

§0: Value

Implementations§

source§

impl GethDebugTracerConfig

source

pub fn is_null(&self) -> bool

Returns if this is a null object

+
source

pub fn from_value<T: DeserializeOwned>(self) -> Result<T, Error>

Consumes the config and tries to deserialize it into the given type.

+
source

pub fn into_call_config(self) -> Result<CallConfig, Error>

Returns the CallConfig if it is a call config.

+
source

pub fn into_json(self) -> Value

Returns the raw json value

+
source

pub fn into_pre_state_config(self) -> Result<PreStateConfig, Error>

Returns the PreStateConfig if it is a call config.

+

Trait Implementations§

source§

impl Clone for GethDebugTracerConfig

source§

fn clone(&self) -> GethDebugTracerConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracerConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracerConfig

source§

fn default() -> GethDebugTracerConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracerConfig

source§

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<Value> for GethDebugTracerConfig

source§

fn from(value: Value) -> Self

Converts to this type from the input type.
source§

impl PartialEq for GethDebugTracerConfig

source§

fn eq(&self, other: &GethDebugTracerConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracerConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracerConfig

source§

impl StructuralEq for GethDebugTracerConfig

source§

impl StructuralPartialEq for GethDebugTracerConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 32 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.GethDebugTracingCallOptions.html b/alloy_rpc_types/trace/struct.GethDebugTracingCallOptions.html new file mode 100644 index 000000000000..b252cd2e982a --- /dev/null +++ b/alloy_rpc_types/trace/struct.GethDebugTracingCallOptions.html @@ -0,0 +1,32 @@ +GethDebugTracingCallOptions in alloy_rpc_types::trace - Rust +
pub struct GethDebugTracingCallOptions {
+    pub tracing_options: GethDebugTracingOptions,
+    pub state_overrides: Option<StateOverride>,
+    pub block_overrides: Option<BlockOverrides>,
+}
Expand description

Bindings for additional debug_traceCall options

+

See https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracecall

+

Fields§

§tracing_options: GethDebugTracingOptions§state_overrides: Option<StateOverride>

The state overrides to apply

+
§block_overrides: Option<BlockOverrides>

The block overrides to apply

+

Trait Implementations§

source§

impl Clone for GethDebugTracingCallOptions

source§

fn clone(&self) -> GethDebugTracingCallOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracingCallOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracingCallOptions

source§

fn default() -> GethDebugTracingCallOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracingCallOptions

source§

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 PartialEq for GethDebugTracingCallOptions

source§

fn eq(&self, other: &GethDebugTracingCallOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracingCallOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracingCallOptions

source§

impl StructuralEq for GethDebugTracingCallOptions

source§

impl StructuralPartialEq for GethDebugTracingCallOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 400 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.GethDebugTracingOptions.html b/alloy_rpc_types/trace/struct.GethDebugTracingOptions.html new file mode 100644 index 000000000000..dca6be45c834 --- /dev/null +++ b/alloy_rpc_types/trace/struct.GethDebugTracingOptions.html @@ -0,0 +1,44 @@ +GethDebugTracingOptions in alloy_rpc_types::trace - Rust +
pub struct GethDebugTracingOptions {
+    pub config: GethDefaultTracingOptions,
+    pub tracer: Option<GethDebugTracerType>,
+    pub tracer_config: GethDebugTracerConfig,
+    pub timeout: Option<String>,
+}
Expand description

Bindings for additional debug_traceTransaction options

+

See https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracetransaction

+

Fields§

§config: GethDefaultTracingOptions§tracer: Option<GethDebugTracerType>

The custom tracer to use.

+

If None then the default structlog tracer is used.

+
§tracer_config: GethDebugTracerConfig

Config specific to given tracer.

+

Note default struct logger config are historically embedded in main object.

+

tracerConfig is slated for Geth v1.11.0 +See https://github.com/ethereum/go-ethereum/issues/26513

+

This could be CallConfig or PreStateConfig depending on the tracer.

+
§timeout: Option<String>

A string of decimal integers that overrides the JavaScript-based tracing calls default +timeout of 5 seconds.

+

Implementations§

source§

impl GethDebugTracingOptions

source

pub fn with_tracer(self, tracer: GethDebugTracerType) -> Self

Sets the tracer to use

+
source

pub fn with_timeout(self, duration: Duration) -> Self

Sets the timeout to use for tracing

+
source

pub fn call_config(self, config: CallConfig) -> Self

Configures a CallConfig

+
source

pub fn prestate_config(self, config: PreStateConfig) -> Self

Configures a PreStateConfig

+

Trait Implementations§

source§

impl Clone for GethDebugTracingOptions

source§

fn clone(&self) -> GethDebugTracingOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDebugTracingOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDebugTracingOptions

source§

fn default() -> GethDebugTracingOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDebugTracingOptions

source§

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 PartialEq for GethDebugTracingOptions

source§

fn eq(&self, other: &GethDebugTracingOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDebugTracingOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDebugTracingOptions

source§

impl StructuralEq for GethDebugTracingOptions

source§

impl StructuralPartialEq for GethDebugTracingOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 112 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.GethDefaultTracingOptions.html b/alloy_rpc_types/trace/struct.GethDefaultTracingOptions.html new file mode 100644 index 000000000000..cb4bc9649119 --- /dev/null +++ b/alloy_rpc_types/trace/struct.GethDefaultTracingOptions.html @@ -0,0 +1,73 @@ +GethDefaultTracingOptions in alloy_rpc_types::trace - Rust +
pub struct GethDefaultTracingOptions {
+    pub enable_memory: Option<bool>,
+    pub disable_memory: Option<bool>,
+    pub disable_stack: Option<bool>,
+    pub disable_storage: Option<bool>,
+    pub enable_return_data: Option<bool>,
+    pub disable_return_data: Option<bool>,
+    pub debug: Option<bool>,
+    pub limit: Option<u64>,
+}
Expand description

Default tracing options for the struct looger.

+

These are all known general purpose tracer options that may or not be supported by a given +tracer. For example, the enableReturnData option is a noop on regular +debug_trace{Transaction,Block} calls.

+

Fields§

§enable_memory: Option<bool>

enable memory capture

+
§disable_memory: Option<bool>

Disable memory capture

+

This is the opposite of enable_memory.

+

Note: memory capture used to be enabled by default on geth, but has since been flipped https://github.com/ethereum/go-ethereum/pull/23558 and is now disabled by default. +However, at the time of writing this, erigon still defaults to enabled and supports the +disableMemory option. So we keep this option for compatibility, but if it’s missing +OR enableMemory is present enableMemory takes precedence.

+

See also https://github.com/paradigmxyz/reth/issues/3033

+
§disable_stack: Option<bool>

disable stack capture

+
§disable_storage: Option<bool>

Disable storage capture

+
§enable_return_data: Option<bool>

Enable return data capture

+
§disable_return_data: Option<bool>

Disable return data capture

+

This is the opposite of enable_return_data, and only supported for compatibility reasons. +See also disable_memory.

+

If enable_return_data is present, enable_return_data always takes precedence.

+
§debug: Option<bool>

print output during capture end

+
§limit: Option<u64>

maximum length of output, but zero means unlimited

+

Implementations§

source§

impl GethDefaultTracingOptions

source

pub fn enable_memory(self) -> Self

Enables memory capture.

+
source

pub fn disable_memory(self) -> Self

Disables memory capture.

+
source

pub fn disable_stack(self) -> Self

Disables stack capture.

+
source

pub fn disable_storage(self) -> Self

Disables storage capture.

+
source

pub fn enable_return_data(self) -> Self

Enables return data capture.

+
source

pub fn disable_return_data(self) -> Self

Disables return data capture.

+
source

pub fn debug(self) -> Self

Enables debug mode.

+
source

pub fn with_enable_memory(self, enable: bool) -> Self

Sets the enable_memory field.

+
source

pub fn with_disable_memory(self, disable: bool) -> Self

Sets the disable_memory field.

+
source

pub fn with_disable_stack(self, disable: bool) -> Self

Sets the disable_stack field.

+
source

pub fn with_disable_storage(self, disable: bool) -> Self

Sets the disable_storage field.

+
source

pub fn with_enable_return_data(self, enable: bool) -> Self

Sets the enable_return_data field.

+
source

pub fn with_disable_return_data(self, disable: bool) -> Self

Sets the disable_return_data field.

+
source

pub fn with_debug(self, debug: bool) -> Self

Sets the debug field.

+
source

pub fn with_limit(self, limit: u64) -> Self

Sets the limit field.

+
source

pub fn is_return_data_enabled(&self) -> bool

Returns true if return data capture is enabled

+
source

pub fn is_memory_enabled(&self) -> bool

Returns true if memory capture is enabled

+
source

pub fn is_stack_enabled(&self) -> bool

Returns true if stack capture is enabled

+
source

pub fn is_storage_enabled(&self) -> bool

Returns true if storage capture is enabled

+

Trait Implementations§

source§

impl Clone for GethDefaultTracingOptions

source§

fn clone(&self) -> GethDefaultTracingOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GethDefaultTracingOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GethDefaultTracingOptions

source§

fn default() -> GethDefaultTracingOptions

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for GethDefaultTracingOptions

source§

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 PartialEq for GethDefaultTracingOptions

source§

fn eq(&self, other: &GethDefaultTracingOptions) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GethDefaultTracingOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for GethDefaultTracingOptions

source§

impl StructuralEq for GethDefaultTracingOptions

source§

impl StructuralPartialEq for GethDefaultTracingOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.LocalizedTransactionTrace.html b/alloy_rpc_types/trace/struct.LocalizedTransactionTrace.html new file mode 100644 index 000000000000..3a35f369c68f --- /dev/null +++ b/alloy_rpc_types/trace/struct.LocalizedTransactionTrace.html @@ -0,0 +1,39 @@ +LocalizedTransactionTrace in alloy_rpc_types::trace - Rust +
pub struct LocalizedTransactionTrace {
+    pub trace: TransactionTrace,
+    pub block_hash: Option<B256>,
+    pub block_number: Option<u64>,
+    pub transaction_hash: Option<B256>,
+    pub transaction_position: Option<u64>,
+}
Expand description

Localized transaction trace.

+

Fields§

§trace: TransactionTrace

Trace of the transaction and its result. +Trace of the transaction and its result.

+
§block_hash: Option<B256>

Hash of the block, if not pending.

+

Note: this deviates from https://openethereum.github.io/JSONRPC-trace-module#trace_transaction which always returns a block number

+
§block_number: Option<u64>

Block number the transaction is included in, None if pending.

+

Note: this deviates from https://openethereum.github.io/JSONRPC-trace-module#trace_transaction which always returns a block number

+
§transaction_hash: Option<B256>

Hash of the transaction

+
§transaction_position: Option<u64>

Transaction index within the block, None if pending.

+

Trait Implementations§

source§

impl Clone for LocalizedTransactionTrace

source§

fn clone(&self) -> LocalizedTransactionTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LocalizedTransactionTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for LocalizedTransactionTrace

source§

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 PartialEq for LocalizedTransactionTrace

source§

fn eq(&self, other: &LocalizedTransactionTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for LocalizedTransactionTrace

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for LocalizedTransactionTrace

source§

impl StructuralEq for LocalizedTransactionTrace

source§

impl StructuralPartialEq for LocalizedTransactionTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 352 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.MemoryDelta.html b/alloy_rpc_types/trace/struct.MemoryDelta.html new file mode 100644 index 000000000000..9771ff55df60 --- /dev/null +++ b/alloy_rpc_types/trace/struct.MemoryDelta.html @@ -0,0 +1,30 @@ +MemoryDelta in alloy_rpc_types::trace - Rust +
pub struct MemoryDelta {
+    pub off: usize,
+    pub data: Bytes,
+}
Expand description

A diff of some chunk of memory.

+

Fields§

§off: usize

Offset into memory the change begins.

+
§data: Bytes

The changed data.

+

Trait Implementations§

source§

impl Clone for MemoryDelta

source§

fn clone(&self) -> MemoryDelta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MemoryDelta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for MemoryDelta

source§

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 PartialEq for MemoryDelta

source§

fn eq(&self, other: &MemoryDelta) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for MemoryDelta

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for MemoryDelta

source§

impl StructuralEq for MemoryDelta

source§

impl StructuralPartialEq for MemoryDelta

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.NoopFrame.html b/alloy_rpc_types/trace/struct.NoopFrame.html new file mode 100644 index 000000000000..133a58518380 --- /dev/null +++ b/alloy_rpc_types/trace/struct.NoopFrame.html @@ -0,0 +1,26 @@ +NoopFrame in alloy_rpc_types::trace - Rust +
pub struct NoopFrame(BTreeMap<Null, Null>);
Expand description

Tuple Fields§

§0: BTreeMap<Null, Null>

Trait Implementations§

source§

impl Clone for NoopFrame

source§

fn clone(&self) -> NoopFrame

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NoopFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for NoopFrame

source§

fn default() -> NoopFrame

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for NoopFrame

source§

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<NoopFrame> for GethTrace

source§

fn from(value: NoopFrame) -> Self

Converts to this type from the input type.
source§

impl PartialEq for NoopFrame

source§

fn eq(&self, other: &NoopFrame) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for NoopFrame

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for NoopFrame

source§

impl StructuralEq for NoopFrame

source§

impl StructuralPartialEq for NoopFrame

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.PreStateConfig.html b/alloy_rpc_types/trace/struct.PreStateConfig.html new file mode 100644 index 000000000000..8d051237054e --- /dev/null +++ b/alloy_rpc_types/trace/struct.PreStateConfig.html @@ -0,0 +1,32 @@ +PreStateConfig in alloy_rpc_types::trace - Rust +
pub struct PreStateConfig {
+    pub diff_mode: Option<bool>,
+}
Expand description

The config for the prestate tracer.

+

If diffMode is set to true, the response frame includes all the account and storage diffs for +the transaction. If it’s missing or set to false it only returns the accounts and storage +necessary to execute the transaction.

+

Fields§

§diff_mode: Option<bool>

Implementations§

source§

impl PreStateConfig

source

pub fn is_diff_mode(&self) -> bool

Returns true if this trace was requested with diffmode.

+
source

pub fn is_default_mode(&self) -> bool

Is default mode if diff_mode is not set

+

Trait Implementations§

source§

impl Clone for PreStateConfig

source§

fn clone(&self) -> PreStateConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateConfig

source§

fn default() -> PreStateConfig

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateConfig

source§

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 PartialEq for PreStateConfig

source§

fn eq(&self, other: &PreStateConfig) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateConfig

source§

impl StructuralEq for PreStateConfig

source§

impl StructuralPartialEq for PreStateConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 1 byte

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.PreStateMode.html b/alloy_rpc_types/trace/struct.PreStateMode.html new file mode 100644 index 000000000000..447bd1273373 --- /dev/null +++ b/alloy_rpc_types/trace/struct.PreStateMode.html @@ -0,0 +1,24 @@ +PreStateMode in alloy_rpc_types::trace - Rust +
pub struct PreStateMode(pub BTreeMap<Address, AccountState>);

Tuple Fields§

§0: BTreeMap<Address, AccountState>

Trait Implementations§

source§

impl Clone for PreStateMode

source§

fn clone(&self) -> PreStateMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PreStateMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PreStateMode

source§

fn default() -> PreStateMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for PreStateMode

source§

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 PartialEq for PreStateMode

source§

fn eq(&self, other: &PreStateMode) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for PreStateMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for PreStateMode

source§

impl StructuralEq for PreStateMode

source§

impl StructuralPartialEq for PreStateMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.RewardAction.html b/alloy_rpc_types/trace/struct.RewardAction.html new file mode 100644 index 000000000000..05ca1a28ce1c --- /dev/null +++ b/alloy_rpc_types/trace/struct.RewardAction.html @@ -0,0 +1,32 @@ +RewardAction in alloy_rpc_types::trace - Rust +
pub struct RewardAction {
+    pub author: Address,
+    pub reward_type: RewardType,
+    pub value: U256,
+}
Expand description

Reward Action.

+

Fields§

§author: Address

Author’s address.

+
§reward_type: RewardType

Reward type.

+
§value: U256

Reward amount.

+

Trait Implementations§

source§

impl Clone for RewardAction

source§

fn clone(&self) -> RewardAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RewardAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for RewardAction

source§

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 PartialEq for RewardAction

source§

fn eq(&self, other: &RewardAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for RewardAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for RewardAction

source§

impl StructuralEq for RewardAction

source§

impl StructuralPartialEq for RewardAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.SelfdestructAction.html b/alloy_rpc_types/trace/struct.SelfdestructAction.html new file mode 100644 index 000000000000..9b91615af6bc --- /dev/null +++ b/alloy_rpc_types/trace/struct.SelfdestructAction.html @@ -0,0 +1,32 @@ +SelfdestructAction in alloy_rpc_types::trace - Rust +
pub struct SelfdestructAction {
+    pub address: Address,
+    pub balance: U256,
+    pub refund_address: Address,
+}
Expand description

Represents a selfdestruct action fka suicide.

+

Fields§

§address: Address

destroyed/suicided address.

+
§balance: U256

Balance of the contract just before it was destroyed.

+
§refund_address: Address

destroyed contract heir.

+

Trait Implementations§

source§

impl Clone for SelfdestructAction

source§

fn clone(&self) -> SelfdestructAction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SelfdestructAction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SelfdestructAction

source§

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 PartialEq for SelfdestructAction

source§

fn eq(&self, other: &SelfdestructAction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SelfdestructAction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SelfdestructAction

source§

impl StructuralEq for SelfdestructAction

source§

impl StructuralPartialEq for SelfdestructAction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.StateDiff.html b/alloy_rpc_types/trace/struct.StateDiff.html new file mode 100644 index 000000000000..7d73cc39d44a --- /dev/null +++ b/alloy_rpc_types/trace/struct.StateDiff.html @@ -0,0 +1,555 @@ +StateDiff in alloy_rpc_types::trace - Rust +
pub struct StateDiff(pub BTreeMap<Address, AccountDiff>);
Expand description

New-type for list of account diffs

+

Tuple Fields§

§0: BTreeMap<Address, AccountDiff>

Methods from Deref<Target = BTreeMap<Address, AccountDiff>>§

1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.clear();
+assert!(a.is_empty());
+
1.0.0 · source

pub fn get<Q>(&self, key: &Q) -> Option<&V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get(&1), Some(&"a"));
+assert_eq!(map.get(&2), None);
+
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns the key-value pair corresponding to the supplied key.

+

The supplied key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
+assert_eq!(map.get_key_value(&2), None);
+
1.66.0 · source

pub fn first_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the first key-value pair in the map. +The key in this pair is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.first_key_value(), None);
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.first_key_value(), Some((&1, &"b")));
+
1.66.0 · source

pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the first entry in the map for in-place manipulation. +The key of this entry is the minimum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.first_entry() {
+    if *entry.key() > 0 {
+        entry.insert("first");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "first");
+assert_eq!(*map.get(&2).unwrap(), "b");
+
1.66.0 · source

pub fn pop_first(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the first element in the map. +The key of this element is the minimum key that was in the map.

+
Examples
+

Draining elements in ascending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_first() {
+    assert!(map.iter().all(|(k, _v)| *k > key));
+}
+assert!(map.is_empty());
+
1.66.0 · source

pub fn last_key_value(&self) -> Option<(&K, &V)>
where + K: Ord,

Returns the last key-value pair in the map. +The key in this pair is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "b");
+map.insert(2, "a");
+assert_eq!(map.last_key_value(), Some((&2, &"a")));
+
1.66.0 · source

pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
where + K: Ord,

Returns the last entry in the map for in-place manipulation. +The key of this entry is the maximum key in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+if let Some(mut entry) = map.last_entry() {
+    if *entry.key() > 0 {
+        entry.insert("last");
+    }
+}
+assert_eq!(*map.get(&1).unwrap(), "a");
+assert_eq!(*map.get(&2).unwrap(), "last");
+
1.66.0 · source

pub fn pop_last(&mut self) -> Option<(K, V)>
where + K: Ord,

Removes and returns the last element in the map. +The key of this element is the maximum key that was in the map.

+
Examples
+

Draining elements in descending order, while keeping a usable map each iteration.

+ +
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+map.insert(2, "b");
+while let Some((key, _val)) = map.pop_last() {
+    assert!(map.iter().all(|(k, _v)| *k < key));
+}
+assert!(map.is_empty());
+
1.0.0 · source

pub fn contains_key<Q>(&self, key: &Q) -> bool
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns true if the map contains a value for the specified key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.contains_key(&1), true);
+assert_eq!(map.contains_key(&2), false);
+
1.0.0 · source

pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Returns a mutable reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+if let Some(x) = map.get_mut(&1) {
+    *x = "b";
+}
+assert_eq!(map[&1], "b");
+
1.0.0 · source

pub fn insert(&mut self, key: K, value: V) -> Option<V>
where + K: Ord,

Inserts a key-value pair into the map.

+

If the map did not have this key present, None is returned.

+

If the map did have this key present, the value is updated, and the old +value is returned. The key is not updated, though; this matters for +types that can be == without being identical. See the module-level +documentation for more.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.insert(37, "a"), None);
+assert_eq!(map.is_empty(), false);
+
+map.insert(37, "b");
+assert_eq!(map.insert(37, "c"), Some("b"));
+assert_eq!(map[&37], "c");
+
source

pub fn try_insert( + &mut self, + key: K, + value: V +) -> Result<&mut V, OccupiedError<'_, K, V, A>>
where + K: Ord,

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns +a mutable reference to the value in the entry.

+

If the map already had this key present, nothing is updated, and +an error containing the occupied entry and the value is returned.

+
Examples
+
#![feature(map_try_insert)]
+
+use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+assert_eq!(map.try_insert(37, "a").unwrap(), &"a");
+
+let err = map.try_insert(37, "b").unwrap_err();
+assert_eq!(err.entry.key(), &37);
+assert_eq!(err.entry.get(), &"a");
+assert_eq!(err.value, "b");
+
1.0.0 · source

pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the value at the key if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove(&1), Some("a"));
+assert_eq!(map.remove(&1), None);
+
1.45.0 · source

pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
where + K: Borrow<Q> + Ord, + Q: Ord + ?Sized,

Removes a key from the map, returning the stored key and value if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but the ordering +on the borrowed form must match the ordering on the key type.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove_entry(&1), Some((1, "a")));
+assert_eq!(map.remove_entry(&1), None);
+
1.53.0 · source

pub fn retain<F>(&mut self, f: F)
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

+

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false. +The elements are visited in ascending key order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
+// Keep only the elements with even-numbered keys.
+map.retain(|&k, _| k % 2 == 0);
+assert!(map.into_iter().eq(vec![(0, 0), (2, 20), (4, 40), (6, 60)]));
+
1.11.0 · source

pub fn append(&mut self, other: &mut BTreeMap<K, V, A>)
where + K: Ord, + A: Clone,

Moves all elements from other into self, leaving other empty.

+

If a key from other is already present in self, the respective +value from self will be overwritten with the respective value from other.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c"); // Note: Key (3) also present in b.
+
+let mut b = BTreeMap::new();
+b.insert(3, "d"); // Note: Key (3) also present in a.
+b.insert(4, "e");
+b.insert(5, "f");
+
+a.append(&mut b);
+
+assert_eq!(a.len(), 5);
+assert_eq!(b.len(), 0);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+assert_eq!(a[&3], "d"); // Note: "c" has been overwritten.
+assert_eq!(a[&4], "e");
+assert_eq!(a[&5], "f");
+
1.17.0 · source

pub fn range<T, R>(&self, range: R) -> Range<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+use std::ops::Bound::Included;
+
+let mut map = BTreeMap::new();
+map.insert(3, "a");
+map.insert(5, "b");
+map.insert(8, "c");
+for (&key, &value) in map.range((Included(&4), Included(&8))) {
+    println!("{key}: {value}");
+}
+assert_eq!(Some((&5, &"b")), map.range(4..).next());
+
1.17.0 · source

pub fn range_mut<T, R>(&mut self, range: R) -> RangeMut<'_, K, V>
where + T: Ord + ?Sized, + K: Borrow<T> + Ord, + R: RangeBounds<T>,

Constructs a mutable double-ended iterator over a sub-range of elements in the map. +The simplest way is to use the range syntax min..max, thus range(min..max) will +yield elements from min (inclusive) to max (exclusive). +The range may also be entered as (Bound<T>, Bound<T>), so for example +range((Excluded(4), Included(10))) will yield a left-exclusive, right-inclusive +range from 4 to 10.

+
Panics
+

Panics if range start > end. +Panics if range start == end and both bounds are Excluded.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map: BTreeMap<&str, i32> =
+    [("Alice", 0), ("Bob", 0), ("Carol", 0), ("Cheryl", 0)].into();
+for (_, balance) in map.range_mut("B".."Cheryl") {
+    *balance += 100;
+}
+for (name, balance) in &map {
+    println!("{name} => {balance}");
+}
+
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V, A>
where + K: Ord,

Gets the given key’s corresponding entry in the map for in-place manipulation.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut count: BTreeMap<&str, usize> = BTreeMap::new();
+
+// count the number of occurrences of letters in the vec
+for x in ["a", "b", "a", "c", "a", "b"] {
+    count.entry(x).and_modify(|curr| *curr += 1).or_insert(1);
+}
+
+assert_eq!(count["a"], 3);
+assert_eq!(count["b"], 2);
+assert_eq!(count["c"], 1);
+
1.11.0 · source

pub fn split_off<Q>(&mut self, key: &Q) -> BTreeMap<K, V, A>
where + Q: Ord + ?Sized, + K: Borrow<Q> + Ord, + A: Clone,

Splits the collection into two at the given key. Returns everything after the given key, +including the key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(17, "d");
+a.insert(41, "e");
+
+let b = a.split_off(&3);
+
+assert_eq!(a.len(), 2);
+assert_eq!(b.len(), 3);
+
+assert_eq!(a[&1], "a");
+assert_eq!(a[&2], "b");
+
+assert_eq!(b[&3], "c");
+assert_eq!(b[&17], "d");
+assert_eq!(b[&41], "e");
+
source

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F, A>
where + K: Ord, + F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (btree_extract_if)

Creates an iterator that visits all elements (key-value pairs) in +ascending key order and uses a closure to determine if an element should +be removed. If the closure returns true, the element is removed from +the map and yielded. If the closure returns false, or panics, the +element remains in the map and will not be yielded.

+

The iterator also lets you mutate the value of each element in the +closure, regardless of whether you choose to keep or remove it.

+

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating +or the iteration short-circuits, then the remaining elements will be retained. +Use retain with a negated predicate if you do not need the returned iterator.

+
Examples
+

Splitting a map into even and odd keys, reusing the original map:

+ +
#![feature(btree_extract_if)]
+use std::collections::BTreeMap;
+
+let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
+let evens: BTreeMap<_, _> = map.extract_if(|k, _v| k % 2 == 0).collect();
+let odds = map;
+assert_eq!(evens.keys().copied().collect::<Vec<_>>(), [0, 2, 4, 6]);
+assert_eq!(odds.keys().copied().collect::<Vec<_>>(), [1, 3, 5, 7]);
+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

Gets an iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::new();
+map.insert(3, "c");
+map.insert(2, "b");
+map.insert(1, "a");
+
+for (key, value) in map.iter() {
+    println!("{key}: {value}");
+}
+
+let (first_key, first_value) = map.iter().next().unwrap();
+assert_eq!((*first_key, *first_value), (1, "a"));
+
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

Gets a mutable iterator over the entries of the map, sorted by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut map = BTreeMap::from([
+   ("a", 1),
+   ("b", 2),
+   ("c", 3),
+]);
+
+// add 10 to the value if the key isn't "a"
+for (key, value) in map.iter_mut() {
+    if key != &"a" {
+        *value += 10;
+    }
+}
+
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

Gets an iterator over the keys of the map, in sorted order.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(2, "b");
+a.insert(1, "a");
+
+let keys: Vec<_> = a.keys().cloned().collect();
+assert_eq!(keys, [1, 2]);
+
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

Gets an iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, "hello");
+a.insert(2, "goodbye");
+
+let values: Vec<&str> = a.values().cloned().collect();
+assert_eq!(values, ["hello", "goodbye"]);
+
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

Gets a mutable iterator over the values of the map, in order by key.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+a.insert(1, String::from("hello"));
+a.insert(2, String::from("goodbye"));
+
+for value in a.values_mut() {
+    value.push_str("!");
+}
+
+let values: Vec<String> = a.values().cloned().collect();
+assert_eq!(values, [String::from("hello!"),
+                    String::from("goodbye!")]);
+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert_eq!(a.len(), 0);
+a.insert(1, "a");
+assert_eq!(a.len(), 1);
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+
Examples
+
use std::collections::BTreeMap;
+
+let mut a = BTreeMap::new();
+assert!(a.is_empty());
+a.insert(1, "a");
+assert!(!a.is_empty());
+
source

pub fn lower_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn lower_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the first element that is above the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the first +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.lower_bound_mut(Bound::Included(&2));
+assert_eq!(cursor.key(), Some(&2));
+let cursor = a.lower_bound_mut(Bound::Excluded(&2));
+assert_eq!(cursor.key(), Some(&3));
+
source

pub fn upper_bound<Q>(&self, bound: Bound<&Q>) -> Cursor<'_, K, V>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a Cursor pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+
source

pub fn upper_bound_mut<Q>(&mut self, bound: Bound<&Q>) -> CursorMut<'_, K, V, A>
where + K: Borrow<Q> + Ord, + Q: Ord,

🔬This is a nightly-only experimental API. (btree_cursors)

Returns a CursorMut pointing at the last element that is below the +given bound.

+

If no such element exists then a cursor pointing at the “ghost” +non-element is returned.

+

Passing Bound::Unbounded will return a cursor pointing at the last +element of the map.

+
Examples
+
#![feature(btree_cursors)]
+
+use std::collections::BTreeMap;
+use std::ops::Bound;
+
+let mut a = BTreeMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+a.insert(3, "c");
+a.insert(4, "c");
+let cursor = a.upper_bound_mut(Bound::Included(&3));
+assert_eq!(cursor.key(), Some(&3));
+let cursor = a.upper_bound_mut(Bound::Excluded(&3));
+assert_eq!(cursor.key(), Some(&2));
+

Trait Implementations§

source§

impl Clone for StateDiff

source§

fn clone(&self) -> StateDiff

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StateDiff

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StateDiff

source§

fn default() -> StateDiff

Returns the “default value” for a type. Read more
source§

impl Deref for StateDiff

§

type Target = BTreeMap<Address, AccountDiff>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for StateDiff

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for StateDiff

source§

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 PartialEq for StateDiff

source§

fn eq(&self, other: &StateDiff) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StateDiff

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StateDiff

source§

impl StructuralEq for StateDiff

source§

impl StructuralPartialEq for StateDiff

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 24 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.StorageDelta.html b/alloy_rpc_types/trace/struct.StorageDelta.html new file mode 100644 index 000000000000..64dc8e1e534d --- /dev/null +++ b/alloy_rpc_types/trace/struct.StorageDelta.html @@ -0,0 +1,30 @@ +StorageDelta in alloy_rpc_types::trace - Rust +
pub struct StorageDelta {
+    pub key: U256,
+    pub val: U256,
+}
Expand description

A diff of some storage value.

+

Fields§

§key: U256

Key.

+
§val: U256

Value.

+

Trait Implementations§

source§

impl Clone for StorageDelta

source§

fn clone(&self) -> StorageDelta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StorageDelta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for StorageDelta

source§

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 PartialEq for StorageDelta

source§

fn eq(&self, other: &StorageDelta) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StorageDelta

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StorageDelta

source§

impl StructuralEq for StorageDelta

source§

impl StructuralPartialEq for StorageDelta

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 64 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.StructLog.html b/alloy_rpc_types/trace/struct.StructLog.html new file mode 100644 index 000000000000..fbe85085f0d1 --- /dev/null +++ b/alloy_rpc_types/trace/struct.StructLog.html @@ -0,0 +1,52 @@ +StructLog in alloy_rpc_types::trace - Rust +
pub struct StructLog {
+    pub pc: u64,
+    pub op: String,
+    pub gas: u64,
+    pub gas_cost: u64,
+    pub memory: Option<Vec<String>>,
+    pub memory_size: Option<u64>,
+    pub stack: Option<Vec<U256>>,
+    pub return_data: Option<Bytes>,
+    pub storage: Option<BTreeMap<B256, B256>>,
+    pub depth: u64,
+    pub refund_counter: Option<u64>,
+    pub error: Option<String>,
+}
Expand description

Fields§

§pc: u64

program counter

+
§op: String

opcode to be executed

+
§gas: u64

remaining gas

+
§gas_cost: u64

cost for executing op

+
§memory: Option<Vec<String>>§memory_size: Option<u64>

Size of memory.

+
§stack: Option<Vec<U256>>

EVM stack

+
§return_data: Option<Bytes>

Last call’s return data. Enabled via enableReturnData

+
§storage: Option<BTreeMap<B256, B256>>

Storage slots of current contract read from and written to. Only emitted for SLOAD and +SSTORE. Disabled via disableStorage

+
§depth: u64

Current call depth

+
§refund_counter: Option<u64>

Refund counter

+
§error: Option<String>

Error message if any

+

Trait Implementations§

source§

impl Clone for StructLog

source§

fn clone(&self) -> StructLog

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StructLog

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for StructLog

source§

fn default() -> StructLog

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for StructLog

source§

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 PartialEq for StructLog

source§

fn eq(&self, other: &StructLog) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for StructLog

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for StructLog

source§

impl StructuralEq for StructLog

source§

impl StructuralPartialEq for StructLog

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 224 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.TraceCallRequest.html b/alloy_rpc_types/trace/struct.TraceCallRequest.html new file mode 100644 index 000000000000..6b9b40646165 --- /dev/null +++ b/alloy_rpc_types/trace/struct.TraceCallRequest.html @@ -0,0 +1,48 @@ +TraceCallRequest in alloy_rpc_types::trace - Rust +
pub struct TraceCallRequest {
+    pub call: CallRequest,
+    pub trace_types: HashSet<TraceType>,
+    pub block_id: Option<BlockId>,
+    pub state_overrides: Option<StateOverride>,
+    pub block_overrides: Option<Box<BlockOverrides>>,
+}
Expand description

Container type for trace_call arguments

+

Fields§

§call: CallRequest

call request object

+
§trace_types: HashSet<TraceType>

trace types

+
§block_id: Option<BlockId>

Optional: blockId

+
§state_overrides: Option<StateOverride>

Optional: StateOverride

+
§block_overrides: Option<Box<BlockOverrides>>

Optional: BlockOverrides

+

Implementations§

source§

impl TraceCallRequest

source

pub fn new(call: CallRequest) -> Self

Returns a new TraceCallRequest given a CallRequest and HashSet<TraceType>

+
source

pub fn with_block_id(self, block_id: BlockId) -> Self

Sets the BlockId +Note: this is optional

+
source

pub fn with_state_override(self, state_overrides: StateOverride) -> Self

Sets the StateOverride +Note: this is optional

+
source

pub fn with_block_overrides(self, block_overrides: Box<BlockOverrides>) -> Self

Sets the BlockOverrides +Note: this is optional

+
source

pub fn with_trace_type(self, trace_type: TraceType) -> Self

Inserts a single trace type.

+
source

pub fn with_trace_types<I: IntoIterator<Item = TraceType>>( + self, + trace_types: I +) -> Self

Inserts multiple trace types from an iterator.

+
source

pub fn with_trace(self) -> Self

source

pub fn with_vm_trace(self) -> Self

source

pub fn with_statediff(self) -> Self

Trait Implementations§

source§

impl Debug for TraceCallRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceCallRequest

source§

fn default() -> TraceCallRequest

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceCallRequest

source§

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 Serialize for TraceCallRequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 592 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.TraceFilter.html b/alloy_rpc_types/trace/struct.TraceFilter.html new file mode 100644 index 000000000000..f3c11f9aa440 --- /dev/null +++ b/alloy_rpc_types/trace/struct.TraceFilter.html @@ -0,0 +1,41 @@ +TraceFilter in alloy_rpc_types::trace - Rust +
pub struct TraceFilter {
+    pub from_block: Option<u64>,
+    pub to_block: Option<u64>,
+    pub from_address: Vec<Address>,
+    pub to_address: Vec<Address>,
+    pub mode: TraceFilterMode,
+    pub after: Option<u64>,
+    pub count: Option<u64>,
+}
Expand description

Trace filter.

+

Fields§

§from_block: Option<u64>

From block

+
§to_block: Option<u64>

To block

+
§from_address: Vec<Address>

From address

+
§to_address: Vec<Address>

To address

+
§mode: TraceFilterMode

How to apply from_address and to_address filters.

+
§after: Option<u64>

Output offset

+
§count: Option<u64>

Output amount

+

Implementations§

source§

impl TraceFilter

source

pub fn matcher(&self) -> TraceFilterMatcher

Returns a TraceFilterMatcher for this filter.

+

Trait Implementations§

source§

impl Clone for TraceFilter

source§

fn clone(&self) -> TraceFilter

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceFilter

source§

fn default() -> TraceFilter

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceFilter

source§

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 PartialEq for TraceFilter

source§

fn eq(&self, other: &TraceFilter) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceFilter

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceFilter

source§

impl StructuralEq for TraceFilter

source§

impl StructuralPartialEq for TraceFilter

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.TraceFilterMatcher.html b/alloy_rpc_types/trace/struct.TraceFilterMatcher.html new file mode 100644 index 000000000000..5073aa5205f5 --- /dev/null +++ b/alloy_rpc_types/trace/struct.TraceFilterMatcher.html @@ -0,0 +1,27 @@ +TraceFilterMatcher in alloy_rpc_types::trace - Rust +
pub struct TraceFilterMatcher {
+    mode: TraceFilterMode,
+    from_addresses: HashSet<Address>,
+    to_addresses: HashSet<Address>,
+}
Expand description

Helper type for matching from and to addresses. Empty sets match all addresses.

+

Fields§

§mode: TraceFilterMode§from_addresses: HashSet<Address>§to_addresses: HashSet<Address>

Implementations§

source§

impl TraceFilterMatcher

source

pub fn matches(&self, from: Address, to: Option<Address>) -> bool

Returns true if the given from and to addresses match this filter.

+

Trait Implementations§

source§

impl Clone for TraceFilterMatcher

source§

fn clone(&self) -> TraceFilterMatcher

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceFilterMatcher

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for TraceFilterMatcher

source§

fn eq(&self, other: &TraceFilterMatcher) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for TraceFilterMatcher

source§

impl StructuralEq for TraceFilterMatcher

source§

impl StructuralPartialEq for TraceFilterMatcher

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 104 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.TraceResults.html b/alloy_rpc_types/trace/struct.TraceResults.html new file mode 100644 index 000000000000..0e1f91cc41e8 --- /dev/null +++ b/alloy_rpc_types/trace/struct.TraceResults.html @@ -0,0 +1,37 @@ +TraceResults in alloy_rpc_types::trace - Rust +
pub struct TraceResults {
+    pub output: Bytes,
+    pub state_diff: Option<StateDiff>,
+    pub trace: Vec<TransactionTrace>,
+    pub vm_trace: Option<VmTrace>,
+}
Expand description

The Outcome of a traced transaction with optional settings

+

Fields§

§output: Bytes

Output of the trace

+
§state_diff: Option<StateDiff>

Enabled if TraceType::StateDiff is provided

+
§trace: Vec<TransactionTrace>

Enabled if TraceType::Trace is provided, otherwise an empty vec

+
§vm_trace: Option<VmTrace>

Enabled if TraceType::VmTrace is provided

+

Implementations§

source§

impl TraceResults

source

pub fn set_root_trace_gas_used(&mut self, gas_used: u64)

Sets the gas used of the root trace.

+

The root trace’s gasUsed should mirror the actual gas used by the transaction.

+

This allows setting it manually by consuming the execution result’s gas for example.

+

Trait Implementations§

source§

impl Clone for TraceResults

source§

fn clone(&self) -> TraceResults

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceResults

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceResults

source§

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 PartialEq for TraceResults

source§

fn eq(&self, other: &TraceResults) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceResults

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceResults

source§

impl StructuralEq for TraceResults

source§

impl StructuralPartialEq for TraceResults

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 144 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.TraceResultsWithTransactionHash.html b/alloy_rpc_types/trace/struct.TraceResultsWithTransactionHash.html new file mode 100644 index 000000000000..f209177a8289 --- /dev/null +++ b/alloy_rpc_types/trace/struct.TraceResultsWithTransactionHash.html @@ -0,0 +1,30 @@ +TraceResultsWithTransactionHash in alloy_rpc_types::trace - Rust +
pub struct TraceResultsWithTransactionHash {
+    pub full_trace: TraceResults,
+    pub transaction_hash: B256,
+}
Expand description

A FullTrace with an additional transaction hash

+

Fields§

§full_trace: TraceResults

Full trace data.

+
§transaction_hash: B256

Transaction hash.

+

Trait Implementations§

source§

impl Clone for TraceResultsWithTransactionHash

source§

fn clone(&self) -> TraceResultsWithTransactionHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TraceResultsWithTransactionHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TraceResultsWithTransactionHash

source§

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 PartialEq for TraceResultsWithTransactionHash

source§

fn eq(&self, other: &TraceResultsWithTransactionHash) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TraceResultsWithTransactionHash

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TraceResultsWithTransactionHash

source§

impl StructuralEq for TraceResultsWithTransactionHash

source§

impl StructuralPartialEq for TraceResultsWithTransactionHash

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 176 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.TransactionTrace.html b/alloy_rpc_types/trace/struct.TransactionTrace.html new file mode 100644 index 000000000000..9b8440d3ac44 --- /dev/null +++ b/alloy_rpc_types/trace/struct.TransactionTrace.html @@ -0,0 +1,36 @@ +TransactionTrace in alloy_rpc_types::trace - Rust +
pub struct TransactionTrace {
+    pub action: Action,
+    pub error: Option<String>,
+    pub result: Option<TraceOutput>,
+    pub subtraces: usize,
+    pub trace_address: Vec<usize>,
+}
Expand description

A parity style trace of a transaction.

+

Fields§

§action: Action

Transaction action.

+
§error: Option<String>

Error message.

+
§result: Option<TraceOutput>

Execution result.

+
§subtraces: usize

Subtrace count.

+
§trace_address: Vec<usize>

Trace address path.

+

Trait Implementations§

source§

impl Clone for TransactionTrace

source§

fn clone(&self) -> TransactionTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransactionTrace

source§

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 PartialEq for TransactionTrace

source§

fn eq(&self, other: &TransactionTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TransactionTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TransactionTrace

source§

impl StructuralEq for TransactionTrace

source§

impl StructuralPartialEq for TransactionTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 248 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.VmExecutedOperation.html b/alloy_rpc_types/trace/struct.VmExecutedOperation.html new file mode 100644 index 000000000000..b6fdf802592e --- /dev/null +++ b/alloy_rpc_types/trace/struct.VmExecutedOperation.html @@ -0,0 +1,34 @@ +VmExecutedOperation in alloy_rpc_types::trace - Rust +
pub struct VmExecutedOperation {
+    pub used: u64,
+    pub push: Vec<U256>,
+    pub mem: Option<MemoryDelta>,
+    pub store: Option<StorageDelta>,
+}
Expand description

A record of an executed VM operation.

+

Fields§

§used: u64

The total gas used.

+
§push: Vec<U256>

The stack item placed, if any.

+
§mem: Option<MemoryDelta>

If altered, the memory delta.

+
§store: Option<StorageDelta>

The altered storage value, if any.

+

Trait Implementations§

source§

impl Clone for VmExecutedOperation

source§

fn clone(&self) -> VmExecutedOperation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmExecutedOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for VmExecutedOperation

source§

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 PartialEq for VmExecutedOperation

source§

fn eq(&self, other: &VmExecutedOperation) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmExecutedOperation

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmExecutedOperation

source§

impl StructuralEq for VmExecutedOperation

source§

impl StructuralPartialEq for VmExecutedOperation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 144 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.VmInstruction.html b/alloy_rpc_types/trace/struct.VmInstruction.html new file mode 100644 index 000000000000..897f1cf90b87 --- /dev/null +++ b/alloy_rpc_types/trace/struct.VmInstruction.html @@ -0,0 +1,38 @@ +VmInstruction in alloy_rpc_types::trace - Rust +
pub struct VmInstruction {
+    pub cost: u64,
+    pub ex: Option<VmExecutedOperation>,
+    pub pc: usize,
+    pub sub: Option<VmTrace>,
+    pub op: Option<String>,
+    pub idx: Option<String>,
+}
Expand description

Vm instruction type.

+

Fields§

§cost: u64

The gas cost for this instruction.

+
§ex: Option<VmExecutedOperation>

Information concerning the execution of the operation.

+
§pc: usize

The program counter.

+
§sub: Option<VmTrace>

Subordinate trace of the CALL/CREATE if applicable.

+
§op: Option<String>

Stringified opcode.

+
§idx: Option<String>

Index.

+

Trait Implementations§

source§

impl Clone for VmInstruction

source§

fn clone(&self) -> VmInstruction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmInstruction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for VmInstruction

source§

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 PartialEq for VmInstruction

source§

fn eq(&self, other: &VmInstruction) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmInstruction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmInstruction

source§

impl StructuralEq for VmInstruction

source§

impl StructuralPartialEq for VmInstruction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 264 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/struct.VmTrace.html b/alloy_rpc_types/trace/struct.VmTrace.html new file mode 100644 index 000000000000..489e10663a60 --- /dev/null +++ b/alloy_rpc_types/trace/struct.VmTrace.html @@ -0,0 +1,30 @@ +VmTrace in alloy_rpc_types::trace - Rust +
pub struct VmTrace {
+    pub code: Bytes,
+    pub ops: Vec<VmInstruction>,
+}
Expand description

A record of a full VM trace for a CALL/CREATE.

+

Fields§

§code: Bytes

The code to be executed.

+
§ops: Vec<VmInstruction>

All executed instructions.

+

Trait Implementations§

source§

impl Clone for VmTrace

source§

fn clone(&self) -> VmTrace

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VmTrace

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for VmTrace

source§

fn default() -> VmTrace

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for VmTrace

source§

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 PartialEq for VmTrace

source§

fn eq(&self, other: &VmTrace) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for VmTrace

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for VmTrace

source§

impl StructuralEq for VmTrace

source§

impl StructuralPartialEq for VmTrace

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 56 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/tracerequest/index.html b/alloy_rpc_types/trace/tracerequest/index.html new file mode 100644 index 000000000000..00b019257df4 --- /dev/null +++ b/alloy_rpc_types/trace/tracerequest/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::trace::tracerequest - Rust +
Expand description

Builder style functions for trace_call

+

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/trace/tracerequest/sidebar-items.js b/alloy_rpc_types/trace/tracerequest/sidebar-items.js new file mode 100644 index 000000000000..3e8c6853414f --- /dev/null +++ b/alloy_rpc_types/trace/tracerequest/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["TraceCallRequest"]}; \ No newline at end of file diff --git a/alloy_rpc_types/trace/tracerequest/struct.TraceCallRequest.html b/alloy_rpc_types/trace/tracerequest/struct.TraceCallRequest.html new file mode 100644 index 000000000000..95fa9bbff01d --- /dev/null +++ b/alloy_rpc_types/trace/tracerequest/struct.TraceCallRequest.html @@ -0,0 +1,48 @@ +TraceCallRequest in alloy_rpc_types::trace::tracerequest - Rust +
pub struct TraceCallRequest {
+    pub call: CallRequest,
+    pub trace_types: HashSet<TraceType>,
+    pub block_id: Option<BlockId>,
+    pub state_overrides: Option<StateOverride>,
+    pub block_overrides: Option<Box<BlockOverrides>>,
+}
Expand description

Container type for trace_call arguments

+

Fields§

§call: CallRequest

call request object

+
§trace_types: HashSet<TraceType>

trace types

+
§block_id: Option<BlockId>

Optional: blockId

+
§state_overrides: Option<StateOverride>

Optional: StateOverride

+
§block_overrides: Option<Box<BlockOverrides>>

Optional: BlockOverrides

+

Implementations§

source§

impl TraceCallRequest

source

pub fn new(call: CallRequest) -> Self

Returns a new TraceCallRequest given a CallRequest and HashSet<TraceType>

+
source

pub fn with_block_id(self, block_id: BlockId) -> Self

Sets the BlockId +Note: this is optional

+
source

pub fn with_state_override(self, state_overrides: StateOverride) -> Self

Sets the StateOverride +Note: this is optional

+
source

pub fn with_block_overrides(self, block_overrides: Box<BlockOverrides>) -> Self

Sets the BlockOverrides +Note: this is optional

+
source

pub fn with_trace_type(self, trace_type: TraceType) -> Self

Inserts a single trace type.

+
source

pub fn with_trace_types<I: IntoIterator<Item = TraceType>>( + self, + trace_types: I +) -> Self

Inserts multiple trace types from an iterator.

+
source

pub fn with_trace(self) -> Self

source

pub fn with_vm_trace(self) -> Self

source

pub fn with_statediff(self) -> Self

Trait Implementations§

source§

impl Debug for TraceCallRequest

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TraceCallRequest

source§

fn default() -> TraceCallRequest

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceCallRequest

source§

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 Serialize for TraceCallRequest

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 592 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/trace/type.TraceResult.html b/alloy_rpc_types/trace/type.TraceResult.html new file mode 100644 index 000000000000..cf86985f9333 --- /dev/null +++ b/alloy_rpc_types/trace/type.TraceResult.html @@ -0,0 +1,12 @@ +TraceResult in alloy_rpc_types::trace - Rust +
pub type TraceResult = TraceResult<GethTrace, String>;
Expand description

Result type for geth style transaction trace

+

Aliased Type§

enum TraceResult {
+    Success {
+        result: GethTrace,
+    },
+    Error {
+        error: String,
+    },
+}

Variants§

§

Success

Fields

§result: GethTrace

Untagged success variant

+
§

Error

Fields

§error: String

Untagged error variant

+

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: 336 bytes

Size for each variant:

  • Success: 336 bytes
  • Error: 32 bytes
\ No newline at end of file diff --git a/alloy_rpc_types/txpool/index.html b/alloy_rpc_types/txpool/index.html new file mode 100644 index 000000000000..ec7b30543d98 --- /dev/null +++ b/alloy_rpc_types/txpool/index.html @@ -0,0 +1,3 @@ +alloy_rpc_types::txpool - Rust +

Module alloy_rpc_types::txpool

source ·
Expand description

Structs

\ No newline at end of file diff --git a/alloy_rpc_types/txpool/sidebar-items.js b/alloy_rpc_types/txpool/sidebar-items.js new file mode 100644 index 000000000000..ec85080e610a --- /dev/null +++ b/alloy_rpc_types/txpool/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["TxpoolContent","TxpoolContentFrom","TxpoolInspect","TxpoolInspectSummary","TxpoolStatus"]}; \ No newline at end of file diff --git a/alloy_rpc_types/txpool/struct.TxpoolContent.html b/alloy_rpc_types/txpool/struct.TxpoolContent.html new file mode 100644 index 000000000000..34ce0576a24d --- /dev/null +++ b/alloy_rpc_types/txpool/struct.TxpoolContent.html @@ -0,0 +1,35 @@ +TxpoolContent in alloy_rpc_types::txpool - Rust +
pub struct TxpoolContent {
+    pub pending: BTreeMap<Address, BTreeMap<String, Transaction>>,
+    pub queued: BTreeMap<Address, BTreeMap<String, Transaction>>,
+}
Expand description

Transaction Pool Content

+

The content inspection property can be queried to list the exact details of all +the transactions currently pending for inclusion in the next block(s), as well +as the ones that are being scheduled for future execution only.

+

See here for more details

+

Fields§

§pending: BTreeMap<Address, BTreeMap<String, Transaction>>

pending tx

+
§queued: BTreeMap<Address, BTreeMap<String, Transaction>>

queued tx

+

Implementations§

source§

impl TxpoolContent

source

pub fn remove_from(&mut self, sender: &Address) -> TxpoolContentFrom

Removes the transactions from the given sender

+

Trait Implementations§

source§

impl Clone for TxpoolContent

source§

fn clone(&self) -> TxpoolContent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolContent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolContent

source§

fn default() -> TxpoolContent

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolContent

source§

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 PartialEq for TxpoolContent

source§

fn eq(&self, other: &TxpoolContent) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolContent

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolContent

source§

impl StructuralEq for TxpoolContent

source§

impl StructuralPartialEq for TxpoolContent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/txpool/struct.TxpoolContentFrom.html b/alloy_rpc_types/txpool/struct.TxpoolContentFrom.html new file mode 100644 index 000000000000..072fa6b88241 --- /dev/null +++ b/alloy_rpc_types/txpool/struct.TxpoolContentFrom.html @@ -0,0 +1,32 @@ +TxpoolContentFrom in alloy_rpc_types::txpool - Rust +
pub struct TxpoolContentFrom {
+    pub pending: BTreeMap<String, Transaction>,
+    pub queued: BTreeMap<String, Transaction>,
+}
Expand description

Transaction Pool Content From

+

Same as TxpoolContent but for a specific address.

+

See here for more details

+

Fields§

§pending: BTreeMap<String, Transaction>

pending tx

+
§queued: BTreeMap<String, Transaction>

queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolContentFrom

source§

fn clone(&self) -> TxpoolContentFrom

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolContentFrom

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolContentFrom

source§

fn default() -> TxpoolContentFrom

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolContentFrom

source§

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 PartialEq for TxpoolContentFrom

source§

fn eq(&self, other: &TxpoolContentFrom) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolContentFrom

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolContentFrom

source§

impl StructuralEq for TxpoolContentFrom

source§

impl StructuralPartialEq for TxpoolContentFrom

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/txpool/struct.TxpoolInspect.html b/alloy_rpc_types/txpool/struct.TxpoolInspect.html new file mode 100644 index 000000000000..c05d2f51eb6c --- /dev/null +++ b/alloy_rpc_types/txpool/struct.TxpoolInspect.html @@ -0,0 +1,36 @@ +TxpoolInspect in alloy_rpc_types::txpool - Rust +
pub struct TxpoolInspect {
+    pub pending: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+    pub queued: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+}
Expand description

Transaction Pool Inspect

+

The inspect inspection property can be queried to list a textual summary +of all the transactions currently pending for inclusion in the next block(s), +as well as the ones that are being scheduled for future execution only. +This is a method specifically tailored to developers to quickly see the +transactions in the pool and find any potential issues.

+

See here for more details

+

Fields§

§pending: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>

pending tx

+
§queued: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>

queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolInspect

source§

fn clone(&self) -> TxpoolInspect

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolInspect

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolInspect

source§

fn default() -> TxpoolInspect

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolInspect

source§

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 PartialEq for TxpoolInspect

source§

fn eq(&self, other: &TxpoolInspect) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolInspect

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolInspect

source§

impl StructuralEq for TxpoolInspect

source§

impl StructuralPartialEq for TxpoolInspect

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/txpool/struct.TxpoolInspectSummary.html b/alloy_rpc_types/txpool/struct.TxpoolInspectSummary.html new file mode 100644 index 000000000000..5fb25f9bcbf9 --- /dev/null +++ b/alloy_rpc_types/txpool/struct.TxpoolInspectSummary.html @@ -0,0 +1,37 @@ +TxpoolInspectSummary in alloy_rpc_types::txpool - Rust +
pub struct TxpoolInspectSummary {
+    pub to: Option<Address>,
+    pub value: U256,
+    pub gas: U256,
+    pub gas_price: U256,
+}
Expand description

Transaction summary as found in the Txpool Inspection property.

+

Fields§

§to: Option<Address>

Recipient (None when contract creation)

+
§value: U256

Transferred value

+
§gas: U256

Gas amount

+
§gas_price: U256

Gas Price

+

Trait Implementations§

source§

impl Clone for TxpoolInspectSummary

source§

fn clone(&self) -> TxpoolInspectSummary

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolInspectSummary

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TxpoolInspectSummary

Implement the Deserialize trait for TxpoolInspectSummary struct.

+
source§

fn deserialize<D>(deserializer: D) -> Result<TxpoolInspectSummary, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for TxpoolInspectSummary

source§

fn eq(&self, other: &TxpoolInspectSummary) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolInspectSummary

Implement the Serialize trait for TxpoolInspectSummary struct so that the +format matches the one from geth.

+
source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolInspectSummary

source§

impl StructuralEq for TxpoolInspectSummary

source§

impl StructuralPartialEq for TxpoolInspectSummary

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 120 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/txpool/struct.TxpoolStatus.html b/alloy_rpc_types/txpool/struct.TxpoolStatus.html new file mode 100644 index 000000000000..c97022a2acd4 --- /dev/null +++ b/alloy_rpc_types/txpool/struct.TxpoolStatus.html @@ -0,0 +1,34 @@ +TxpoolStatus in alloy_rpc_types::txpool - Rust +
pub struct TxpoolStatus {
+    pub pending: U64,
+    pub queued: U64,
+}
Expand description

Transaction Pool Status

+

The status inspection property can be queried for the number of transactions +currently pending for inclusion in the next block(s), as well as the ones that +are being scheduled for future execution only.

+

See here for more details

+

Fields§

§pending: U64

number of pending tx

+
§queued: U64

number of queued tx

+

Trait Implementations§

source§

impl Clone for TxpoolStatus

source§

fn clone(&self) -> TxpoolStatus

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxpoolStatus

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxpoolStatus

source§

fn default() -> TxpoolStatus

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TxpoolStatus

source§

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 PartialEq for TxpoolStatus

source§

fn eq(&self, other: &TxpoolStatus) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for TxpoolStatus

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for TxpoolStatus

source§

impl StructuralEq for TxpoolStatus

source§

impl StructuralPartialEq for TxpoolStatus

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 16 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/type.ForkBlock.html b/alloy_rpc_types/type.ForkBlock.html new file mode 100644 index 000000000000..2871a7e38f57 --- /dev/null +++ b/alloy_rpc_types/type.ForkBlock.html @@ -0,0 +1,8 @@ +ForkBlock in alloy_rpc_types - Rust +

Type Alias alloy_rpc_types::ForkBlock

source ·
pub type ForkBlock = BlockNumHash;
Expand description

Block number and hash of the forked block.

+

Aliased Type§

struct ForkBlock {
+    pub number: u64,
+    pub hash: FixedBytes<32>,
+}

Fields§

§number: u64

Block number

+
§hash: FixedBytes<32>

Block hash

+

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: 40 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/type.RichBlock.html b/alloy_rpc_types/type.RichBlock.html new file mode 100644 index 000000000000..ea593707e3c3 --- /dev/null +++ b/alloy_rpc_types/type.RichBlock.html @@ -0,0 +1,8 @@ +RichBlock in alloy_rpc_types - Rust +

Type Alias alloy_rpc_types::RichBlock

source ·
pub type RichBlock = Rich<Block>;
Expand description

A Block representation that allows to include additional fields

+

Aliased Type§

struct RichBlock {
+    pub inner: Block,
+    pub extra_info: BTreeMap<String, Value>,
+}

Fields§

§inner: Block

Standard value.

+
§extra_info: BTreeMap<String, Value>

Additional fields that should be serialized into the Block object

+

Trait Implementations§

source§

impl From<Block> for RichBlock

source§

fn from(block: Block) -> Self

Converts to this type from the input type.

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: 1064 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/type.RichHeader.html b/alloy_rpc_types/type.RichHeader.html new file mode 100644 index 000000000000..5b9e99b21ea6 --- /dev/null +++ b/alloy_rpc_types/type.RichHeader.html @@ -0,0 +1,8 @@ +RichHeader in alloy_rpc_types - Rust +

Type Alias alloy_rpc_types::RichHeader

source ·
pub type RichHeader = Rich<Header>;
Expand description

Header representation with additional info.

+

Aliased Type§

struct RichHeader {
+    pub inner: Header,
+    pub extra_info: BTreeMap<String, Value>,
+}

Fields§

§inner: Header

Standard value.

+
§extra_info: BTreeMap<String, Value>

Additional fields that should be serialized into the Block object

+

Trait Implementations§

source§

impl From<Header> for RichHeader

source§

fn from(header: Header) -> Self

Converts to this type from the input type.

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: 880 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/type.Topic.html b/alloy_rpc_types/type.Topic.html new file mode 100644 index 000000000000..83059c443552 --- /dev/null +++ b/alloy_rpc_types/type.Topic.html @@ -0,0 +1,3 @@ +Topic in alloy_rpc_types - Rust +

Type Alias alloy_rpc_types::Topic

source ·
pub type Topic = FilterSet<B256>;
Expand description

A single topic

+

Aliased Type§

struct Topic(HashSet<FixedBytes<32>>);

Fields§

§0: HashSet<FixedBytes<32>>

Trait Implementations§

source§

impl From<Uint<256, 4>> for Topic

source§

fn from(src: U256) -> Self

Converts to this type from the input type.

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: 48 bytes

\ No newline at end of file diff --git a/alloy_rpc_types/u64_hex/fn.deserialize.html b/alloy_rpc_types/u64_hex/fn.deserialize.html new file mode 100644 index 000000000000..7a4e9e715f59 --- /dev/null +++ b/alloy_rpc_types/u64_hex/fn.deserialize.html @@ -0,0 +1,4 @@ +deserialize in alloy_rpc_types::u64_hex - Rust +
pub fn deserialize<'de, D>(deserializer: D) -> Result<u64, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserializes an u64 from [U64] accepting a hex quantity string with optional 0x prefix

+
\ No newline at end of file diff --git a/alloy_rpc_types/u64_hex/fn.serialize.html b/alloy_rpc_types/u64_hex/fn.serialize.html new file mode 100644 index 000000000000..b34b41dc5faf --- /dev/null +++ b/alloy_rpc_types/u64_hex/fn.serialize.html @@ -0,0 +1,3 @@ +serialize in alloy_rpc_types::u64_hex - Rust +
pub fn serialize<S: Serializer>(value: &u64, s: S) -> Result<S::Ok, S::Error>
Expand description

Serializes u64 as hex string

+
\ No newline at end of file diff --git a/alloy_rpc_types/u64_hex/index.html b/alloy_rpc_types/u64_hex/index.html new file mode 100644 index 000000000000..94c384a0bb9f --- /dev/null +++ b/alloy_rpc_types/u64_hex/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::u64_hex - Rust +
Expand description

Helper to deserialize an u64 from [U64] accepting a hex quantity string with optional 0x +prefix

+

Functions

  • Deserializes an u64 from [U64] accepting a hex quantity string with optional 0x prefix
  • Serializes u64 as hex string
\ No newline at end of file diff --git a/alloy_rpc_types/u64_hex/sidebar-items.js b/alloy_rpc_types/u64_hex/sidebar-items.js new file mode 100644 index 000000000000..4ed511eceead --- /dev/null +++ b/alloy_rpc_types/u64_hex/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize","serialize"]}; \ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/beacon_api_withdrawals/fn.deserialize.html b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/fn.deserialize.html new file mode 100644 index 000000000000..c4f2c7db0a6b --- /dev/null +++ b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/fn.deserialize.html @@ -0,0 +1,4 @@ +deserialize in alloy_rpc_types::withdrawal::beacon_api_withdrawals - Rust +
pub fn deserialize<'de, D>(deserializer: D) -> Result<Withdrawal, D::Error>
where + D: Deserializer<'de>,
Expand description

Deserialize the payload attributes for the beacon API.

+
\ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/beacon_api_withdrawals/fn.serialize.html b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/fn.serialize.html new file mode 100644 index 000000000000..85c9ebf152fa --- /dev/null +++ b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/fn.serialize.html @@ -0,0 +1,7 @@ +serialize in alloy_rpc_types::withdrawal::beacon_api_withdrawals - Rust +
pub fn serialize<S>(
+    payload_attributes: &Withdrawal,
+    serializer: S
+) -> Result<S::Ok, S::Error>
where + S: Serializer,
Expand description

Serialize the payload attributes for the beacon API.

+
\ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/beacon_api_withdrawals/index.html b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/index.html new file mode 100644 index 000000000000..5c672e75cc80 --- /dev/null +++ b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::withdrawal::beacon_api_withdrawals - Rust +
Expand description

A helper serde module to convert from/to the Beacon API which uses quoted decimals rather than +big-endian hex.

+

Functions

  • Deserialize the payload attributes for the beacon API.
  • Serialize the payload attributes for the beacon API.
\ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/beacon_api_withdrawals/sidebar-items.js b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/sidebar-items.js new file mode 100644 index 000000000000..4ed511eceead --- /dev/null +++ b/alloy_rpc_types/withdrawal/beacon_api_withdrawals/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["deserialize","serialize"]}; \ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/constant.GWEI_TO_WEI.html b/alloy_rpc_types/withdrawal/constant.GWEI_TO_WEI.html new file mode 100644 index 000000000000..e86c3fd71788 --- /dev/null +++ b/alloy_rpc_types/withdrawal/constant.GWEI_TO_WEI.html @@ -0,0 +1,3 @@ +GWEI_TO_WEI in alloy_rpc_types::withdrawal - Rust +
pub const GWEI_TO_WEI: u64 = 1_000_000_000;
Expand description

Multiplier for converting gwei to wei.

+
\ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/index.html b/alloy_rpc_types/withdrawal/index.html new file mode 100644 index 000000000000..cd88d1f1ce19 --- /dev/null +++ b/alloy_rpc_types/withdrawal/index.html @@ -0,0 +1,4 @@ +alloy_rpc_types::withdrawal - Rust +
Expand description

Withdrawal type and serde helpers.

+

Modules

  • A helper serde module to convert from/to the Beacon API which uses quoted decimals rather than +big-endian hex.

Structs

  • Withdrawal represents a validator withdrawal from the consensus layer.

Constants

\ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/sidebar-items.js b/alloy_rpc_types/withdrawal/sidebar-items.js new file mode 100644 index 000000000000..6189e9163093 --- /dev/null +++ b/alloy_rpc_types/withdrawal/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["GWEI_TO_WEI"],"mod":["beacon_api_withdrawals"],"struct":["Withdrawal"]}; \ No newline at end of file diff --git a/alloy_rpc_types/withdrawal/struct.Withdrawal.html b/alloy_rpc_types/withdrawal/struct.Withdrawal.html new file mode 100644 index 000000000000..033f1b49efb1 --- /dev/null +++ b/alloy_rpc_types/withdrawal/struct.Withdrawal.html @@ -0,0 +1,44 @@ +Withdrawal in alloy_rpc_types::withdrawal - Rust +
pub struct Withdrawal {
+    pub index: u64,
+    pub validator_index: u64,
+    pub address: Address,
+    pub amount: u64,
+}
Expand description

Withdrawal represents a validator withdrawal from the consensus layer.

+

Fields§

§index: u64

Monotonically increasing identifier issued by consensus layer.

+
§validator_index: u64

Index of validator associated with withdrawal.

+
§address: Address

Target address for withdrawn ether.

+
§amount: u64

Value of the withdrawal in gwei.

+

Implementations§

source§

impl Withdrawal

source§

impl Withdrawal

source

pub fn amount_wei(&self) -> U256

Return the withdrawal amount in wei.

+
source

pub fn size(&self) -> usize

Calculate a heuristic for the in-memory size of the Withdrawal.

+

Trait Implementations§

source§

impl Clone for Withdrawal

source§

fn clone(&self) -> Withdrawal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Withdrawal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for Withdrawal

source§

fn decode(b: &mut &[u8]) -> Result<Self>

Decodes the blob into the appropriate type. buf must be advanced past +the decoded object.
source§

impl Default for Withdrawal

source§

fn default() -> Withdrawal

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Withdrawal

source§

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<'de> DeserializeAs<'de, Withdrawal> for BeaconAPIWithdrawal

source§

fn deserialize_as<D>(deserializer: D) -> Result<Withdrawal, D::Error>
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
source§

impl Encodable for Withdrawal

source§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
source§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
source§

impl Hash for Withdrawal

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Withdrawal

source§

fn eq(&self, other: &Withdrawal) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Withdrawal

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl SerializeAs<Withdrawal> for BeaconAPIWithdrawal

source§

fn serialize_as<S>( + source: &Withdrawal, + serializer: S +) -> Result<S::Ok, S::Error>
where + S: Serializer,

Serialize this value into the given Serde serializer.
source§

impl Eq for Withdrawal

source§

impl StructuralEq for Withdrawal

source§

impl StructuralPartialEq for Withdrawal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

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: 48 bytes

\ No newline at end of file diff --git a/alloy_signer/all.html b/alloy_signer/all.html new file mode 100644 index 000000000000..f55920c42774 --- /dev/null +++ b/alloy_signer/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Traits

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/alloy_signer/enum.Error.html b/alloy_signer/enum.Error.html new file mode 100644 index 000000000000..7d01dc21ed99 --- /dev/null +++ b/alloy_signer/enum.Error.html @@ -0,0 +1,114 @@ +Error in alloy_signer - Rust +

Enum alloy_signer::Error

source ·
pub enum Error {
+    UnsupportedOperation(UnsupportedSignerOperation),
+    TransactionChainIdMismatch {
+        signer: u64,
+        tx: u64,
+    },
+    Ecdsa(Error),
+    HexError(FromHexError),
+    Other(Box<dyn Error + Send + Sync + 'static>),
+}
Expand description

Generic error type for Signer implementations.

+

Variants§

§

UnsupportedOperation(UnsupportedSignerOperation)

This operation is not supported by the signer.

+
§

TransactionChainIdMismatch

Fields

§signer: u64

The signer’s chain ID.

+
§tx: u64

The chain ID provided by the transaction.

+

Mismatch between provided transaction chain ID and signer chain ID.

+
§

Ecdsa(Error)

[ecdsa] error.

+
§

HexError(FromHexError)

hex error.

+
§

Other(Box<dyn Error + Send + Sync + 'static>)

Generic error.

+

Implementations§

source§

impl Error

source

pub fn other(error: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self

Constructs a new Other error.

+
source

pub const fn is_unsupported(&self) -> bool

Returns true if the error is UnsupportedOperation.

+
source

pub const fn unsupported(&self) -> Option<UnsupportedSignerOperation>

Returns the UnsupportedSignerOperation if the error is +UnsupportedOperation.

+

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Box<dyn Error + Sync + Send>> for Error

source§

fn from(source: Box<dyn Error + Send + Sync + 'static>) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for Error

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 24 bytes

Size for each variant:

  • UnsupportedOperation: 1 byte
  • TransactionChainIdMismatch: 23 bytes
  • Ecdsa: 23 bytes
  • HexError: 23 bytes
  • Other: 23 bytes
\ No newline at end of file diff --git a/alloy_signer/enum.UnsupportedSignerOperation.html b/alloy_signer/enum.UnsupportedSignerOperation.html new file mode 100644 index 000000000000..c2fc7d4f9b90 --- /dev/null +++ b/alloy_signer/enum.UnsupportedSignerOperation.html @@ -0,0 +1,112 @@ +UnsupportedSignerOperation in alloy_signer - Rust +
pub enum UnsupportedSignerOperation {
+    SignHash,
+    SignMessage,
+    SignTransaction,
+    SignTypedData,
+}
Expand description

An unsupported signer operation.

+

Variants§

§

SignHash

sign_hash is not supported by the signer.

+
§

SignMessage

sign_message is not supported by the signer.

+
§

SignTransaction

sign_transaction is not supported by the signer.

+
§

SignTypedData

sign_typed_data is not supported by the signer.

+

Implementations§

source§

impl UnsupportedSignerOperation

source

pub const fn as_str(&self) -> &'static str

Returns the string representation of the operation.

+

Trait Implementations§

source§

impl Clone for UnsupportedSignerOperation

source§

fn clone(&self) -> UnsupportedSignerOperation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for UnsupportedSignerOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for UnsupportedSignerOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for UnsupportedSignerOperation

source§

fn cmp(&self, other: &UnsupportedSignerOperation) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for UnsupportedSignerOperation

source§

fn eq(&self, other: &UnsupportedSignerOperation) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for UnsupportedSignerOperation

source§

fn partial_cmp(&self, other: &UnsupportedSignerOperation) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for UnsupportedSignerOperation

source§

impl Eq for UnsupportedSignerOperation

source§

impl StructuralEq for UnsupportedSignerOperation

source§

impl StructuralPartialEq for UnsupportedSignerOperation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 1 byte

Size for each variant:

  • SignHash: 0 bytes
  • SignMessage: 0 bytes
  • SignTransaction: 0 bytes
  • SignTypedData: 0 bytes
\ No newline at end of file diff --git a/alloy_signer/enum.WalletError.html b/alloy_signer/enum.WalletError.html new file mode 100644 index 000000000000..8bb61f9ce150 --- /dev/null +++ b/alloy_signer/enum.WalletError.html @@ -0,0 +1,109 @@ +WalletError in alloy_signer - Rust +
pub enum WalletError {
+    EcdsaError(Error),
+    HexError(FromHexError),
+    IoError(Error),
+    Bip32Error(Bip32Error),
+    Bip39Error(MnemonicError),
+    MnemonicBuilderError(MnemonicBuilderError),
+    EthKeystoreError(KeystoreError),
+}
Expand description

Error thrown by the Wallet module.

+

Variants§

§

EcdsaError(Error)

[ecdsa] error.

+
§

HexError(FromHexError)

hex error.

+
§

IoError(Error)

std::io error.

+
§

Bip32Error(Bip32Error)

Available on crate feature mnemonic only.

[coins_bip32] error.

+
§

Bip39Error(MnemonicError)

Available on crate feature mnemonic only.

[coins_bip39] error.

+
§

MnemonicBuilderError(MnemonicBuilderError)

Available on crate feature mnemonic only.
§

EthKeystoreError(KeystoreError)

Available on crate feature keystore only.

[eth_keystore] error.

+

Trait Implementations§

source§

impl Debug for WalletError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for WalletError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for WalletError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Bip32Error> for WalletError

source§

fn from(source: Bip32Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for WalletError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for WalletError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for WalletError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<KeystoreError> for WalletError

source§

fn from(source: KeystoreError) -> Self

Converts to this type from the input type.
source§

impl From<MnemonicBuilderError> for WalletError

source§

fn from(source: MnemonicBuilderError) -> Self

Converts to this type from the input type.
source§

impl From<MnemonicError> for WalletError

source§

fn from(source: MnemonicError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 40 bytes

Size for each variant:

  • EcdsaError: 23 bytes
  • HexError: 23 bytes
  • IoError: 15 bytes
  • Bip32Error: 39 bytes
  • Bip39Error: 39 bytes
  • MnemonicBuilderError: 1 byte
  • EthKeystoreError: 39 bytes
\ No newline at end of file diff --git a/alloy_signer/error/enum.Error.html b/alloy_signer/error/enum.Error.html new file mode 100644 index 000000000000..22bf61a13412 --- /dev/null +++ b/alloy_signer/error/enum.Error.html @@ -0,0 +1,114 @@ +Error in alloy_signer::error - Rust +
pub enum Error {
+    UnsupportedOperation(UnsupportedSignerOperation),
+    TransactionChainIdMismatch {
+        signer: u64,
+        tx: u64,
+    },
+    Ecdsa(Error),
+    HexError(FromHexError),
+    Other(Box<dyn Error + Send + Sync + 'static>),
+}
Expand description

Generic error type for Signer implementations.

+

Variants§

§

UnsupportedOperation(UnsupportedSignerOperation)

This operation is not supported by the signer.

+
§

TransactionChainIdMismatch

Fields

§signer: u64

The signer’s chain ID.

+
§tx: u64

The chain ID provided by the transaction.

+

Mismatch between provided transaction chain ID and signer chain ID.

+
§

Ecdsa(Error)

[ecdsa] error.

+
§

HexError(FromHexError)

hex error.

+
§

Other(Box<dyn Error + Send + Sync + 'static>)

Generic error.

+

Implementations§

source§

impl Error

source

pub fn other(error: impl Into<Box<dyn Error + Send + Sync + 'static>>) -> Self

Constructs a new Other error.

+
source

pub const fn is_unsupported(&self) -> bool

Returns true if the error is UnsupportedOperation.

+
source

pub const fn unsupported(&self) -> Option<UnsupportedSignerOperation>

Returns the UnsupportedSignerOperation if the error is +UnsupportedOperation.

+

Trait Implementations§

source§

impl Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Box<dyn Error + Sync + Send>> for Error

source§

fn from(source: Box<dyn Error + Send + Sync + 'static>) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for Error

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 24 bytes

Size for each variant:

  • UnsupportedOperation: 1 byte
  • TransactionChainIdMismatch: 23 bytes
  • Ecdsa: 23 bytes
  • HexError: 23 bytes
  • Other: 23 bytes
\ No newline at end of file diff --git a/alloy_signer/error/enum.UnsupportedSignerOperation.html b/alloy_signer/error/enum.UnsupportedSignerOperation.html new file mode 100644 index 000000000000..a801f391462d --- /dev/null +++ b/alloy_signer/error/enum.UnsupportedSignerOperation.html @@ -0,0 +1,112 @@ +UnsupportedSignerOperation in alloy_signer::error - Rust +
pub enum UnsupportedSignerOperation {
+    SignHash,
+    SignMessage,
+    SignTransaction,
+    SignTypedData,
+}
Expand description

An unsupported signer operation.

+

Variants§

§

SignHash

sign_hash is not supported by the signer.

+
§

SignMessage

sign_message is not supported by the signer.

+
§

SignTransaction

sign_transaction is not supported by the signer.

+
§

SignTypedData

sign_typed_data is not supported by the signer.

+

Implementations§

source§

impl UnsupportedSignerOperation

source

pub const fn as_str(&self) -> &'static str

Returns the string representation of the operation.

+

Trait Implementations§

source§

impl Clone for UnsupportedSignerOperation

source§

fn clone(&self) -> UnsupportedSignerOperation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for UnsupportedSignerOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for UnsupportedSignerOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for UnsupportedSignerOperation

source§

fn cmp(&self, other: &UnsupportedSignerOperation) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for UnsupportedSignerOperation

source§

fn eq(&self, other: &UnsupportedSignerOperation) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for UnsupportedSignerOperation

source§

fn partial_cmp(&self, other: &UnsupportedSignerOperation) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl Copy for UnsupportedSignerOperation

source§

impl Eq for UnsupportedSignerOperation

source§

impl StructuralEq for UnsupportedSignerOperation

source§

impl StructuralPartialEq for UnsupportedSignerOperation

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 1 byte

Size for each variant:

  • SignHash: 0 bytes
  • SignMessage: 0 bytes
  • SignTransaction: 0 bytes
  • SignTypedData: 0 bytes
\ No newline at end of file diff --git a/alloy_signer/error/index.html b/alloy_signer/error/index.html new file mode 100644 index 000000000000..271201ec8dda --- /dev/null +++ b/alloy_signer/error/index.html @@ -0,0 +1,2 @@ +alloy_signer::error - Rust +

Module alloy_signer::error

source ·

Enums

Type Aliases

\ No newline at end of file diff --git a/alloy_signer/error/sidebar-items.js b/alloy_signer/error/sidebar-items.js new file mode 100644 index 000000000000..9d9ce04e0cfe --- /dev/null +++ b/alloy_signer/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Error","UnsupportedSignerOperation"],"type":["Result"]}; \ No newline at end of file diff --git a/alloy_signer/error/type.Result.html b/alloy_signer/error/type.Result.html new file mode 100644 index 000000000000..fa48dafd87a3 --- /dev/null +++ b/alloy_signer/error/type.Result.html @@ -0,0 +1,8 @@ +Result in alloy_signer::error - Rust +

Type Alias alloy_signer::error::Result

source ·
pub type Result<T, E = Error> = Result<T, E>;
Expand description

Result type alias for Error.

+

Aliased Type§

enum Result<T, E = Error> {
+    Ok(T),
+    Err(E),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(E)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_signer/index.html b/alloy_signer/index.html new file mode 100644 index 000000000000..1e16828a2bae --- /dev/null +++ b/alloy_signer/index.html @@ -0,0 +1,53 @@ +alloy_signer - Rust +

Crate alloy_signer

source ·
Expand description

alloy-signers

+

Ethereum signer abstraction.

+

You can implement the Signer trait to extend functionality to other signers +such as Hardware Security Modules, KMS etc.

+

Supported signers:

+ +

Examples

+

Sign an Ethereum prefixed message (EIP-712):

+ +
use alloy_signer::{LocalWallet, Signer, SignerSync};
+
+let message = "Some data";
+let wallet = LocalWallet::random();
+
+// Sign the message
+let signature = wallet.sign_message_sync(message.as_bytes())?;
+
+// Recover the signer from the message
+let recovered = signature.recover_address_from_msg(message)?;
+
+assert_eq!(recovered, wallet.address());
+

Re-exports

  • pub use yubihsm;
    yubihsm
  • pub use coins_bip39;
    mnemonic

Modules

Structs

  • Represents a structure that can resolve into a Wallet<SigningKey>.
  • An Ethereum ECDSA signature.
  • An Ethereum private-public key pair which can be used for signing messages.

Enums

Traits

Type Aliases

\ No newline at end of file diff --git a/alloy_signer/sidebar-items.js b/alloy_signer/sidebar-items.js new file mode 100644 index 000000000000..67427396ff75 --- /dev/null +++ b/alloy_signer/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Error","UnsupportedSignerOperation","WalletError"],"mod":["error","signature","signer","utils","wallet"],"struct":["MnemonicBuilder","Signature","Wallet"],"trait":["Signer","SignerSync"],"type":["LocalWallet","Result","YubiWallet"]}; \ No newline at end of file diff --git a/alloy_signer/signature/fn.normalize_v.html b/alloy_signer/signature/fn.normalize_v.html new file mode 100644 index 000000000000..422ccf270603 --- /dev/null +++ b/alloy_signer/signature/fn.normalize_v.html @@ -0,0 +1,16 @@ +normalize_v in alloy_signer::signature - Rust +
const fn normalize_v(v: u64) -> RecoveryId
Expand description

Normalizes a v value, respecting raw, legacy, and EIP-155 values.

+

This function covers the entire u64 range, producing v-values as follows:

+
    +
  • 0-26 - raw/bare. 0-3 are legal. In order to ensure that all values are covered, we also handle +4-26 here by returning v % 4.
  • +
  • 27-34 - legacy. 27-30 are legal. By legacy bitcoin convention range 27-30 signals uncompressed +pubkeys, while 31-34 signals compressed pubkeys. We do not respect the compression convention. +All Ethereum keys are uncompressed.
  • +
  • 35+ - EIP-155. By EIP-155 convention, v = 35 + CHAIN_ID * 2 + 0/1 We return (v-1 % 2) here.
  • +
+

NB: raw and legacy support values 2, and 3, while EIP-155 does not. +Recovery values of 2 and 3 are unlikely to occur in practice. In the vanishingly unlikely event +that you encounter an EIP-155 signature with a recovery value of 2 or 3, you should normalize +out of band.

+
\ No newline at end of file diff --git a/alloy_signer/signature/index.html b/alloy_signer/signature/index.html new file mode 100644 index 000000000000..2fa3e6cfb48c --- /dev/null +++ b/alloy_signer/signature/index.html @@ -0,0 +1,2 @@ +alloy_signer::signature - Rust +

Module alloy_signer::signature

source ·

Structs

Functions

  • Normalizes a v value, respecting raw, legacy, and EIP-155 values.
\ No newline at end of file diff --git a/alloy_signer/signature/sidebar-items.js b/alloy_signer/signature/sidebar-items.js new file mode 100644 index 000000000000..81cd4a372906 --- /dev/null +++ b/alloy_signer/signature/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["normalize_v"],"struct":["Signature"]}; \ No newline at end of file diff --git a/alloy_signer/signature/struct.Signature.html b/alloy_signer/signature/struct.Signature.html new file mode 100644 index 000000000000..1c3a82d85afb --- /dev/null +++ b/alloy_signer/signature/struct.Signature.html @@ -0,0 +1,148 @@ +Signature in alloy_signer::signature - Rust +
pub struct Signature {
+    inner: Signature,
+    recid: RecoveryId,
+}
Expand description

An Ethereum ECDSA signature.

+

This is a wrapper around [ecdsa::Signature] and a [RecoveryId] to provide public key +recovery functionality.

+

Fields§

§inner: Signature

The inner ECDSA signature.

+
§recid: RecoveryId

The recovery ID.

+

Implementations§

source§

impl Signature

source

pub fn new(inner: Signature, recid: RecoveryId) -> Self

Creates a new Signature from the given ECDSA signature and recovery ID.

+

Normalizes the signature into “low S” form as described in +BIP 0062: Dealing with Malleability.

+
source

pub const fn new_not_normalized(inner: Signature, recid: RecoveryId) -> Self

Creates a new signature from the given inner signature and recovery ID, without normalizing +it into “low S” form.

+
source

pub fn normalize_s(&mut self)

Normalizes the signature into “low S” form as described in +BIP 0062: Dealing with Malleability.

+
source

pub fn from_bytes(bytes: &[u8], v: u64) -> Result<Self, Error>

Parses a signature from a byte slice.

+
source

pub fn from_scalars(r: B256, s: B256, v: u64) -> Result<Self, Error>

Creates a Signature from the serialized r and s scalar values, which comprise the +ECDSA signature, alongside a v value, used to determine the recovery ID.

+

See [ecdsa::Signature::from_scalars] for more details.

+
source

pub const fn inner(&self) -> &Signature

Returns the inner ECDSA signature.

+
source

pub fn inner_mut(&mut self) -> &mut Signature

Returns the inner ECDSA signature.

+
source

pub const fn into_inner(self) -> Signature

Returns the inner ECDSA signature.

+
source

pub const fn recid(&self) -> RecoveryId

Returns the recovery ID.

+
source

pub fn r(&self) -> NonZeroScalar<Secp256k1>

Returns the r component of this signature.

+
source

pub fn s(&self) -> NonZeroScalar<Secp256k1>

Returns the s component of this signature.

+
source

pub const fn v(&self) -> u8

Returns the recovery ID as a u8.

+
source

pub fn as_bytes(&self) -> [u8; 65]

Returns the byte-array representation of this signature.

+

The first 32 bytes are the r value, the second 32 bytes the s value +and the final byte is the v value in ‘Electrum’ notation.

+
source

pub fn set_recid(&mut self, recid: RecoveryId)

Sets the recovery ID.

+
source

pub fn set_v(&mut self, v: u64)

Sets the recovery ID by normalizing a v value.

+
source

pub fn apply_eip155(&mut self, chain_id: u64)

Modifies the recovery ID by applying EIP-155 to a v value.

+
source

pub fn recover_address_from_msg<T: AsRef<[u8]>>( + &self, + msg: T +) -> Result<Address, Error>

Recovers an [Address] from this signature and the given message by first prefixing and +hashing the message according to EIP-191.

+
source

pub fn recover_address_from_prehash( + &self, + prehash: &B256 +) -> Result<Address, Error>

Recovers an [Address] from this signature and the given prehashed message.

+
source

pub fn recover_from_msg<T: AsRef<[u8]>>( + &self, + msg: T +) -> Result<VerifyingKey, Error>

Recovers a [VerifyingKey] from this signature and the given message by first prefixing and +hashing the message according to EIP-191.

+
source

pub fn recover_from_prehash( + &self, + prehash: &B256 +) -> Result<VerifyingKey, Error>

Recovers a [VerifyingKey] from this signature and the given prehashed message.

+

Trait Implementations§

source§

impl Clone for Signature

source§

fn clone(&self) -> Signature

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Signature

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&Signature> for [u8; 65]

source§

fn from(value: &Signature) -> [u8; 65]

Converts to this type from the input type.
source§

impl From<&Signature> for Vec<u8>

source§

fn from(value: &Signature) -> Vec<u8>

Converts to this type from the input type.
source§

impl From<Signature> for [u8; 65]

source§

fn from(value: Signature) -> [u8; 65]

Converts to this type from the input type.
source§

impl From<Signature> for Vec<u8>

source§

fn from(value: Signature) -> Vec<u8>

Converts to this type from the input type.
source§

impl FromStr for Signature

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for Signature

source§

fn eq(&self, other: &Signature) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<'a> TryFrom<&'a [u8]> for Signature

source§

fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error>

Parses a raw signature which is expected to be 65 bytes long where +the first 32 bytes is the r value, the second 32 bytes the s value +and the final byte is the v value in ‘Electrum’ notation.

+
§

type Error = Error

The type returned in the event of a conversion error.
source§

impl Copy for Signature

source§

impl Eq for Signature

source§

impl StructuralEq for Signature

source§

impl StructuralPartialEq for Signature

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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

\ No newline at end of file diff --git a/alloy_signer/signer/index.html b/alloy_signer/signer/index.html new file mode 100644 index 000000000000..562073354ade --- /dev/null +++ b/alloy_signer/signer/index.html @@ -0,0 +1,2 @@ +alloy_signer::signer - Rust +

Module alloy_signer::signer

source ·

Traits

\ No newline at end of file diff --git a/alloy_signer/signer/sidebar-items.js b/alloy_signer/signer/sidebar-items.js new file mode 100644 index 000000000000..8d8810e2d8a6 --- /dev/null +++ b/alloy_signer/signer/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"trait":["Signer","SignerSync"]}; \ No newline at end of file diff --git a/alloy_signer/signer/trait.Signer.html b/alloy_signer/signer/trait.Signer.html new file mode 100644 index 000000000000..8069d237512d --- /dev/null +++ b/alloy_signer/signer/trait.Signer.html @@ -0,0 +1,114 @@ +Signer in alloy_signer::signer - Rust +
pub trait Signer: Send + Sync {
+    // Required methods
+    fn sign_hash<'life0, 'life1, 'async_trait>(
+        &'life0 self,
+        hash: &'life1 B256
+    ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait,
+             'life1: 'async_trait;
+    fn address(&self) -> Address;
+    fn chain_id(&self) -> u64;
+    fn set_chain_id(&mut self, chain_id: u64);
+
+    // Provided methods
+    fn sign_message<'life0, 'life1, 'async_trait>(
+        &'life0 self,
+        message: &'life1 [u8]
+    ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait,
+             'life1: 'async_trait { ... }
+    fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>(
+        &'life0 self,
+        payload: &'life1 T,
+        domain: &'life2 Eip712Domain
+    ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
+       where Self: Sized + 'async_trait,
+             T: 'async_trait + SolStruct + Send + Sync,
+             'life0: 'async_trait,
+             'life1: 'async_trait,
+             'life2: 'async_trait { ... }
+    fn with_chain_id(self, chain_id: u64) -> Self
+       where Self: Sized { ... }
+}
Expand description

Asynchronous Ethereum signer.

+

All provided implementations rely on sign_hash. A signer may not always +be able to implement this method, in which case it should return +UnsupportedOperation, and implement all the signing +methods directly.

+

Synchronous signers should implement both this trait and SignerSync.

+

Required Methods§

source

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.

+
source

fn address(&self) -> Address

Returns the signer’s Ethereum Address.

+
source

fn chain_id(&self) -> u64

Returns the signer’s chain ID.

+
source

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.

+

Provided Methods§

source

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.

+
source

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.

Encodes and signs the typed data according to EIP-712.

+
source

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

+

Implementations on Foreign Types§

source§

impl<'a, U: 'a + Signer + Sized> Signer for &'a mut U
where + &'a mut U: Send + Sync,

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
source§

fn address(&self) -> Address

source§

fn chain_id(&self) -> u64

source§

fn set_chain_id(&mut self, chain_id: u64)

source§

impl<U: Signer + Sized> Signer for Box<U>
where + Box<U>: Send + Sync,

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
source§

fn address(&self) -> Address

source§

fn chain_id(&self) -> u64

source§

fn set_chain_id(&mut self, chain_id: u64)

Implementors§

source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Signer for Wallet<D>

\ No newline at end of file diff --git a/alloy_signer/signer/trait.SignerSync.html b/alloy_signer/signer/trait.SignerSync.html new file mode 100644 index 000000000000..51fbcf560dd1 --- /dev/null +++ b/alloy_signer/signer/trait.SignerSync.html @@ -0,0 +1,54 @@ +SignerSync in alloy_signer::signer - Rust +
pub trait SignerSync {
+    // Required method
+    fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>;
+
+    // Provided methods
+    fn sign_message_sync(&self, message: &[u8]) -> Result<Signature> { ... }
+    fn sign_typed_data_sync<T: SolStruct>(
+        &self,
+        payload: &T,
+        domain: &Eip712Domain
+    ) -> Result<Signature>
+       where Self: Sized { ... }
+}
Expand description

Synchronous Ethereum signer.

+

All provided implementations rely on sign_hash_sync. A signer +may not always be able to implement this method, in which case it should return +UnsupportedOperation, and implement all the signing +methods directly.

+

Synchronous signers should also implement Signer, as they are always able to by delegating +the asynchronous methods to the synchronous ones.

+

Required Methods§

source

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

Signs the given hash.

+

Provided Methods§

source

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

Signs the hash of the provided message after prefixing it, as specified in EIP-191.

+
source

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.

Encodes and signs the typed data according to EIP-712.

+

Implementations on Foreign Types§

source§

impl<'a, U: 'a + SignerSync + Sized> SignerSync for &'a U

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<'a, U: 'a + SignerSync + Sized> SignerSync for &'a mut U

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<U: SignerSync + Sized> SignerSync for Box<U>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<U: SignerSync + Sized> SignerSync for Rc<U>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<U: SignerSync + Sized> SignerSync for Arc<U>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.

Implementors§

source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> SignerSync for Wallet<D>

\ No newline at end of file diff --git a/alloy_signer/struct.MnemonicBuilder.html b/alloy_signer/struct.MnemonicBuilder.html new file mode 100644 index 000000000000..925eb9aeb5fa --- /dev/null +++ b/alloy_signer/struct.MnemonicBuilder.html @@ -0,0 +1,154 @@ +MnemonicBuilder in alloy_signer - Rust +
pub struct MnemonicBuilder<W: Wordlist> {
+    phrase: Option<String>,
+    word_count: usize,
+    derivation_path: DerivationPath,
+    password: Option<String>,
+    write_to: Option<PathBuf>,
+    _wordlist: PhantomData<W>,
+}
Available on crate feature mnemonic only.
Expand description

Represents a structure that can resolve into a Wallet<SigningKey>.

+

Fields§

§phrase: Option<String>

The mnemonic phrase can be supplied to the builder as a string. A builder that has a valid +phrase should build the wallet.

+
§word_count: usize

The mnemonic builder can also be asked to generate a new random wallet by providing the +number of words in the phrase. By default this is set to 12.

+
§derivation_path: DerivationPath

The derivation path at which the extended private key child will be derived at. By default +the mnemonic builder uses the path: “m/44’/60’/0’/0/0”.

+
§password: Option<String>

Optional password for the mnemonic phrase.

+
§write_to: Option<PathBuf>

Optional field that if enabled, writes the mnemonic phrase to disk storage at the provided +path.

+
§_wordlist: PhantomData<W>

PhantomData

+

Implementations§

source§

impl<W: Wordlist> MnemonicBuilder<W>

source

pub fn phrase<P: Into<String>>(self, phrase: P) -> Self

Sets the phrase in the mnemonic builder. The phrase can either be a string or a path to +the file that contains the phrase. Once a phrase is provided, the key will be generated +deterministically by calling the build method.

+
Examples
+
use alloy_signer::{MnemonicBuilder, coins_bip39::English};
+
+let wallet = MnemonicBuilder::<English>::default()
+    .phrase("abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about")
+    .build()?;
+
+
source

pub const fn word_count(self, count: usize) -> Self

Sets the word count of a mnemonic phrase to be generated at random. If the phrase field +is set, then word_count will be ignored.

+
Examples
+
use alloy_signer::{coins_bip39::English, MnemonicBuilder};
+
+let wallet = MnemonicBuilder::<English>::default().word_count(24).build()?;
+
+
source

pub fn index(self, index: u32) -> Result<Self, WalletError>

Sets the derivation path of the child key to be derived. The derivation path is calculated +using the default derivation path prefix used in Ethereum, i.e. “m/44’/60’/0’/0/{index}”.

+
source

pub fn derivation_path<T: AsRef<str>>( + self, + path: T +) -> Result<Self, WalletError>

Sets the derivation path of the child key to be derived.

+
source

pub fn password<T: Into<String>>(self, password: T) -> Self

Sets the password used to construct the seed from the mnemonic phrase.

+
source

pub fn write_to<P: Into<PathBuf>>(self, path: P) -> Self

Sets the path to which the randomly generated phrase will be written to. This field is +ignored when building a wallet from the provided mnemonic phrase.

+
source

pub fn build(&self) -> Result<Wallet<SigningKey>, WalletError>

Builds a LocalWallet using the parameters set in mnemonic builder. This method expects +the phrase field to be set.

+
source

pub fn build_random<R: Rng>( + &self, + rng: &mut R +) -> Result<Wallet<SigningKey>, WalletError>

Builds a LocalWallet using the parameters set in the mnemonic builder and constructing +the phrase using the provided random number generator.

+
source

fn mnemonic_to_wallet( + &self, + mnemonic: &Mnemonic<W> +) -> Result<Wallet<SigningKey>, WalletError>

Trait Implementations§

source§

impl<W: Clone + Wordlist> Clone for MnemonicBuilder<W>

source§

fn clone(&self) -> MnemonicBuilder<W>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<W: Debug + Wordlist> Debug for MnemonicBuilder<W>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<W: Wordlist> Default for MnemonicBuilder<W>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<W: PartialEq + Wordlist> PartialEq for MnemonicBuilder<W>

source§

fn eq(&self, other: &MnemonicBuilder<W>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<W: Eq + Wordlist> Eq for MnemonicBuilder<W>

source§

impl<W: Wordlist> StructuralEq for MnemonicBuilder<W>

source§

impl<W: Wordlist> StructuralPartialEq for MnemonicBuilder<W>

Auto Trait Implementations§

§

impl<W> RefUnwindSafe for MnemonicBuilder<W>
where + W: RefUnwindSafe,

§

impl<W> Send for MnemonicBuilder<W>
where + W: Send,

§

impl<W> Sync for MnemonicBuilder<W>
where + W: Sync,

§

impl<W> Unpin for MnemonicBuilder<W>
where + W: Unpin,

§

impl<W> UnwindSafe for MnemonicBuilder<W>
where + W: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 104 bytes

\ No newline at end of file diff --git a/alloy_signer/struct.Signature.html b/alloy_signer/struct.Signature.html new file mode 100644 index 000000000000..17d9196b0f51 --- /dev/null +++ b/alloy_signer/struct.Signature.html @@ -0,0 +1,148 @@ +Signature in alloy_signer - Rust +

Struct alloy_signer::Signature

source ·
pub struct Signature {
+    inner: Signature,
+    recid: RecoveryId,
+}
Expand description

An Ethereum ECDSA signature.

+

This is a wrapper around [ecdsa::Signature] and a [RecoveryId] to provide public key +recovery functionality.

+

Fields§

§inner: Signature

The inner ECDSA signature.

+
§recid: RecoveryId

The recovery ID.

+

Implementations§

source§

impl Signature

source

pub fn new(inner: Signature, recid: RecoveryId) -> Self

Creates a new Signature from the given ECDSA signature and recovery ID.

+

Normalizes the signature into “low S” form as described in +BIP 0062: Dealing with Malleability.

+
source

pub const fn new_not_normalized(inner: Signature, recid: RecoveryId) -> Self

Creates a new signature from the given inner signature and recovery ID, without normalizing +it into “low S” form.

+
source

pub fn normalize_s(&mut self)

Normalizes the signature into “low S” form as described in +BIP 0062: Dealing with Malleability.

+
source

pub fn from_bytes(bytes: &[u8], v: u64) -> Result<Self, Error>

Parses a signature from a byte slice.

+
source

pub fn from_scalars(r: B256, s: B256, v: u64) -> Result<Self, Error>

Creates a Signature from the serialized r and s scalar values, which comprise the +ECDSA signature, alongside a v value, used to determine the recovery ID.

+

See [ecdsa::Signature::from_scalars] for more details.

+
source

pub const fn inner(&self) -> &Signature

Returns the inner ECDSA signature.

+
source

pub fn inner_mut(&mut self) -> &mut Signature

Returns the inner ECDSA signature.

+
source

pub const fn into_inner(self) -> Signature

Returns the inner ECDSA signature.

+
source

pub const fn recid(&self) -> RecoveryId

Returns the recovery ID.

+
source

pub fn r(&self) -> NonZeroScalar<Secp256k1>

Returns the r component of this signature.

+
source

pub fn s(&self) -> NonZeroScalar<Secp256k1>

Returns the s component of this signature.

+
source

pub const fn v(&self) -> u8

Returns the recovery ID as a u8.

+
source

pub fn as_bytes(&self) -> [u8; 65]

Returns the byte-array representation of this signature.

+

The first 32 bytes are the r value, the second 32 bytes the s value +and the final byte is the v value in ‘Electrum’ notation.

+
source

pub fn set_recid(&mut self, recid: RecoveryId)

Sets the recovery ID.

+
source

pub fn set_v(&mut self, v: u64)

Sets the recovery ID by normalizing a v value.

+
source

pub fn apply_eip155(&mut self, chain_id: u64)

Modifies the recovery ID by applying EIP-155 to a v value.

+
source

pub fn recover_address_from_msg<T: AsRef<[u8]>>( + &self, + msg: T +) -> Result<Address, Error>

Recovers an [Address] from this signature and the given message by first prefixing and +hashing the message according to EIP-191.

+
source

pub fn recover_address_from_prehash( + &self, + prehash: &B256 +) -> Result<Address, Error>

Recovers an [Address] from this signature and the given prehashed message.

+
source

pub fn recover_from_msg<T: AsRef<[u8]>>( + &self, + msg: T +) -> Result<VerifyingKey, Error>

Recovers a [VerifyingKey] from this signature and the given message by first prefixing and +hashing the message according to EIP-191.

+
source

pub fn recover_from_prehash( + &self, + prehash: &B256 +) -> Result<VerifyingKey, Error>

Recovers a [VerifyingKey] from this signature and the given prehashed message.

+

Trait Implementations§

source§

impl Clone for Signature

source§

fn clone(&self) -> Signature

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Signature

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&Signature> for [u8; 65]

source§

fn from(value: &Signature) -> [u8; 65]

Converts to this type from the input type.
source§

impl From<&Signature> for Vec<u8>

source§

fn from(value: &Signature) -> Vec<u8>

Converts to this type from the input type.
source§

impl From<Signature> for [u8; 65]

source§

fn from(value: Signature) -> [u8; 65]

Converts to this type from the input type.
source§

impl From<Signature> for Vec<u8>

source§

fn from(value: Signature) -> Vec<u8>

Converts to this type from the input type.
source§

impl FromStr for Signature

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for Signature

source§

fn eq(&self, other: &Signature) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<'a> TryFrom<&'a [u8]> for Signature

source§

fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error>

Parses a raw signature which is expected to be 65 bytes long where +the first 32 bytes is the r value, the second 32 bytes the s value +and the final byte is the v value in ‘Electrum’ notation.

+
§

type Error = Error

The type returned in the event of a conversion error.
source§

impl Copy for Signature

source§

impl Eq for Signature

source§

impl StructuralEq for Signature

source§

impl StructuralPartialEq for Signature

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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

\ No newline at end of file diff --git a/alloy_signer/struct.Wallet.html b/alloy_signer/struct.Wallet.html new file mode 100644 index 000000000000..ec2048192bc1 --- /dev/null +++ b/alloy_signer/struct.Wallet.html @@ -0,0 +1,212 @@ +Wallet in alloy_signer - Rust +

Struct alloy_signer::Wallet

source ·
pub struct Wallet<D> {
+    pub(crate) signer: D,
+    pub(crate) address: Address,
+    pub(crate) chain_id: u64,
+}
Expand description

An Ethereum private-public key pair which can be used for signing messages.

+

Examples

Signing and Verifying a message

+

The wallet can be used to produce ECDSA Signature objects, which can be +then verified. Note that this uses +eip191_hash_message under the hood which will +prefix the message being hashed with the Ethereum Signed Message domain separator.

+ +
use alloy_signer::{LocalWallet, Signer, SignerSync};
+
+let wallet = LocalWallet::random();
+
+// Optionally, the wallet's chain id can be set, in order to use EIP-155
+// replay protection with different chains
+let wallet = wallet.with_chain_id(1337u64);
+
+// The wallet can be used to sign messages
+let message = b"hello";
+let signature = wallet.sign_message_sync(message)?;
+assert_eq!(signature.recover_address_from_msg(&message[..]).unwrap(), wallet.address());
+
+// LocalWallet is clonable:
+let wallet_clone = wallet.clone();
+let signature2 = wallet_clone.sign_message_sync(message)?;
+assert_eq!(signature, signature2);
+

Fields§

§signer: D

The wallet’s private key.

+
§address: Address

The wallet’s address.

+
§chain_id: u64

The wallet’s chain ID (for EIP-155).

+

Implementations§

source§

impl Wallet<SigningKey>

source

pub fn from_bytes(bytes: &FieldBytes) -> Result<Self, Error>

Creates a new Wallet instance from a raw scalar serialized as a byte array.

+
source

pub fn from_slice(bytes: &[u8]) -> Result<Self, Error>

Creates a new Wallet instance from a raw scalar serialized as a byte slice.

+
source

pub fn random() -> Self

Creates a new random keypair seeded with rand::thread_rng().

+
source

pub fn random_with<R: Rng + CryptoRng>(rng: &mut R) -> Self

Creates a new random keypair seeded with the provided RNG.

+
source

fn new_pk(signer: SigningKey) -> Self

source§

impl Wallet<SigningKey>

source

pub fn new_keystore<P, R, S>( + dir: P, + rng: &mut R, + password: S, + name: Option<&str> +) -> Result<(Self, String), WalletError>
where + P: AsRef<Path>, + R: Rng + CryptoRng + CryptoRng, + S: AsRef<[u8]>,

Available on crate feature keystore only.

Creates a new random encrypted JSON with the provided password and stores it in the +provided directory. Returns a tuple (Wallet, String) of the wallet instance for the +keystore with its random UUID. Accepts an optional name for the keystore file. If None, +the keystore is stored as the stringified UUID.

+
source

pub fn decrypt_keystore<P, S>( + keypath: P, + password: S +) -> Result<Self, WalletError>
where + P: AsRef<Path>, + S: AsRef<[u8]>,

Available on crate feature keystore only.

Decrypts an encrypted JSON from the provided path to construct a Wallet instance

+
source

pub fn encrypt_keystore<P, R, B, S>( + keypath: P, + rng: &mut R, + pk: B, + password: S, + name: Option<&str> +) -> Result<(Self, String), WalletError>
where + P: AsRef<Path>, + R: Rng + CryptoRng, + B: AsRef<[u8]>, + S: AsRef<[u8]>,

Available on crate feature keystore only.

Creates a new encrypted JSON with the provided private key and password and stores it in the +provided directory. Returns a tuple (Wallet, String) of the wallet instance for the +keystore with its random UUID. Accepts an optional name for the keystore file. If None, +the keystore is stored as the stringified UUID.

+
source§

impl Wallet<Signer<Secp256k1>>

source

pub fn connect(connector: Connector, credentials: Credentials, id: Id) -> Self

Available on crate feature yubihsm only.

Connects to a yubi key’s ECDSA account at the provided id

+
source

pub fn new( + connector: Connector, + credentials: Credentials, + id: Id, + label: Label, + domain: Domain +) -> Self

Available on crate feature yubihsm only.

Creates a new random ECDSA keypair on the yubi at the provided id

+
source

pub fn from_key( + connector: Connector, + credentials: Credentials, + id: Id, + label: Label, + domain: Domain, + key: impl Into<Vec<u8>> +) -> Self

Available on crate feature yubihsm only.

Uploads the provided keypair on the yubi at the provided id

+
source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Wallet<D>

source

pub const fn new_with_signer(signer: D, address: Address, chain_id: u64) -> Self

Construct a new wallet with an external [PrehashSigner].

+
source

pub const fn signer(&self) -> &D

Returns this wallet’s signer.

+

Trait Implementations§

source§

impl<D: Clone> Clone for Wallet<D>

source§

fn clone(&self) -> Wallet<D>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> Debug for Wallet<D>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SecretKey<Secp256k1>> for Wallet<SigningKey>

source§

fn from(value: K256SecretKey) -> Self

Converts to this type from the input type.
source§

impl From<Signer<Secp256k1>> for Wallet<Signer<Secp256k1>>

Available on crate feature yubihsm only.
source§

fn from(signer: YubiSigner<Secp256k1>) -> Self

Converts to this type from the input type.
source§

impl From<SigningKey<Secp256k1>> for Wallet<SigningKey>

source§

fn from(value: SigningKey) -> Self

Converts to this type from the input type.
source§

impl FromStr for Wallet<SigningKey>

§

type Err = WalletError

The associated error which can be returned from parsing.
source§

fn from_str(src: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for Wallet<SigningKey>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Signer for Wallet<D>

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
source§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.
source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> SignerSync for Wallet<D>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

Signs the given hash.
source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.

Auto Trait Implementations§

§

impl<D> RefUnwindSafe for Wallet<D>
where + D: RefUnwindSafe,

§

impl<D> Send for Wallet<D>
where + D: Send,

§

impl<D> Sync for Wallet<D>
where + D: Sync,

§

impl<D> Unpin for Wallet<D>
where + D: Unpin,

§

impl<D> UnwindSafe for Wallet<D>
where + D: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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.

\ No newline at end of file diff --git a/alloy_signer/trait.Signer.html b/alloy_signer/trait.Signer.html new file mode 100644 index 000000000000..2ece8012fc1b --- /dev/null +++ b/alloy_signer/trait.Signer.html @@ -0,0 +1,114 @@ +Signer in alloy_signer - Rust +

Trait alloy_signer::Signer

source ·
pub trait Signer: Send + Sync {
+    // Required methods
+    fn sign_hash<'life0, 'life1, 'async_trait>(
+        &'life0 self,
+        hash: &'life1 B256
+    ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait,
+             'life1: 'async_trait;
+    fn address(&self) -> Address;
+    fn chain_id(&self) -> u64;
+    fn set_chain_id(&mut self, chain_id: u64);
+
+    // Provided methods
+    fn sign_message<'life0, 'life1, 'async_trait>(
+        &'life0 self,
+        message: &'life1 [u8]
+    ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
+       where Self: 'async_trait,
+             'life0: 'async_trait,
+             'life1: 'async_trait { ... }
+    fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>(
+        &'life0 self,
+        payload: &'life1 T,
+        domain: &'life2 Eip712Domain
+    ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
+       where Self: Sized + 'async_trait,
+             T: 'async_trait + SolStruct + Send + Sync,
+             'life0: 'async_trait,
+             'life1: 'async_trait,
+             'life2: 'async_trait { ... }
+    fn with_chain_id(self, chain_id: u64) -> Self
+       where Self: Sized { ... }
+}
Expand description

Asynchronous Ethereum signer.

+

All provided implementations rely on sign_hash. A signer may not always +be able to implement this method, in which case it should return +UnsupportedOperation, and implement all the signing +methods directly.

+

Synchronous signers should implement both this trait and SignerSync.

+

Required Methods§

source

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.

+
source

fn address(&self) -> Address

Returns the signer’s Ethereum Address.

+
source

fn chain_id(&self) -> u64

Returns the signer’s chain ID.

+
source

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.

+

Provided Methods§

source

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.

+
source

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.

Encodes and signs the typed data according to EIP-712.

+
source

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

+

Implementations on Foreign Types§

source§

impl<'a, U: 'a + Signer + Sized> Signer for &'a mut U
where + &'a mut U: Send + Sync,

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
source§

fn address(&self) -> Address

source§

fn chain_id(&self) -> u64

source§

fn set_chain_id(&mut self, chain_id: u64)

source§

impl<U: Signer + Sized> Signer for Box<U>
where + Box<U>: Send + Sync,

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
source§

fn address(&self) -> Address

source§

fn chain_id(&self) -> u64

source§

fn set_chain_id(&mut self, chain_id: u64)

Implementors§

source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Signer for Wallet<D>

\ No newline at end of file diff --git a/alloy_signer/trait.SignerSync.html b/alloy_signer/trait.SignerSync.html new file mode 100644 index 000000000000..e7d0da3c5363 --- /dev/null +++ b/alloy_signer/trait.SignerSync.html @@ -0,0 +1,54 @@ +SignerSync in alloy_signer - Rust +
pub trait SignerSync {
+    // Required method
+    fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>;
+
+    // Provided methods
+    fn sign_message_sync(&self, message: &[u8]) -> Result<Signature> { ... }
+    fn sign_typed_data_sync<T: SolStruct>(
+        &self,
+        payload: &T,
+        domain: &Eip712Domain
+    ) -> Result<Signature>
+       where Self: Sized { ... }
+}
Expand description

Synchronous Ethereum signer.

+

All provided implementations rely on sign_hash_sync. A signer +may not always be able to implement this method, in which case it should return +UnsupportedOperation, and implement all the signing +methods directly.

+

Synchronous signers should also implement Signer, as they are always able to by delegating +the asynchronous methods to the synchronous ones.

+

Required Methods§

source

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

Signs the given hash.

+

Provided Methods§

source

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

Signs the hash of the provided message after prefixing it, as specified in EIP-191.

+
source

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.

Encodes and signs the typed data according to EIP-712.

+

Implementations on Foreign Types§

source§

impl<'a, U: 'a + SignerSync + Sized> SignerSync for &'a U

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<'a, U: 'a + SignerSync + Sized> SignerSync for &'a mut U

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<U: SignerSync + Sized> SignerSync for Box<U>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<U: SignerSync + Sized> SignerSync for Rc<U>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
source§

impl<U: SignerSync + Sized> SignerSync for Arc<U>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.

Implementors§

source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> SignerSync for Wallet<D>

\ No newline at end of file diff --git a/alloy_signer/type.LocalWallet.html b/alloy_signer/type.LocalWallet.html new file mode 100644 index 000000000000..a798170981c2 --- /dev/null +++ b/alloy_signer/type.LocalWallet.html @@ -0,0 +1,10 @@ +LocalWallet in alloy_signer - Rust +

Type Alias alloy_signer::LocalWallet

source ·
pub type LocalWallet = Wallet<SigningKey>;
Expand description

A wallet instantiated with a locally stored private key

+

Aliased Type§

struct LocalWallet {
+    pub(crate) signer: SigningKey<Secp256k1>,
+    pub(crate) address: Address,
+    pub(crate) chain_id: u64,
+}

Fields§

§signer: SigningKey<Secp256k1>

The wallet’s private key.

+
§address: Address

The wallet’s address.

+
§chain_id: u64

The wallet’s chain ID (for EIP-155).

+

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: 168 bytes

\ No newline at end of file diff --git a/alloy_signer/type.Result.html b/alloy_signer/type.Result.html new file mode 100644 index 000000000000..59b6cb836277 --- /dev/null +++ b/alloy_signer/type.Result.html @@ -0,0 +1,8 @@ +Result in alloy_signer - Rust +

Type Alias alloy_signer::Result

source ·
pub type Result<T, E = Error> = Result<T, E>;
Expand description

Result type alias for Error.

+

Aliased Type§

enum Result<T, E = Error> {
+    Ok(T),
+    Err(E),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(E)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_signer/type.YubiWallet.html b/alloy_signer/type.YubiWallet.html new file mode 100644 index 000000000000..f818512445dc --- /dev/null +++ b/alloy_signer/type.YubiWallet.html @@ -0,0 +1,10 @@ +YubiWallet in alloy_signer - Rust +

Type Alias alloy_signer::YubiWallet

source ·
pub type YubiWallet = Wallet<Signer<Secp256k1>>;
Available on crate feature yubihsm only.
Expand description

A wallet instantiated with a YubiHSM

+

Aliased Type§

struct YubiWallet {
+    pub(crate) signer: Signer<Secp256k1>,
+    pub(crate) address: Address,
+    pub(crate) chain_id: u64,
+}

Fields§

§signer: Signer<Secp256k1>

The wallet’s private key.

+
§address: Address

The wallet’s address.

+
§chain_id: u64

The wallet’s chain ID (for EIP-155).

+

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: 280 bytes

\ No newline at end of file diff --git a/alloy_signer/utils/fn.public_key_to_address.html b/alloy_signer/utils/fn.public_key_to_address.html new file mode 100644 index 000000000000..5522a60ca4d0 --- /dev/null +++ b/alloy_signer/utils/fn.public_key_to_address.html @@ -0,0 +1,3 @@ +public_key_to_address in alloy_signer::utils - Rust +
pub fn public_key_to_address(pubkey: &VerifyingKey) -> Address
Expand description

Converts an ECDSA public key to its corresponding Ethereum address.

+
\ No newline at end of file diff --git a/alloy_signer/utils/fn.raw_public_key_to_address.html b/alloy_signer/utils/fn.raw_public_key_to_address.html new file mode 100644 index 000000000000..56f4b4fcb68a --- /dev/null +++ b/alloy_signer/utils/fn.raw_public_key_to_address.html @@ -0,0 +1,9 @@ +raw_public_key_to_address in alloy_signer::utils - Rust +
pub fn raw_public_key_to_address(pubkey: &[u8]) -> Address
Expand description

Convert a raw, uncompressed public key to its corresponding Ethereum address.

+

Warning

+

This method does not verify that the public key is valid. It is the +caller’s responsibility to pass a valid public key. Passing an invalid +public key will produce an unspendable output.

+

Panics

+

This function panics if the input is not exactly 64 bytes.

+
\ No newline at end of file diff --git a/alloy_signer/utils/fn.secret_key_to_address.html b/alloy_signer/utils/fn.secret_key_to_address.html new file mode 100644 index 000000000000..44ac8003dc0c --- /dev/null +++ b/alloy_signer/utils/fn.secret_key_to_address.html @@ -0,0 +1,3 @@ +secret_key_to_address in alloy_signer::utils - Rust +
pub fn secret_key_to_address(secret_key: &SigningKey) -> Address
Expand description

Converts an ECDSA private key to its corresponding Ethereum Address.

+
\ No newline at end of file diff --git a/alloy_signer/utils/fn.to_eip155_v.html b/alloy_signer/utils/fn.to_eip155_v.html new file mode 100644 index 000000000000..5a92c3d61622 --- /dev/null +++ b/alloy_signer/utils/fn.to_eip155_v.html @@ -0,0 +1,3 @@ +to_eip155_v in alloy_signer::utils - Rust +
pub const fn to_eip155_v(v: u8, chain_id: u64) -> u64
Expand description

Applies EIP-155.

+
\ No newline at end of file diff --git a/alloy_signer/utils/index.html b/alloy_signer/utils/index.html new file mode 100644 index 000000000000..38bbb2606d9f --- /dev/null +++ b/alloy_signer/utils/index.html @@ -0,0 +1,3 @@ +alloy_signer::utils - Rust +

Module alloy_signer::utils

source ·
Expand description

Utility functions for working with Ethereum signatures.

+

Functions

\ No newline at end of file diff --git a/alloy_signer/utils/sidebar-items.js b/alloy_signer/utils/sidebar-items.js new file mode 100644 index 000000000000..5f30729ef978 --- /dev/null +++ b/alloy_signer/utils/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["public_key_to_address","raw_public_key_to_address","secret_key_to_address","to_eip155_v"]}; \ No newline at end of file diff --git a/alloy_signer/wallet/error/enum.WalletError.html b/alloy_signer/wallet/error/enum.WalletError.html new file mode 100644 index 000000000000..c3c8a51067b9 --- /dev/null +++ b/alloy_signer/wallet/error/enum.WalletError.html @@ -0,0 +1,109 @@ +WalletError in alloy_signer::wallet::error - Rust +
pub enum WalletError {
+    EcdsaError(Error),
+    HexError(FromHexError),
+    IoError(Error),
+    Bip32Error(Bip32Error),
+    Bip39Error(MnemonicError),
+    MnemonicBuilderError(MnemonicBuilderError),
+    EthKeystoreError(KeystoreError),
+}
Expand description

Error thrown by the Wallet module.

+

Variants§

§

EcdsaError(Error)

[ecdsa] error.

+
§

HexError(FromHexError)

hex error.

+
§

IoError(Error)

std::io error.

+
§

Bip32Error(Bip32Error)

Available on crate feature mnemonic only.

[coins_bip32] error.

+
§

Bip39Error(MnemonicError)

Available on crate feature mnemonic only.

[coins_bip39] error.

+
§

MnemonicBuilderError(MnemonicBuilderError)

Available on crate feature mnemonic only.
§

EthKeystoreError(KeystoreError)

Available on crate feature keystore only.

[eth_keystore] error.

+

Trait Implementations§

source§

impl Debug for WalletError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for WalletError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for WalletError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Bip32Error> for WalletError

source§

fn from(source: Bip32Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for WalletError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for WalletError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for WalletError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<KeystoreError> for WalletError

source§

fn from(source: KeystoreError) -> Self

Converts to this type from the input type.
source§

impl From<MnemonicBuilderError> for WalletError

source§

fn from(source: MnemonicBuilderError) -> Self

Converts to this type from the input type.
source§

impl From<MnemonicError> for WalletError

source§

fn from(source: MnemonicError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 40 bytes

Size for each variant:

  • EcdsaError: 23 bytes
  • HexError: 23 bytes
  • IoError: 15 bytes
  • Bip32Error: 39 bytes
  • Bip39Error: 39 bytes
  • MnemonicBuilderError: 1 byte
  • EthKeystoreError: 39 bytes
\ No newline at end of file diff --git a/alloy_signer/wallet/error/index.html b/alloy_signer/wallet/error/index.html new file mode 100644 index 000000000000..4de67d977a09 --- /dev/null +++ b/alloy_signer/wallet/error/index.html @@ -0,0 +1,2 @@ +alloy_signer::wallet::error - Rust +

Module alloy_signer::wallet::error

source ·

Enums

\ No newline at end of file diff --git a/alloy_signer/wallet/error/sidebar-items.js b/alloy_signer/wallet/error/sidebar-items.js new file mode 100644 index 000000000000..ef8b4f63f0fd --- /dev/null +++ b/alloy_signer/wallet/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["WalletError"]}; \ No newline at end of file diff --git a/alloy_signer/wallet/index.html b/alloy_signer/wallet/index.html new file mode 100644 index 000000000000..3e36322737b2 --- /dev/null +++ b/alloy_signer/wallet/index.html @@ -0,0 +1,3 @@ +alloy_signer::wallet - Rust +

Module alloy_signer::wallet

source ·

Re-exports

Modules

  • error 🔒
  • mnemonic 🔒 mnemonic
    Specific helper functions for creating/loading a mnemonic private key following BIP-39 +specifications.
  • Specific helper functions for loading an offline K256 Private Key stored on disk
  • yubi 🔒 yubihsm
    Helpers for creating wallets for YubiHSM2.

Structs

  • An Ethereum private-public key pair which can be used for signing messages.
\ No newline at end of file diff --git a/alloy_signer/wallet/mnemonic/constant.DEFAULT_DERIVATION_PATH.html b/alloy_signer/wallet/mnemonic/constant.DEFAULT_DERIVATION_PATH.html new file mode 100644 index 000000000000..c1a18b42dbd2 --- /dev/null +++ b/alloy_signer/wallet/mnemonic/constant.DEFAULT_DERIVATION_PATH.html @@ -0,0 +1,2 @@ +DEFAULT_DERIVATION_PATH in alloy_signer::wallet::mnemonic - Rust +
const DEFAULT_DERIVATION_PATH: &str = "m/44'/60'/0'/0/0";
Available on crate feature mnemonic only.
\ No newline at end of file diff --git a/alloy_signer/wallet/mnemonic/constant.DEFAULT_DERIVATION_PATH_PREFIX.html b/alloy_signer/wallet/mnemonic/constant.DEFAULT_DERIVATION_PATH_PREFIX.html new file mode 100644 index 000000000000..5368b78c6b55 --- /dev/null +++ b/alloy_signer/wallet/mnemonic/constant.DEFAULT_DERIVATION_PATH_PREFIX.html @@ -0,0 +1,2 @@ +DEFAULT_DERIVATION_PATH_PREFIX in alloy_signer::wallet::mnemonic - Rust +
const DEFAULT_DERIVATION_PATH_PREFIX: &str = "m/44'/60'/0'/0/";
Available on crate feature mnemonic only.
\ No newline at end of file diff --git a/alloy_signer/wallet/mnemonic/enum.MnemonicBuilderError.html b/alloy_signer/wallet/mnemonic/enum.MnemonicBuilderError.html new file mode 100644 index 000000000000..f000156d3eaf --- /dev/null +++ b/alloy_signer/wallet/mnemonic/enum.MnemonicBuilderError.html @@ -0,0 +1,99 @@ +MnemonicBuilderError in alloy_signer::wallet::mnemonic - Rust +
pub enum MnemonicBuilderError {
+    ExpectedPhraseNotFound,
+    UnexpectedPhraseFound,
+}
Available on crate feature mnemonic only.
Expand description

Error produced by the mnemonic wallet module

+

Variants§

§

ExpectedPhraseNotFound

Error suggests that a phrase (path or words) was expected but not found.

+
§

UnexpectedPhraseFound

Error suggests that a phrase (path or words) was not expected but found.

+

Trait Implementations§

source§

impl Debug for MnemonicBuilderError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for MnemonicBuilderError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for MnemonicBuilderError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<MnemonicBuilderError> for WalletError

source§

fn from(source: MnemonicBuilderError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 1 byte

Size for each variant:

  • ExpectedPhraseNotFound: 0 bytes
  • UnexpectedPhraseFound: 0 bytes
\ No newline at end of file diff --git a/alloy_signer/wallet/mnemonic/index.html b/alloy_signer/wallet/mnemonic/index.html new file mode 100644 index 000000000000..bf14eb0a8a21 --- /dev/null +++ b/alloy_signer/wallet/mnemonic/index.html @@ -0,0 +1,4 @@ +alloy_signer::wallet::mnemonic - Rust +
Available on crate feature mnemonic only.
Expand description

Specific helper functions for creating/loading a mnemonic private key following BIP-39 +specifications.

+

Structs

  • Represents a structure that can resolve into a Wallet<SigningKey>.

Enums

Constants

\ No newline at end of file diff --git a/alloy_signer/wallet/mnemonic/sidebar-items.js b/alloy_signer/wallet/mnemonic/sidebar-items.js new file mode 100644 index 000000000000..f73520714aa3 --- /dev/null +++ b/alloy_signer/wallet/mnemonic/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["DEFAULT_DERIVATION_PATH","DEFAULT_DERIVATION_PATH_PREFIX"],"enum":["MnemonicBuilderError"],"struct":["MnemonicBuilder"]}; \ No newline at end of file diff --git a/alloy_signer/wallet/mnemonic/struct.MnemonicBuilder.html b/alloy_signer/wallet/mnemonic/struct.MnemonicBuilder.html new file mode 100644 index 000000000000..f4a27e50cf2b --- /dev/null +++ b/alloy_signer/wallet/mnemonic/struct.MnemonicBuilder.html @@ -0,0 +1,154 @@ +MnemonicBuilder in alloy_signer::wallet::mnemonic - Rust +
pub struct MnemonicBuilder<W: Wordlist> {
+    phrase: Option<String>,
+    word_count: usize,
+    derivation_path: DerivationPath,
+    password: Option<String>,
+    write_to: Option<PathBuf>,
+    _wordlist: PhantomData<W>,
+}
Available on crate feature mnemonic only.
Expand description

Represents a structure that can resolve into a Wallet<SigningKey>.

+

Fields§

§phrase: Option<String>

The mnemonic phrase can be supplied to the builder as a string. A builder that has a valid +phrase should build the wallet.

+
§word_count: usize

The mnemonic builder can also be asked to generate a new random wallet by providing the +number of words in the phrase. By default this is set to 12.

+
§derivation_path: DerivationPath

The derivation path at which the extended private key child will be derived at. By default +the mnemonic builder uses the path: “m/44’/60’/0’/0/0”.

+
§password: Option<String>

Optional password for the mnemonic phrase.

+
§write_to: Option<PathBuf>

Optional field that if enabled, writes the mnemonic phrase to disk storage at the provided +path.

+
§_wordlist: PhantomData<W>

PhantomData

+

Implementations§

source§

impl<W: Wordlist> MnemonicBuilder<W>

source

pub fn phrase<P: Into<String>>(self, phrase: P) -> Self

Sets the phrase in the mnemonic builder. The phrase can either be a string or a path to +the file that contains the phrase. Once a phrase is provided, the key will be generated +deterministically by calling the build method.

+
Examples
+
use alloy_signer::{MnemonicBuilder, coins_bip39::English};
+
+let wallet = MnemonicBuilder::<English>::default()
+    .phrase("abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about")
+    .build()?;
+
+
source

pub const fn word_count(self, count: usize) -> Self

Sets the word count of a mnemonic phrase to be generated at random. If the phrase field +is set, then word_count will be ignored.

+
Examples
+
use alloy_signer::{coins_bip39::English, MnemonicBuilder};
+
+let wallet = MnemonicBuilder::<English>::default().word_count(24).build()?;
+
+
source

pub fn index(self, index: u32) -> Result<Self, WalletError>

Sets the derivation path of the child key to be derived. The derivation path is calculated +using the default derivation path prefix used in Ethereum, i.e. “m/44’/60’/0’/0/{index}”.

+
source

pub fn derivation_path<T: AsRef<str>>( + self, + path: T +) -> Result<Self, WalletError>

Sets the derivation path of the child key to be derived.

+
source

pub fn password<T: Into<String>>(self, password: T) -> Self

Sets the password used to construct the seed from the mnemonic phrase.

+
source

pub fn write_to<P: Into<PathBuf>>(self, path: P) -> Self

Sets the path to which the randomly generated phrase will be written to. This field is +ignored when building a wallet from the provided mnemonic phrase.

+
source

pub fn build(&self) -> Result<Wallet<SigningKey>, WalletError>

Builds a LocalWallet using the parameters set in mnemonic builder. This method expects +the phrase field to be set.

+
source

pub fn build_random<R: Rng>( + &self, + rng: &mut R +) -> Result<Wallet<SigningKey>, WalletError>

Builds a LocalWallet using the parameters set in the mnemonic builder and constructing +the phrase using the provided random number generator.

+
source

fn mnemonic_to_wallet( + &self, + mnemonic: &Mnemonic<W> +) -> Result<Wallet<SigningKey>, WalletError>

Trait Implementations§

source§

impl<W: Clone + Wordlist> Clone for MnemonicBuilder<W>

source§

fn clone(&self) -> MnemonicBuilder<W>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<W: Debug + Wordlist> Debug for MnemonicBuilder<W>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<W: Wordlist> Default for MnemonicBuilder<W>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<W: PartialEq + Wordlist> PartialEq for MnemonicBuilder<W>

source§

fn eq(&self, other: &MnemonicBuilder<W>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<W: Eq + Wordlist> Eq for MnemonicBuilder<W>

source§

impl<W: Wordlist> StructuralEq for MnemonicBuilder<W>

source§

impl<W: Wordlist> StructuralPartialEq for MnemonicBuilder<W>

Auto Trait Implementations§

§

impl<W> RefUnwindSafe for MnemonicBuilder<W>
where + W: RefUnwindSafe,

§

impl<W> Send for MnemonicBuilder<W>
where + W: Send,

§

impl<W> Sync for MnemonicBuilder<W>
where + W: Sync,

§

impl<W> Unpin for MnemonicBuilder<W>
where + W: Unpin,

§

impl<W> UnwindSafe for MnemonicBuilder<W>
where + W: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 104 bytes

\ No newline at end of file diff --git a/alloy_signer/wallet/private_key/index.html b/alloy_signer/wallet/private_key/index.html new file mode 100644 index 000000000000..55526a2893a0 --- /dev/null +++ b/alloy_signer/wallet/private_key/index.html @@ -0,0 +1,3 @@ +alloy_signer::wallet::private_key - Rust +
Expand description

Specific helper functions for loading an offline K256 Private Key stored on disk

+
\ No newline at end of file diff --git a/alloy_signer/wallet/private_key/sidebar-items.js b/alloy_signer/wallet/private_key/sidebar-items.js new file mode 100644 index 000000000000..5244ce01ccff --- /dev/null +++ b/alloy_signer/wallet/private_key/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/alloy_signer/wallet/sidebar-items.js b/alloy_signer/wallet/sidebar-items.js new file mode 100644 index 000000000000..f4937d7bf38d --- /dev/null +++ b/alloy_signer/wallet/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["error","mnemonic","private_key","yubi"],"struct":["Wallet"]}; \ No newline at end of file diff --git a/alloy_signer/wallet/struct.Wallet.html b/alloy_signer/wallet/struct.Wallet.html new file mode 100644 index 000000000000..92edac609531 --- /dev/null +++ b/alloy_signer/wallet/struct.Wallet.html @@ -0,0 +1,212 @@ +Wallet in alloy_signer::wallet - Rust +

Struct alloy_signer::wallet::Wallet

source ·
pub struct Wallet<D> {
+    pub(crate) signer: D,
+    pub(crate) address: Address,
+    pub(crate) chain_id: u64,
+}
Expand description

An Ethereum private-public key pair which can be used for signing messages.

+

Examples

Signing and Verifying a message

+

The wallet can be used to produce ECDSA Signature objects, which can be +then verified. Note that this uses +eip191_hash_message under the hood which will +prefix the message being hashed with the Ethereum Signed Message domain separator.

+ +
use alloy_signer::{LocalWallet, Signer, SignerSync};
+
+let wallet = LocalWallet::random();
+
+// Optionally, the wallet's chain id can be set, in order to use EIP-155
+// replay protection with different chains
+let wallet = wallet.with_chain_id(1337u64);
+
+// The wallet can be used to sign messages
+let message = b"hello";
+let signature = wallet.sign_message_sync(message)?;
+assert_eq!(signature.recover_address_from_msg(&message[..]).unwrap(), wallet.address());
+
+// LocalWallet is clonable:
+let wallet_clone = wallet.clone();
+let signature2 = wallet_clone.sign_message_sync(message)?;
+assert_eq!(signature, signature2);
+

Fields§

§signer: D

The wallet’s private key.

+
§address: Address

The wallet’s address.

+
§chain_id: u64

The wallet’s chain ID (for EIP-155).

+

Implementations§

source§

impl Wallet<SigningKey>

source

pub fn from_bytes(bytes: &FieldBytes) -> Result<Self, Error>

Creates a new Wallet instance from a raw scalar serialized as a byte array.

+
source

pub fn from_slice(bytes: &[u8]) -> Result<Self, Error>

Creates a new Wallet instance from a raw scalar serialized as a byte slice.

+
source

pub fn random() -> Self

Creates a new random keypair seeded with rand::thread_rng().

+
source

pub fn random_with<R: Rng + CryptoRng>(rng: &mut R) -> Self

Creates a new random keypair seeded with the provided RNG.

+
source

fn new_pk(signer: SigningKey) -> Self

source§

impl Wallet<SigningKey>

source

pub fn new_keystore<P, R, S>( + dir: P, + rng: &mut R, + password: S, + name: Option<&str> +) -> Result<(Self, String), WalletError>
where + P: AsRef<Path>, + R: Rng + CryptoRng + CryptoRng, + S: AsRef<[u8]>,

Available on crate feature keystore only.

Creates a new random encrypted JSON with the provided password and stores it in the +provided directory. Returns a tuple (Wallet, String) of the wallet instance for the +keystore with its random UUID. Accepts an optional name for the keystore file. If None, +the keystore is stored as the stringified UUID.

+
source

pub fn decrypt_keystore<P, S>( + keypath: P, + password: S +) -> Result<Self, WalletError>
where + P: AsRef<Path>, + S: AsRef<[u8]>,

Available on crate feature keystore only.

Decrypts an encrypted JSON from the provided path to construct a Wallet instance

+
source

pub fn encrypt_keystore<P, R, B, S>( + keypath: P, + rng: &mut R, + pk: B, + password: S, + name: Option<&str> +) -> Result<(Self, String), WalletError>
where + P: AsRef<Path>, + R: Rng + CryptoRng, + B: AsRef<[u8]>, + S: AsRef<[u8]>,

Available on crate feature keystore only.

Creates a new encrypted JSON with the provided private key and password and stores it in the +provided directory. Returns a tuple (Wallet, String) of the wallet instance for the +keystore with its random UUID. Accepts an optional name for the keystore file. If None, +the keystore is stored as the stringified UUID.

+
source§

impl Wallet<Signer<Secp256k1>>

source

pub fn connect(connector: Connector, credentials: Credentials, id: Id) -> Self

Available on crate feature yubihsm only.

Connects to a yubi key’s ECDSA account at the provided id

+
source

pub fn new( + connector: Connector, + credentials: Credentials, + id: Id, + label: Label, + domain: Domain +) -> Self

Available on crate feature yubihsm only.

Creates a new random ECDSA keypair on the yubi at the provided id

+
source

pub fn from_key( + connector: Connector, + credentials: Credentials, + id: Id, + label: Label, + domain: Domain, + key: impl Into<Vec<u8>> +) -> Self

Available on crate feature yubihsm only.

Uploads the provided keypair on the yubi at the provided id

+
source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Wallet<D>

source

pub const fn new_with_signer(signer: D, address: Address, chain_id: u64) -> Self

Construct a new wallet with an external [PrehashSigner].

+
source

pub const fn signer(&self) -> &D

Returns this wallet’s signer.

+

Trait Implementations§

source§

impl<D: Clone> Clone for Wallet<D>

source§

fn clone(&self) -> Wallet<D>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> Debug for Wallet<D>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<SecretKey<Secp256k1>> for Wallet<SigningKey>

source§

fn from(value: K256SecretKey) -> Self

Converts to this type from the input type.
source§

impl From<Signer<Secp256k1>> for Wallet<Signer<Secp256k1>>

Available on crate feature yubihsm only.
source§

fn from(signer: YubiSigner<Secp256k1>) -> Self

Converts to this type from the input type.
source§

impl From<SigningKey<Secp256k1>> for Wallet<SigningKey>

source§

fn from(value: SigningKey) -> Self

Converts to this type from the input type.
source§

impl FromStr for Wallet<SigningKey>

§

type Err = WalletError

The associated error which can be returned from parsing.
source§

fn from_str(src: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl PartialEq for Wallet<SigningKey>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Signer for Wallet<D>

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
source§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.
source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> SignerSync for Wallet<D>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

Signs the given hash.
source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data_sync<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature>
where + Self: Sized,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.

Auto Trait Implementations§

§

impl<D> RefUnwindSafe for Wallet<D>
where + D: RefUnwindSafe,

§

impl<D> Send for Wallet<D>
where + D: Send,

§

impl<D> Sync for Wallet<D>
where + D: Sync,

§

impl<D> Unpin for Wallet<D>
where + D: Unpin,

§

impl<D> UnwindSafe for Wallet<D>
where + D: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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.

\ No newline at end of file diff --git a/alloy_signer/wallet/yubi/index.html b/alloy_signer/wallet/yubi/index.html new file mode 100644 index 000000000000..71da86b488d8 --- /dev/null +++ b/alloy_signer/wallet/yubi/index.html @@ -0,0 +1,3 @@ +alloy_signer::wallet::yubi - Rust +

Module alloy_signer::wallet::yubi

source ·
Available on crate feature yubihsm only.
Expand description

Helpers for creating wallets for YubiHSM2.

+
\ No newline at end of file diff --git a/alloy_signer/wallet/yubi/sidebar-items.js b/alloy_signer/wallet/yubi/sidebar-items.js new file mode 100644 index 000000000000..5244ce01ccff --- /dev/null +++ b/alloy_signer/wallet/yubi/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/alloy_signer_aws/all.html b/alloy_signer_aws/all.html new file mode 100644 index 000000000000..9299ae74db09 --- /dev/null +++ b/alloy_signer_aws/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Functions

\ No newline at end of file diff --git a/alloy_signer_aws/enum.AwsSignerError.html b/alloy_signer_aws/enum.AwsSignerError.html new file mode 100644 index 000000000000..463d966b9c48 --- /dev/null +++ b/alloy_signer_aws/enum.AwsSignerError.html @@ -0,0 +1,115 @@ +AwsSignerError in alloy_signer_aws - Rust +
pub enum AwsSignerError {
+    Sign(SdkError<SignError>),
+    GetPublicKey(SdkError<GetPublicKeyError>),
+    K256(Error),
+    Spki(Error),
+    Hex(FromHexError),
+    SignatureNotFound,
+    PublicKeyNotFound,
+}
Expand description

Errors thrown by AwsSigner.

+

Variants§

§

Sign(SdkError<SignError>)

Thrown when the AWS KMS API returns a signing error.

+
§

GetPublicKey(SdkError<GetPublicKeyError>)

Thrown when the AWS KMS API returns an error.

+
§

K256(Error)

[ecdsa] error.

+
§

Spki(Error)

[spki] error.

+
§

Hex(FromHexError)

hex error.

+
§

SignatureNotFound

Thrown when the AWS KMS API returns a response without a signature.

+
§

PublicKeyNotFound

Thrown when the AWS KMS API returns a response without a public key.

+

Trait Implementations§

source§

impl Debug for AwsSignerError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AwsSignerError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for AwsSignerError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for AwsSignerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for AwsSignerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for AwsSignerError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<SdkError<GetPublicKeyError, Response>> for AwsSignerError

source§

fn from(source: SdkError<GetPublicKeyError>) -> Self

Converts to this type from the input type.
source§

impl From<SdkError<SignError, Response>> for AwsSignerError

source§

fn from(source: SdkError<SignError>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where + Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 336 bytes

Size for each variant:

  • Sign: 328 bytes
  • GetPublicKey: 328 bytes
  • K256: 16 bytes
  • Spki: 56 bytes
  • Hex: 16 bytes
  • SignatureNotFound: 0 bytes
  • PublicKeyNotFound: 0 bytes
\ No newline at end of file diff --git a/alloy_signer_aws/index.html b/alloy_signer_aws/index.html new file mode 100644 index 000000000000..03ed67ac5684 --- /dev/null +++ b/alloy_signer_aws/index.html @@ -0,0 +1,5 @@ +alloy_signer_aws - Rust +

Crate alloy_signer_aws

source ·
Expand description

alloy-signer-aws

+

Ethereum AWS KMS signer.

+

Modules

Structs

  • Amazon Web Services Key Management Service (AWS KMS) Ethereum signer.

Enums

\ No newline at end of file diff --git a/alloy_signer_aws/sidebar-items.js b/alloy_signer_aws/sidebar-items.js new file mode 100644 index 000000000000..7740f78c93bc --- /dev/null +++ b/alloy_signer_aws/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AwsSignerError"],"mod":["signer"],"struct":["AwsSigner"]}; \ No newline at end of file diff --git a/alloy_signer_aws/signer/enum.AwsSignerError.html b/alloy_signer_aws/signer/enum.AwsSignerError.html new file mode 100644 index 000000000000..2e40af98396d --- /dev/null +++ b/alloy_signer_aws/signer/enum.AwsSignerError.html @@ -0,0 +1,115 @@ +AwsSignerError in alloy_signer_aws::signer - Rust +
pub enum AwsSignerError {
+    Sign(SdkError<SignError>),
+    GetPublicKey(SdkError<GetPublicKeyError>),
+    K256(Error),
+    Spki(Error),
+    Hex(FromHexError),
+    SignatureNotFound,
+    PublicKeyNotFound,
+}
Expand description

Errors thrown by AwsSigner.

+

Variants§

§

Sign(SdkError<SignError>)

Thrown when the AWS KMS API returns a signing error.

+
§

GetPublicKey(SdkError<GetPublicKeyError>)

Thrown when the AWS KMS API returns an error.

+
§

K256(Error)

[ecdsa] error.

+
§

Spki(Error)

[spki] error.

+
§

Hex(FromHexError)

hex error.

+
§

SignatureNotFound

Thrown when the AWS KMS API returns a response without a signature.

+
§

PublicKeyNotFound

Thrown when the AWS KMS API returns a response without a public key.

+

Trait Implementations§

source§

impl Debug for AwsSignerError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AwsSignerError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for AwsSignerError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for AwsSignerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for AwsSignerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for AwsSignerError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<SdkError<GetPublicKeyError, Response>> for AwsSignerError

source§

fn from(source: SdkError<GetPublicKeyError>) -> Self

Converts to this type from the input type.
source§

impl From<SdkError<SignError, Response>> for AwsSignerError

source§

fn from(source: SdkError<SignError>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where + Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 336 bytes

Size for each variant:

  • Sign: 328 bytes
  • GetPublicKey: 328 bytes
  • K256: 16 bytes
  • Spki: 56 bytes
  • Hex: 16 bytes
  • SignatureNotFound: 0 bytes
  • PublicKeyNotFound: 0 bytes
\ No newline at end of file diff --git a/alloy_signer_aws/signer/fn.check_candidate.html b/alloy_signer_aws/signer/fn.check_candidate.html new file mode 100644 index 000000000000..e69e33335c88 --- /dev/null +++ b/alloy_signer_aws/signer/fn.check_candidate.html @@ -0,0 +1,7 @@ +check_candidate in alloy_signer_aws::signer - Rust +
fn check_candidate(
+    signature: &Signature,
+    hash: &B256,
+    pubkey: &VerifyingKey
+) -> bool
Expand description

Makes a trial recovery to check whether an RSig corresponds to a known VerifyingKey.

+
\ No newline at end of file diff --git a/alloy_signer_aws/signer/fn.decode_pubkey.html b/alloy_signer_aws/signer/fn.decode_pubkey.html new file mode 100644 index 000000000000..e0b274c2b3d9 --- /dev/null +++ b/alloy_signer_aws/signer/fn.decode_pubkey.html @@ -0,0 +1,5 @@ +decode_pubkey in alloy_signer_aws::signer - Rust +
fn decode_pubkey(
+    resp: GetPublicKeyOutput
+) -> Result<VerifyingKey, AwsSignerError>
Expand description

Decode an AWS KMS Pubkey response.

+
\ No newline at end of file diff --git a/alloy_signer_aws/signer/fn.decode_signature.html b/alloy_signer_aws/signer/fn.decode_signature.html new file mode 100644 index 000000000000..d23d73e55b35 --- /dev/null +++ b/alloy_signer_aws/signer/fn.decode_signature.html @@ -0,0 +1,3 @@ +decode_signature in alloy_signer_aws::signer - Rust +
fn decode_signature(resp: SignOutput) -> Result<Signature, AwsSignerError>
Expand description

Decode an AWS KMS Signature response.

+
\ No newline at end of file diff --git a/alloy_signer_aws/signer/fn.request_get_pubkey.html b/alloy_signer_aws/signer/fn.request_get_pubkey.html new file mode 100644 index 000000000000..49eae6238aa1 --- /dev/null +++ b/alloy_signer_aws/signer/fn.request_get_pubkey.html @@ -0,0 +1,5 @@ +request_get_pubkey in alloy_signer_aws::signer - Rust +
async fn request_get_pubkey(
+    kms: &Client,
+    key_id: String
+) -> Result<GetPublicKeyOutput, AwsSignerError>
\ No newline at end of file diff --git a/alloy_signer_aws/signer/fn.request_sign_digest.html b/alloy_signer_aws/signer/fn.request_sign_digest.html new file mode 100644 index 000000000000..e4cae9eac390 --- /dev/null +++ b/alloy_signer_aws/signer/fn.request_sign_digest.html @@ -0,0 +1,6 @@ +request_sign_digest in alloy_signer_aws::signer - Rust +
async fn request_sign_digest(
+    kms: &Client,
+    key_id: String,
+    digest: &B256
+) -> Result<SignOutput, AwsSignerError>
\ No newline at end of file diff --git a/alloy_signer_aws/signer/fn.sig_from_digest_bytes_trial_recovery.html b/alloy_signer_aws/signer/fn.sig_from_digest_bytes_trial_recovery.html new file mode 100644 index 000000000000..6b44e69a77d8 --- /dev/null +++ b/alloy_signer_aws/signer/fn.sig_from_digest_bytes_trial_recovery.html @@ -0,0 +1,7 @@ +sig_from_digest_bytes_trial_recovery in alloy_signer_aws::signer - Rust +
fn sig_from_digest_bytes_trial_recovery(
+    sig: Signature,
+    hash: &B256,
+    pubkey: &VerifyingKey
+) -> Signature
Expand description

Recover an rsig from a signature under a known key by trial/error.

+
\ No newline at end of file diff --git a/alloy_signer_aws/signer/index.html b/alloy_signer_aws/signer/index.html new file mode 100644 index 000000000000..c21824e4fe49 --- /dev/null +++ b/alloy_signer_aws/signer/index.html @@ -0,0 +1,2 @@ +alloy_signer_aws::signer - Rust +

Structs

  • Amazon Web Services Key Management Service (AWS KMS) Ethereum signer.

Enums

Functions

\ No newline at end of file diff --git a/alloy_signer_aws/signer/sidebar-items.js b/alloy_signer_aws/signer/sidebar-items.js new file mode 100644 index 000000000000..3ebe7f2e7589 --- /dev/null +++ b/alloy_signer_aws/signer/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["AwsSignerError"],"fn":["check_candidate","decode_pubkey","decode_signature","request_get_pubkey","request_sign_digest","sig_from_digest_bytes_trial_recovery"],"struct":["AwsSigner"]}; \ No newline at end of file diff --git a/alloy_signer_aws/signer/struct.AwsSigner.html b/alloy_signer_aws/signer/struct.AwsSigner.html new file mode 100644 index 000000000000..3ab2e37d4478 --- /dev/null +++ b/alloy_signer_aws/signer/struct.AwsSigner.html @@ -0,0 +1,176 @@ +AwsSigner in alloy_signer_aws::signer - Rust +
pub struct AwsSigner {
+    kms: Client,
+    chain_id: u64,
+    key_id: String,
+    pubkey: VerifyingKey,
+    address: Address,
+}
Expand description

Amazon Web Services Key Management Service (AWS KMS) Ethereum signer.

+

The AWS Signer passes signing requests to the cloud service. AWS KMS keys are identified by a +UUID, the key_id.

+

Because the public key is unknown, we retrieve it on instantiation of the signer. This means +that the new function is async and must be called within some runtime.

+

Note that this signer only supports asynchronous operations. Calling a non-asynchronous method +will always return an error.

+

Examples

+
use alloy_signer::Signer;
+use alloy_signer_aws::AwsSigner;
+use aws_config::BehaviorVersion;
+
+let config = aws_config::load_defaults(BehaviorVersion::latest()).await;
+let client = aws_sdk_kms::Client::new(&config);
+
+let key_id = "...".to_string();
+let chain_id = 1;
+let signer = AwsSigner::new(client, key_id, chain_id).await.unwrap();
+
+let message = vec![0, 1, 2, 3];
+
+let sig = signer.sign_message(&message).await.unwrap();
+assert_eq!(sig.recover_address_from_msg(message).unwrap(), signer.address());
+

Fields§

§kms: Client§chain_id: u64§key_id: String§pubkey: VerifyingKey§address: Address

Implementations§

source§

impl AwsSigner

source

pub async fn new( + kms: Client, + key_id: String, + chain_id: u64 +) -> Result<AwsSigner, AwsSignerError>

Instantiate a new signer from an existing Client and key ID.

+

Retrieves the public key from AWS and calculates the Ethereum address.

+
source

pub async fn get_pubkey_for_key( + &self, + key_id: String +) -> Result<VerifyingKey, AwsSignerError>

Fetch the pubkey associated with a key ID.

+
source

pub async fn get_pubkey(&self) -> Result<VerifyingKey, AwsSignerError>

Fetch the pubkey associated with this signer’s key ID.

+
source

pub async fn sign_digest_with_key( + &self, + key_id: String, + digest: &B256 +) -> Result<Signature, AwsSignerError>

Sign a digest with the key associated with a key ID.

+
source

pub async fn sign_digest( + &self, + digest: &B256 +) -> Result<Signature, AwsSignerError>

Sign a digest with this signer’s key

+
source

async fn sign_digest_with_eip155( + &self, + digest: &B256, + chain_id: u64 +) -> Result<Signature, AwsSignerError>

Sign a digest with this signer’s key and add the eip155 v value +corresponding to the input chain_id

+

Trait Implementations§

source§

impl Clone for AwsSigner

source§

fn clone(&self) -> AwsSigner

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AwsSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Signer for AwsSigner

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>
where + 'life0: 'async_trait, + 'life1: 'async_trait, + Self: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>
where + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait, + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where + Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 168 bytes

\ No newline at end of file diff --git a/alloy_signer_aws/struct.AwsSigner.html b/alloy_signer_aws/struct.AwsSigner.html new file mode 100644 index 000000000000..222bc9834951 --- /dev/null +++ b/alloy_signer_aws/struct.AwsSigner.html @@ -0,0 +1,176 @@ +AwsSigner in alloy_signer_aws - Rust +
pub struct AwsSigner {
+    kms: Client,
+    chain_id: u64,
+    key_id: String,
+    pubkey: VerifyingKey,
+    address: Address,
+}
Expand description

Amazon Web Services Key Management Service (AWS KMS) Ethereum signer.

+

The AWS Signer passes signing requests to the cloud service. AWS KMS keys are identified by a +UUID, the key_id.

+

Because the public key is unknown, we retrieve it on instantiation of the signer. This means +that the new function is async and must be called within some runtime.

+

Note that this signer only supports asynchronous operations. Calling a non-asynchronous method +will always return an error.

+

Examples

+
use alloy_signer::Signer;
+use alloy_signer_aws::AwsSigner;
+use aws_config::BehaviorVersion;
+
+let config = aws_config::load_defaults(BehaviorVersion::latest()).await;
+let client = aws_sdk_kms::Client::new(&config);
+
+let key_id = "...".to_string();
+let chain_id = 1;
+let signer = AwsSigner::new(client, key_id, chain_id).await.unwrap();
+
+let message = vec![0, 1, 2, 3];
+
+let sig = signer.sign_message(&message).await.unwrap();
+assert_eq!(sig.recover_address_from_msg(message).unwrap(), signer.address());
+

Fields§

§kms: Client§chain_id: u64§key_id: String§pubkey: VerifyingKey§address: Address

Implementations§

source§

impl AwsSigner

source

pub async fn new( + kms: Client, + key_id: String, + chain_id: u64 +) -> Result<AwsSigner, AwsSignerError>

Instantiate a new signer from an existing Client and key ID.

+

Retrieves the public key from AWS and calculates the Ethereum address.

+
source

pub async fn get_pubkey_for_key( + &self, + key_id: String +) -> Result<VerifyingKey, AwsSignerError>

Fetch the pubkey associated with a key ID.

+
source

pub async fn get_pubkey(&self) -> Result<VerifyingKey, AwsSignerError>

Fetch the pubkey associated with this signer’s key ID.

+
source

pub async fn sign_digest_with_key( + &self, + key_id: String, + digest: &B256 +) -> Result<Signature, AwsSignerError>

Sign a digest with the key associated with a key ID.

+
source

pub async fn sign_digest( + &self, + digest: &B256 +) -> Result<Signature, AwsSignerError>

Sign a digest with this signer’s key

+
source

async fn sign_digest_with_eip155( + &self, + digest: &B256, + chain_id: u64 +) -> Result<Signature, AwsSignerError>

Sign a digest with this signer’s key and add the eip155 v value +corresponding to the input chain_id

+

Trait Implementations§

source§

impl Clone for AwsSigner

source§

fn clone(&self) -> AwsSigner

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AwsSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Signer for AwsSigner

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>
where + 'life0: 'async_trait, + 'life1: 'async_trait, + Self: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>
where + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait, + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where + Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 168 bytes

\ No newline at end of file diff --git a/alloy_signer_ledger/all.html b/alloy_signer_ledger/all.html new file mode 100644 index 000000000000..741ecceb36ae --- /dev/null +++ b/alloy_signer_ledger/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Constants

\ No newline at end of file diff --git a/alloy_signer_ledger/enum.HDPath.html b/alloy_signer_ledger/enum.HDPath.html new file mode 100644 index 000000000000..cd5ec7fae11b --- /dev/null +++ b/alloy_signer_ledger/enum.HDPath.html @@ -0,0 +1,107 @@ +HDPath in alloy_signer_ledger - Rust +
pub enum HDPath {
+    LedgerLive(usize),
+    Legacy(usize),
+    Other(String),
+}
Expand description

Ledger wallet type

+

Variants§

§

LedgerLive(usize)

Ledger Live-generated HD path

+
§

Legacy(usize)

Legacy generated HD Path

+
§

Other(String)

Any other path

+

Trait Implementations§

source§

impl Clone for DerivationType

source§

fn clone(&self) -> DerivationType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

Size for each variant:

  • LedgerLive: 8 bytes
  • Legacy: 8 bytes
  • Other: 24 bytes
\ No newline at end of file diff --git a/alloy_signer_ledger/enum.LedgerError.html b/alloy_signer_ledger/enum.LedgerError.html new file mode 100644 index 000000000000..0fa889257756 --- /dev/null +++ b/alloy_signer_ledger/enum.LedgerError.html @@ -0,0 +1,119 @@ +LedgerError in alloy_signer_ledger - Rust +
pub enum LedgerError {
+    LedgerError(LedgerError),
+    UnexpectedNullResponse,
+    HexError(FromHexError),
+    SemVerError(Error),
+    Ecdsa(Error),
+    UnsupportedAppVersion(&'static str),
+    ShortResponse {
+        got: usize,
+        expected: usize,
+    },
+}
Expand description

Error when using the Ledger transport.

+

Variants§

§

LedgerError(LedgerError)

Underlying Ledger transport error.

+
§

UnexpectedNullResponse

Device response was unexpectedly empty.

+
§

HexError(FromHexError)

hex error.

+
§

SemVerError(Error)

semver error.

+
§

Ecdsa(Error)

[ecdsa] error.

+
§

UnsupportedAppVersion(&'static str)

Thrown when trying to sign using EIP-712 with an incompatible Ledger Ethereum app.

+
§

ShortResponse

Fields

§got: usize

Number of bytes received.

+
§expected: usize

Number of bytes expected.

+

Got a response, but it didn’t contain as much data as expected

+

Trait Implementations§

source§

impl Debug for LedgerError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LedgerError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for LedgerError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for LedgerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for LedgerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for LedgerError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<LedgerError> for LedgerError

source§

fn from(source: LedgerError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 40 bytes

Size for each variant:

  • LedgerError: 40 bytes
  • UnexpectedNullResponse: 0 bytes
  • HexError: 24 bytes
  • SemVerError: 12 bytes
  • Ecdsa: 24 bytes
  • UnsupportedAppVersion: 24 bytes
  • ShortResponse: 24 bytes
\ No newline at end of file diff --git a/alloy_signer_ledger/index.html b/alloy_signer_ledger/index.html new file mode 100644 index 000000000000..1d7adf29b815 --- /dev/null +++ b/alloy_signer_ledger/index.html @@ -0,0 +1,5 @@ +alloy_signer_ledger - Rust +
Expand description

alloy-signer-ledger

+

Ethereum Ledger signer.

+

Modules

  • signer 🔒
    Ledger Ethereum app wrapper.
  • types 🔒
    Helpers for interacting with the Ethereum Ledger App.

Structs

Enums

\ No newline at end of file diff --git a/alloy_signer_ledger/sidebar-items.js b/alloy_signer_ledger/sidebar-items.js new file mode 100644 index 000000000000..726a49d01565 --- /dev/null +++ b/alloy_signer_ledger/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["HDPath","LedgerError"],"mod":["signer","types"],"struct":["LedgerSigner"]}; \ No newline at end of file diff --git a/alloy_signer_ledger/signer/index.html b/alloy_signer_ledger/signer/index.html new file mode 100644 index 000000000000..b4d85c47ff33 --- /dev/null +++ b/alloy_signer_ledger/signer/index.html @@ -0,0 +1,3 @@ +alloy_signer_ledger::signer - Rust +
Expand description

Ledger Ethereum app wrapper.

+

Structs

\ No newline at end of file diff --git a/alloy_signer_ledger/signer/sidebar-items.js b/alloy_signer_ledger/signer/sidebar-items.js new file mode 100644 index 000000000000..1c1beead9d6a --- /dev/null +++ b/alloy_signer_ledger/signer/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["LedgerSigner"]}; \ No newline at end of file diff --git a/alloy_signer_ledger/signer/struct.LedgerSigner.html b/alloy_signer_ledger/signer/struct.LedgerSigner.html new file mode 100644 index 000000000000..6c9a66dcf214 --- /dev/null +++ b/alloy_signer_ledger/signer/struct.LedgerSigner.html @@ -0,0 +1,156 @@ +LedgerSigner in alloy_signer_ledger::signer - Rust +
pub struct LedgerSigner {
+    transport: Mutex<Ledger>,
+    derivation: DerivationType,
+    pub(crate) chain_id: u64,
+    pub(crate) address: Address,
+}
Expand description

A Ledger Ethereum signer.

+

This is a simple wrapper around the Ledger transport.

+

Note that this signer only supports asynchronous operations. Calling a non-asynchronous method +will always return an error.

+

Fields§

§transport: Mutex<Ledger>§derivation: DerivationType§chain_id: u64§address: Address

Implementations§

source§

impl LedgerSigner

source

pub async fn new( + derivation: DerivationType, + chain_id: u64 +) -> Result<Self, LedgerError>

Instantiate the application by acquiring a lock on the ledger device.

+
Examples
+
use alloy_signer_ledger::{HDPath, Ledger};
+
+let ledger = Ledger::new(HDPath::LedgerLive(0), 1).await?;
+
source

pub async fn get_address(&self) -> Result<Address, LedgerError>

Get the account which corresponds to our derivation path

+
source

pub async fn get_address_with_path( + &self, + derivation: &DerivationType +) -> Result<Address, LedgerError>

Gets the account which corresponds to the provided derivation path

+
source

async fn get_address_with_path_transport( + transport: &Ledger, + derivation: &DerivationType +) -> Result<Address, LedgerError>

source

pub async fn version(&self) -> Result<Version, LedgerError>

Returns the semver of the Ethereum ledger app

+
source

async fn sign_typed_data_<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature, LedgerError>

Available on crate feature eip712 only.
source

async fn sign_payload( + &self, + command: INS, + payload: &[u8] +) -> Result<Signature, LedgerError>

Helper function for signing either transaction data, personal messages or EIP712 derived +structs.

+
source

fn path_to_bytes(derivation: &DerivationType) -> Vec<u8>

Trait Implementations§

source§

impl Debug for LedgerSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LedgerSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Signer for LedgerSigner

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + _hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + T: 'async_trait + SolStruct + Send + Sync, + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 128 bytes

\ No newline at end of file diff --git a/alloy_signer_ledger/struct.LedgerSigner.html b/alloy_signer_ledger/struct.LedgerSigner.html new file mode 100644 index 000000000000..a57f609875a4 --- /dev/null +++ b/alloy_signer_ledger/struct.LedgerSigner.html @@ -0,0 +1,156 @@ +LedgerSigner in alloy_signer_ledger - Rust +
pub struct LedgerSigner {
+    transport: Mutex<Ledger>,
+    derivation: DerivationType,
+    pub(crate) chain_id: u64,
+    pub(crate) address: Address,
+}
Expand description

A Ledger Ethereum signer.

+

This is a simple wrapper around the Ledger transport.

+

Note that this signer only supports asynchronous operations. Calling a non-asynchronous method +will always return an error.

+

Fields§

§transport: Mutex<Ledger>§derivation: DerivationType§chain_id: u64§address: Address

Implementations§

source§

impl LedgerSigner

source

pub async fn new( + derivation: DerivationType, + chain_id: u64 +) -> Result<Self, LedgerError>

Instantiate the application by acquiring a lock on the ledger device.

+
Examples
+
use alloy_signer_ledger::{HDPath, Ledger};
+
+let ledger = Ledger::new(HDPath::LedgerLive(0), 1).await?;
+
source

pub async fn get_address(&self) -> Result<Address, LedgerError>

Get the account which corresponds to our derivation path

+
source

pub async fn get_address_with_path( + &self, + derivation: &DerivationType +) -> Result<Address, LedgerError>

Gets the account which corresponds to the provided derivation path

+
source

async fn get_address_with_path_transport( + transport: &Ledger, + derivation: &DerivationType +) -> Result<Address, LedgerError>

source

pub async fn version(&self) -> Result<Version, LedgerError>

Returns the semver of the Ethereum ledger app

+
source

async fn sign_typed_data_<T: SolStruct>( + &self, + payload: &T, + domain: &Eip712Domain +) -> Result<Signature, LedgerError>

Available on crate feature eip712 only.
source

async fn sign_payload( + &self, + command: INS, + payload: &[u8] +) -> Result<Signature, LedgerError>

Helper function for signing either transaction data, personal messages or EIP712 derived +structs.

+
source

fn path_to_bytes(derivation: &DerivationType) -> Vec<u8>

Trait Implementations§

source§

impl Debug for LedgerSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LedgerSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Signer for LedgerSigner

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + _hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + T: 'async_trait + SolStruct + Send + Sync, + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 128 bytes

\ No newline at end of file diff --git a/alloy_signer_ledger/types/constant.P1_FIRST.html b/alloy_signer_ledger/types/constant.P1_FIRST.html new file mode 100644 index 000000000000..a1f9d0476a1c --- /dev/null +++ b/alloy_signer_ledger/types/constant.P1_FIRST.html @@ -0,0 +1,2 @@ +P1_FIRST in alloy_signer_ledger::types - Rust +
pub(crate) const P1_FIRST: u8 = 0x00;
\ No newline at end of file diff --git a/alloy_signer_ledger/types/enum.DerivationType.html b/alloy_signer_ledger/types/enum.DerivationType.html new file mode 100644 index 000000000000..2bdefcb07656 --- /dev/null +++ b/alloy_signer_ledger/types/enum.DerivationType.html @@ -0,0 +1,107 @@ +DerivationType in alloy_signer_ledger::types - Rust +
pub enum DerivationType {
+    LedgerLive(usize),
+    Legacy(usize),
+    Other(String),
+}
Expand description

Ledger wallet type

+

Variants§

§

LedgerLive(usize)

Ledger Live-generated HD path

+
§

Legacy(usize)

Legacy generated HD Path

+
§

Other(String)

Any other path

+

Trait Implementations§

source§

impl Clone for DerivationType

source§

fn clone(&self) -> DerivationType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 32 bytes

Size for each variant:

  • LedgerLive: 8 bytes
  • Legacy: 8 bytes
  • Other: 24 bytes
\ No newline at end of file diff --git a/alloy_signer_ledger/types/enum.INS.html b/alloy_signer_ledger/types/enum.INS.html new file mode 100644 index 000000000000..7885537c2d95 --- /dev/null +++ b/alloy_signer_ledger/types/enum.INS.html @@ -0,0 +1,107 @@ +INS in alloy_signer_ledger::types - Rust +
#[repr(u8)]
pub(crate) enum INS { + GET_PUBLIC_KEY = 2, + SIGN = 4, + GET_APP_CONFIGURATION = 6, + SIGN_PERSONAL_MESSAGE = 8, + SIGN_ETH_EIP_712 = 12, +}

Variants§

§

GET_PUBLIC_KEY = 2

§

SIGN = 4

§

GET_APP_CONFIGURATION = 6

§

SIGN_PERSONAL_MESSAGE = 8

§

SIGN_ETH_EIP_712 = 12

Trait Implementations§

source§

impl Clone for INS

source§

fn clone(&self) -> INS

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for INS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for INS

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for INS

source§

fn eq(&self, other: &INS) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for INS

source§

impl Eq for INS

source§

impl StructuralEq for INS

source§

impl StructuralPartialEq for INS

Auto Trait Implementations§

§

impl RefUnwindSafe for INS

§

impl Send for INS

§

impl Sync for INS

§

impl Unpin for INS

§

impl UnwindSafe for INS

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • GET_PUBLIC_KEY: 0 bytes
  • SIGN: 0 bytes
  • GET_APP_CONFIGURATION: 0 bytes
  • SIGN_PERSONAL_MESSAGE: 0 bytes
  • SIGN_ETH_EIP_712: 0 bytes
\ No newline at end of file diff --git a/alloy_signer_ledger/types/enum.LedgerError.html b/alloy_signer_ledger/types/enum.LedgerError.html new file mode 100644 index 000000000000..0af4bed03c3a --- /dev/null +++ b/alloy_signer_ledger/types/enum.LedgerError.html @@ -0,0 +1,119 @@ +LedgerError in alloy_signer_ledger::types - Rust +
pub enum LedgerError {
+    LedgerError(LedgerError),
+    UnexpectedNullResponse,
+    HexError(FromHexError),
+    SemVerError(Error),
+    Ecdsa(Error),
+    UnsupportedAppVersion(&'static str),
+    ShortResponse {
+        got: usize,
+        expected: usize,
+    },
+}
Expand description

Error when using the Ledger transport.

+

Variants§

§

LedgerError(LedgerError)

Underlying Ledger transport error.

+
§

UnexpectedNullResponse

Device response was unexpectedly empty.

+
§

HexError(FromHexError)

hex error.

+
§

SemVerError(Error)

semver error.

+
§

Ecdsa(Error)

[ecdsa] error.

+
§

UnsupportedAppVersion(&'static str)

Thrown when trying to sign using EIP-712 with an incompatible Ledger Ethereum app.

+
§

ShortResponse

Fields

§got: usize

Number of bytes received.

+
§expected: usize

Number of bytes expected.

+

Got a response, but it didn’t contain as much data as expected

+

Trait Implementations§

source§

impl Debug for LedgerError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LedgerError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for LedgerError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for LedgerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for LedgerError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for LedgerError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<LedgerError> for LedgerError

source§

fn from(source: LedgerError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 40 bytes

Size for each variant:

  • LedgerError: 40 bytes
  • UnexpectedNullResponse: 0 bytes
  • HexError: 24 bytes
  • SemVerError: 12 bytes
  • Ecdsa: 24 bytes
  • UnsupportedAppVersion: 24 bytes
  • ShortResponse: 24 bytes
\ No newline at end of file diff --git a/alloy_signer_ledger/types/enum.P1.html b/alloy_signer_ledger/types/enum.P1.html new file mode 100644 index 000000000000..0cce6bd9b946 --- /dev/null +++ b/alloy_signer_ledger/types/enum.P1.html @@ -0,0 +1,103 @@ +P1 in alloy_signer_ledger::types - Rust +
#[repr(u8)]
pub(crate) enum P1 { + NON_CONFIRM = 0, + MORE = 128, +}

Variants§

§

NON_CONFIRM = 0

§

MORE = 128

Trait Implementations§

source§

impl Clone for P1

source§

fn clone(&self) -> P1

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for P1

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for P1

source§

fn eq(&self, other: &P1) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for P1

source§

impl Eq for P1

source§

impl StructuralEq for P1

source§

impl StructuralPartialEq for P1

Auto Trait Implementations§

§

impl RefUnwindSafe for P1

§

impl Send for P1

§

impl Sync for P1

§

impl Unpin for P1

§

impl UnwindSafe for P1

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • NON_CONFIRM: 0 bytes
  • MORE: 0 bytes
\ No newline at end of file diff --git a/alloy_signer_ledger/types/enum.P2.html b/alloy_signer_ledger/types/enum.P2.html new file mode 100644 index 000000000000..4f4b65f1fc79 --- /dev/null +++ b/alloy_signer_ledger/types/enum.P2.html @@ -0,0 +1,102 @@ +P2 in alloy_signer_ledger::types - Rust +
#[repr(u8)]
pub(crate) enum P2 { + NO_CHAINCODE = 0, +}

Variants§

§

NO_CHAINCODE = 0

Trait Implementations§

source§

impl Clone for P2

source§

fn clone(&self) -> P2

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for P2

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for P2

source§

fn eq(&self, other: &P2) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for P2

source§

impl Eq for P2

source§

impl StructuralEq for P2

source§

impl StructuralPartialEq for P2

Auto Trait Implementations§

§

impl RefUnwindSafe for P2

§

impl Send for P2

§

impl Sync for P2

§

impl Unpin for P2

§

impl UnwindSafe for P2

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 1 byte

Size for each variant:

  • NO_CHAINCODE: 0 bytes
\ No newline at end of file diff --git a/alloy_signer_ledger/types/index.html b/alloy_signer_ledger/types/index.html new file mode 100644 index 000000000000..fc694209fdcf --- /dev/null +++ b/alloy_signer_ledger/types/index.html @@ -0,0 +1,4 @@ +alloy_signer_ledger::types - Rust +
Expand description

Helpers for interacting with the Ethereum Ledger App.

+

Official Docs

+

Enums

Constants

\ No newline at end of file diff --git a/alloy_signer_ledger/types/sidebar-items.js b/alloy_signer_ledger/types/sidebar-items.js new file mode 100644 index 000000000000..6792c7b63724 --- /dev/null +++ b/alloy_signer_ledger/types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["P1_FIRST"],"enum":["DerivationType","INS","LedgerError","P1","P2"]}; \ No newline at end of file diff --git a/alloy_signer_trezor/all.html b/alloy_signer_trezor/all.html new file mode 100644 index 000000000000..8471188fe65e --- /dev/null +++ b/alloy_signer_trezor/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Constants

\ No newline at end of file diff --git a/alloy_signer_trezor/enum.TrezorError.html b/alloy_signer_trezor/enum.TrezorError.html new file mode 100644 index 000000000000..49d5e16d50ba --- /dev/null +++ b/alloy_signer_trezor/enum.TrezorError.html @@ -0,0 +1,115 @@ +TrezorError in alloy_signer_trezor - Rust +
pub enum TrezorError {
+    Client(Error),
+    Hex(FromHexError),
+    Semver(Error),
+    Ecdsa(Error),
+    UnsupportedFirmwareVersion(String),
+    NoEnsSupport,
+    FeaturesError,
+}
Expand description

Error when using the Trezor transport

+

Variants§

§

Client(Error)

Underlying Trezor transport error.

+
§

Hex(FromHexError)

Thrown when converting from a hex string.

+
§

Semver(Error)

Thrown when converting a semver requirement.

+
§

Ecdsa(Error)

ecdsa error.

+
§

UnsupportedFirmwareVersion(String)

Thrown when trying to sign an EIP-712 struct with an incompatible Trezor Ethereum app +version.

+
§

NoEnsSupport

No ENS support.

+
§

FeaturesError

Could not retrieve device features.

+

Trait Implementations§

source§

impl Debug for TrezorError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for TrezorError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for TrezorError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for TrezorError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for TrezorError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for TrezorError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for TrezorError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 48 bytes

Size for each variant:

  • Client: 48 bytes
  • Hex: 24 bytes
  • Semver: 12 bytes
  • Ecdsa: 24 bytes
  • UnsupportedFirmwareVersion: 32 bytes
  • NoEnsSupport: 0 bytes
  • FeaturesError: 0 bytes
\ No newline at end of file diff --git a/alloy_signer_trezor/enum.TrezorHDPath.html b/alloy_signer_trezor/enum.TrezorHDPath.html new file mode 100644 index 000000000000..7458f49a3af0 --- /dev/null +++ b/alloy_signer_trezor/enum.TrezorHDPath.html @@ -0,0 +1,107 @@ +TrezorHDPath in alloy_signer_trezor - Rust +
pub enum TrezorHDPath {
+    TrezorLive(usize),
+    Other(String),
+}
Expand description

Trezor wallet type.

+

Variants§

§

TrezorLive(usize)

Trezor Live-generated HD path

+
§

Other(String)

Any other path.

+

Warning: Trezor by default forbids custom derivation paths; +run trezorctl set safety-checks prompt to enable them.

+

Trait Implementations§

source§

impl Clone for DerivationType

source§

fn clone(&self) -> DerivationType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • TrezorLive: 16 bytes
  • Other: 24 bytes
\ No newline at end of file diff --git a/alloy_signer_trezor/index.html b/alloy_signer_trezor/index.html new file mode 100644 index 000000000000..d35311938915 --- /dev/null +++ b/alloy_signer_trezor/index.html @@ -0,0 +1,5 @@ +alloy_signer_trezor - Rust +
Expand description

alloy-signer-trezor

+

Ethereum Trezor signer.

+

Modules

  • signer 🔒
  • types 🔒
    Helpers for interacting with the Ethereum Trezor App.

Structs

Enums

\ No newline at end of file diff --git a/alloy_signer_trezor/sidebar-items.js b/alloy_signer_trezor/sidebar-items.js new file mode 100644 index 000000000000..8e1660f860ce --- /dev/null +++ b/alloy_signer_trezor/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TrezorError","TrezorHDPath"],"mod":["signer","types"],"struct":["TrezorSigner"]}; \ No newline at end of file diff --git a/alloy_signer_trezor/signer/constant.FIRMWARE_1_MIN_VERSION.html b/alloy_signer_trezor/signer/constant.FIRMWARE_1_MIN_VERSION.html new file mode 100644 index 000000000000..d55dd8f24f8b --- /dev/null +++ b/alloy_signer_trezor/signer/constant.FIRMWARE_1_MIN_VERSION.html @@ -0,0 +1,2 @@ +FIRMWARE_1_MIN_VERSION in alloy_signer_trezor::signer - Rust +
const FIRMWARE_1_MIN_VERSION: &str = ">=1.11.1";
\ No newline at end of file diff --git a/alloy_signer_trezor/signer/constant.FIRMWARE_2_MIN_VERSION.html b/alloy_signer_trezor/signer/constant.FIRMWARE_2_MIN_VERSION.html new file mode 100644 index 000000000000..ff3f1b40fdb9 --- /dev/null +++ b/alloy_signer_trezor/signer/constant.FIRMWARE_2_MIN_VERSION.html @@ -0,0 +1,2 @@ +FIRMWARE_2_MIN_VERSION in alloy_signer_trezor::signer - Rust +
const FIRMWARE_2_MIN_VERSION: &str = ">=2.5.1";
\ No newline at end of file diff --git a/alloy_signer_trezor/signer/index.html b/alloy_signer_trezor/signer/index.html new file mode 100644 index 000000000000..1390fd6d607c --- /dev/null +++ b/alloy_signer_trezor/signer/index.html @@ -0,0 +1,2 @@ +alloy_signer_trezor::signer - Rust +

Structs

Constants

\ No newline at end of file diff --git a/alloy_signer_trezor/signer/sidebar-items.js b/alloy_signer_trezor/signer/sidebar-items.js new file mode 100644 index 000000000000..1bcfe7a2a284 --- /dev/null +++ b/alloy_signer_trezor/signer/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["FIRMWARE_1_MIN_VERSION","FIRMWARE_2_MIN_VERSION"],"struct":["TrezorSigner"]}; \ No newline at end of file diff --git a/alloy_signer_trezor/signer/struct.TrezorSigner.html b/alloy_signer_trezor/signer/struct.TrezorSigner.html new file mode 100644 index 000000000000..e2a1d4b07981 --- /dev/null +++ b/alloy_signer_trezor/signer/struct.TrezorSigner.html @@ -0,0 +1,137 @@ +TrezorSigner in alloy_signer_trezor::signer - Rust +
pub struct TrezorSigner {
+    derivation: DerivationType,
+    session_id: Vec<u8>,
+    pub(crate) chain_id: u64,
+    pub(crate) address: Address,
+}
Expand description

A Trezor Ethereum signer.

+

This is a simple wrapper around the Trezor transport.

+

Note that this signer only supports asynchronous operations. Calling a non-asynchronous method +will always return an error.

+

Fields§

§derivation: DerivationType§session_id: Vec<u8>§chain_id: u64§address: Address

Implementations§

source§

impl TrezorSigner

source

pub async fn new( + derivation: DerivationType, + chain_id: u64 +) -> Result<Self, TrezorError>

Instantiates a new Trezor signer.

+
source

fn check_version(version: Version) -> Result<(), TrezorError>

source

fn initate_session(&mut self) -> Result<(), TrezorError>

source

fn get_client(&self) -> Result<Trezor, TrezorError>

source

pub async fn get_address(&self) -> Result<Address, TrezorError>

Get the account which corresponds to our derivation path

+
source

pub async fn get_address_with_path( + &self, + derivation: &DerivationType +) -> Result<Address, TrezorError>

Gets the account which corresponds to the provided derivation path

+
source

async fn sign_message_(&self, message: &[u8]) -> Result<Signature, TrezorError>

source

fn convert_path(derivation: &DerivationType) -> Vec<u32>

Trait Implementations§

source§

impl Debug for TrezorSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Signer for TrezorSigner

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + _hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>
where + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait, + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 80 bytes

\ No newline at end of file diff --git a/alloy_signer_trezor/struct.TrezorSigner.html b/alloy_signer_trezor/struct.TrezorSigner.html new file mode 100644 index 000000000000..4acc16a94371 --- /dev/null +++ b/alloy_signer_trezor/struct.TrezorSigner.html @@ -0,0 +1,137 @@ +TrezorSigner in alloy_signer_trezor - Rust +
pub struct TrezorSigner {
+    derivation: DerivationType,
+    session_id: Vec<u8>,
+    pub(crate) chain_id: u64,
+    pub(crate) address: Address,
+}
Expand description

A Trezor Ethereum signer.

+

This is a simple wrapper around the Trezor transport.

+

Note that this signer only supports asynchronous operations. Calling a non-asynchronous method +will always return an error.

+

Fields§

§derivation: DerivationType§session_id: Vec<u8>§chain_id: u64§address: Address

Implementations§

source§

impl TrezorSigner

source

pub async fn new( + derivation: DerivationType, + chain_id: u64 +) -> Result<Self, TrezorError>

Instantiates a new Trezor signer.

+
source

fn check_version(version: Version) -> Result<(), TrezorError>

source

fn initate_session(&mut self) -> Result<(), TrezorError>

source

fn get_client(&self) -> Result<Trezor, TrezorError>

source

pub async fn get_address(&self) -> Result<Address, TrezorError>

Get the account which corresponds to our derivation path

+
source

pub async fn get_address_with_path( + &self, + derivation: &DerivationType +) -> Result<Address, TrezorError>

Gets the account which corresponds to the provided derivation path

+
source

async fn sign_message_(&self, message: &[u8]) -> Result<Signature, TrezorError>

source

fn convert_path(derivation: &DerivationType) -> Vec<u32>

Trait Implementations§

source§

impl Debug for TrezorSigner

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Signer for TrezorSigner

source§

fn sign_hash<'life0, 'life1, 'async_trait>( + &'life0 self, + _hash: &'life1 B256 +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the given hash.
source§

fn sign_message<'life0, 'life1, 'async_trait>( + &'life0 self, + message: &'life1 [u8] +) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where + Self: 'async_trait, + 'life0: 'async_trait, + 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>( + &'life0 self, + payload: &'life1 T, + domain: &'life2 Eip712Domain +) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>
where + 'life0: 'async_trait, + 'life1: 'async_trait, + 'life2: 'async_trait, + Self: Sized + 'async_trait, + T: 'async_trait + SolStruct + Send + Sync,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
§

fn with_chain_id(self, chain_id: u64) -> Self
where + Self: Sized,

Sets the signer’s chain ID and returns self.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 80 bytes

\ No newline at end of file diff --git a/alloy_signer_trezor/types/enum.DerivationType.html b/alloy_signer_trezor/types/enum.DerivationType.html new file mode 100644 index 000000000000..97552387ebf0 --- /dev/null +++ b/alloy_signer_trezor/types/enum.DerivationType.html @@ -0,0 +1,107 @@ +DerivationType in alloy_signer_trezor::types - Rust +
pub enum DerivationType {
+    TrezorLive(usize),
+    Other(String),
+}
Expand description

Trezor wallet type.

+

Variants§

§

TrezorLive(usize)

Trezor Live-generated HD path

+
§

Other(String)

Any other path.

+

Warning: Trezor by default forbids custom derivation paths; +run trezorctl set safety-checks prompt to enable them.

+

Trait Implementations§

source§

impl Clone for DerivationType

source§

fn clone(&self) -> DerivationType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for DerivationType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 24 bytes

Size for each variant:

  • TrezorLive: 16 bytes
  • Other: 24 bytes
\ No newline at end of file diff --git a/alloy_signer_trezor/types/enum.TrezorError.html b/alloy_signer_trezor/types/enum.TrezorError.html new file mode 100644 index 000000000000..34da43fc7443 --- /dev/null +++ b/alloy_signer_trezor/types/enum.TrezorError.html @@ -0,0 +1,115 @@ +TrezorError in alloy_signer_trezor::types - Rust +
pub enum TrezorError {
+    Client(Error),
+    Hex(FromHexError),
+    Semver(Error),
+    Ecdsa(Error),
+    UnsupportedFirmwareVersion(String),
+    NoEnsSupport,
+    FeaturesError,
+}
Expand description

Error when using the Trezor transport

+

Variants§

§

Client(Error)

Underlying Trezor transport error.

+
§

Hex(FromHexError)

Thrown when converting from a hex string.

+
§

Semver(Error)

Thrown when converting a semver requirement.

+
§

Ecdsa(Error)

ecdsa error.

+
§

UnsupportedFirmwareVersion(String)

Thrown when trying to sign an EIP-712 struct with an incompatible Trezor Ethereum app +version.

+
§

NoEnsSupport

No ENS support.

+
§

FeaturesError

Could not retrieve device features.

+

Trait Implementations§

source§

impl Debug for TrezorError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for TrezorError

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for TrezorError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<Error> for TrezorError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for TrezorError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for TrezorError

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for TrezorError

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 48 bytes

Size for each variant:

  • Client: 48 bytes
  • Hex: 24 bytes
  • Semver: 12 bytes
  • Ecdsa: 24 bytes
  • UnsupportedFirmwareVersion: 32 bytes
  • NoEnsSupport: 0 bytes
  • FeaturesError: 0 bytes
\ No newline at end of file diff --git a/alloy_signer_trezor/types/index.html b/alloy_signer_trezor/types/index.html new file mode 100644 index 000000000000..ae490f9a42b3 --- /dev/null +++ b/alloy_signer_trezor/types/index.html @@ -0,0 +1,4 @@ +alloy_signer_trezor::types - Rust +
Expand description

Helpers for interacting with the Ethereum Trezor App.

+

Official Docs

+

Structs

Enums

\ No newline at end of file diff --git a/alloy_signer_trezor/types/sidebar-items.js b/alloy_signer_trezor/types/sidebar-items.js new file mode 100644 index 000000000000..928833f78de9 --- /dev/null +++ b/alloy_signer_trezor/types/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["DerivationType","TrezorError"],"struct":["TrezorTransaction"]}; \ No newline at end of file diff --git a/alloy_signer_trezor/types/struct.TrezorTransaction.html b/alloy_signer_trezor/types/struct.TrezorTransaction.html new file mode 100644 index 000000000000..b287c0318bdd --- /dev/null +++ b/alloy_signer_trezor/types/struct.TrezorTransaction.html @@ -0,0 +1,108 @@ +TrezorTransaction in alloy_signer_trezor::types - Rust +
pub(crate) struct TrezorTransaction {
+    pub(crate) nonce: Vec<u8>,
+    pub(crate) gas: Vec<u8>,
+    pub(crate) gas_price: Vec<u8>,
+    pub(crate) value: Vec<u8>,
+    pub(crate) to: String,
+    pub(crate) data: Vec<u8>,
+    pub(crate) max_fee_per_gas: Vec<u8>,
+    pub(crate) max_priority_fee_per_gas: Vec<u8>,
+    pub(crate) access_list: Vec<AccessListItem>,
+}
Expand description

Trezor transaction.

+

Fields§

§nonce: Vec<u8>§gas: Vec<u8>§gas_price: Vec<u8>§value: Vec<u8>§to: String§data: Vec<u8>§max_fee_per_gas: Vec<u8>§max_priority_fee_per_gas: Vec<u8>§access_list: Vec<AccessListItem>

Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for T
where + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> R
where + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> R
where + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 216 bytes

\ No newline at end of file diff --git a/alloy_transport/all.html b/alloy_transport/all.html new file mode 100644 index 000000000000..54d225382fb2 --- /dev/null +++ b/alloy_transport/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Enums

Traits

Functions

Type Aliases

\ No newline at end of file diff --git a/alloy_transport/boxed/index.html b/alloy_transport/boxed/index.html new file mode 100644 index 000000000000..14bbac499821 --- /dev/null +++ b/alloy_transport/boxed/index.html @@ -0,0 +1,2 @@ +alloy_transport::boxed - Rust +

Module alloy_transport::boxed

source ·

Structs

Traits

\ No newline at end of file diff --git a/alloy_transport/boxed/sidebar-items.js b/alloy_transport/boxed/sidebar-items.js new file mode 100644 index 000000000000..744427c3c8ec --- /dev/null +++ b/alloy_transport/boxed/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["BoxTransport"],"trait":["CloneTransport"]}; \ No newline at end of file diff --git a/alloy_transport/boxed/struct.BoxTransport.html b/alloy_transport/boxed/struct.BoxTransport.html new file mode 100644 index 000000000000..04bc15c0d591 --- /dev/null +++ b/alloy_transport/boxed/struct.BoxTransport.html @@ -0,0 +1,64 @@ +BoxTransport in alloy_transport::boxed - Rust +
#[repr(transparent)]
pub struct BoxTransport { + inner: Box<dyn CloneTransport + Send + Sync>, +}
Expand description

A boxed, Clone-able Transport trait object.

+

This type allows RPC clients to use a type-erased transport. It is +Clone and Send + Sync, and implementes Transport. This +allows for complex behavior abstracting across several different clients +with different transport types.

+

Most higher-level types will be generic over T: Transport = BoxTransport. +This allows paramterization with a concrete type, while hiding this +complexity from the library consumer.

+

Fields§

§inner: Box<dyn CloneTransport + Send + Sync>

Implementations§

source§

impl BoxTransport

source

pub fn new<T: Transport + Clone + Send + Sync>(inner: T) -> Self

Instantiate a new box transport from a suitable transport.

+

Trait Implementations§

source§

impl Clone for BoxTransport

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BoxTransport

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Service<RequestPacket> for BoxTransport

§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T, Request> ServiceExt<Request> for T
where + T: Service<Request> + ?Sized,

§

fn ready(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_and(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

👎Deprecated since 0.4.6: please use the ServiceExt::ready method instead
Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_oneshot(self) -> ReadyOneshot<Self, Request>
where + Self: Sized,

Yields the service when it is ready to accept a request.
§

fn oneshot(self, req: Request) -> Oneshot<Self, Request>
where + Self: Sized,

Consume this Service, calling with the providing request once it is ready.
§

fn call_all<S>(self, reqs: S) -> CallAll<Self, S>
where + Self: Sized, + Self::Error: Into<Box<dyn Error + Sync + Send>>, + S: Stream<Item = Request>,

Process all requests from the given Stream, and produce a Stream of their responses. Read more
§

fn and_then<F>(self, f: F) -> AndThen<Self, F>
where + Self: Sized, + F: Clone,

Executes a new future after this service’s future resolves. This does +not alter the behaviour of the poll_ready method. Read more
§

fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Response) -> Response + Clone,

Maps this service’s response value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Error + Clone,

Maps this service’s error value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Result<Response, Error> + Clone,

Maps this service’s result type (Result<Self::Response, Self::Error>) +to a different value, regardless of whether the future succeeds or +fails. Read more
§

fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
where + Self: Sized, + F: FnMut(NewRequest) -> Request,

Composes a function in front of the service. Read more
§

fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Fut + Clone, + Fut: Future<Output = Result<Response, Error>>,

Composes an asynchronous function after this service. Read more
§

fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
where + Self: Sized, + F: FnMut(Self::Future) -> Fut, + Error: From<Self::Error>, + Fut: Future<Output = Result<Response, Error>>,

Composes a function that transforms futures produced by the service. Read more
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
where + Self: Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Send trait object. Read more
§

fn boxed_clone(self) -> BoxCloneService<Request, Self::Response, Self::Error>
where + Self: Clone + Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Clone + Send trait object. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> Transport for T
where + T: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = RpcError<TransportErrorKind>, Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>> + Send + Sync + 'static,

source§

fn boxed(self) -> BoxTransport
where + Self: Sized + Clone + Send + Sync + 'static,

Convert this transport into a boxed trait object.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> Sealed for T
where + T: Service<RequestPacket, Response = ResponsePacket, Error = RpcError<TransportErrorKind>, Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>> + Send + Sync + '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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/boxed/trait.CloneTransport.html b/alloy_transport/boxed/trait.CloneTransport.html new file mode 100644 index 000000000000..9b02e05e8f1c --- /dev/null +++ b/alloy_transport/boxed/trait.CloneTransport.html @@ -0,0 +1,7 @@ +CloneTransport in alloy_transport::boxed - Rust +
trait CloneTransport: Transport {
+    // Required method
+    fn clone_box(&self) -> Box<dyn CloneTransport + Send + Sync>;
+}
Expand description

Helper trait for constructing BoxTransport.

+

Required Methods§

Implementors§

source§

impl<T> CloneTransport for T
where + T: Transport + Clone + Send + Sync,

\ No newline at end of file diff --git a/alloy_transport/common/enum.Authorization.html b/alloy_transport/common/enum.Authorization.html new file mode 100644 index 000000000000..4911ae130866 --- /dev/null +++ b/alloy_transport/common/enum.Authorization.html @@ -0,0 +1,24 @@ +Authorization in alloy_transport::common - Rust +
pub enum Authorization {
+    Basic(String),
+    Bearer(String),
+}
Expand description

Basic or bearer authentication in http or websocket transport

+

Use to inject username and password or an auth token into requests

+

Variants§

§

Basic(String)

HTTP Basic Auth

+
§

Bearer(String)

Bearer Auth

+

Implementations§

source§

impl Authorization

source

pub fn basic(username: impl AsRef<str>, password: impl AsRef<str>) -> Self

Instantiate a new basic auth.

+
source

pub fn bearer(token: impl Into<String>) -> Self

Instantiate a new bearer auth.

+

Trait Implementations§

source§

impl Clone for Authorization

source§

fn clone(&self) -> Authorization

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Authorization

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Authorization

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 32 bytes

Size for each variant:

  • Basic: 24 bytes
  • Bearer: 24 bytes
\ No newline at end of file diff --git a/alloy_transport/common/index.html b/alloy_transport/common/index.html new file mode 100644 index 000000000000..f7705eeebba5 --- /dev/null +++ b/alloy_transport/common/index.html @@ -0,0 +1,2 @@ +alloy_transport::common - Rust +

Module alloy_transport::common

source ·

Enums

  • Basic or bearer authentication in http or websocket transport
\ No newline at end of file diff --git a/alloy_transport/common/sidebar-items.js b/alloy_transport/common/sidebar-items.js new file mode 100644 index 000000000000..8835e02759ba --- /dev/null +++ b/alloy_transport/common/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Authorization"]}; \ No newline at end of file diff --git a/alloy_transport/connect/index.html b/alloy_transport/connect/index.html new file mode 100644 index 000000000000..c7b15272ea89 --- /dev/null +++ b/alloy_transport/connect/index.html @@ -0,0 +1,2 @@ +alloy_transport::connect - Rust +

Traits

\ No newline at end of file diff --git a/alloy_transport/connect/sidebar-items.js b/alloy_transport/connect/sidebar-items.js new file mode 100644 index 000000000000..880583cf833a --- /dev/null +++ b/alloy_transport/connect/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"trait":["BoxTransportConnect","TransportConnect"]}; \ No newline at end of file diff --git a/alloy_transport/connect/trait.BoxTransportConnect.html b/alloy_transport/connect/trait.BoxTransportConnect.html new file mode 100644 index 000000000000..a1defd9fa4f6 --- /dev/null +++ b/alloy_transport/connect/trait.BoxTransportConnect.html @@ -0,0 +1,18 @@ +BoxTransportConnect in alloy_transport::connect - Rust +
pub trait BoxTransportConnect {
+    // Required methods
+    fn is_local(&self) -> bool;
+    fn get_boxed_transport<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, BoxTransport, TransportError>;
+}
Expand description

Connection details for a transport that can be boxed.

+

This trait is implemented for TransportConnect implementors that +produce a boxable transport. It can be used to create a boxed transport +without knowing the exact type of the transport.

+

This trait is separate from TransportConnect`` to hide the associated type in when this trait is a trai object. It is intended to allow creation of several unlike transports or clients at once. E.g. in something like Vec<&dyn BoxTransportConnect>.

+

Required Methods§

source

fn is_local(&self) -> bool

Returns true if the transport is a local transport.

+
source

fn get_boxed_transport<'a: 'b, 'b>( + &'a self +) -> Pbf<'b, BoxTransport, TransportError>

Connect to a transport, and box it.

+

Implementors§

\ No newline at end of file diff --git a/alloy_transport/connect/trait.TransportConnect.html b/alloy_transport/connect/trait.TransportConnect.html new file mode 100644 index 000000000000..a33589bf6ac3 --- /dev/null +++ b/alloy_transport/connect/trait.TransportConnect.html @@ -0,0 +1,26 @@ +TransportConnect in alloy_transport::connect - Rust +
pub trait TransportConnect: Sized + Send + Sync + 'static {
+    type Transport: Transport + Clone;
+
+    // Required methods
+    fn is_local(&self) -> bool;
+    fn get_transport<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, Self::Transport, TransportError>;
+}
Expand description

Connection details for a transport.

+

This object captures the information necessary to establish a transport, +and may encapsulate reconnection logic.

+

Why implement TransportConnect?

+

Users may want to implement transport-connect for the following reasons:

+
    +
  • You want to customize a reqwest::Client before using it.
  • +
  • You need to provide special authentication information to a remote provider.
  • +
  • You have implemented a custom Transport.
  • +
  • You require a specific websocket reconnection strategy.
  • +
+

Required Associated Types§

source

type Transport: Transport + Clone

The transport type that is returned by connect.

+

Required Methods§

source

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.

+
source

fn get_transport<'a: 'b, 'b>( + &'a self +) -> Pbf<'b, Self::Transport, TransportError>

Connect to the transport, returning a Transport instance.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_transport/enum.Authorization.html b/alloy_transport/enum.Authorization.html new file mode 100644 index 000000000000..86720503f5c4 --- /dev/null +++ b/alloy_transport/enum.Authorization.html @@ -0,0 +1,24 @@ +Authorization in alloy_transport - Rust +
pub enum Authorization {
+    Basic(String),
+    Bearer(String),
+}
Expand description

Basic or bearer authentication in http or websocket transport

+

Use to inject username and password or an auth token into requests

+

Variants§

§

Basic(String)

HTTP Basic Auth

+
§

Bearer(String)

Bearer Auth

+

Implementations§

source§

impl Authorization

source

pub fn basic(username: impl AsRef<str>, password: impl AsRef<str>) -> Self

Instantiate a new basic auth.

+
source

pub fn bearer(token: impl Into<String>) -> Self

Instantiate a new bearer auth.

+

Trait Implementations§

source§

impl Clone for Authorization

source§

fn clone(&self) -> Authorization

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Authorization

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Authorization

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 32 bytes

Size for each variant:

  • Basic: 24 bytes
  • Bearer: 24 bytes
\ No newline at end of file diff --git a/alloy_transport/error/enum.TransportErrorKind.html b/alloy_transport/error/enum.TransportErrorKind.html new file mode 100644 index 000000000000..261583e6b7dd --- /dev/null +++ b/alloy_transport/error/enum.TransportErrorKind.html @@ -0,0 +1,30 @@ +TransportErrorKind in alloy_transport::error - Rust +
pub enum TransportErrorKind {
+    MissingBatchResponse(Id),
+    BackendGone,
+    Custom(Box<dyn StdError + Send + Sync + 'static>),
+}
Expand description

Transport error.

+

All transport errors are wrapped in this enum.

+

Variants§

§

MissingBatchResponse(Id)

Missing batch response.

+

This error is returned when a batch request is sent and the response +does not contain a response for a request. For convenience the ID is +specified.

+
§

BackendGone

PubSub backend connection task has stopped.

+
§

Custom(Box<dyn StdError + Send + Sync + 'static>)

Custom error

+

Implementations§

source§

impl TransportErrorKind

source

pub fn custom_str(err: &str) -> TransportError

Instantiate a new TransportError from a custom error.

+
source

pub fn custom(err: impl StdError + Send + Sync + 'static) -> TransportError

Instantiate a new TransportError from a custom error.

+
source

pub const fn missing_batch_response(id: Id) -> TransportError

Instantiate a new TransportError from a missing ID.

+
source

pub const fn backend_gone() -> TransportError

Instantiate a new TransportError::BackendGone.

+

Trait Implementations§

source§

impl Debug for TransportErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for TransportErrorKind

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for TransportErrorKind

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> ToString for T
where + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

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: 32 bytes

Size for each variant:

  • MissingBatchResponse: 32 bytes
  • BackendGone: 0 bytes
  • Custom: 24 bytes
\ No newline at end of file diff --git a/alloy_transport/error/index.html b/alloy_transport/error/index.html new file mode 100644 index 000000000000..e31445f83c31 --- /dev/null +++ b/alloy_transport/error/index.html @@ -0,0 +1,2 @@ +alloy_transport::error - Rust +

Module alloy_transport::error

source ·

Enums

Type Aliases

\ No newline at end of file diff --git a/alloy_transport/error/sidebar-items.js b/alloy_transport/error/sidebar-items.js new file mode 100644 index 000000000000..734887a63dcd --- /dev/null +++ b/alloy_transport/error/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["TransportErrorKind"],"type":["TransportError","TransportResult"]}; \ No newline at end of file diff --git a/alloy_transport/error/type.TransportError.html b/alloy_transport/error/type.TransportError.html new file mode 100644 index 000000000000..1bb83de289dd --- /dev/null +++ b/alloy_transport/error/type.TransportError.html @@ -0,0 +1,20 @@ +TransportError in alloy_transport::error - Rust +
pub type TransportError<ErrResp = Box<RawValue>> = RpcError<TransportErrorKind, ErrResp>;
Expand description

A transport error is an [RpcError] containing a TransportErrorKind.

+

Aliased Type§

enum TransportError<ErrResp = Box<RawValue>> {
+    ErrorResp(ErrorPayload<ErrResp>),
+    SerError(Error),
+    DeserError {
+        err: Error,
+        text: String,
+    },
+    Transport(TransportErrorKind),
+}

Variants§

§

ErrorResp(ErrorPayload<ErrResp>)

Server returned an error response.

+
§

SerError(Error)

Tuple Fields

§0: Error

The underlying serde_json error.

+

JSON serialization error.

+
§

DeserError

Fields

§err: Error

The underlying serde_json error.

+
§text: String

For deser errors, the text that failed to deserialize.

+

JSON deserialization error.

+
§

Transport(TransportErrorKind)

Tuple Fields

§0: TransportErrorKind

The underlying transport error.

+

Transport error.

+

This variant is used when the error occurs during communication.

+

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.

\ No newline at end of file diff --git a/alloy_transport/error/type.TransportResult.html b/alloy_transport/error/type.TransportResult.html new file mode 100644 index 000000000000..5b1aca9a8744 --- /dev/null +++ b/alloy_transport/error/type.TransportResult.html @@ -0,0 +1,8 @@ +TransportResult in alloy_transport::error - Rust +
pub type TransportResult<T, ErrResp = Box<RawValue>> = RpcResult<T, TransportErrorKind, ErrResp>;
Expand description

A transport result is a Result containing a TransportError.

+

Aliased Type§

enum TransportResult<T, ErrResp = Box<RawValue>> {
+    Ok(T),
+    Err(RpcError<TransportErrorKind, ErrResp>),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(RpcError<TransportErrorKind, ErrResp>)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_transport/index.html b/alloy_transport/index.html new file mode 100644 index 000000000000..254677e3c9a4 --- /dev/null +++ b/alloy_transport/index.html @@ -0,0 +1,49 @@ +alloy_transport - Rust +

Crate alloy_transport

source ·
Expand description

alloy-transport

+

Transport implementations for Alloy providers.

+

This crate handles RPC connection and request management. It builds an +RpcClient on top of the tower Service abstraction, and provides +futures for simple and batch RPC requests as well as a unified TransportError +type.

+

Usage

+

Usage of this crate typically means instantiating an RpcClient<T> over some +Transport. The RPC client can then be used to make requests to the RPC +server. Requests are captured as RpcCall futures, which can be polled to +completion.

+

For example, to make a simple request:

+ +
// Instantiate a new client over a transport.
+let client: RpcClient<reqwest::Http> = "https://mainnet.infura.io/v3/...".parse().unwrap();
+
+// Prepare a request to the server.
+let request = client.request("eth_blockNumber", ());
+
+// Poll the request to completion.
+let block_number = request.await.unwrap();
+

Batch requests are also supported:

+ +
// Instantiate a new client over a transport.
+let client: RpcClient<reqwest::Http> = "https://mainnet.infura.io/v3/...".parse().unwrap();
+
+// Prepare a batch request to the server.
+let batch = client.new_batch();
+
+// Batches serialize params immediately. So we need to handle the result when
+// adding calls.
+let block_number_fut = batch.add_call("eth_blockNumber", ()).unwrap();
+let balance_fut = batch.add_call("eth_getBalance", address).unwrap();
+
+// Make sure to send the batch!
+batch.send().await.unwrap();
+
+// After the batch is complete, we can get the results.
+// Note that requests may error separately!
+let block_number = block_number_fut.await.unwrap();
+let balance = balance_fut.await.unwrap();
+

Features

+
    +
  • reqwest: Enables the reqwest transport implementation.
  • +
  • hyper: Enables the hyper transport implementation (not available in WASM).
  • +
+

Modules

Structs

Enums

  • Basic or bearer authentication in http or websocket transport

Traits

Type Aliases

\ No newline at end of file diff --git a/alloy_transport/sidebar-items.js b/alloy_transport/sidebar-items.js new file mode 100644 index 000000000000..0bc71b855d07 --- /dev/null +++ b/alloy_transport/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Authorization"],"mod":["boxed","common","connect","error","trait","type_aliases","utils"],"struct":["BoxTransport"],"trait":["BoxTransportConnect","Transport","TransportConnect"],"type":["Pbf","RpcFut","RpcResult","TransportError","TransportFut","TransportResult"]}; \ No newline at end of file diff --git a/alloy_transport/struct.BoxTransport.html b/alloy_transport/struct.BoxTransport.html new file mode 100644 index 000000000000..a4dd53f0462a --- /dev/null +++ b/alloy_transport/struct.BoxTransport.html @@ -0,0 +1,64 @@ +BoxTransport in alloy_transport - Rust +
#[repr(transparent)]
pub struct BoxTransport { + inner: Box<dyn CloneTransport + Send + Sync>, +}
Expand description

A boxed, Clone-able Transport trait object.

+

This type allows RPC clients to use a type-erased transport. It is +Clone and Send + Sync, and implementes Transport. This +allows for complex behavior abstracting across several different clients +with different transport types.

+

Most higher-level types will be generic over T: Transport = BoxTransport. +This allows paramterization with a concrete type, while hiding this +complexity from the library consumer.

+

Fields§

§inner: Box<dyn CloneTransport + Send + Sync>

Implementations§

source§

impl BoxTransport

source

pub fn new<T: Transport + Clone + Send + Sync>(inner: T) -> Self

Instantiate a new box transport from a suitable transport.

+

Trait Implementations§

source§

impl Clone for BoxTransport

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BoxTransport

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Service<RequestPacket> for BoxTransport

§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T, Request> ServiceExt<Request> for T
where + T: Service<Request> + ?Sized,

§

fn ready(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_and(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

👎Deprecated since 0.4.6: please use the ServiceExt::ready method instead
Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_oneshot(self) -> ReadyOneshot<Self, Request>
where + Self: Sized,

Yields the service when it is ready to accept a request.
§

fn oneshot(self, req: Request) -> Oneshot<Self, Request>
where + Self: Sized,

Consume this Service, calling with the providing request once it is ready.
§

fn call_all<S>(self, reqs: S) -> CallAll<Self, S>
where + Self: Sized, + Self::Error: Into<Box<dyn Error + Sync + Send>>, + S: Stream<Item = Request>,

Process all requests from the given Stream, and produce a Stream of their responses. Read more
§

fn and_then<F>(self, f: F) -> AndThen<Self, F>
where + Self: Sized, + F: Clone,

Executes a new future after this service’s future resolves. This does +not alter the behaviour of the poll_ready method. Read more
§

fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Response) -> Response + Clone,

Maps this service’s response value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Error + Clone,

Maps this service’s error value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Result<Response, Error> + Clone,

Maps this service’s result type (Result<Self::Response, Self::Error>) +to a different value, regardless of whether the future succeeds or +fails. Read more
§

fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
where + Self: Sized, + F: FnMut(NewRequest) -> Request,

Composes a function in front of the service. Read more
§

fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Fut + Clone, + Fut: Future<Output = Result<Response, Error>>,

Composes an asynchronous function after this service. Read more
§

fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
where + Self: Sized, + F: FnMut(Self::Future) -> Fut, + Error: From<Self::Error>, + Fut: Future<Output = Result<Response, Error>>,

Composes a function that transforms futures produced by the service. Read more
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
where + Self: Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Send trait object. Read more
§

fn boxed_clone(self) -> BoxCloneService<Request, Self::Response, Self::Error>
where + Self: Clone + Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Clone + Send trait object. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> Transport for T
where + T: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = RpcError<TransportErrorKind>, Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>> + Send + Sync + 'static,

source§

fn boxed(self) -> BoxTransport
where + Self: Sized + Clone + Send + Sync + 'static,

Convert this transport into a boxed trait object.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> Sealed for T
where + T: Service<RequestPacket, Response = ResponsePacket, Error = RpcError<TransportErrorKind>, Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>> + Send + Sync + '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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/trait.BoxTransportConnect.html b/alloy_transport/trait.BoxTransportConnect.html new file mode 100644 index 000000000000..de6fd2ba61b7 --- /dev/null +++ b/alloy_transport/trait.BoxTransportConnect.html @@ -0,0 +1,18 @@ +BoxTransportConnect in alloy_transport - Rust +
pub trait BoxTransportConnect {
+    // Required methods
+    fn is_local(&self) -> bool;
+    fn get_boxed_transport<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, BoxTransport, TransportError>;
+}
Expand description

Connection details for a transport that can be boxed.

+

This trait is implemented for TransportConnect implementors that +produce a boxable transport. It can be used to create a boxed transport +without knowing the exact type of the transport.

+

This trait is separate from TransportConnect`` to hide the associated type in when this trait is a trai object. It is intended to allow creation of several unlike transports or clients at once. E.g. in something like Vec<&dyn BoxTransportConnect>.

+

Required Methods§

source

fn is_local(&self) -> bool

Returns true if the transport is a local transport.

+
source

fn get_boxed_transport<'a: 'b, 'b>( + &'a self +) -> Pbf<'b, BoxTransport, TransportError>

Connect to a transport, and box it.

+

Implementors§

\ No newline at end of file diff --git a/alloy_transport/trait.Transport.html b/alloy_transport/trait.Transport.html new file mode 100644 index 000000000000..9cdb0eeb1262 --- /dev/null +++ b/alloy_transport/trait.Transport.html @@ -0,0 +1,31 @@ +Transport in alloy_transport - Rust +
pub trait Transport: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = TransportError, Future = TransportFut<'static>> + Send + Sync + 'static {
+    // Provided method
+    fn boxed(self) -> BoxTransport
+       where Self: Sized + Clone + Send + Sync + 'static { ... }
+}
Expand description

A Transport manages the JSON-RPC request/response lifecycle.

+

Transports should be instantiated via the TransportConnect trait.

+

Transports are reponsible for the following:

+
    +
  • Communicating with the RPC server.
  • +
  • Managing any ongoing connection or communication resource.
  • +
  • Associating responses with requests.
  • +
  • Associating notifications with subscriptions.
  • +
+

As a result, a Transport may be a simple HTTP client, or a collection of +long-lived tasks.

+

Implementing Transport

+

This trait is blanket implemented for all appropriate types. To implement +this trait, you must implement the [tower::Service] trait with the +appropriate associated types. It cannot be implemented directly.

+

⚠️ Always implement Clone ⚠️

+

Clone is not a bound on Transport, however, transports generally may +not be used as expected unless they implement Clone. For example, only +cloneable transports may be used by the RpcClient in alloy-rpc-client +to send RPC requests, and BoxTransport may only be used to type-erase +Cloneable transports.

+

If you are implementing a transport, make sure it is Clone.

+

Provided Methods§

source

fn boxed(self) -> BoxTransport
where + Self: Sized + Clone + Send + Sync + 'static,

Convert this transport into a boxed trait object.

+

Implementors§

source§

impl<T> Transport for T
where + T: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = TransportError, Future = TransportFut<'static>> + Send + Sync + 'static,

\ No newline at end of file diff --git a/alloy_transport/trait.TransportConnect.html b/alloy_transport/trait.TransportConnect.html new file mode 100644 index 000000000000..988e68ec1eea --- /dev/null +++ b/alloy_transport/trait.TransportConnect.html @@ -0,0 +1,26 @@ +TransportConnect in alloy_transport - Rust +
pub trait TransportConnect: Sized + Send + Sync + 'static {
+    type Transport: Transport + Clone;
+
+    // Required methods
+    fn is_local(&self) -> bool;
+    fn get_transport<'a: 'b, 'b>(
+        &'a self
+    ) -> Pbf<'b, Self::Transport, TransportError>;
+}
Expand description

Connection details for a transport.

+

This object captures the information necessary to establish a transport, +and may encapsulate reconnection logic.

+

Why implement TransportConnect?

+

Users may want to implement transport-connect for the following reasons:

+
    +
  • You want to customize a reqwest::Client before using it.
  • +
  • You need to provide special authentication information to a remote provider.
  • +
  • You have implemented a custom Transport.
  • +
  • You require a specific websocket reconnection strategy.
  • +
+

Required Associated Types§

source

type Transport: Transport + Clone

The transport type that is returned by connect.

+

Required Methods§

source

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.

+
source

fn get_transport<'a: 'b, 'b>( + &'a self +) -> Pbf<'b, Self::Transport, TransportError>

Connect to the transport, returning a Transport instance.

+

Object Safety§

This trait is not object safe.

Implementors§

\ No newline at end of file diff --git a/alloy_transport/trait/index.html b/alloy_transport/trait/index.html new file mode 100644 index 000000000000..9ca69b54e7d4 --- /dev/null +++ b/alloy_transport/trait/index.html @@ -0,0 +1,2 @@ +alloy_transport::trait - Rust +

Module alloy_transport::trait

source ·

Modules

Traits

  • A Transport manages the JSON-RPC request/response lifecycle.
\ No newline at end of file diff --git a/alloy_transport/trait/private/index.html b/alloy_transport/trait/private/index.html new file mode 100644 index 000000000000..6885b0ab0afc --- /dev/null +++ b/alloy_transport/trait/private/index.html @@ -0,0 +1,2 @@ +alloy_transport::trait::private - Rust +

Traits

\ No newline at end of file diff --git a/alloy_transport/trait/private/sidebar-items.js b/alloy_transport/trait/private/sidebar-items.js new file mode 100644 index 000000000000..9276b78edd79 --- /dev/null +++ b/alloy_transport/trait/private/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"trait":["Sealed"]}; \ No newline at end of file diff --git a/alloy_transport/trait/private/trait.Sealed.html b/alloy_transport/trait/private/trait.Sealed.html new file mode 100644 index 000000000000..13a99b22abaf --- /dev/null +++ b/alloy_transport/trait/private/trait.Sealed.html @@ -0,0 +1,3 @@ +Sealed in alloy_transport::trait::private - Rust +
pub trait Sealed { }

Implementors§

source§

impl<T> Sealed for T
where + T: Service<RequestPacket, Response = ResponsePacket, Error = TransportError, Future = TransportFut<'static>> + Send + Sync + 'static,

\ No newline at end of file diff --git a/alloy_transport/trait/sidebar-items.js b/alloy_transport/trait/sidebar-items.js new file mode 100644 index 000000000000..6a4d0e80fd1c --- /dev/null +++ b/alloy_transport/trait/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["private"],"trait":["Transport"]}; \ No newline at end of file diff --git a/alloy_transport/trait/trait.Transport.html b/alloy_transport/trait/trait.Transport.html new file mode 100644 index 000000000000..5921e29da6b3 --- /dev/null +++ b/alloy_transport/trait/trait.Transport.html @@ -0,0 +1,31 @@ +Transport in alloy_transport::trait - Rust +
pub trait Transport: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = TransportError, Future = TransportFut<'static>> + Send + Sync + 'static {
+    // Provided method
+    fn boxed(self) -> BoxTransport
+       where Self: Sized + Clone + Send + Sync + 'static { ... }
+}
Expand description

A Transport manages the JSON-RPC request/response lifecycle.

+

Transports should be instantiated via the TransportConnect trait.

+

Transports are reponsible for the following:

+
    +
  • Communicating with the RPC server.
  • +
  • Managing any ongoing connection or communication resource.
  • +
  • Associating responses with requests.
  • +
  • Associating notifications with subscriptions.
  • +
+

As a result, a Transport may be a simple HTTP client, or a collection of +long-lived tasks.

+

Implementing Transport

+

This trait is blanket implemented for all appropriate types. To implement +this trait, you must implement the [tower::Service] trait with the +appropriate associated types. It cannot be implemented directly.

+

⚠️ Always implement Clone ⚠️

+

Clone is not a bound on Transport, however, transports generally may +not be used as expected unless they implement Clone. For example, only +cloneable transports may be used by the RpcClient in alloy-rpc-client +to send RPC requests, and BoxTransport may only be used to type-erase +Cloneable transports.

+

If you are implementing a transport, make sure it is Clone.

+

Provided Methods§

source

fn boxed(self) -> BoxTransport
where + Self: Sized + Clone + Send + Sync + 'static,

Convert this transport into a boxed trait object.

+

Implementors§

source§

impl<T> Transport for T
where + T: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = TransportError, Future = TransportFut<'static>> + Send + Sync + 'static,

\ No newline at end of file diff --git a/alloy_transport/type.Pbf.html b/alloy_transport/type.Pbf.html new file mode 100644 index 000000000000..dbf76dfdaac6 --- /dev/null +++ b/alloy_transport/type.Pbf.html @@ -0,0 +1,3 @@ +Pbf in alloy_transport - Rust +

Type Alias alloy_transport::Pbf

source ·
pub type Pbf<'a, T, E> = Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'a>>;
Available on non-WebAssembly only.
Expand description

Pin-boxed future.

+

Aliased Type§

struct Pbf<'a, T, E> { /* private fields */ }

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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/type.RpcFut.html b/alloy_transport/type.RpcFut.html new file mode 100644 index 000000000000..3c008a8a1cad --- /dev/null +++ b/alloy_transport/type.RpcFut.html @@ -0,0 +1,3 @@ +RpcFut in alloy_transport - Rust +

Type Alias alloy_transport::RpcFut

source ·
pub type RpcFut<'a, T> = Pin<Box<dyn Future<Output = TransportResult<T>> + Send + 'a>>;
Available on non-WebAssembly only.
Expand description

Future for RPC-level requests.

+

Aliased Type§

struct RpcFut<'a, T> { /* private fields */ }

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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/type.RpcResult.html b/alloy_transport/type.RpcResult.html new file mode 100644 index 000000000000..88627d758299 --- /dev/null +++ b/alloy_transport/type.RpcResult.html @@ -0,0 +1,19 @@ +RpcResult in alloy_transport - Rust +

Type Alias alloy_transport::RpcResult

pub type RpcResult<T, E, ErrResp = Box<RawValue>> = Result<T, RpcError<E, ErrResp>>;
Expand description

The result of a JSON-RPC request.

+

Either a success response, an error response, or a non-response error. The +non-response error is intended to be used for errors returned by a +transport, or serde errors.

+

The common cases are:

+
    +
  • Ok(T) - The server returned a succesful response.
  • +
  • Err(RpcError::ErrorResponse(ErrResp)) - The server returned an error response.
  • +
  • Err(RpcError::SerError(E)) - A serialization error occurred.
  • +
  • Err(RpcError::DeserError { err: E, text: String }) - A deserialization error occurred.
  • +
  • Err(RpcError::TransportError(E)) - Some client-side or communication error occurred.
  • +
+

Aliased Type§

enum RpcResult<T, E, ErrResp = Box<RawValue>> {
+    Ok(T),
+    Err(RpcError<E, ErrResp>),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(RpcError<E, ErrResp>)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_transport/type.TransportError.html b/alloy_transport/type.TransportError.html new file mode 100644 index 000000000000..5cabc47847b5 --- /dev/null +++ b/alloy_transport/type.TransportError.html @@ -0,0 +1,20 @@ +TransportError in alloy_transport - Rust +
pub type TransportError<ErrResp = Box<RawValue>> = RpcError<TransportErrorKind, ErrResp>;
Expand description

A transport error is an [RpcError] containing a TransportErrorKind.

+

Aliased Type§

enum TransportError<ErrResp = Box<RawValue>> {
+    ErrorResp(ErrorPayload<ErrResp>),
+    SerError(Error),
+    DeserError {
+        err: Error,
+        text: String,
+    },
+    Transport(TransportErrorKind),
+}

Variants§

§

ErrorResp(ErrorPayload<ErrResp>)

Server returned an error response.

+
§

SerError(Error)

Tuple Fields

§0: Error

The underlying serde_json error.

+

JSON serialization error.

+
§

DeserError

Fields

§err: Error

The underlying serde_json error.

+
§text: String

For deser errors, the text that failed to deserialize.

+

JSON deserialization error.

+
§

Transport(TransportErrorKind)

Tuple Fields

§0: TransportErrorKind

The underlying transport error.

+

Transport error.

+

This variant is used when the error occurs during communication.

+

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.

\ No newline at end of file diff --git a/alloy_transport/type.TransportFut.html b/alloy_transport/type.TransportFut.html new file mode 100644 index 000000000000..ba9f2343fbe9 --- /dev/null +++ b/alloy_transport/type.TransportFut.html @@ -0,0 +1,3 @@ +TransportFut in alloy_transport - Rust +

Type Alias alloy_transport::TransportFut

source ·
pub type TransportFut<'a, T = ResponsePacket, E = TransportError> = Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'a>>;
Available on non-WebAssembly only.
Expand description

Future for Transport-level requests.

+

Aliased Type§

struct TransportFut<'a, T = ResponsePacket, E = TransportError> { /* private fields */ }

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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/type.TransportResult.html b/alloy_transport/type.TransportResult.html new file mode 100644 index 000000000000..75faab9278f2 --- /dev/null +++ b/alloy_transport/type.TransportResult.html @@ -0,0 +1,8 @@ +TransportResult in alloy_transport - Rust +
pub type TransportResult<T, ErrResp = Box<RawValue>> = RpcResult<T, TransportErrorKind, ErrResp>;
Expand description

A transport result is a Result containing a TransportError.

+

Aliased Type§

enum TransportResult<T, ErrResp = Box<RawValue>> {
+    Ok(T),
+    Err(RpcError<TransportErrorKind, ErrResp>),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(RpcError<TransportErrorKind, ErrResp>)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_transport/type_aliases/index.html b/alloy_transport/type_aliases/index.html new file mode 100644 index 000000000000..968a438d7b39 --- /dev/null +++ b/alloy_transport/type_aliases/index.html @@ -0,0 +1,2 @@ +alloy_transport::type_aliases - Rust +
Available on non-WebAssembly only.

Type Aliases

\ No newline at end of file diff --git a/alloy_transport/type_aliases/sidebar-items.js b/alloy_transport/type_aliases/sidebar-items.js new file mode 100644 index 000000000000..93da3564e0e3 --- /dev/null +++ b/alloy_transport/type_aliases/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"type":["Pbf","RpcFut","TransportFut"]}; \ No newline at end of file diff --git a/alloy_transport/type_aliases/type.Pbf.html b/alloy_transport/type_aliases/type.Pbf.html new file mode 100644 index 000000000000..4bab2550097e --- /dev/null +++ b/alloy_transport/type_aliases/type.Pbf.html @@ -0,0 +1,3 @@ +Pbf in alloy_transport::type_aliases - Rust +

Type Alias alloy_transport::type_aliases::Pbf

source ·
pub type Pbf<'a, T, E> = Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'a>>;
Available on non-WebAssembly only.
Expand description

Pin-boxed future.

+

Aliased Type§

struct Pbf<'a, T, E> { /* private fields */ }

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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/type_aliases/type.RpcFut.html b/alloy_transport/type_aliases/type.RpcFut.html new file mode 100644 index 000000000000..8dff6a433bc2 --- /dev/null +++ b/alloy_transport/type_aliases/type.RpcFut.html @@ -0,0 +1,3 @@ +RpcFut in alloy_transport::type_aliases - Rust +
pub type RpcFut<'a, T> = Pin<Box<dyn Future<Output = TransportResult<T>> + Send + 'a>>;
Available on non-WebAssembly only.
Expand description

Future for RPC-level requests.

+

Aliased Type§

struct RpcFut<'a, T> { /* private fields */ }

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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/type_aliases/type.TransportFut.html b/alloy_transport/type_aliases/type.TransportFut.html new file mode 100644 index 000000000000..b373d46d1b0e --- /dev/null +++ b/alloy_transport/type_aliases/type.TransportFut.html @@ -0,0 +1,3 @@ +TransportFut in alloy_transport::type_aliases - Rust +
pub type TransportFut<'a, T = ResponsePacket, E = TransportError> = Pin<Box<dyn Future<Output = Result<T, E>> + Send + 'a>>;
Available on non-WebAssembly only.
Expand description

Future for Transport-level requests.

+

Aliased Type§

struct TransportFut<'a, T = ResponsePacket, E = TransportError> { /* private fields */ }

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: 16 bytes

\ No newline at end of file diff --git a/alloy_transport/utils/fn.guess_local_url.html b/alloy_transport/utils/fn.guess_local_url.html new file mode 100644 index 000000000000..c515ea8ad91e --- /dev/null +++ b/alloy_transport/utils/fn.guess_local_url.html @@ -0,0 +1,6 @@ +guess_local_url in alloy_transport::utils - Rust +
pub fn guess_local_url(s: impl AsRef<str>) -> bool
Expand description

Guess whether the URL is local, based on the hostname.

+

The ouput of this function is best-efforts, and should be checked if +possible. It simply returns true if the connection has no hostname, +or the hostname is localhost or 127.0.0.1.

+
\ No newline at end of file diff --git a/alloy_transport/utils/fn.to_json_raw_value.html b/alloy_transport/utils/fn.to_json_raw_value.html new file mode 100644 index 000000000000..199db795184f --- /dev/null +++ b/alloy_transport/utils/fn.to_json_raw_value.html @@ -0,0 +1,5 @@ +to_json_raw_value in alloy_transport::utils - Rust +
pub fn to_json_raw_value<S>(s: &S) -> TransportResult<Box<RawValue>>
where + S: Serialize,
Expand description

Convert to a Box<RawValue> from a Serialize type, mapping the error +to a TransportError.

+
\ No newline at end of file diff --git a/alloy_transport/utils/index.html b/alloy_transport/utils/index.html new file mode 100644 index 000000000000..caf688d130f4 --- /dev/null +++ b/alloy_transport/utils/index.html @@ -0,0 +1,4 @@ +alloy_transport::utils - Rust +

Module alloy_transport::utils

source ·
Expand description

Misc. utilities for building transports.

+

Functions

  • Guess whether the URL is local, based on the hostname.
  • Convert to a Box<RawValue> from a Serialize type, mapping the error +to a TransportError.
\ No newline at end of file diff --git a/alloy_transport/utils/sidebar-items.js b/alloy_transport/utils/sidebar-items.js new file mode 100644 index 000000000000..630e0e45d8d5 --- /dev/null +++ b/alloy_transport/utils/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["guess_local_url","to_json_raw_value"]}; \ No newline at end of file diff --git a/alloy_transport_http/all.html b/alloy_transport_http/all.html new file mode 100644 index 000000000000..d52f2e9b5f96 --- /dev/null +++ b/alloy_transport_http/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

\ No newline at end of file diff --git a/alloy_transport_http/hyper/index.html b/alloy_transport_http/hyper/index.html new file mode 100644 index 000000000000..72d433758078 --- /dev/null +++ b/alloy_transport_http/hyper/index.html @@ -0,0 +1,2 @@ +alloy_transport_http::hyper - Rust +
Available on non-WebAssembly and crate feature hyper only.
\ No newline at end of file diff --git a/alloy_transport_http/hyper/sidebar-items.js b/alloy_transport_http/hyper/sidebar-items.js new file mode 100644 index 000000000000..5244ce01ccff --- /dev/null +++ b/alloy_transport_http/hyper/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/alloy_transport_http/index.html b/alloy_transport_http/index.html new file mode 100644 index 000000000000..332f97340148 --- /dev/null +++ b/alloy_transport_http/index.html @@ -0,0 +1,5 @@ +alloy_transport_http - Rust +
Expand description

alloy-transport-http

+

HTTP transport implementation.

+

Modules

Structs

  • An Http transport.
\ No newline at end of file diff --git a/alloy_transport_http/reqwest/index.html b/alloy_transport_http/reqwest/index.html new file mode 100644 index 000000000000..0e6da6bebe2e --- /dev/null +++ b/alloy_transport_http/reqwest/index.html @@ -0,0 +1,2 @@ +alloy_transport_http::reqwest - Rust +
Available on crate feature reqwest only.
\ No newline at end of file diff --git a/alloy_transport_http/reqwest/sidebar-items.js b/alloy_transport_http/reqwest/sidebar-items.js new file mode 100644 index 000000000000..5244ce01ccff --- /dev/null +++ b/alloy_transport_http/reqwest/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/alloy_transport_http/sidebar-items.js b/alloy_transport_http/sidebar-items.js new file mode 100644 index 000000000000..6dddda486bd3 --- /dev/null +++ b/alloy_transport_http/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["hyper","reqwest"],"struct":["Http"]}; \ No newline at end of file diff --git a/alloy_transport_http/struct.Http.html b/alloy_transport_http/struct.Http.html new file mode 100644 index 000000000000..88312a284d15 --- /dev/null +++ b/alloy_transport_http/struct.Http.html @@ -0,0 +1,90 @@ +Http in alloy_transport_http - Rust +
pub struct Http<T> {
+    pub(crate) client: T,
+    pub(crate) url: Url,
+}
Expand description

An Http transport.

+

The user must provide an internal http client and a URL to which to +connect. It implements Service<Box<RawValue>>, and therefore +Transport.

+

Currently supported clients are:

+ +

Fields§

§client: T§url: Url

Implementations§

source§

impl<C> Http<Client<C>>
where + C: Connect + Clone + Send + Sync + 'static,

source

fn request(&self, req: RequestPacket) -> TransportFut<'static>

Available on non-WebAssembly and crate feature hyper only.

Make a request.

+
source§

impl Http<Client>

source

fn request(&self, req: RequestPacket) -> TransportFut<'static>

Available on crate feature reqwest only.

Make a request.

+
source§

impl<T> Http<T>

source

pub fn new(url: Url) -> Self
where + T: Default,

Create a new Http transport.

+
source

pub const fn with_client(client: T, url: Url) -> Self

Create a new Http transport with a custom client.

+
source

pub fn set_url(&mut self, url: Url)

Set the URL.

+
source

pub fn set_client(&mut self, client: T)

Set the client.

+
source

pub fn guess_local(&self) -> bool

Guess whether the URL is local, based on the hostname.

+

The ouput of this function is best-efforts, and should be checked if +possible. It simply returns true if the connection has no hostname, +or the hostname is localhost or 127.0.0.1.

+
source

pub const fn client(&self) -> &T

Get a reference to the client.

+
source

pub fn url(&self) -> &str

Get a reference to the URL.

+

Trait Implementations§

source§

impl<T: Clone> Clone for Http<T>

source§

fn clone(&self) -> Http<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for Http<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<C> Service<RequestPacket> for &Http<Client<C>>
where + C: Connect + Clone + Send + Sync + 'static,

Available on non-WebAssembly and crate feature hyper only.
§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more
source§

impl Service<RequestPacket> for &Http<Client>

Available on crate feature reqwest only.
§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more
source§

impl<C> Service<RequestPacket> for Http<Client<C>>
where + C: Connect + Clone + Send + Sync + 'static,

Available on non-WebAssembly and crate feature hyper only.
§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more
source§

impl Service<RequestPacket> for Http<Client>

Available on crate feature reqwest only.
§

type Response = ResponsePacket

Responses given by the service.
§

type Error = RpcError<TransportErrorKind>

Errors produced by the service.
§

type Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>

The future response value.
source§

fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, req: RequestPacket) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Http<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Http<T>
where + T: Send,

§

impl<T> Sync for Http<T>
where + T: Sync,

§

impl<T> Unpin for Http<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Http<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T, Request> ServiceExt<Request> for T
where + T: Service<Request> + ?Sized,

§

fn ready(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_and(&mut self) -> Ready<'_, Self, Request>
where + Self: Sized,

👎Deprecated since 0.4.6: please use the ServiceExt::ready method instead
Yields a mutable reference to the service when it is ready to accept a request.
§

fn ready_oneshot(self) -> ReadyOneshot<Self, Request>
where + Self: Sized,

Yields the service when it is ready to accept a request.
§

fn oneshot(self, req: Request) -> Oneshot<Self, Request>
where + Self: Sized,

Consume this Service, calling with the providing request once it is ready.
§

fn call_all<S>(self, reqs: S) -> CallAll<Self, S>
where + Self: Sized, + Self::Error: Into<Box<dyn Error + Sync + Send>>, + S: Stream<Item = Request>,

Process all requests from the given Stream, and produce a Stream of their responses. Read more
§

fn and_then<F>(self, f: F) -> AndThen<Self, F>
where + Self: Sized, + F: Clone,

Executes a new future after this service’s future resolves. This does +not alter the behaviour of the poll_ready method. Read more
§

fn map_response<F, Response>(self, f: F) -> MapResponse<Self, F>
where + Self: Sized, + F: FnOnce(Self::Response) -> Response + Clone,

Maps this service’s response value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_err<F, Error>(self, f: F) -> MapErr<Self, F>
where + Self: Sized, + F: FnOnce(Self::Error) -> Error + Clone,

Maps this service’s error value to a different value. This does not +alter the behaviour of the poll_ready method. Read more
§

fn map_result<F, Response, Error>(self, f: F) -> MapResult<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Result<Response, Error> + Clone,

Maps this service’s result type (Result<Self::Response, Self::Error>) +to a different value, regardless of whether the future succeeds or +fails. Read more
§

fn map_request<F, NewRequest>(self, f: F) -> MapRequest<Self, F>
where + Self: Sized, + F: FnMut(NewRequest) -> Request,

Composes a function in front of the service. Read more
§

fn then<F, Response, Error, Fut>(self, f: F) -> Then<Self, F>
where + Self: Sized, + Error: From<Self::Error>, + F: FnOnce(Result<Self::Response, Self::Error>) -> Fut + Clone, + Fut: Future<Output = Result<Response, Error>>,

Composes an asynchronous function after this service. Read more
§

fn map_future<F, Fut, Response, Error>(self, f: F) -> MapFuture<Self, F>
where + Self: Sized, + F: FnMut(Self::Future) -> Fut, + Error: From<Self::Error>, + Fut: Future<Output = Result<Response, Error>>,

Composes a function that transforms futures produced by the service. Read more
§

fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
where + Self: Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Send trait object. Read more
§

fn boxed_clone(self) -> BoxCloneService<Request, Self::Response, Self::Error>
where + Self: Clone + Sized + Send + 'static, + Self::Future: Send + 'static,

Convert the service into a Service + Clone + Send trait object. Read more
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> Transport for T
where + T: Sealed + Service<RequestPacket, Response = ResponsePacket, Error = RpcError<TransportErrorKind>, Future = Pin<Box<dyn Future<Output = Result<ResponsePacket, RpcError<TransportErrorKind>>> + Send>>> + Send + Sync + 'static,

§

fn boxed(self) -> BoxTransport
where + Self: Sized + Clone + Send + Sync + 'static,

Convert this transport into a boxed trait object.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_transport_ipc/all.html b/alloy_transport_ipc/all.html new file mode 100644 index 000000000000..0fd730b1add4 --- /dev/null +++ b/alloy_transport_ipc/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Macros

Type Aliases

\ No newline at end of file diff --git a/alloy_transport_ipc/connect/index.html b/alloy_transport_ipc/connect/index.html new file mode 100644 index 000000000000..0a110956ca5e --- /dev/null +++ b/alloy_transport_ipc/connect/index.html @@ -0,0 +1,2 @@ +alloy_transport_ipc::connect - Rust +

Macros

Structs

\ No newline at end of file diff --git a/alloy_transport_ipc/connect/macro.impl_connect!.html b/alloy_transport_ipc/connect/macro.impl_connect!.html new file mode 100644 index 000000000000..6c12fc4386ab --- /dev/null +++ b/alloy_transport_ipc/connect/macro.impl_connect!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.impl_connect.html...

+ + + \ No newline at end of file diff --git a/alloy_transport_ipc/connect/macro.impl_connect.html b/alloy_transport_ipc/connect/macro.impl_connect.html new file mode 100644 index 000000000000..30e1f876887f --- /dev/null +++ b/alloy_transport_ipc/connect/macro.impl_connect.html @@ -0,0 +1,4 @@ +impl_connect in alloy_transport_ipc::connect - Rust +
macro_rules! impl_connect {
+    ($target:ty) => { ... };
+}
\ No newline at end of file diff --git a/alloy_transport_ipc/connect/sidebar-items.js b/alloy_transport_ipc/connect/sidebar-items.js new file mode 100644 index 000000000000..ec4d7dd29328 --- /dev/null +++ b/alloy_transport_ipc/connect/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"macro":["impl_connect"],"struct":["IpcConnect"]}; \ No newline at end of file diff --git a/alloy_transport_ipc/connect/struct.IpcConnect.html b/alloy_transport_ipc/connect/struct.IpcConnect.html new file mode 100644 index 000000000000..66f29a65cf48 --- /dev/null +++ b/alloy_transport_ipc/connect/struct.IpcConnect.html @@ -0,0 +1,50 @@ +IpcConnect in alloy_transport_ipc::connect - Rust +
pub struct IpcConnect<T> {
+    inner: T,
+}
Expand description

An IPC Connection object.

+

Fields§

§inner: T

Trait Implementations§

source§

impl<T: Clone> Clone for IpcConnect<T>

source§

fn clone(&self) -> IpcConnect<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for IpcConnect<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<CString> for IpcConnect<CString>

source§

fn from(inner: CString) -> Self

Converts to this type from the input type.
source§

impl From<IpcConnect<CString>> for CString

source§

fn from(this: IpcConnect<CString>) -> CString

Converts to this type from the input type.
source§

impl From<IpcConnect<OsString>> for OsString

source§

fn from(this: IpcConnect<OsString>) -> OsString

Converts to this type from the input type.
source§

impl From<IpcConnect<PathBuf>> for PathBuf

source§

fn from(this: IpcConnect<PathBuf>) -> PathBuf

Converts to this type from the input type.
source§

impl From<IpcConnect<String>> for String

source§

fn from(this: IpcConnect<String>) -> String

Converts to this type from the input type.
source§

impl From<OsString> for IpcConnect<OsString>

source§

fn from(inner: OsString) -> Self

Converts to this type from the input type.
source§

impl From<PathBuf> for IpcConnect<PathBuf>

source§

fn from(inner: PathBuf) -> Self

Converts to this type from the input type.
source§

impl From<String> for IpcConnect<String>

source§

fn from(inner: String) -> Self

Converts to this type from the input type.
source§

impl PubSubConnect for IpcConnect<CString>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
source§

impl PubSubConnect for IpcConnect<OsString>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
source§

impl PubSubConnect for IpcConnect<PathBuf>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
source§

impl PubSubConnect for IpcConnect<String>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for IpcConnect<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IpcConnect<T>
where + T: Send,

§

impl<T> Sync for IpcConnect<T>
where + T: Sync,

§

impl<T> Unpin for IpcConnect<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IpcConnect<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_transport_ipc/index.html b/alloy_transport_ipc/index.html new file mode 100644 index 000000000000..d6234ed4126b --- /dev/null +++ b/alloy_transport_ipc/index.html @@ -0,0 +1,5 @@ +alloy_transport_ipc - Rust +
Expand description

alloy-transport-ipc

+

IPC transport implementation.

+

Re-exports

Modules

Structs

Type Aliases

\ No newline at end of file diff --git a/alloy_transport_ipc/mock/index.html b/alloy_transport_ipc/mock/index.html new file mode 100644 index 000000000000..72957050b87a --- /dev/null +++ b/alloy_transport_ipc/mock/index.html @@ -0,0 +1,3 @@ +alloy_transport_ipc::mock - Rust +
Available on crate feature mock only.
Expand description

Mock IPC server.

+

Structs

\ No newline at end of file diff --git a/alloy_transport_ipc/mock/sidebar-items.js b/alloy_transport_ipc/mock/sidebar-items.js new file mode 100644 index 000000000000..a6aed9939c9a --- /dev/null +++ b/alloy_transport_ipc/mock/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["MockIpcServer"]}; \ No newline at end of file diff --git a/alloy_transport_ipc/mock/struct.MockIpcServer.html b/alloy_transport_ipc/mock/struct.MockIpcServer.html new file mode 100644 index 000000000000..de34d34a36b2 --- /dev/null +++ b/alloy_transport_ipc/mock/struct.MockIpcServer.html @@ -0,0 +1,45 @@ +MockIpcServer in alloy_transport_ipc::mock - Rust +
pub struct MockIpcServer {
+    replies: VecDeque<Vec<u8>>,
+    path: NamedTempFile,
+}
Available on crate feature mock only.
Expand description

Mock IPC server.

+

Currently unix socket only, due to use of namedtempfile.

+

Example:

+
use alloy_transport_ipc::MockIpcServer;
+// Instantiate a new mock server.
+let mut server = MockIpcServer::new();
+// Get the path to the socket.
+let path = server.path();
+// Add a reply to the server. Can also use `add_raw_reply` to add a raw
+// byte vector, or `add_response` to add a json-rpc response.
+server.add_reply("hello");
+// Run the server. The first request will get "hello" as a response.
+MockIpcServer::new().spawn();
+

Fields§

§replies: VecDeque<Vec<u8>>

Replies to send, in order

+
§path: NamedTempFile

Path to the socket

+

Implementations§

source§

impl MockIpcServer

source

pub fn new() -> Self

Create a new mock IPC server.

+
source

pub fn add_raw_reply(&mut self, reply: Vec<u8>)

Add a raw reply to the server.

+
source

pub fn add_reply<S: Serialize>(&mut self, s: S)

Add a reply to the server.

+
source

pub fn add_response<S: Serialize>(&mut self, response: Response<S>)

Add a json-rpc response to the server.

+
source

pub fn path(&self) -> PathBuf

Get the path to the socket.

+
source

pub async fn spawn(self)

Run the server.

+

Trait Implementations§

source§

impl Debug for MockIpcServer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for MockIpcServer

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 56 bytes

\ No newline at end of file diff --git a/alloy_transport_ipc/sidebar-items.js b/alloy_transport_ipc/sidebar-items.js new file mode 100644 index 000000000000..5800790a68d9 --- /dev/null +++ b/alloy_transport_ipc/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["connect","mock"],"struct":["IpcBackend","IpcConnect","ReadJsonStream"],"type":["Result"]}; \ No newline at end of file diff --git a/alloy_transport_ipc/struct.IpcBackend.html b/alloy_transport_ipc/struct.IpcBackend.html new file mode 100644 index 000000000000..c66fe5b79d01 --- /dev/null +++ b/alloy_transport_ipc/struct.IpcBackend.html @@ -0,0 +1,27 @@ +IpcBackend in alloy_transport_ipc - Rust +
pub(crate) struct IpcBackend {
+    pub(crate) socket: LocalSocketStream,
+    pub(crate) interface: ConnectionInterface,
+}
Expand description

An IPC backend task.

+

Fields§

§socket: LocalSocketStream§interface: ConnectionInterface

Implementations§

source§

impl IpcBackend

source

pub(crate) async fn connect<'a, I>(name: &I) -> Result<ConnectionHandle, Error>
where + I: ToLocalSocketName<'a> + Clone,

Connect to a local socket. Either a unix socket or a windows named pipe.

+
source

pub(crate) fn spawn(self)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 64 bytes

\ No newline at end of file diff --git a/alloy_transport_ipc/struct.IpcConnect.html b/alloy_transport_ipc/struct.IpcConnect.html new file mode 100644 index 000000000000..f69cf790db9a --- /dev/null +++ b/alloy_transport_ipc/struct.IpcConnect.html @@ -0,0 +1,50 @@ +IpcConnect in alloy_transport_ipc - Rust +
pub struct IpcConnect<T> {
+    inner: T,
+}
Expand description

An IPC Connection object.

+

Fields§

§inner: T

Trait Implementations§

source§

impl<T: Clone> Clone for IpcConnect<T>

source§

fn clone(&self) -> IpcConnect<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for IpcConnect<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<CString> for IpcConnect<CString>

source§

fn from(inner: CString) -> Self

Converts to this type from the input type.
source§

impl From<IpcConnect<CString>> for CString

source§

fn from(this: IpcConnect<CString>) -> CString

Converts to this type from the input type.
source§

impl From<IpcConnect<OsString>> for OsString

source§

fn from(this: IpcConnect<OsString>) -> OsString

Converts to this type from the input type.
source§

impl From<IpcConnect<PathBuf>> for PathBuf

source§

fn from(this: IpcConnect<PathBuf>) -> PathBuf

Converts to this type from the input type.
source§

impl From<IpcConnect<String>> for String

source§

fn from(this: IpcConnect<String>) -> String

Converts to this type from the input type.
source§

impl From<OsString> for IpcConnect<OsString>

source§

fn from(inner: OsString) -> Self

Converts to this type from the input type.
source§

impl From<PathBuf> for IpcConnect<PathBuf>

source§

fn from(inner: PathBuf) -> Self

Converts to this type from the input type.
source§

impl From<String> for IpcConnect<String>

source§

fn from(inner: String) -> Self

Converts to this type from the input type.
source§

impl PubSubConnect for IpcConnect<CString>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
source§

impl PubSubConnect for IpcConnect<OsString>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
source§

impl PubSubConnect for IpcConnect<PathBuf>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.
source§

impl PubSubConnect for IpcConnect<String>

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for IpcConnect<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IpcConnect<T>
where + T: Send,

§

impl<T> Sync for IpcConnect<T>
where + T: Sync,

§

impl<T> Unpin for IpcConnect<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IpcConnect<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_transport_ipc/struct.ReadJsonStream.html b/alloy_transport_ipc/struct.ReadJsonStream.html new file mode 100644 index 000000000000..e54e0b16a0e4 --- /dev/null +++ b/alloy_transport_ipc/struct.ReadJsonStream.html @@ -0,0 +1,250 @@ +ReadJsonStream in alloy_transport_ipc - Rust +
pub struct ReadJsonStream<T> {
+    pub(crate) reader: Compat<T>,
+    pub(crate) buf: BytesMut,
+    pub(crate) drained: bool,
+}
Expand description

A stream of JSON-RPC items, read from an [AsyncRead] stream.

+

Fields§

§reader: Compat<T>

The underlying reader.

+
§buf: BytesMut

A buffer for reading data from the reader.

+
§drained: bool

Whether the buffer has been drained.

+

Implementations§

source§

impl<T> ReadJsonStream<T>

source

pub(crate) fn project<'pin>( + self: Pin<&'pin mut Self> +) -> __ReadJsonStreamProjection<'pin, T>

source

pub(crate) fn project_ref<'pin>( + self: Pin<&'pin Self> +) -> __ReadJsonStreamProjectionRef<'pin, T>

source§

impl<T> ReadJsonStream<T>
where + T: AsyncRead,

source

pub(crate) fn new(reader: T) -> Self

Trait Implementations§

source§

impl<T: Debug> Debug for ReadJsonStream<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> From<T> for ReadJsonStream<T>
where + T: AsyncRead,

source§

fn from(reader: T) -> Self

Converts to this type from the input type.
source§

impl<T> Stream for ReadJsonStream<T>
where + T: AsyncRead,

§

type Item = PubSubItem

Values yielded by the stream.
source§

fn poll_next( + self: Pin<&mut Self>, + cx: &mut Context<'_> +) -> Poll<Option<Self::Item>>

Attempt to pull out the next value of this stream, registering the +current task for wakeup if the value is not yet available, and returning +None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
source§

impl<'pin, T> Unpin for ReadJsonStream<T>
where + __ReadJsonStream<'pin, T>: Unpin,

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for ReadJsonStream<T>
where + T: RefUnwindSafe,

§

impl<T> Send for ReadJsonStream<T>
where + T: Send,

§

impl<T> Sync for ReadJsonStream<T>
where + T: Sync,

§

impl<T> UnwindSafe for ReadJsonStream<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<S> StreamExt for S
where + S: Stream + ?Sized,

§

fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
where + Self: Unpin,

A convenience for calling [Stream::poll_next()] on !Unpin types.
§

fn next(&mut self) -> NextFuture<'_, Self>
where + Self: Unpin,

Retrieves the next item in the stream. Read more
§

fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self>
where + Self: Stream<Item = Result<T, E>> + Unpin,

Retrieves the next item in the stream. Read more
§

fn count(self) -> CountFuture<Self>
where + Self: Sized,

Counts the number of items in the stream. Read more
§

fn map<T, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> T,

Maps items of the stream to new values using a closure. Read more
§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: Stream, + F: FnMut(Self::Item) -> U,

Maps items to streams and then concatenates them. Read more
§

fn flatten(self) -> Flatten<Self>
where + Self: Sized, + Self::Item: Stream,

Concatenates inner streams. Read more
§

fn then<F, Fut>(self, f: F) -> Then<Self, F, Fut>
where + Self: Sized, + F: FnMut(Self::Item) -> Fut, + Fut: Future,

Maps items of the stream to new values using an async closure. Read more
§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Keeps items of the stream for which predicate returns true. Read more
§

fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<T>,

Filters and maps items of the stream using a closure. Read more
§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Takes only the first n items of the stream. Read more
§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Takes items while predicate returns true. Read more
§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Skips the first n items of the stream. Read more
§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Skips items while predicate returns true. Read more
§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Yields every stepth item. Read more
§

fn chain<U>(self, other: U) -> Chain<Self, U>
where + Self: Sized, + U: Stream<Item = Self::Item>,

Appends another stream to the end of this one. Read more
§

fn cloned<'a, T>(self) -> Cloned<Self>
where + Self: Stream<Item = &'a T> + Sized, + T: Clone + 'a,

Clones all items. Read more
§

fn copied<'a, T>(self) -> Copied<Self>
where + Self: Stream<Item = &'a T> + Sized, + T: Copy + 'a,

Copies all items. Read more
§

fn collect<C>(self) -> CollectFuture<Self, C>
where + Self: Sized, + C: Default + Extend<Self::Item>,

Collects all items in the stream into a collection. Read more
§

fn try_collect<T, E, C>(self) -> TryCollectFuture<Self, C>
where + Self: Stream<Item = Result<T, E>> + Sized, + C: Default + Extend<T>,

Collects all items in the fallible stream into a collection. Read more
§

fn partition<B, P>(self, predicate: P) -> PartitionFuture<Self, P, B>
where + Self: Sized, + B: Default + Extend<Self::Item>, + P: FnMut(&Self::Item) -> bool,

Partitions items into those for which predicate is true and those for which it is +false, and then collects them into two collections. Read more
§

fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T>
where + Self: Sized, + F: FnMut(T, Self::Item) -> T,

Accumulates a computation over the stream. Read more
§

fn try_fold<T, E, F, B>( + &mut self, + init: B, + f: F +) -> TryFoldFuture<'_, Self, F, B>
where + Self: Stream<Item = Result<T, E>> + Unpin + Sized, + F: FnMut(B, T) -> Result<B, E>,

Accumulates a fallible computation over the stream. Read more
§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

Maps items of the stream to new values using a state value and a closure. Read more
§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Fuses the stream so that it stops yielding items after the first None. Read more
§

fn cycle(self) -> Cycle<Self>
where + Self: Clone + Sized,

Repeats the stream from beginning to end, forever. Read more
§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Enumerates items, mapping them to (index, item). Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Calls a closure on each item and passes it on. Read more
§

fn nth(&mut self, n: usize) -> NthFuture<'_, Self>
where + Self: Unpin,

Gets the nth item of the stream. Read more
§

fn last(self) -> LastFuture<Self>
where + Self: Sized,

Returns the last item in the stream. Read more
§

fn find<P>(&mut self, predicate: P) -> FindFuture<'_, Self, P>
where + Self: Unpin, + P: FnMut(&Self::Item) -> bool,

Finds the first item of the stream for which predicate returns true. Read more
§

fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F>
where + Self: Unpin, + F: FnMut(Self::Item) -> Option<B>,

Applies a closure to items in the stream and returns the first Some result. Read more
§

fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P>
where + Self: Unpin, + P: FnMut(Self::Item) -> bool,

Finds the index of the first item of the stream for which predicate returns true. Read more
§

fn all<P>(&mut self, predicate: P) -> AllFuture<'_, Self, P>
where + Self: Unpin, + P: FnMut(Self::Item) -> bool,

Tests if predicate returns true for all items in the stream. Read more
§

fn any<P>(&mut self, predicate: P) -> AnyFuture<'_, Self, P>
where + Self: Unpin, + P: FnMut(Self::Item) -> bool,

Tests if predicate returns true for any item in the stream. Read more
§

fn for_each<F>(self, f: F) -> ForEachFuture<Self, F>
where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each item of the stream. Read more
§

fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F>
where + Self: Unpin, + F: FnMut(Self::Item) -> Result<(), E>,

Calls a fallible closure on each item of the stream, stopping on first error. Read more
§

fn zip<U>(self, other: U) -> Zip<Self, U>
where + Self: Sized, + U: Stream,

Zips up two streams into a single stream of pairs. Read more
§

fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB>
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Stream<Item = (A, B)> + Sized,

Collects a stream of pairs into a pair of collections. Read more
§

fn or<S>(self, other: S) -> Or<Self, S>
where + Self: Sized, + S: Stream<Item = Self::Item>,

Merges with other stream, preferring items from self whenever both streams are ready. Read more
§

impl<T> StreamExt for T
where + T: Stream + ?Sized,

§

fn next(&mut self) -> Next<'_, Self>
where + Self: Unpin,

Creates a future that resolves to the next item in the stream. Read more
§

fn into_future(self) -> StreamFuture<Self>
where + Self: Sized + Unpin,

Converts this stream into a future of (next_item, tail_of_stream). +If the stream terminates, then the next item is None. Read more
§

fn map<T, F>(self, f: F) -> Map<Self, F>
where + F: FnMut(Self::Item) -> T, + Self: Sized,

Maps this stream’s items to a different type, returning a new stream of +the resulting type. Read more
§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates a stream which gives the current iteration count as well as +the next value. Read more
§

fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
where + F: FnMut(&Self::Item) -> Fut, + Fut: Future<Output = bool>, + Self: Sized,

Filters the values produced by this stream according to the provided +asynchronous predicate. Read more
§

fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
where + F: FnMut(Self::Item) -> Fut, + Fut: Future<Output = Option<T>>, + Self: Sized,

Filters the values produced by this stream while simultaneously mapping +them to a different type according to the provided asynchronous closure. Read more
§

fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
where + F: FnMut(Self::Item) -> Fut, + Fut: Future, + Self: Sized,

Computes from this stream’s items new items of a different type using +an asynchronous closure. Read more
§

fn collect<C>(self) -> Collect<Self, C>
where + C: Default + Extend<Self::Item>, + Self: Sized,

Transforms a stream into a collection, returning a +future representing the result of that computation. Read more
§

fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Stream<Item = (A, B)>,

Converts a stream of pairs into a future, which +resolves to pair of containers. Read more
§

fn concat(self) -> Concat<Self>
where + Self: Sized, + Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Concatenate all items of a stream into a single extendable +destination, returning a future representing the end result. Read more
§

fn count(self) -> Count<Self>
where + Self: Sized,

Drives the stream to completion, counting the number of items. Read more
§

fn cycle(self) -> Cycle<Self>
where + Self: Sized + Clone,

Repeats a stream endlessly. Read more
§

fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>
where + F: FnMut(T, Self::Item) -> Fut, + Fut: Future<Output = T>, + Self: Sized,

Execute an accumulating asynchronous computation over a stream, +collecting all the values into one final result. Read more
§

fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>
where + F: FnMut(Self::Item) -> Fut, + Fut: Future<Output = bool>, + Self: Sized,

Execute predicate over asynchronous stream, and return true if any element in stream satisfied a predicate. Read more
§

fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>
where + F: FnMut(Self::Item) -> Fut, + Fut: Future<Output = bool>, + Self: Sized,

Execute predicate over asynchronous stream, and return true if all element in stream satisfied a predicate. Read more
§

fn flatten(self) -> Flatten<Self>
where + Self::Item: Stream, + Self: Sized,

Flattens a stream of streams into just one continuous stream. Read more
§

fn flatten_unordered( + self, + limit: impl Into<Option<usize>> +) -> FlattenUnorderedWithFlowController<Self, ()>
where + Self::Item: Stream + Unpin, + Self: Sized,

Available on non-futures_no_atomic_cas and crate feature alloc only.
Flattens a stream of streams into just one continuous stream. Polls +inner streams produced by the base stream concurrently. Read more
§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + F: FnMut(Self::Item) -> U, + U: Stream, + Self: Sized,

Maps a stream like [StreamExt::map] but flattens nested Streams. Read more
§

fn flat_map_unordered<U, F>( + self, + limit: impl Into<Option<usize>>, + f: F +) -> FlatMapUnordered<Self, U, F>
where + U: Stream + Unpin, + F: FnMut(Self::Item) -> U, + Self: Sized,

Available on non-futures_no_atomic_cas and crate feature alloc only.
Maps a stream like [StreamExt::map] but flattens nested Streams +and polls them concurrently, yielding items in any order, as they made +available. Read more
§

fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
where + F: FnMut(&mut S, Self::Item) -> Fut, + Fut: Future<Output = Option<B>>, + Self: Sized,

Combinator similar to [StreamExt::fold] that holds internal state +and produces a new stream. Read more
§

fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
where + F: FnMut(&Self::Item) -> Fut, + Fut: Future<Output = bool>, + Self: Sized,

Skip elements on this stream while the provided asynchronous predicate +resolves to true. Read more
§

fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
where + F: FnMut(&Self::Item) -> Fut, + Fut: Future<Output = bool>, + Self: Sized,

Take elements from this stream while the provided asynchronous predicate +resolves to true. Read more
§

fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
where + Fut: Future, + Self: Sized,

Take elements from this stream until the provided future resolves. Read more
§

fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>
where + F: FnMut(Self::Item) -> Fut, + Fut: Future<Output = ()>, + Self: Sized,

Runs this stream to completion, executing the provided asynchronous +closure for each element on the stream. Read more
§

fn for_each_concurrent<Fut, F>( + self, + limit: impl Into<Option<usize>>, + f: F +) -> ForEachConcurrent<Self, Fut, F>
where + F: FnMut(Self::Item) -> Fut, + Fut: Future<Output = ()>, + Self: Sized,

Available on non-futures_no_atomic_cas and crate feature alloc only.
Runs this stream to completion, executing the provided asynchronous +closure for each element on the stream concurrently as elements become +available. Read more
§

fn take(self, n: usize) -> Take<Self>
where + Self: Sized,

Creates a new stream of at most n items of the underlying stream. Read more
§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates a new stream which skips n items of the underlying stream. Read more
§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Fuse a stream such that poll_next will never +again be called once it has finished. This method can be used to turn +any Stream into a FusedStream. Read more
§

fn by_ref(&mut self) -> &mut Self

Borrows a stream, rather than consuming it. Read more
§

fn catch_unwind(self) -> CatchUnwind<Self>
where + Self: Sized + UnwindSafe,

Available on crate feature std only.
Catches unwinding panics while polling the stream. Read more
§

fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
where + Self: Sized + Send + 'a,

Available on crate feature alloc only.
Wrap the stream in a Box, pinning it. Read more
§

fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
where + Self: Sized + 'a,

Available on crate feature alloc only.
Wrap the stream in a Box, pinning it. Read more
§

fn buffered(self, n: usize) -> Buffered<Self>
where + Self::Item: Future, + Self: Sized,

Available on non-futures_no_atomic_cas and crate feature alloc only.
An adaptor for creating a buffered list of pending futures. Read more
§

fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
where + Self::Item: Future, + Self: Sized,

Available on non-futures_no_atomic_cas and crate feature alloc only.
An adaptor for creating a buffered list of pending futures (unordered). Read more
§

fn zip<St>(self, other: St) -> Zip<Self, St>
where + St: Stream, + Self: Sized,

An adapter for zipping two streams together. Read more
§

fn chain<St>(self, other: St) -> Chain<Self, St>
where + St: Stream<Item = Self::Item>, + Self: Sized,

Adapter for chaining two streams. Read more
§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates a new stream which exposes a peek method. Read more
§

fn chunks(self, capacity: usize) -> Chunks<Self>
where + Self: Sized,

Available on crate feature alloc only.
An adaptor for chunking up items of the stream inside a vector. Read more
§

fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
where + Self: Sized,

Available on crate feature alloc only.
An adaptor for chunking up ready items of the stream inside a vector. Read more
§

fn forward<S>(self, sink: S) -> Forward<Self, S>
where + S: Sink<Self::Ok, Error = Self::Error>, + Self: TryStream + Sized,

Available on crate feature sink only.
A future that completes after the given stream has been fully processed +into the sink and the sink has been flushed and closed. Read more
§

fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
where + Self: Sink<Item> + Sized,

Available on crate feature sink and non-futures_no_atomic_cas and crate feature alloc only.
Splits this Stream + Sink object into separate Sink and Stream +objects. Read more
§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + F: FnMut(&Self::Item), + Self: Sized,

Do something with each item of this stream, afterwards passing it on. Read more
§

fn left_stream<B>(self) -> Either<Self, B>
where + B: Stream<Item = Self::Item>, + Self: Sized,

Wrap this stream in an Either stream, making it the left-hand variant +of that Either. Read more
§

fn right_stream<B>(self) -> Either<B, Self>
where + B: Stream<Item = Self::Item>, + Self: Sized,

Wrap this stream in an Either stream, making it the right-hand variant +of that Either. Read more
§

fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
where + Self: Unpin,

A convenience method for calling [Stream::poll_next] on Unpin +stream types.
§

fn select_next_some(&mut self) -> SelectNextSome<'_, Self>
where + Self: Unpin + FusedStream,

Returns a Future that resolves when the next item in this stream is +ready. Read more
§

impl<T> To for T
where + T: ?Sized,

§

fn to<T>(self) -> T
where + Self: Into<T>,

Converts to T by calling Into<T>::into.
§

fn try_to<T>(self) -> Result<T, Self::Error>
where + Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_transport_ipc/type.Result.html b/alloy_transport_ipc/type.Result.html new file mode 100644 index 000000000000..beca2fe1cd08 --- /dev/null +++ b/alloy_transport_ipc/type.Result.html @@ -0,0 +1,7 @@ +Result in alloy_transport_ipc - Rust +

Type Alias alloy_transport_ipc::Result

source ·
pub(crate) type Result<T> = Result<T, Error>;

Aliased Type§

enum Result<T> {
+    Ok(T),
+    Err(Error),
+}

Variants§

§1.0.0

Ok(T)

Contains the success value

+
§1.0.0

Err(Error)

Contains the error value

+

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.

\ No newline at end of file diff --git a/alloy_transport_ws/all.html b/alloy_transport_ws/all.html new file mode 100644 index 000000000000..f645223c9a84 --- /dev/null +++ b/alloy_transport_ws/all.html @@ -0,0 +1,2 @@ +List of all items in this crate +

List of all items

Structs

Type Aliases

Constants

\ No newline at end of file diff --git a/alloy_transport_ws/index.html b/alloy_transport_ws/index.html new file mode 100644 index 000000000000..ed28ed936863 --- /dev/null +++ b/alloy_transport_ws/index.html @@ -0,0 +1,5 @@ +alloy_transport_ws - Rust +
Expand description

alloy-transport-ws

+

Websocket transport implementation.

+

Modules

Structs

  • An ongoing connection to a backend.
  • WsConnectNon-WebAssembly
    Simple connection details for a websocket connection.
\ No newline at end of file diff --git a/alloy_transport_ws/native/constant.KEEPALIVE.html b/alloy_transport_ws/native/constant.KEEPALIVE.html new file mode 100644 index 000000000000..3fa76e678871 --- /dev/null +++ b/alloy_transport_ws/native/constant.KEEPALIVE.html @@ -0,0 +1,2 @@ +KEEPALIVE in alloy_transport_ws::native - Rust +
const KEEPALIVE: u64 = 10;
Available on non-WebAssembly only.
\ No newline at end of file diff --git a/alloy_transport_ws/native/index.html b/alloy_transport_ws/native/index.html new file mode 100644 index 000000000000..ddbc3d5d12d1 --- /dev/null +++ b/alloy_transport_ws/native/index.html @@ -0,0 +1,2 @@ +alloy_transport_ws::native - Rust +
Available on non-WebAssembly only.

Structs

  • Simple connection details for a websocket connection.

Constants

Type Aliases

\ No newline at end of file diff --git a/alloy_transport_ws/native/sidebar-items.js b/alloy_transport_ws/native/sidebar-items.js new file mode 100644 index 000000000000..80429480335b --- /dev/null +++ b/alloy_transport_ws/native/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["KEEPALIVE"],"struct":["WsConnect"],"type":["TungsteniteStream"]}; \ No newline at end of file diff --git a/alloy_transport_ws/native/struct.WsConnect.html b/alloy_transport_ws/native/struct.WsConnect.html new file mode 100644 index 000000000000..04da05977094 --- /dev/null +++ b/alloy_transport_ws/native/struct.WsConnect.html @@ -0,0 +1,30 @@ +WsConnect in alloy_transport_ws::native - Rust +
pub struct WsConnect {
+    pub url: String,
+    pub auth: Option<Authorization>,
+}
Available on non-WebAssembly only.
Expand description

Simple connection details for a websocket connection.

+

Fields§

§url: String

The URL to connect to.

+
§auth: Option<Authorization>

The authorization header to use.

+

Trait Implementations§

source§

impl Clone for WsConnect

source§

fn clone(&self) -> WsConnect

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WsConnect

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl IntoClientRequest for WsConnect

source§

fn into_client_request(self) -> Result<Request>

Convert into a Request that can be used for a client connection.
source§

impl PubSubConnect for WsConnect

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 56 bytes

\ No newline at end of file diff --git a/alloy_transport_ws/native/type.TungsteniteStream.html b/alloy_transport_ws/native/type.TungsteniteStream.html new file mode 100644 index 000000000000..bd3cdb3ea2fe --- /dev/null +++ b/alloy_transport_ws/native/type.TungsteniteStream.html @@ -0,0 +1,7 @@ +TungsteniteStream in alloy_transport_ws::native - Rust +
type TungsteniteStream = WebSocketStream<MaybeTlsStream<TcpStream>>;
Available on non-WebAssembly only.

Aliased Type§

struct TungsteniteStream {
+    pub(crate) inner: WebSocket<AllowStd<MaybeTlsStream<TcpStream>>>,
+    pub(crate) closing: bool,
+    pub(crate) ended: bool,
+    pub(crate) ready: bool,
+}

Fields§

§inner: WebSocket<AllowStd<MaybeTlsStream<TcpStream>>>§closing: bool§ended: bool§ready: bool

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: 832 bytes

\ No newline at end of file diff --git a/alloy_transport_ws/sidebar-items.js b/alloy_transport_ws/sidebar-items.js new file mode 100644 index 000000000000..3c1526d30c00 --- /dev/null +++ b/alloy_transport_ws/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["native"],"struct":["WsBackend","WsConnect"]}; \ No newline at end of file diff --git a/alloy_transport_ws/struct.WsBackend.html b/alloy_transport_ws/struct.WsBackend.html new file mode 100644 index 000000000000..2c9943adb022 --- /dev/null +++ b/alloy_transport_ws/struct.WsBackend.html @@ -0,0 +1,33 @@ +WsBackend in alloy_transport_ws - Rust +
pub struct WsBackend<T> {
+    pub(crate) socket: T,
+    pub(crate) interface: ConnectionInterface,
+}
Expand description

An ongoing connection to a backend.

+

Users should NEVER instantiate a backend directly. Instead, they should use +PubSubConnect to get a running service with a running backend.

+

Fields§

§socket: T

The websocket connection.

+
§interface: ConnectionInterface

The interface to the connection.

+

Implementations§

source§

impl WsBackend<WebSocketStream<MaybeTlsStream<TcpStream>>>

source

pub async fn handle(&mut self, msg: Message) -> Result<(), ()>

Available on non-WebAssembly only.

Handle a message from the server.

+
source

pub async fn send(&mut self, msg: Box<RawValue>) -> Result<(), Error>

Available on non-WebAssembly only.

Send a message to the server.

+
source

pub fn spawn(self)

Available on non-WebAssembly only.

Spawn a new backend task.

+
source§

impl<T> WsBackend<T>

source

pub async fn handle_text(&mut self, t: String) -> Result<(), ()>

Handle inbound text from the websocket.

+

Trait Implementations§

source§

impl<T: Debug> Debug for WsBackend<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for WsBackend<T>

§

impl<T> Send for WsBackend<T>
where + T: Send,

§

impl<T> Sync for WsBackend<T>
where + T: Sync,

§

impl<T> Unpin for WsBackend<T>
where + T: Unpin,

§

impl<T> !UnwindSafe for WsBackend<T>

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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.

\ No newline at end of file diff --git a/alloy_transport_ws/struct.WsConnect.html b/alloy_transport_ws/struct.WsConnect.html new file mode 100644 index 000000000000..e7b6e19410d0 --- /dev/null +++ b/alloy_transport_ws/struct.WsConnect.html @@ -0,0 +1,30 @@ +WsConnect in alloy_transport_ws - Rust +
pub struct WsConnect {
+    pub url: String,
+    pub auth: Option<Authorization>,
+}
Available on non-WebAssembly only.
Expand description

Simple connection details for a websocket connection.

+

Fields§

§url: String

The URL to connect to.

+
§auth: Option<Authorization>

The authorization header to use.

+

Trait Implementations§

source§

impl Clone for WsConnect

source§

fn clone(&self) -> WsConnect

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WsConnect

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl IntoClientRequest for WsConnect

source§

fn into_client_request(self) -> Result<Request>

Convert into a Request that can be used for a client connection.
source§

impl PubSubConnect for WsConnect

source§

fn is_local(&self) -> bool

Returns true if the transport connects to a local resource.
source§

fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>

Spawn the backend, returning a handle to it. Read more
§

fn try_reconnect<'a, 'b>( + &'a self +) -> Pin<Box<dyn Future<Output = Result<ConnectionHandle, RpcError<TransportErrorKind>>> + Send + 'b>>
where + 'a: 'b,

Attempt to reconnect the transport. Read more
§

fn into_service( + self +) -> Pin<Box<dyn Future<Output = Result<PubSubFrontend, RpcError<TransportErrorKind>>> + Send>>

Convert the configuration object into a service with a running backend.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more

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: 56 bytes

\ No newline at end of file diff --git a/crates.js b/crates.js new file mode 100644 index 000000000000..34cb6cd706bd --- /dev/null +++ b/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["alloy_json_rpc","alloy_networks","alloy_providers","alloy_pubsub","alloy_rpc_client","alloy_rpc_types","alloy_signer","alloy_signer_aws","alloy_signer_ledger","alloy_signer_trezor","alloy_transport","alloy_transport_http","alloy_transport_ipc","alloy_transport_ws"]; \ No newline at end of file diff --git a/help.html b/help.html new file mode 100644 index 000000000000..7fe455e06caf --- /dev/null +++ b/help.html @@ -0,0 +1,2 @@ +Help +

Rustdoc help

Back
\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000000..655401c6d490 --- /dev/null +++ b/index.html @@ -0,0 +1,2 @@ +Index of crates +

List of all crates

\ No newline at end of file diff --git a/search-index.js b/search-index.js new file mode 100644 index 000000000000..9e3aa87beeb4 --- /dev/null +++ b/search-index.js @@ -0,0 +1,18 @@ +var searchIndex = new Map(JSON.parse('[\ +["alloy_json_rpc",{"doc":"Alloy JSON-RPC data types.","t":"PPPIIIIIPPPFPFPPGPPPPPIGFFGFPGGGKKIKPFPPPPPPPOOCOOCOOOOOOOOOCCOOOOCOCCOOHHHOOGPPPNNNNNNNNNNNNNNNNNNNNNNNNNPPGPPNNNNNNNNNNNNNNNNNNNNNNOOFPGPNNNNNNNNNNNNNNNNONONNNNNNNNNNPPPIGGPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNIFFFNNNNNNNNNNNNNNNNNNNNNONNNNNOOONONOONONNNNNNNNNNNNNNNNNNNNNNNEIEEFENNNNNNNCNNOONNNNNCOONNNNNNNNIFNNNNOOOONNNNNNNNOONNNNNNNNIPPGPPNNNNNNNNNNNNNNNNNNNNNNIPPPPIHHH","n":["Batch","Batch","Batch","BorrowedErrorPayload","BorrowedResponse","BorrowedResponsePacket","BorrowedResponsePayload","BorrowedRpcResult","DeserError","Err","Err","ErrorPayload","ErrorResp","EthNotification","Failure","Failure","Id","None","Notification","Number","Ok","Ok","PartiallySerializedRequest","PubSubItem","Request","RequestMeta","RequestPacket","Response","Response","ResponsePacket","ResponsePayload","RpcError","RpcObject","RpcParam","RpcResult","RpcReturn","SerError","SerializedRequest","Single","Single","Single","String","Success","Success","Transport","code","code","common","data","data","error","id","id","id","message","message","meta","meta","meta","method","notification","packet","params","params","payload","payload","request","request","response","result","result","subscription","transform_response","transform_result","try_deserialize_ok","err","text","Id","None","Number","String","as_number","as_string","borrow","borrow_mut","clone","clone_into","cmp","deserialize","eq","fmt","fmt","from","hash","into","is_none","is_number","is_string","partial_cmp","serialize","to_owned","to_string","try_from","try_into","type_id","vzip","DeserError","ErrorResp","RpcError","SerError","Transport","as_error_resp","borrow","borrow_mut","deser_err","err_resp","fmt","fmt","from","from","from","into","is_deser_error","is_error_resp","is_ser_error","is_transport_error","ser_err","source","to_string","try_from","try_into","type_id","vzip","err","text","EthNotification","Notification","PubSubItem","Response","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deserialize","deserialize","fmt","fmt","from","from","into","into","result","serialize","subscription","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","Batch","Batch","Batch","BorrowedResponsePacket","RequestPacket","ResponsePacket","Single","Single","Single","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deserialize","fmt","fmt","from","from","from","from","from_iter","from_iter","into","into","into_owned","into_owned","is_empty","len","push","responses_by_ids","serialize","serialize","subscription_request_ids","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","with_capacity","PartiallySerializedRequest","Request","RequestMeta","SerializedRequest","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","box_params","clone","clone","clone","clone_into","clone_into","clone_into","decompose","fmt","fmt","fmt","from","from","from","id","id","into","into","into","into_owned_params","meta","meta","meta","meta","method","method","params","params","params","params_hash","request","serialize","serialize","serialize","serialized","take_request","to_owned","to_owned","to_owned","try_borrow_params_as","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_params_as","type_id","type_id","type_id","vzip","vzip","vzip","BorrowedErrorPayload","BorrowedResponse","BorrowedResponsePayload","ErrorPayload","Response","ResponsePayload","borrow","borrow_mut","clone","clone_into","deser_err","deser_success","deserialize","error","fmt","from","id","id","into","into_owned","into_owned","is_error","is_success","payload","payload","payload","serialize","to_owned","try_error_as","try_from","try_into","try_success_as","type_id","vzip","BorrowedErrorPayload","ErrorPayload","borrow","borrow_mut","clone","clone_into","code","code","data","data","deser_data","deserialize","fmt","fmt","from","into","into_owned","into_owned","message","message","serialize","to_owned","to_string","try_data_as","try_from","try_into","type_id","vzip","BorrowedResponsePayload","Failure","Failure","ResponsePayload","Success","Success","as_error","as_success","borrow","borrow_mut","clone","clone_into","deserialize_error","deserialize_success","fmt","from","into","into_owned","into_owned","is_error","is_success","to_owned","try_error_as","try_from","try_into","try_success_as","type_id","vzip","BorrowedRpcResult","Err","Err","Ok","Ok","RpcResult","transform_response","transform_result","try_deserialize_ok"],"q":[[0,"alloy_json_rpc"],[75,"alloy_json_rpc::RpcError"],[77,"alloy_json_rpc::common"],[106,"alloy_json_rpc::error"],[133,"alloy_json_rpc::error::RpcError"],[135,"alloy_json_rpc::notification"],[168,"alloy_json_rpc::packet"],[216,"alloy_json_rpc::request"],[280,"alloy_json_rpc::response"],[314,"alloy_json_rpc::response::error"],[342,"alloy_json_rpc::response::payload"],[370,"alloy_json_rpc::result"],[379,"core::result"],[380,"serde_json::raw"],[381,"core::borrow"],[382,"core::option"],[383,"core::cmp"],[384,"serde::de"],[385,"core::fmt"],[386,"core::fmt"],[387,"serde::ser"],[388,"alloc::string"],[389,"core::any"],[390,"serde_json::error"],[391,"core::convert"],[392,"core::fmt"],[393,"core::clone"],[394,"serde::de"],[395,"core::iter::traits::collect"],[396,"std::collections::hash::set"],[397,"alloc::boxed"],[398,"serde_json::error"],[399,"serde::de"]],"d":["A batch of responses.","A batch of requests.","A batch of responses.","A ErrorPayload that has been partially deserialized, …","A Response that has been partially deserialized, borrowing …","A BorrowedResponsePacket is a ResponsePacket that has been …","A ResponsePayload that has been partially deserialized, …","A partially deserialized RpcResult, borrowing from the …","JSON deserialization error.","Contains the error value","Contains the error value","A JSONRPC-2.0 error object.","Server returned an error response.","An ethereum-style notification, not to be confused with a …","An error response payload.","An error response payload.","A JSON-RPC 2.0 ID object. This may be a number, a string, …","Null.","An Ethereum-style notification.","A number.","Contains the success value","Contains the success value","A Request that has been partially serialized. The request …","An item received over an Ethereum pubsub transport. …","A JSON-RPC 2.0 request object.","RequestMeta contains the Id and method name of a request.","A RequestPacket is a SerializedRequest or a batch of …","A JSONRPC-2.0 response object containing a ResponsePayload.","A Response to a JSON-RPC request.","A ResponsePacket is a Response or a batch of responses.","A JSONRPC-2.0 response payload.","An RPC error.","An object that can be used as a JSON-RPC parameter and …","An object that can be used as a JSON-RPC parameter.","The result of a JSON-RPC request.","An object that can be used as a JSON-RPC return value.","JSON serialization error.","A JSON-RPC 2.0 request object that has been serialized, …","A single response.","A single request.","A single response.","A string.","A successful response payload.","A successful response payload.","Transport error.","The error code.","The error code.","","The error data (if any).","The error data (if any).","","The ID of the request that this response is responding to.","The request ID.","The ID of the request that this response is responding to.","The error message (if any).","The error message (if any).","The request metadata (ID and method).","The request metadata (ID and method).","","The method name.","","","The request parameters.","The request parameters.","The response payload.","The response payload.","","","","","The notification payload.","The subscription ID.","Transform a transport response into an RpcResult, …","Transform a transport outcome into an RpcResult, …","Attempt to deserialize the Ok(_) variant of an RpcResult.","The underlying serde_json error.","For deser errors, the text that failed to deserialize.","A JSON-RPC 2.0 ID object. This may be a number, a string, …","Null.","A number.","A string.","Returns the ID as a number, if it is one.","Returns the ID as a string, if it is one.","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","Returns true if the ID is None.","Returns true if the ID is a number.","Returns true if the ID is a string.","","","","","","","","","JSON deserialization error.","Server returned an error response.","An RPC error.","JSON serialization error.","Transport error.","Fallible conversion to an error response.","","","Instantiate a new TransportError from a serde_json::Error …","Instantiate a new TransportError from an error response.","","","","Returns the argument unchanged.","","Calls U::from(self).","Check if the error is a deserialization error.","Check if the error is an error response.","Check if the error is a serialization error.","Check if the error is a transport error.","Instantiate a new TransportError from a serde_json::Error. …","","","","","","","The underlying serde_json error.","For deser errors, the text that failed to deserialize.","An ethereum-style notification, not to be confused with a …","An Ethereum-style notification.","An item received over an Ethereum pubsub transport. …","A Response to a JSON-RPC request.","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","The notification payload.","","The subscription ID.","","","","","","","","","","","A batch of responses.","A batch of requests.","A batch of responses.","A BorrowedResponsePacket is a ResponsePacket that has been …","A RequestPacket is a SerializedRequest or a batch of …","A ResponsePacket is a Response or a batch of responses.","A single response.","A single request.","A single response.","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Convert this borrowed response packet into an owned packet …","Convert this borrowed response packet into an owned packet …","Check if the packet is empty.","Get the number of requests in the packet.","Push a request into the packet.","Find responses by a list of IDs.","","Serialize the packet as a boxed RawValue.","Get the request IDs of all subscription requests in the …","","","","","","","","","","","Create a new empty packet with the given capacity.","A Request that has been partially serialized. The request …","A JSON-RPC 2.0 request object.","RequestMeta contains the Id and method name of a request.","A JSON-RPC 2.0 request object that has been serialized, …","","","","","","","Serialize the request parameters as a boxed RawValue.","","","","","","","Consumes the serialized request, returning the underlying …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Get the request ID.","The request ID.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Clone the request, including the request parameters.","Get the request metadata (ID and Method)","The request metadata (ID and method).","The request metadata (ID and method).","","Get the request method.","The method name.","Get a reference to the serialized request’s params.","The request parameters.","The request parameters.","Get the hash of the serialized request’s params.","","Serialize the request, including the request parameters.","","","Get the serialized request.","Take the serialized request, consuming the …","","","","Attempt to deserialize the params, borrowing from the …","","","","","","","","Attempt to deserialize the params.","","","","","","","","A Response that has been partially deserialized, borrowing …","","","A JSONRPC-2.0 response object containing a ResponsePayload.","","","","","","Attempt to deserialize the Error payload, transforming …","Attempt to deserialize the Success payload, transforming …","","","","Returns the argument unchanged.","The ID of the request that this response is responding to.","The ID of the request that this response is responding to.","Calls U::from(self).","Convert this borrowed response to an owned response by …","Convert this borrowed response to an owned response by …","Returns true if the response is an error.","Returns true if the response is a success.","","The response payload.","The response payload.","","","Attempt to deserialize the error payload, borrowing from …","","","Attempt to deserialize the success payload, borrowing from …","","","A ErrorPayload that has been partially deserialized, …","A JSONRPC-2.0 error object.","","","","","The error code.","The error code.","The error data (if any).","The error data (if any).","Attempt to deserialize the data field.","","","","Returns the argument unchanged.","Calls U::from(self).","Convert this borrowed error payload into an owned payload …","Convert this borrowed error payload into an owned payload …","The error message (if any).","The error message (if any).","","","","Deserialize the error’s data field, borrowing from the …","","","","","A ResponsePayload that has been partially deserialized, …","An error response payload.","An error response payload.","A JSONRPC-2.0 response payload.","A successful response payload.","A successful response payload.","Fallible conversion to the error object.","Fallible conversion to the succesful payload.","","","","","Deserialize an Error payload, if possible, transforming …","Deserialize a Success payload, if possible, transforming …","","Returns the argument unchanged.","Calls U::from(self).","Convert this borrowed response payload into an owned …","Convert this borrowed response payload into an owned …","Returns true if the response payload is an error.","Returns true if the response payload is a success.","","Attempt to deserialize the error payload, borrowing from …","","","Attempt to deserialize the success payload, borrowing from …","","","A partially deserialized RpcResult, borrowing from the …","Contains the error value","Contains the error value","Contains the success value","Contains the success value","The result of a JSON-RPC request.","Transform a transport response into an RpcResult, …","Transform a transport outcome into an RpcResult, …","Attempt to deserialize the Ok(_) variant of an RpcResult."],"i":[40,34,35,0,0,0,0,0,2,5,55,0,2,0,54,53,0,8,31,8,5,55,0,0,0,0,0,0,31,0,0,0,0,0,0,0,2,0,40,34,35,8,54,53,2,52,22,0,52,22,0,51,48,1,52,22,46,45,36,48,0,0,46,45,51,1,0,36,0,0,29,29,0,0,0,56,56,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,56,56,0,31,0,31,29,31,29,31,29,31,29,31,29,31,29,31,29,31,29,31,29,29,29,29,31,29,31,29,31,29,31,29,31,40,34,35,0,0,0,40,34,35,34,35,34,35,34,35,34,35,35,34,35,34,34,35,35,34,35,34,35,40,35,34,34,34,35,34,34,34,34,35,34,35,34,35,34,35,34,35,34,0,0,0,0,48,45,36,48,45,36,45,48,45,36,48,45,36,36,48,45,36,48,45,36,36,48,48,45,36,45,36,46,45,36,36,48,36,46,45,36,36,45,45,36,36,36,48,45,36,45,48,45,36,36,48,45,36,45,48,45,36,48,45,36,0,0,0,0,0,0,1,1,1,1,1,1,1,0,1,1,51,1,1,51,1,1,1,0,51,1,1,1,1,1,1,1,1,1,0,0,22,22,22,22,52,22,52,22,22,22,22,22,22,22,52,22,52,22,22,22,22,22,22,22,22,22,0,54,53,0,54,53,53,53,53,53,53,53,53,53,53,53,53,54,53,53,53,53,53,53,53,53,53,53,0,5,55,5,55,0,0,0,0],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[[1,[-1,-2]]],[[3,[-1,[2,[-3,-2]]]]],[],4,[]],[[[3,[[1,[-1,-2]],-3]]],[[3,[-1,[2,[-3,-2]]]]],[],4,[]],[[[5,[-1,-2,-3]]],[[5,[-4,-2,-3]]],[[7,[6]]],[],4,4],0,0,0,0,0,0,[8,[[10,[9]]]],[8,[[10,[11]]]],[-1,-2,[],[]],[-1,-2,[],[]],[8,8],[[-1,-2],12,[],[]],[[8,8],13],[-1,[[3,[8]]],14],[[8,8],15],[[8,16],17],[[8,16],17],[-1,-1,[]],[[8,-1],12,18],[-1,-2,[],[]],[8,15],[8,15],[8,15],[[8,8],[[10,[13]]]],[[8,-1],3,19],[-1,-2,[],[]],[-1,20,[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,[[[2,[-1,-2]]],[[10,[[22,[-2]]]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[23,-1],[[2,[-2,-3]]],[[24,[11]]],[],[]],[[[22,[-1]]],[[2,[-2,-1]]],4,[]],[[[2,[-1,-2]],16],17,25,25],[[[2,[-1,-2]],16],17,26,[]],[-1,[[2,[-1,-2]]],[],[]],[-1,-1,[]],[27,-1,[]],[-1,-2,[],[]],[[[2,[-1,-2]]],15,[],[]],[[[2,[-1,-2]]],15,[],[]],[[[2,[-1,-2]]],15,[],[]],[[[2,[-1,-2]]],15,[],[]],[23,[[2,[-1,-2]]],[],[]],[[[2,[-1,-2]]],[[10,[28]]],28,[]],[-1,20,[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[29,[-1]]],[[29,[-1]]],30],[31,31],[[-1,-2],12,[],[]],[[-1,-2],12,[],[]],[-1,[[3,[[29,[-2]]]]],14,32],[-1,[[3,[31]]],14],[[[29,[-1]],16],17,25],[[31,16],17],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[[29,[-1]],-2],3,33,19],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[34,34],[[[35,[-1,-2]]],[[35,[-1,-2]]],30,30],[[-1,-2],12,[],[]],[[-1,-2],12,[],[]],[-1,[[3,[[35,[-2,-3]]]]],14,32,32],[[34,16],17],[[[35,[-1,-2]],16],17,25,25],[36,34],[-1,-1,[]],[[[37,[[1,[-1,-2]]]]],[[35,[-1,-2]]],[],[]],[-1,-1,[]],[-1,34,[[39,[],[[38,[36]]]]]],[-3,[[35,[-1,-2]]],[],[],[[39,[],[[38,[[1,[-1,-2]]]]]]]],[-1,-2,[],[]],[-1,-2,[],[]],[40,35],[[[35,[6,6]]],35],[34,15],[34,41],[[34,36],12],[[[35,[-1,-2]],[42,[8]]],[[37,[[1,[-1,-2]]]]],[],[]],[[34,-1],3,19],[34,[[44,[[43,[6]]]]]],[34,[[42,[8]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[41,34],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[45,[-1]]],46,47],[48,48],[[[45,[-1]]],[[45,[-1]]],30],[36,36],[[-1,-2],12,[],[]],[[-1,-2],12,[],[]],[[-1,-2],12,[],[]],[36,[[12,[48,[43,[6]]]]]],[[48,16],17],[[[45,[-1]],16],17,25],[[36,16],17],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[36,8],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[45,[-1]]],[[45,[-1]]],30],[36,48],0,0,0,[36,11],0,[36,[[10,[6]]]],0,0,[36,49],0,[[[45,[-1]]],[[44,[36]]],47],[[[45,[-1]],-2],3,47,19],[[36,-1],3,19],[36,6],[36,[[43,[6]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[45,[-1]]],[[44,[-2]]],[[24,[6]]],32],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[[[45,[-1]]],[[3,[36,-2]]],47,[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[[[45,[-1]]],[[44,[-2]]],[[24,[6]]],50],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[1,[-1,-2]]],[[1,[-1,-2]]],30,30],[[-1,-2],12,[],[]],[[[1,[-1,-2]]],[[3,[[1,[-1,-3]],[1,[-1,-2]]]]],[],[[7,[6]]],50],[[[1,[-1,-2]]],[[3,[[1,[-3,-2]],[1,[-1,-2]]]]],[[24,[6]]],[],50],[-1,[[3,[[1,[-2,-3]]]]],14,32,32],0,[[[1,[-1,-2]],16],17,25,25],[-1,-1,[]],0,0,[-1,-2,[],[]],[51,1],[[[1,[6,6]]],1],[[[1,[-1,-2]]],15,[],[]],[[[1,[-1,-2]]],15,[],[]],0,0,0,[[[1,[-1,-2]],-3],3,33,33,19],[-1,-2,[],[]],[[[1,[-1,-2]]],[[10,[[44,[-3]]]]],[],[[7,[6]]],32],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[[[1,[-1,-2]]],[[10,[[44,[-3]]]]],[[24,[6]]],[],32],[-1,21,[]],[-1,-2,[],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[22,[-1]]],[[22,[-1]]],30],[[-1,-2],12,[],[]],0,0,0,0,[[[22,[-1]]],[[3,[[22,[-2]],[22,[-1]]]]],[[7,[6]]],50],[-1,[[3,[[22,[-2]]]]],14,32],[[[22,[-1]],16],17,25],[[[22,[-1]],16],17,[]],[-1,-1,[]],[-1,-2,[],[]],[52,22],[[[22,[6]]],22],0,0,[[[22,[-1]],-2],3,33,19],[-1,-2,[],[]],[-1,20,[]],[[[22,[-1]]],[[10,[[44,[-2]]]]],[[7,[6]]],32],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,0,[[[53,[-1,-2]]],[[10,[[22,[-2]]]]],[],[]],[[[53,[-1,-2]]],[[10,[-1]]],[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[53,[-1,-2]]],[[53,[-1,-2]]],30,30],[[-1,-2],12,[],[]],[[[53,[-1,-2]]],[[3,[[53,[-1,-3]],[53,[-1,-2]]]]],[],[[7,[6]]],50],[[[53,[-1,-2]]],[[3,[[53,[-3,-2]],[53,[-1,-2]]]]],[[24,[6]]],[],50],[[[53,[-1,-2]],16],17,25,25],[-1,-1,[]],[-1,-2,[],[]],[54,53],[[[53,[6,6]]],53],[[[53,[-1,-2]]],15,[],[]],[[[53,[-1,-2]]],15,[],[]],[-1,-2,[],[]],[[[53,[-1,-2]]],[[10,[[44,[-3]]]]],[],[[7,[6]]],32],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[[[53,[-1,-2]]],[[10,[[44,[-3]]]]],[[24,[6]]],[],32],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,0,[[[1,[-1,-2]]],[[3,[-1,[2,[-3,-2]]]]],[],4,[]],[[[3,[[1,[-1,-2]],-3]]],[[3,[-1,[2,[-3,-2]]]]],[],4,[]],[[[5,[-1,-2,-3]]],[[5,[-4,-2,-3]]],[[7,[6]]],[],4,4]],"c":[],"p":[[5,"Response",280],[6,"RpcError",106],[6,"Result",379],[10,"RpcReturn",0],[8,"RpcResult",370],[5,"RawValue",380],[10,"Borrow",381],[6,"Id",77],[1,"u64"],[6,"Option",382],[1,"str"],[1,"tuple"],[6,"Ordering",383],[10,"Deserializer",384],[1,"bool"],[5,"Formatter",385],[8,"Result",385],[10,"Hasher",386],[10,"Serializer",387],[5,"String",388],[5,"TypeId",389],[5,"ErrorPayload",314],[5,"Error",390],[10,"AsRef",391],[10,"Debug",385],[10,"Display",385],[1,"never"],[10,"Error",392],[5,"EthNotification",135],[10,"Clone",393],[6,"PubSubItem",135],[10,"Deserialize",384],[10,"Serialize",387],[6,"RequestPacket",168],[6,"ResponsePacket",168],[5,"SerializedRequest",216],[5,"Vec",394],[17,"Item"],[10,"IntoIterator",395],[8,"BorrowedResponsePacket",168],[1,"usize"],[5,"HashSet",396],[5,"Box",397],[8,"Result",390],[5,"Request",216],[8,"PartiallySerializedRequest",216],[10,"RpcParam",0],[5,"RequestMeta",216],[8,"B256",398],[10,"DeserializeOwned",384],[8,"BorrowedResponse",280],[8,"BorrowedErrorPayload",314],[6,"ResponsePayload",342],[8,"BorrowedResponsePayload",342],[8,"BorrowedRpcResult",370],[15,"DeserError",133]],"b":[[90,"impl-Display-for-Id"],[91,"impl-Debug-for-Id"],[116,"impl-Debug-for-RpcError%3CE,+ErrResp%3E"],[117,"impl-Display-for-RpcError%3CE,+ErrResp%3E"],[202,"impl-Serialize-for-RequestPacket"],[203,"impl-RequestPacket"],[257,"impl-Request%3CParams%3E"],[258,"impl-Serialize-for-Request%3CParams%3E"],[326,"impl-Debug-for-ErrorPayload%3CErrData%3E"],[327,"impl-Display-for-ErrorPayload%3CErrData%3E"]]}],\ +["alloy_networks",{"doc":"alloy-networks","t":"KKKRKRRM","n":["Eip1559Transaction","Network","Receipt","Receipt","Transaction","TransactionRequest","TransactionResponse","set_gas"],"q":[[0,"alloy_networks"],[8,"ruint::aliases"]],"d":["Captures getters and setters common across EIP-1559 …","Captures type info for network-specific RPC …","Captures getters and setters common across receipts across …","The JSON body of a transaction receipt.","Captures getters and setters common across transactions and","The JSON body of a transaction request.","The JSON body of a transaction response.","Sets the gas price of the transaction."],"i":[0,0,0,4,0,4,4,1],"f":[0,0,0,0,0,0,0,[[1,2],3]],"c":[],"p":[[10,"Transaction",0],[8,"U256",8],[1,"tuple"],[10,"Network",0]],"b":[]}],\ +["alloy_providers",{"doc":"alloy-providers","t":"FKRFKFONNCMNONNNNNNNNMNONMOOOONCNNNONNNCNRFKFONNNNNNNONNMNNONONONONNNNNNNNGPFKPNNNNMNMNMNNMNMNNNNNNOMNMNNMNMNMNMNMNMNMNMNMNMNMNMNMNMNMNNONNNNMNMNNMNMNNMNMNNNNNNNNNNNNNSSSSSIHHH","n":["NetworkRpcClient","Provider","Provider","ProviderBuilder","ProviderLayer","Stack","_pd","borrow","borrow_mut","builder","client","client","client","deref","estimate_gas","estimate_gas","fmt","from","from","get_transaction_count","get_transaction_count","inner","inner","inner","into","layer","layer","network","network","outer","populate_gas","provider","raw_client","send_transaction","send_transaction","transport","try_from","try_into","type_id","utils","vzip","Provider","ProviderBuilder","ProviderLayer","Stack","_pd","borrow","borrow","borrow_mut","borrow_mut","client","from","from","inner","into","into","layer","layer","layer","layer","network","network","new","outer","provider","transport","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","ClientError","ParseError","Provider","TempProvider","UnsupportedBlockIdError","borrow","borrow","borrow_mut","borrow_mut","call","call","create_access_list","create_access_list","debug_trace_transaction","debug_trace_transaction","deserialize","estimate_eip1559_fees","estimate_eip1559_fees","estimate_gas","estimate_gas","fmt","fmt","fmt","from","from","from","get_accounts","get_accounts","get_balance","get_balance","get_block","get_block_by_hash","get_block_by_hash","get_block_by_number","get_block_by_number","get_block_number","get_block_number","get_block_receipts","get_block_receipts","get_chain_id","get_chain_id","get_code_at","get_code_at","get_fee_history","get_fee_history","get_gas_price","get_gas_price","get_logs","get_logs","get_proof","get_proof","get_storage_at","get_storage_at","get_transaction_by_hash","get_transaction_by_hash","get_transaction_count","get_transaction_count","get_transaction_receipt","get_transaction_receipt","get_uncle","get_uncle","inner","inner","into","into","new","new_with_client","raw_request","raw_request","send_raw_transaction","send_raw_transaction","serialize","set_code","set_code","syncing","syncing","to_string","trace_block","trace_block","trace_transaction","trace_transaction","try_from","try_from","try_from","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","with_sender","EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE","EIP1559_FEE_ESTIMATION_PAST_BLOCKS","EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER","EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE","EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE","EstimatorFunction","base_fee_surged","eip1559_default_estimator","estimate_priority_fee"],"q":[[0,"alloy_providers"],[41,"alloy_providers::builder"],[74,"alloy_providers::provider"],[167,"alloy_providers::utils"],[176,"alloy_networks"],[177,"alloy_transport::trait"],[178,"core::clone"],[179,"core::future::future"],[180,"alloc::boxed"],[181,"core::pin"],[182,"core::fmt"],[183,"core::fmt"],[184,"alloy_primitives::bits::address"],[185,"core::result"],[186,"core::any"],[187,"alloy_rpc_types::eth::call"],[188,"alloy_rpc_types::eth::block"],[189,"core::option"],[190,"core::marker"],[191,"core::marker"],[192,"alloy_rpc_types::eth::trace::geth"],[193,"serde::de"],[194,"alloy_primitives::aliases"],[195,"alloy_rpc_types::eth::filter"],[196,"alloy_primitives::aliases"],[197,"ruint::aliases"],[198,"alloy_primitives::bytes_"],[199,"serde::ser"],[200,"reqwest::async_impl::client"],[201,"alloy_transport_http"]],"d":["A network-wrapped RPC client.","Provider is parameterized with a network and a transport. …","","A builder for constructing a Provider from various layers.","A layering abstraction in the vein of tower::Layer","","","","","","Return a reference to the inner RpcClient.","","","","","","","","Returns the argument unchanged.","","Get the transaction count for an address. Used for finding …","Return a reference to the inner Provider.","","","Calls U::from(self).","","","","","","","Alloy main Provider abstraction.","","","Send a transaction to the network.","","","","","Provider-related utilities.","","","A builder for constructing a Provider from various layers.","A layering abstraction in the vein of tower::Layer","","","","","","","Finish the layer stack by providing a root RpcClient, …","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","","","Add a layer to the stack being built. This is similar to …","","Change the network.","","Create a new Stack.","","Finish the layer stack by providing a root Provider, …","","","","","","","","","","","","An abstract provider for interacting with the Ethereum …","Temporary Provider trait to be used until the new Provider …","","","","","","Execute a smart contract call with CallRequest without …","Execute a smart contract call with CallRequest without …","","","","","","Estimates the EIP1559 maxFeePerGas and maxPriorityFeePerGas…","Estimates the EIP1559 maxFeePerGas and maxPriorityFeePerGas…","Estimate the gas needed for a transaction.","Estimate the gas needed for a transaction.","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Gets the accounts in the remote node. This is usually …","Gets the accounts in the remote node. This is usually …","Gets the balance of the account at the specified tag, …","Gets the balance of the account at the specified tag, …","Gets a block by either its hash, tag, or number, with full …","Gets a block by its BlockHash, with full transactions or …","Gets a block by its BlockHash, with full transactions or …","Gets a block by BlockNumberOrTag, with full transactions …","Gets a block by BlockNumberOrTag, with full transactions …","Gets the last block number available.","Gets the last block number available. Gets the last block …","Gets the selected block BlockNumberOrTag receipts.","Gets the selected block BlockNumberOrTag receipts.","Gets the chain ID.","Gets the chain ID.","Gets the bytecode located at the corresponding Address.","Gets the bytecode located at the corresponding Address.","Returns a collection of historical gas information …","Returns a collection of historical gas information …","Gets the current gas price.","Gets the current gas price.","Retrieves a Vec<Log> with the given Filter.","Retrieves a Vec<Log> with the given Filter.","","","Gets the specified storage value from Address.","Gets the specified storage value from Address.","Gets a Transaction by its TxHash.","Gets a Transaction by its TxHash.","Gets the transaction count of the corresponding address.","Gets the transaction count of the corresponding address.","Gets a TransactionReceipt if it exists, by its TxHash.","Gets a TransactionReceipt if it exists, by its TxHash.","Gets an uncle block through the tag BlockId and index U64.","Gets an uncle block through the tag BlockId and index U64.","","","Calls U::from(self).","Calls U::from(self).","","","","Sends a raw request with the methods and params specified …","Sends an already-signed transaction.","Sends an already-signed transaction.","","","","Gets syncing info.","Gets syncing info.","","","","Parity trace transaction.","Parity trace transaction.","","","","","","","","","","","","","The default max priority fee per gas, used in case the …","The number of blocks from the past for which the fee …","The threshold for base fee below which we use the default …","The default percentile of gas premiums that are fetched …","The threshold max change/difference (in %) at which we …","An estimator function for EIP1559 fees.","","The default EIP-1559 fee estimator which is based on the …",""],"i":[0,0,15,0,0,0,19,2,2,0,1,2,2,2,2,1,2,2,2,2,1,1,2,19,2,15,18,18,2,19,1,0,1,2,1,18,2,2,2,0,2,15,0,0,0,19,19,18,19,18,18,19,18,19,19,18,15,19,18,18,18,18,19,19,18,18,19,18,19,18,19,18,19,18,0,29,0,0,29,29,24,29,24,20,24,20,24,20,24,29,20,24,20,24,29,29,24,29,24,24,20,24,20,24,20,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,20,24,24,24,29,24,24,24,20,24,20,24,29,20,24,20,24,29,20,24,20,24,29,24,24,24,24,29,24,29,24,29,24,24,0,0,0,0,0,0,0,0,0],"f":[0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,[1,[[2,[-1,-2]]],3,4],[[[2,[-1,-2]]],[[2,[-1,-2]]],3,[4,5]],0,[[[2,[-1,-2]]],-3,3,4,[]],[[[2,[-1,-2]]],[[8,[[7,[6]]]]],3,[4,5]],[1,[[8,[[7,[6]]]]]],[[[2,[-1,-2]],9],10,[11,3],[11,4]],[[[12,[-1]]],[[2,[-2,-1]]],4,3],[-1,-1,[]],[[[2,[-1,-2]],13],[[8,[[7,[6]]]]],3,[4,5]],[[1,13],[[8,[[7,[6]]]]]],[1,1],[[[2,[-1,-2]]],1,3,[4,5]],0,[-1,-2,[],[]],[[[15,[],[[14,[-1]]]],-4],-1,[[1,[-2,-3]]],3,4,[[1,[-2,-3]]]],0,0,0,0,[1,[[8,[[7,[6]]]]]],0,[1,[[12,[-1]]],4],[[[2,[-1,-2]]],[[8,[[7,[6]]]]],3,[4,5]],[1,[[8,[[7,[6]]]]]],0,[-1,[[16,[-2]]],[],[]],[-1,[[16,[-2]]],[],[]],[-1,17,[]],0,[-1,-2,[],[]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[18,[-3,-1,-2]],[12,[-2]]],[],3,[4,5],[[15,[[2,[-1,-2]],-1,-2]]]],[-1,-1,[]],[-1,-1,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[[[15,[],[[14,[-1]]]],-4],-1,[[1,[-2,-3]]],3,4,[[1,[-2,-3]]]],[[[19,[-1,-4,-5]],-3],-6,4,3,[[1,[-2,-1]]],[[15,[-3,-2,-1]]],[[15,[-2,-1]]],[]],[[[18,[-1,-2,-3]],-4],[[18,[[19,[-3,-4,-1]]]]],[],[],[],[]],0,[[[18,[-1,-2,-3]]],[[18,[-1,-4,-3]]],[],[],[],3],0,[[-1,-2],[[19,[-3,-1,-2]]],[],[],[]],0,[[[18,[-4,-1,-2]],-3],[],3,4,[[1,[-1,-2]]],[[15,[-3,-1,-2]]]],0,[-1,[[16,[-2]]],[],[]],[-1,[[16,[-2]]],[],[]],[-1,[[16,[-2]]],[],[]],[-1,[[16,[-2]]],[],[]],[-1,17,[]],[-1,17,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[20,21,[23,[22]]],[[8,[[7,[6]]]]]],[[[24,[-1]],21,[23,[22]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,21,[23,[22]]],[[8,[[7,[6]]]]]],[[[24,[-1]],21,[23,[22]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,27,28],[[8,[[7,[6]]]]]],[[[24,[-1]],27,28],[[8,[[7,[6]]]]],[4,5,25,26]],[-1,[[16,[29]]],30],[[20,[23,[31]]],[[8,[[7,[6]]]]]],[[[24,[-1]],[23,[31]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,21,[23,[22]]],[[8,[[7,[6]]]]]],[[[24,[-1]],21,[23,[22]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[29,9],10],[[29,9],10],[[[24,[-1]],9],10,[11,4]],[-1,-1,[]],[-1,-1,[]],0,[20,[[8,[[7,[6]]]]]],[[[24,[-1]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,13,[23,[22]]],[[8,[[7,[6]]]]]],[[[24,[-1]],13,[23,[22]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,22,32],[[8,[[7,[6]]]]]],[[20,33,32],[[8,[[7,[6]]]]]],[[[24,[-1]],33,32],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,34,32],[[8,[[7,[6]]]]]],[[[24,[-1]],34,32],[[8,[[7,[6]]]]],[4,5,25,26]],[20,[[8,[[7,[6]]]]]],[[[24,[-1]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,34],[[8,[[7,[6]]]]]],[[[24,[-1]],34],[[8,[[7,[6]]]]],[4,5,25,26]],[20,[[8,[[7,[6]]]]]],[[[24,[-1]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,13,22],[[8,[[7,[6]]]]]],[[[24,[-1]],13,22],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,35,34,[37,[36]]],[[8,[[7,[6]]]]]],[[[24,[-1]],35,34,[37,[36]]],[[8,[[7,[6]]]]],[4,5,25,26]],[20,[[8,[[7,[6]]]]]],[[[24,[-1]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,38],[[8,[[7,[6]]]]]],[[[24,[-1]],38],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,13,[40,[39]],[23,[22]]],[[8,[[7,[6]]]]]],[[[24,[-1]],13,[40,[39]],[23,[22]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,13,39,[23,[22]]],[[8,[[7,[6]]]]]],[[[24,[-1]],13,39,[23,[22]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,27],[[8,[[7,[6]]]]]],[[[24,[-1]],27],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,13,[23,[22]]],[[8,[[7,[6]]]]]],[[[24,[-1]],13,[23,[22]]],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,27],[[8,[[7,[6]]]]]],[[[24,[-1]],27],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,22,41],[[8,[[7,[6]]]]]],[[[24,[-1]],22,41],[[8,[[7,[6]]]]],[4,5,25,26]],[[[24,[-1]]],[[12,[-1]]],[4,5,25,26]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[24,[-1]]],[4,5,25,26]],[[[12,[-1]]],[[24,[-1]]],[4,5,25,26]],[[20,42,-1],[[8,[[7,[6]]]]],[43,25,26,5]],[[[24,[-1]],42,-2],[[8,[[7,[6]]]]],[4,5,25,26],[43,25,26,5]],[[20,44],[[8,[[7,[6]]]]]],[[[24,[-1]],44],[[8,[[7,[6]]]]],[4,5,25,26]],[[29,-1],16,45],[[20,13,42],[[8,[[7,[6]]]]]],[[[24,[-1]],13,42],[[8,[[7,[6]]]]],[4,5,25,26]],[20,[[8,[[7,[6]]]]]],[[[24,[-1]]],[[8,[[7,[6]]]]],[4,5,25,26]],[-1,46,[]],[[20,34],[[8,[[7,[6]]]]]],[[[24,[-1]],34],[[8,[[7,[6]]]]],[4,5,25,26]],[[20,27],[[8,[[7,[6]]]]]],[[[24,[-1]],27],[[8,[[7,[6]]]]],[4,5,25,26]],[-1,[[16,[-2]]],[],[]],[-1,[[16,[-2]]],[],[]],[46,[[16,[[24,[[48,[47]]]],-1]]],[]],[46,[[16,[[24,[[48,[47]]]],-1]]],[]],[42,[[16,[[24,[[48,[47]]]],-1]]],[]],[-1,[[16,[-2]]],[],[]],[-1,[[16,[-2]]],[],[]],[-1,17,[]],[-1,17,[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[24,[-1]],13],[[24,[-1]]],[4,5,25,26]],0,0,0,0,0,0,[35,35],[[35,[40,[[40,[35]]]]],[[49,[35,35]]]],[[[40,[[40,[35]]]]],35]],"c":[],"p":[[10,"Provider",0],[5,"NetworkRpcClient",0],[10,"Network",176],[10,"Transport",177],[10,"Clone",178],[10,"Future",179],[5,"Box",180],[5,"Pin",181],[5,"Formatter",182],[8,"Result",182],[10,"Debug",182],[5,"RpcClient",183],[5,"Address",184],[17,"Provider"],[10,"ProviderLayer",41],[6,"Result",185],[5,"TypeId",186],[5,"ProviderBuilder",41],[5,"Stack",41],[10,"TempProvider",74],[5,"CallRequest",187],[6,"BlockId",188],[6,"Option",189],[5,"Provider",74],[10,"Send",190],[10,"Sync",190],[8,"TxHash",191],[5,"GethDebugTracingOptions",192],[6,"ClientError",74],[10,"Deserializer",193],[8,"EstimatorFunction",167],[1,"bool"],[8,"BlockHash",191],[6,"BlockNumberOrTag",188],[8,"U256",194],[1,"f64"],[1,"slice"],[5,"Filter",195],[8,"StorageKey",191],[5,"Vec",196],[8,"U64",194],[1,"str"],[10,"Serialize",197],[5,"Bytes",198],[10,"Serializer",197],[5,"String",199],[5,"Client",200],[5,"Http",201],[1,"tuple"]],"b":[[94,"impl-Debug-for-ClientError"],[95,"impl-Display-for-ClientError"],[157,"impl-TryFrom%3C%26String%3E-for-Provider%3CHttp%3CClient%3E%3E"],[158,"impl-TryFrom%3CString%3E-for-Provider%3CHttp%3CClient%3E%3E"],[159,"impl-TryFrom%3C%26str%3E-for-Provider%3CHttp%3CClient%3E%3E"]]}],\ +["alloy_pubsub",{"doc":"alloy-pubsub","t":"FFKFCMOOOOCCMCCCOOOOOKMNNMNNFNNNNNNNNNNNNNNNNNNONNNFFNNNNNOONNNNOONNNNNNOOOONNNNNNNNPGPPNNNNNNNNNCCCCFNNNNNNNNNNONNNNONNNONNFNNNNNNNNNONNONNFNNNNNNNNNNONNNNFNNNNNNNNNNNNNOONNNNNNNFNNNONNNNONNONNONNNNNONNNN","n":["ConnectionHandle","ConnectionInterface","PubSubConnect","PubSubFrontend","connect","connect","error","error","from_frontend","from_socket","frontend","handle","is_local","ix","managers","service","shutdown","shutdown","to_frontend","to_socket","tx","PubSubConnect","connect","into_service","into_service","is_local","try_reconnect","try_reconnect","PubSubFrontend","borrow","borrow_mut","call","call","clone","clone_into","fmt","from","get_subscription","into","new","poll_ready","poll_ready","send","send_packet","to_owned","try_from","try_into","tx","type_id","unsubscribe","vzip","ConnectionHandle","ConnectionInterface","borrow","borrow","borrow_mut","borrow_mut","close_with_error","error","error","fmt","fmt","from","from","from_frontend","from_socket","into","into","new","recv_from_frontend","send_to_frontend","shutdown","shutdown","shutdown","to_frontend","to_socket","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","GetSub","PubSubInstruction","Request","Unsubscribe","borrow","borrow_mut","fmt","from","into","try_from","try_into","type_id","vzip","active_sub","in_flight","req","sub","ActiveSubscription","borrow","borrow_mut","clone","clone_into","cmp","eq","fmt","from","hash","into","local_id","new","notify","partial_cmp","request","request","to_owned","try_from","try_into","tx","type_id","vzip","InFlight","borrow","borrow_mut","fmt","from","fulfill","into","method","new","request","request","try_from","try_into","tx","type_id","vzip","RequestManager","borrow","borrow_mut","default","fmt","from","handle_response","insert","into","iter","len","reqs","try_from","try_into","type_id","vzip","SubscriptionManager","borrow","borrow_mut","change_server_id","default","drop_server_ids","fmt","from","get_rx","insert","into","iter","len","local_id_for","local_to_server","local_to_sub","notify","remove_sub","try_from","try_into","type_id","upsert","vzip","PubSubService","borrow","borrow_mut","connect","connector","dispatch_request","fmt","from","get_new_backend","handle","handle_item","handle_sub_response","in_flights","into","reconnect","reqs","service_get_sub","service_ix","service_request","service_unsubscribe","spawn","subs","try_from","try_into","type_id","vzip"],"q":[[0,"alloy_pubsub"],[21,"alloy_pubsub::connect"],[28,"alloy_pubsub::frontend"],[51,"alloy_pubsub::handle"],[84,"alloy_pubsub::ix"],[97,"alloy_pubsub::managers"],[101,"alloy_pubsub::managers::active_sub"],[124,"alloy_pubsub::managers::in_flight"],[140,"alloy_pubsub::managers::req"],[156,"alloy_pubsub::managers::sub"],[179,"alloy_pubsub::service"],[205,"alloy_transport::error"],[206,"alloy_transport::type_aliases"],[207,"alloy_json_rpc::packet"],[208,"core::fmt"],[209,"core::fmt"],[210,"serde_json::raw"],[211,"alloc::boxed"],[212,"tokio::sync::broadcast"],[213,"core::result"],[214,"tokio::sync::mpsc::unbounded"],[215,"core::task::wake"],[216,"core::task::poll"],[217,"alloy_json_rpc::request"],[218,"core::future::future"],[219,"core::pin"],[220,"core::any"],[221,"core::option"],[222,"alloy_json_rpc::notification"],[223,"tokio::sync::mpsc::error"],[224,"core::cmp"],[225,"core::hash"],[226,"alloy_json_rpc::response"],[227,"tokio::sync::oneshot"],[228,"alloy_json_rpc::common"],[229,"core::iter::traits::iterator"],[230,"alloy_primitives::aliases"],[231,"alloy_json_rpc::notification"]],"d":["A handle to a backend. Communicates to a …","The reciprocal of ConnectionHandle.","Configuration objects that contain connection details for …","A PubSubFrontend is Transport composed of a channel to a …","","Spawn the backend, returning a handle to it.","Notification from the backend of a terminal error.","Notifies the frontend of a terminal error.","Inbound channel from frontend.","Inbound channel from remote server via WS.","","","Returns true if the transport connects to a local resource.","","","","Notify the backend of intentional shutdown.","Causes local shutdown when sender is triggered or dropped.","Channel of responses to the frontend","Outbound channel to server.","","Configuration objects that contain connection details for …","Spawn the backend, returning a handle to it.","Convert the configuration object into a service with a …","Convert the configuration object into a service with a …","Returns true if the transport connects to a local resource.","Attempt to reconnect the transport.","Attempt to reconnect the transport.","A PubSubFrontend is Transport composed of a channel to a …","","","","","","","","Returns the argument unchanged.","Get the subscription ID for a local ID.","Calls U::from(self).","Create a new frontend.","","","Send a request.","Send a packet of requests, by breaking it up into …","","","","","","Unsubscribe from a subscription.","","A handle to a backend. Communicates to a …","The reciprocal of ConnectionHandle.","","","","","Close the interface, sending an error to the frontend.","Notification from the backend of a terminal error.","Notifies the frontend of a terminal error.","","","Returns the argument unchanged.","Returns the argument unchanged.","Inbound channel from frontend.","Inbound channel from remote server via WS.","Calls U::from(self).","Calls U::from(self).","Create a new connection handle.","Receive a request from the frontend. Ensures that if the …","Send a pubsub item to the frontend.","Shutdown the backend.","Notify the backend of intentional shutdown.","Causes local shutdown when sender is triggered or dropped.","Channel of responses to the frontend","Outbound channel to server.","","","","","","","","","Get the subscription ID for a local ID.","Instructions for the pubsub service.","Send a request.","Unsubscribe from a subscription.","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","An active subscription.","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","Cached hash of the request, used for sorting and equality.","Create a new active subscription.","Notify the subscription channel of a new value, if any …","","Serialize the request as a boxed RawValue.","The serialized subscription request.","","","","The channel via which notifications are broadcast.","","","An in-flight JSON-RPC request.","","","","Returns the argument unchanged.","Fulfill the request with a response. This consumes the …","Calls U::from(self).","Get the method","Create a new in-flight request.","Get a reference to the serialized request.","The request","","","The channel to send the response on.","","","Manages in-flight requests.","","","","","Returns the argument unchanged.","Handle a response by sending the payload to the waiter.","Insert a new in-flight request.","Calls U::from(self).","Get an iterator over the in-flight requests.","Get the number of in-flight requests.","","","","","","","","","Change the server_id of a subscription.","","Drop all server_ids.","","Returns the argument unchanged.","Get a receiver for a subscription.","Insert a subscription.","Calls U::from(self).","Get an iterator over the subscriptions.","Get the number of subscriptions.","De-alias an alias, getting the original ID.","Tracks the CURRENT server id for a subscription.","The subscriptions.","Notify the subscription channel of a new value, if the sub …","Remove a subscription by its local_id.","","","","Insert or update the server_id for a subscription.","","The service contains the backend handle, a subscription …","","","Create a new service from a connector.","The configuration details required to reconnect.","Dispatch a request to the socket.","","Returns the argument unchanged.","Reconnect by dropping the backend and creating a new one.","The backend handle.","Handle an item from the backend.","Rewrite the subscription id and insert into the …","The request manager.","Calls U::from(self).","Reconnect the backend, re-issue pending requests, and …","The inbound requests.","Service a GetSub instruction.","Service an instruction","Service a request.","Service an unsubscribe instruction.","Spawn the service.","The subscription manager.","","","",""],"i":[0,0,0,0,0,1,2,24,24,2,0,0,1,0,0,0,2,24,24,2,6,0,1,1,1,1,1,1,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0,2,24,2,24,24,2,24,2,24,2,24,24,2,2,24,2,24,24,2,2,24,24,2,2,24,2,24,2,24,2,24,16,0,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,0,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,0,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,0,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,0,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43],"f":[0,0,0,0,0,[1,[[4,[2,3]]]],0,0,0,0,0,0,[1,5],0,0,0,0,0,0,0,0,0,[1,[[4,[2,3]]]],[1,[[4,[6,3]]]],[1,[[4,[6,3]]]],[1,5],[1,[[4,[2,3]]]],[1,[[4,[2,3]]]],0,[-1,-2,[],[]],[-1,-2,[],[]],[[6,7],-1,[]],[[6,7],-1,[]],[6,6],[[-1,-2],8,[],[]],[[6,9],10],[-1,-1,[]],[[6,11],[[15,[[14,[[13,[12]]]],3]]]],[-1,-2,[],[]],[[[17,[16]]],6],[[6,18],[[19,[[15,[8,-1]]]]],[]],[[6,18],[[19,[[15,[8,-1]]]]],[]],[[6,20],[[22,[[13,[21]]]]]],[[6,7],[[22,[[13,[21]]]]]],[-1,-2,[],[]],[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],0,[-1,23,[]],[[6,11],[[15,[8,3]]]],[-1,-2,[],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[24,8],0,0,[[2,9],10],[[24,9],10],[-1,-1,[]],[-1,-1,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[],[[8,[2,24]]]],[24,[[25,[[13,[12]]]]]],[[24,26],[[15,[8,[27,[26]]]]]],[2,8],0,0,0,0,[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],[-1,23,[]],[-1,23,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[16,9],10],[-1,-1,[]],[-1,-2,[],[]],[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],[-1,23,[]],[-1,-2,[],[]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[28,28],[[-1,-2],8,[],[]],[[28,28],29],[[28,28],5],[[28,9],10],[-1,-1,[]],[[28,-1],8,30],[-1,-2,[],[]],0,[20,[[8,[28,[14,[[13,[12]]]]]]]],[[28,[13,[12]]],8],[[28,28],[[25,[29]]]],[28,20],0,[-1,-2,[],[]],[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],0,[-1,23,[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[[31,9],10],[-1,-1,[]],[[31,32],[[25,[[8,[11,31]]]]]],[-1,-2,[],[]],[31,33],[20,[[8,[31,[34,[[15,[32,3]]]]]]]],[31,20],0,[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],0,[-1,23,[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[[],35],[[35,9],10],[-1,-1,[]],[[35,32],[[25,[[8,[11,31]]]]]],[[35,31],8],[-1,-2,[],[]],[35,[[0,[[38,[],[[36,[[8,[37,31]]]]]]]]]],[35,39],0,[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],[-1,23,[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[[40,41,11],8],[[],40],[40,8],[[40,9],10],[-1,-1,[]],[[40,41],[[25,[[14,[[13,[12]]]]]]]],[[40,20,11],[[14,[[13,[12]]]]]],[-1,-2,[],[]],[40,[[0,[[38,[],[[36,[[8,[41,28]]]]]]]]]],[40,39],[[40,11],[[25,[41]]]],0,0,[[40,42],8],[[40,41],8],[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],[-1,23,[]],[[40,20,11],[[14,[[13,[12]]]]]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[15,[6,3]]],1],0,[[[43,[-1]],[13,[12]]],[[44,[8]]],1],[[[43,[-1]],9],10,45],[-1,-1,[]],[[[43,[-1]]],[[15,[2,3]]],1],0,[[[43,[-1]],26],[[44,[8]]],1],[[[43,[-1]],31,11],[[44,[8]]],1],0,[-1,-2,[],[]],[[[43,[-1]]],[[44,[8]]],1],0,[[[43,[-1]],11,[46,[[14,[[13,[12]]]]]]],[[44,[8]]],1],[[[43,[-1]],16],[[44,[8]]],1],[[[43,[-1]],31],[[44,[8]]],1],[[[43,[-1]],11],[[44,[8]]],1],[[[43,[-1]]],8,1],0,[-1,[[15,[-2]]],[],[]],[-1,[[15,[-2]]],[],[]],[-1,23,[]],[-1,-2,[],[]]],"c":[],"p":[[10,"PubSubConnect",21],[5,"ConnectionHandle",51],[8,"TransportError",205],[8,"Pbf",206],[1,"bool"],[5,"PubSubFrontend",28],[6,"RequestPacket",207],[1,"tuple"],[5,"Formatter",208],[8,"Result",208],[8,"U256",209],[5,"RawValue",210],[5,"Box",211],[5,"Receiver",212],[6,"Result",213],[6,"PubSubInstruction",84],[5,"UnboundedSender",214],[5,"Context",215],[6,"Poll",216],[5,"SerializedRequest",217],[10,"Future",218],[5,"Pin",219],[5,"TypeId",220],[5,"ConnectionInterface",51],[6,"Option",221],[6,"PubSubItem",222],[5,"SendError",223],[5,"ActiveSubscription",101],[6,"Ordering",224],[10,"Hasher",225],[5,"InFlight",124],[5,"Response",226],[1,"str"],[5,"Receiver",227],[5,"RequestManager",140],[17,"Item"],[6,"Id",228],[10,"Iterator",229],[1,"usize"],[5,"SubscriptionManager",156],[8,"B256",230],[5,"EthNotification",222],[5,"PubSubService",179],[8,"TransportResult",205],[10,"Debug",208],[5,"Sender",227]],"b":[[31,"impl-Service%3CRequestPacket%3E-for-%26PubSubFrontend"],[32,"impl-Service%3CRequestPacket%3E-for-PubSubFrontend"],[40,"impl-Service%3CRequestPacket%3E-for-PubSubFrontend"],[41,"impl-Service%3CRequestPacket%3E-for-%26PubSubFrontend"]]}],\ +["alloy_rpc_client",{"doc":"alloy-rpc-client","t":"FFFFFFOOCNNNNCOCOCNNNNNNNNNNNNNNNNNOONNNNNNNNOOONNOONNNNNNONNPPGFGIIPPPPPPFONONNNNNNNNONNNNNNNNONNNNNNNNNNNNNNNNOONONNNNNNNNNNNNNNNNNNOOOOOOOOOOFNNONNNNNNNNNNNNNNNNPPGGPPPPFONNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNOOOOOOFNNNNNNNNNONNNONNNNNCNONNNN","n":["BatchRequest","ClientBuilder","IpcConnect","RpcCall","RpcClient","WsConnect","_pd","auth","batch","borrow","borrow","borrow_mut","borrow_mut","builder","builder","call","channels","client","clone","clone","clone_into","clone_into","connect","connect","connect","connect","connect","fmt","fmt","from","from","from","from","from","from","id","inner","into","into","into_client_request","is_local","is_local","is_local","is_local","is_local","is_local","requests","state","to_owned","to_owned","transport","transport","try_from","try_from","try_into","try_into","type_id","type_id","url","vzip","vzip","AwaitingResponse","AwaitingResponse","BatchFuture","BatchRequest","CallStateProj","Channel","ChannelMap","Complete","Complete","Prepared","Prepared","SerError","SerError","Waiter","_resp","add_call","base","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","channels","fmt","fmt","fmt","from","from","from","from","from","inner","into","into","into","into","into_future","into_future","into_future","new","poll","poll","poll_awaiting_response","poll_prepared","poll_ser_error","project","push","push_raw","requests","rx","send","transport","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_poll","try_poll","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","channels","channels","fut","requests","transport","channels","channels","fut","requests","transport","ClientBuilder","borrow","borrow_mut","builder","connect","connect_boxed","default","fmt","from","hyper_http","into","layer","pubsub","reqwest_http","transport","try_from","try_into","type_id","vzip","ws","AwaitingResponse","AwaitingResponse","CallState","CallStateProj","Complete","Complete","Prepared","Prepared","RpcCall","_pd","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","boxed","fmt","fmt","from","from","from","into","into","into","into_future","into_future","into_owned_params","params","poll","poll","poll_awaiting","poll_prepared","project","project","project_ref","state","try_from","try_from","try_from","try_into","try_into","try_into","try_poll","try_poll","type_id","type_id","type_id","vzip","vzip","vzip","connection","fut","request","connection","fut","request","RpcClient","borrow","borrow_mut","boxed","builder","connect","connect_pubsub","fmt","from","get_watcher","id","increment_id","into","is_local","is_local","make_request","new","new_batch","next_id","prepare","pubsub_impl","set_local","transport","try_from","try_into","type_id","vzip"],"q":[[0,"alloy_rpc_client"],[61,"alloy_rpc_client::batch"],[134,"alloy_rpc_client::batch::BatchFuture"],[139,"alloy_rpc_client::batch::CallStateProj"],[144,"alloy_rpc_client::builder"],[164,"alloy_rpc_client::call"],[215,"alloy_rpc_client::call::CallState"],[218,"alloy_rpc_client::call::CallStateProj"],[221,"alloy_rpc_client::client"],[248,"core::clone"],[249,"core::future::future"],[250,"alloc::boxed"],[251,"core::pin"],[252,"alloc::string"],[253,"std::ffi::os_str"],[254,"std::path"],[255,"alloc::ffi::c_str"],[256,"core::fmt"],[257,"core::fmt"],[258,"core::fmt"],[259,"tungstenite::error"],[260,"core::any"],[261,"alloy_transport::error"],[262,"alloy_transport::trait"],[263,"alloy_json_rpc"],[264,"alloy_json_rpc"],[265,"alloy_transport::error"],[266,"core::task::wake"],[267,"core::task::poll"],[268,"alloy_json_rpc::request"],[269,"alloy_json_rpc::request"],[270,"alloy_transport::connect"],[271,"alloy_transport::boxed"],[272,"alloy_transport::connect"],[273,"url"],[274,"hyper::client::connect::http"],[275,"hyper::client::client"],[276,"alloy_transport_http"],[277,"tower_layer::stack"],[278,"alloy_pubsub::frontend"],[279,"alloy_pubsub::connect"],[280,"reqwest::async_impl::client"],[281,"alloy_transport::type_aliases"],[282,"ruint::aliases"],[283,"tokio::sync::broadcast"],[284,"alloy_json_rpc::common"]],"d":["A batch JSON-RPC request, used to bundle requests into a …","A builder for the transport RpcClient.","An IPC Connection object.","A prepared, but unsent, RPC call.","A JSON-RPC client.","Simple connection details for a websocket connection.","","The authorization header to use.","","","","","","","","","The channels to send the responses through.","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","The next request ID to use.","","Calls U::from(self).","Calls U::from(self).","","","","","","","true if the transport is local.","The requests to be sent.","","","","The transport via which the batch will be sent.","The underlying transport.","","","","","","","The URL to connect to.","","","","","","A batch JSON-RPC request, used to bundle requests into a …","","","","","","","","","","Awaits a single response for a request that has been …","","Add a call to the batch.","","","","","","","","","","The channels to send the responses through.","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","Create a new batch request.","","","","","","","","","The requests to be sent.","","Send the batch future via its connection.","The transport via which the batch will be sent.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A builder for the transport RpcClient.","","","","Connect a transport, producing an RpcClient with the …","Connect a transport, producing an RpcClient with a …","","","Returns the argument unchanged.","Convenience function to create a new RpcClient with a hyper","Calls U::from(self).","Add a middleware layer to the stack.","Connect a pubsub transport, producing an RpcClient with …","Convenience function to create a new RpcClient with a …","Create a new RpcClient with the given transport and the …","","","","","Connect a WS transport, producing an RpcClient with the …","","","The states of the RpcCall future.","","","","","","A prepared, but unsent, RPC call.","","","","","","","","Convert this future into a boxed, pinned future, erasing …","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","Convert this call into one with owned params, by cloning …","Get a mutable reference to the params of the request.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A JSON-RPC client.","","","Type erase the service in the transport, allowing it to be …","Create a new ClientBuilder.","Connect to a transport via a TransportConnect implementor.","Connect to a transport via a PubSubConnect implementor.","","Returns the argument unchanged.","Get a broadcast::Receiver for the given subscription ID.","The next request ID to use.","Reserve a request ID value. This is used to generate …","Calls U::from(self).","true if the client believes the transport is local.","true if the transport is local.","Build a JsonRpcRequest with the given method and params.","Create a new RpcClient with the given transport.","Create a new BatchRequest builder.","Reserve a request ID u64.","Prepare an RpcCall.","","Set the is_local flag.","The underlying transport.","","","",""],"i":[0,0,0,0,0,0,52,1,0,1,2,1,2,0,38,0,20,0,1,2,1,2,1,2,2,2,2,1,2,1,2,2,2,2,2,32,2,1,2,1,1,2,2,2,2,32,20,52,1,2,20,32,1,2,1,2,1,2,1,1,2,35,28,0,0,0,0,0,35,28,35,28,35,28,0,22,20,61,20,22,35,28,20,22,35,28,20,20,22,28,20,22,22,35,28,62,20,22,35,28,20,22,28,20,22,28,28,28,28,28,20,20,20,22,20,20,20,22,35,28,20,22,35,28,22,28,20,22,35,28,20,22,35,28,63,64,64,63,63,65,66,66,65,65,0,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,55,54,0,0,55,54,55,54,0,52,55,54,52,55,54,52,52,54,52,55,54,52,55,54,52,54,52,52,52,54,52,54,54,54,52,52,52,55,54,52,55,54,52,54,52,55,54,52,55,54,52,67,68,67,69,70,69,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32],"f":[0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,[1,1],[[[2,[-1]]],[[2,[-1]]],3],[[-1,-2],4,[],[]],[[-1,-2],4,[],[]],[1,[[7,[[6,[5]]]]]],[[[2,[8]]],[[7,[[6,[5]]]]]],[[[2,[9]]],[[7,[[6,[5]]]]]],[[[2,[10]]],[[7,[[6,[5]]]]]],[[[2,[11]]],[[7,[[6,[5]]]]]],[[1,12],[[14,[4,13]]]],[[[2,[-1]],12],[[14,[4,13]]],15],[-1,-1,[]],[8,[[2,[8]]]],[-1,-1,[]],[10,[[2,[10]]]],[9,[[2,[9]]]],[11,[[2,[11]]]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[1,[[14,[[16,[4]],17]]]],[1,18],[[[2,[9]]],18],[[[2,[10]]],18],[[[2,[11]]],18],[[[2,[8]]],18],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,0,[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,19,[]],[-1,19,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[[20,[-1]],21,-2],[[14,[[22,[-3]],23]]],[24,3],25,26],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[[20,[-1]],12],27,15],[[[22,[-1]],12],27,15],[[[28,[-1]],12],27,[24,15]],[-1,-1,[]],[[[31,[[30,[[6,[29]]]]]]],[[22,[-1]]],[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[20,[-1]]],-2,[24,3],[]],[-1,[],[]],[-1,[],[]],[[[32,[-1]]],[[20,[-1]]],[]],[[[7,[[22,[-1]]]],33],[[34,[-2]]],26,[]],[[[7,[[28,[-1]]]],33],[[34,[-2]]],[24,3],[]],[[[7,[[28,[-1]]]],33],[[34,[-2]]],[24,3],[]],[[[7,[[28,[-1]]]],33],[[34,[-2]]],[24,3],[]],[[[7,[[28,[-1]]]],33],[[34,[-2]]],[24,3],[]],[[[7,[[28,[-1]]]]],[[35,[-1]]],24],[[[20,[-1]],[36,[-2]]],[[14,[[22,[-3]],23]]],[],25,26],[[[20,[-1]],37],[[31,[[30,[[6,[29]]]]]]],[]],0,0,[[[20,[-1]]],[[28,[-1]]],[24,3]],0,[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[[[7,[-1]],33],34,[]],[[[7,[-1]],33],34,[]],[-1,19,[]],[-1,19,[]],[-1,19,[]],[-1,19,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,[[[38,[-1]],-2],[[14,[32,23]]],39,40],[[[38,[-1]],-2],[[14,[32,23]]],[[39,[41]]],42],[[],[[38,[43]]]],[[[38,[-1]],12],27,15],[-1,-1,[]],[[[38,[-1]],44],32,[[39,[[47,[[46,[45]]]]]]]],[-1,-2,[],[]],[[[38,[-1]],-2],[[38,[[48,[-2,-1]]]]],[],[]],[[[38,[-1]],-2],[[14,[32,23]]],[[39,[49]]],50],[[[38,[-1]],44],32,[[39,[[47,[51]]]]]],[[[38,[-2]],-1,18],32,24,[[39,[-1]]]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,19,[]],[-1,-2,[],[]],[[[38,[-1]],1],[[14,[32,23]]],[[39,[49]]]],0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[52,[-1,-2,-3]]],[[53,[-3]]],[24,3],25,26],[[[54,[-1,-2]],12],27,25,[24,3]],[[[52,[-1,-2,-3]],12],27,[24,3,15],[25,15],15],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[],[]],[-1,[],[]],[[[52,[-1,-2,-3]]],[[52,[-1,-2,-3]]],[24,3],[25,3],[]],[[[52,[-1,-2,-3]]],-2,[24,3],25,[]],[[[7,[[54,[-1,-2]]]],33],[[34,[-3]]],25,[24,3],[]],[[[7,[[52,[-1,-2,-3]]]],33],[[34,[-4]]],[24,3],25,26,[]],[[[7,[[54,[-1,-2]]]],33],[[34,[-3]]],25,[24,3],[]],[[[7,[[54,[-1,-2]]]],33],[[34,[-3]]],25,[24,3],[]],[[[7,[[54,[-1,-2]]]]],[[55,[-1,-2]]],25,[24,3]],[[[7,[[52,[-1,-2,-3]]]]],[[0,[-1,-2,-3]]],[24,3],25,[]],[[[7,[[52,[-1,-2,-3]]]]],[[0,[-1,-2,-3]]],[24,3],25,[]],0,[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[[[7,[-1]],33],34,[]],[[[7,[-1]],33],34,[]],[-1,19,[]],[-1,19,[]],[-1,19,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[32,[-1]]],[[32,[41]]],[24,3]],[[],[[38,[43]]]],[-2,[[14,[[32,[-1]],23]]],24,[[40,[],[[56,[-1]]]]]],[-1,[[14,[[32,[49]],23]]],50],[[[32,[-1]],12],27,15],[-1,-1,[]],[[[32,[49]],57],[[58,[[6,[29]]]]]],0,[[[32,[-1]]],59,[]],[-1,-2,[],[]],[[[32,[-1]]],18,[]],0,[[[32,[-1]],21,-2],[[36,[-2]]],[],25],[[-1,18],[[32,[-1]]],[]],[[[32,[[47,[-1]]]]],[[20,[[47,[-1]]]]],[]],[[[32,[-1]]],60,[]],[[[32,[-1]],21,-2],[[52,[-1,-2,-3]]],[24,3],25,26],0,[[[32,[-1]],18],4,[]],0,[-1,[[14,[-2]]],[],[]],[-1,[[14,[-2]]],[],[]],[-1,19,[]],[-1,-2,[],[]]],"c":[],"p":[[5,"WsConnect",0],[5,"IpcConnect",0],[10,"Clone",248],[1,"tuple"],[10,"Future",249],[5,"Box",250],[5,"Pin",251],[5,"String",252],[5,"OsString",253],[5,"PathBuf",254],[5,"CString",255],[5,"Formatter",256],[5,"Error",256],[6,"Result",257],[10,"Debug",256],[5,"Request",258],[6,"Error",259],[1,"bool"],[5,"TypeId",260],[5,"BatchRequest",61],[1,"str"],[5,"Waiter",61],[8,"TransportError",261],[10,"Transport",262],[10,"RpcParam",263],[10,"RpcReturn",263],[8,"Result",256],[6,"BatchFuture",61],[5,"RawValue",264],[8,"TransportResult",261],[5,"Receiver",265],[5,"RpcClient",221],[5,"Context",266],[6,"Poll",267],[6,"CallStateProj",61],[5,"Request",268],[5,"SerializedRequest",268],[5,"ClientBuilder",144],[10,"Layer",269],[10,"TransportConnect",270],[5,"BoxTransport",271],[10,"BoxTransportConnect",270],[5,"Identity",272],[5,"Url",273],[5,"HttpConnector",274],[5,"Client",275],[5,"Http",276],[5,"Stack",277],[5,"PubSubFrontend",278],[10,"PubSubConnect",279],[5,"Client",280],[5,"RpcCall",164],[8,"RpcFut",281],[6,"CallState",164],[6,"CallStateProj",164],[17,"Transport"],[8,"U256",282],[5,"Receiver",283],[1,"u64"],[6,"Id",284],[8,"ChannelMap",61],[8,"Channel",61],[15,"Prepared",134],[15,"AwaitingResponse",134],[15,"Prepared",139],[15,"AwaitingResponse",139],[15,"Prepared",215],[15,"AwaitingResponse",215],[15,"Prepared",218],[15,"AwaitingResponse",218]],"b":[[23,"impl-PubSubConnect-for-IpcConnect%3CString%3E"],[24,"impl-PubSubConnect-for-IpcConnect%3COsString%3E"],[25,"impl-PubSubConnect-for-IpcConnect%3CPathBuf%3E"],[26,"impl-PubSubConnect-for-IpcConnect%3CCString%3E"],[30,"impl-From%3CString%3E-for-IpcConnect%3CString%3E"],[32,"impl-From%3CPathBuf%3E-for-IpcConnect%3CPathBuf%3E"],[33,"impl-From%3COsString%3E-for-IpcConnect%3COsString%3E"],[34,"impl-From%3CCString%3E-for-IpcConnect%3CCString%3E"],[41,"impl-PubSubConnect-for-IpcConnect%3COsString%3E"],[42,"impl-PubSubConnect-for-IpcConnect%3CPathBuf%3E"],[43,"impl-PubSubConnect-for-IpcConnect%3CCString%3E"],[44,"impl-PubSubConnect-for-IpcConnect%3CString%3E"]]}],\ +["alloy_rpc_types",{"doc":"Alloy RPC type definitions.","t":"FFFFPPFGGGFGFFFGGFFPFFFFPFFPPFSPPFSPSPPFFFFGGGFFPIPPPPPPPPPFPFPPSPPPFFGPPPPPPPPFFGPPGFFFFFPGFPFFFIIPFFPFFPFGPIFFGFFFPFGFFFFFGPPGFOOOOOOCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCOOOOOOOOOOOOHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCOOOOOOOHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCOOOOOCOOOOOOOOOOOOOOOOOCOOOOOOCOOOOOOCOCHOOOCOOOCOOOOOOOOOOOOOOCOOOOOOOOOOOOOCCOOOOOOOOOOOOOOOOOCOOOOOFFFFFOOOOOOOOOOOOOOOOOEEEEEEEEEECCCCCCECCCCCCCCCFFFFFOOOONNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOONNNNNOONNNNNNNNNNNNNNNNNNNNOONNNNNFGGGFGFFGGFGGPPIPPPPPPPPPPFFPPPPPPFGPPPFIIPFPPPPSNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNOONNNNNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNOOONNOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONOONNNNNNNOOOOOOOOOOOONNNNNNNNNONNNNOOONNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNOOPFFFFFPFGOOOONNNNNNNNNNNNNNONNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNOOONNNNNOONNNNNNNNNOOONNOONNNNNNONNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNONNNNNNNFFONNNNNNNNNNNNNNNNNOONNONOONNNNNNNNNNNPPPFPFGGGFFPPPPPGPIIPIPPPGNONNNONNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOFGPOOONNNNNNONNNNNNNNNNOONNNOOONNNNNNNNFNNNNNNNNNNNNNNNONNNNNNNNNNNNPPPPPPPPPPGGPGGPFPPNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNFNNONNNNONNNNNNNNHNONNNNFIOONNNNONNNNNNONOONNNNNFPPPPGFFFFFFFGFOONNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNOONNOONNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNOOOOOOOOONNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNOOCCCCCPPGNNNNNNNNNNNNNNNOOPFFGPONNNNNNNNNNNNONNNNNNNNNNNNNOOONNNNNOONNOOONNNNNNNNNNNNNNNEEFPEEEPPPFEEPEPPGFGFFFGPPEPPEEEPPFPIOONNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNONONNNNNNNONNNNNNNNNNNONONONONONONNNNNNNNNNOONNNNNNNNNNCNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNOOOCOOCNOOONNNNNNNNNNHOOOOONNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOFFFONNNNNNONNNNNNONNNNNNNNNONNNNNNOOOONNNONOOONNNONNNONNNNNNONNNONNNNOFNNNNNNNNNNNNNNNNFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNGFPPPFGPPPFGFPNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFGGPPPPPPFPFGPFPPPFFPGFFPPPPFGPPFFPPFPGFFGFPPFFFPOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOONOONOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONOOOOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNFOONNONNNNNNNOONNNNNNNNNNNNEEEEEFEEECOOOONNONNCNNNNNOOOOONOOOOOCCNCOONOONNCNCONFFFNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNONNNNNNNNNNNNNNNFOOONNNNNNNNOONNNNNNFOOOONNNNOONONNNOONOOONOOONOOONNNNFNONNNNONNNNNOONONNNNONONONNONNONNNNONFFNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNOONNHNNNNNNNNNNNNONNOPSPSPSSPGNNNNNNNNNNNNNNNNNNPPPFPFPFGGOONNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOONOOONNNNNOOONNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNFFFFFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNOOOOOOOONNNNNNONNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNFSFNNOOOONCNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNOONNHHFHPPGFHHCHHFOPPPPPPPPPPGGPGGPFPPOOOOFOOHOFNNNNNNNNNNNONNNNNNNHCCHCCFFNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNPPGFNNNNNNNNNNNNNNNNHHNNNNNNNNNNNNNNCNNHHFNNNNNNHNNNNHNNNNNNNHHFIOOOOOOFHHGFFGGPPFPPPPPFPFFFFPPGPFPPPPFFPPFPGPFGPFPPGFGFFFGPPPFFPPFPPPPFGFPPPPPFGPPPFFPPFFPPFFFGGIFFGFPPPFFFPOOOOOOOOOOOOOOOCOOOOOOOCOOOOOOOOOOOOOOOOOOOCCOOOOOOOOOOOOOOOOOCOOOOOOOOOOOOOOOCOOOOOOOOCOOOOCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCOOOOOOOOOOOOOOOOFFFOOOOOOOOOOOOOOOOOPPGOOPFFGPOOOOOOOOOOFGFFPFFFPPPPPFPFGPFPPGFGFFFGPPPFPPPPFGFPPPFPIOOOOCOOOOOOOOOOOOOOOOCOOOOOOOOOOOOOCOOOOOOCOOOOOOOOOOOOOOOOOOOOOFFFOOOOOOOOOOOOOOOOOFFGFPPPFGPPPFGFPOOOOOOOFFGGPPPPPPFPFGPFPPPFFPGFFPPPPFGPPFFPPFPGFFGFPPFFFPOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOGFPPPFGPPPFGFPOOOOOOOFOOOOOFFFFFOOOOOOOOOOOOHHSFOOCOOHH","n":["AccessList","AccessListItem","AccessListWithGasUsed","AccountInfo","Array","AtBlockHash","Block","BlockError","BlockHashOrNumber","BlockId","BlockNumHash","BlockNumberOrTag","BlockOverrides","BlockTransactionHashes","BlockTransactionHashesMut","BlockTransactions","BlockTransactionsKind","BloomFilter","Bundle","Call","CallInput","CallInputError","CallRequest","ChainStatus","Create","EIP1186AccountProofResponse","EIP1186StorageProof","EIP1559","EIP1559","EIP1559TransactionRequest","EIP1559_TX_TYPE_ID","EIP2930","EIP2930","EIP2930TransactionRequest","EIP2930_TX_TYPE_ID","EIP4844","EIP4844_TX_TYPE_ID","Earliest","Empty","EthCallResponse","ExtAccountInfo","FeeHistory","Filter","FilterBlockOption","FilterChanges","FilterId","FilterSet","FilteredParams","Finalized","ForkBlock","Full","Full","Full","Hash","Hash","Hashes","Hashes","Hashes","Hashes","Header","Hex","HexStringMissingPrefixError","Info","InvalidSignature","LEGACY_TX_TYPE_ID","Latest","Legacy","Legacy","LegacyTransactionRequest","Log","LogError","Logs","MissingPrefix","None","Num","Number","Number","Number","Number","Parity","ParseBlockHashOrNumberError","ParseBlockNumberError","ParseErr","ParseIntErr","PeerCount","PeerEthProtocolInfo","PeerInfo","PeerNetworkInfo","PeerProtocolsInfo","Peers","Pending","PendingTransactionFilterKind","PipProtocolInfo","Range","RawLog","RecoveredAccount","Rich","RichBlock","RichHeader","RlpDecodeRawBlock","RpcBlockHash","RpcModules","Safe","Signature","StateContext","Str","SyncInfo","SyncStatus","TooManyTopics","Topic","Transaction","TransactionInfo","TransactionKind","TransactionReceipt","TransactionRequest","TransactionStats","Transactions","TxGasAndReward","TxType","TxpoolContent","TxpoolContentFrom","TxpoolInspect","TxpoolInspectSummary","TxpoolStatus","TypedTransactionRequest","Uncle","Value","ValueOrArray","Withdrawal","access_list","access_list","access_list","access_list","access_list","access_list","account","account_proof","active","address","address","address","address","address","address","address","amount","balance","base_fee","base_fee","base_fee_per_gas","base_fee_per_gas","blob_gas_price","blob_gas_used","blob_gas_used","blob_versioned_hashes","blob_versioned_hashes","block_gap","block_hash","block_hash","block_hash","block_hash","block_hash","block_hash","block_number","block_number","block_number","block_number","block_number","block_option","block_override","caps","chain_id","chain_id","chain_id","chain_id","chain_id","code_hash","coinbase","connected","contract_address","cumulative_gas_used","current_block","data","data","data","data","difficulty","difficulty","difficulty","difficulty","effective_gas_price","error","eth","eth","excess_blob_gas","extra_data","extra_info","extra_info","extra_info","filter","first_seen","from","from","from","from","from_int_or_hex","gas","gas","gas","gas","gas_limit","gas_limit","gas_limit","gas_limit","gas_limit","gas_price","gas_price","gas_price","gas_price","gas_price","gas_price","gas_used","gas_used","gas_used","gas_used","gas_used_ratio","hash","hash","hash","hash","hash","head","head","header","hex_error","highest_block","id","index","index","inner","inner","inner","input","input","input","input","input","input","input","is_valid_for_current_chain","json_u256","key","kind","kind","kind","local_address","log_index","logs","logs_bloom","logs_bloom","logs_bloom","max","max_fee_per_blob_gas","max_fee_per_blob_gas","max_fee_per_gas","max_fee_per_gas","max_fee_per_gas","max_fee_per_gas","max_priority_fee_per_gas","max_priority_fee_per_gas","max_priority_fee_per_gas","max_priority_fee_per_gas","meta","miner","mix_hash","module_map","name","name","name","network","nonce","nonce","nonce","nonce","nonce","nonce","nonce","nonce","num","number","number","number","number","oldest_block","other","other","other","other","output","parent_beacon_block_root","parent_hash","parse_int_error","peers","pending","pending","pending","pending","pip","proof","propagated_to","protocols","public_key","pubsub","queued","queued","queued","queued","r","random","raw_log","receipts_root","remote_address","removed","require_canonical","reward","reward","rpc","s","serde_helpers","serialize_hex_string_no_prefix","signature","size","starting_block","state","state_root","state_root","status_code","storage","storage_hash","storage_keys","storage_proof","time","timestamp","to","to","to","to","to","topics","topics","topics","total_difficulty","trace","transaction_hash","transaction_hash","transaction_index","transaction_index","transaction_index","transaction_index","transaction_type","transaction_type","transaction_type","transaction_type","transactions","transactions","transactions_root","txpool","u64_hex","uncles","uncles_hash","uuid","v","validator_index","value","value","value","value","value","value","value","value","version","version","warp_chunks_amount","warp_chunks_processed","withdrawal","withdrawals","withdrawals_root","y_parity","from_block","to_block","AccountInfo","EIP1186AccountProofResponse","EIP1186StorageProof","ExtAccountInfo","RecoveredAccount","account_proof","address","address","balance","code_hash","is_valid_for_current_chain","key","meta","name","name","nonce","proof","public_key","storage_hash","storage_proof","uuid","value","Bundle","CallInput","CallInputError","CallRequest","EthCallResponse","FeeHistory","RawLog","StateContext","TxGasAndReward","Withdrawal","account","block","call","fee","filter","log","logs_bloom","other","pubsub","raw_log","state","syncing","trace","transaction","txpool","withdrawal","AccountInfo","EIP1186AccountProofResponse","EIP1186StorageProof","ExtAccountInfo","RecoveredAccount","account_proof","address","address","balance","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","code_hash","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","into","into","into","into","into","is_valid_for_current_chain","key","meta","name","name","nonce","proof","public_key","serialize","serialize","serialize","serialize","serialize","storage_hash","storage_proof","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","uuid","value","vzip","vzip","vzip","vzip","vzip","Block","BlockError","BlockHashOrNumber","BlockId","BlockNumHash","BlockNumberOrTag","BlockOverrides","BlockTransactionHashes","BlockTransactionHashesInner","BlockTransactionHashesInnerMut","BlockTransactionHashesMut","BlockTransactions","BlockTransactionsKind","Earliest","Finalized","ForkBlock","Full","Full","Full","Full","Hash","Hash","Hashes","Hashes","Hashes","Hashes","Header","HexStringMissingPrefixError","InvalidSignature","Latest","MissingPrefix","Number","Number","Number","ParseBlockHashOrNumberError","ParseBlockNumberError","ParseErr","ParseIntErr","Pending","Rich","RichBlock","RichHeader","RlpDecodeRawBlock","RpcBlockHash","Safe","Uncle","Uncle","Uncle","_IMPL_ARBITRARY_FOR_BlockHashOrNumber","arbitrary","arbitrary_take_rest","arbitrary_with","as_block_hash","as_number","as_number","as_ref","base_fee","base_fee_per_gas","blob_gas_used","block_hash","block_hash","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","coinbase","convert_to_hashes","decode","default","default","default","default","default","deref","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","difficulty","difficulty","encode","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","excess_blob_gas","extra_data","extra_info","extra_info","extra_info","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_hash","from_str","from_str","gas_limit","gas_limit","gas_used","hash","hash","hash","hash","hash","hash","hash","hashes","hashes_mut","header","hex_error","inner","inner","inner","input","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into_components","into_full_block","into_hashes","into_iter","into_iter","is_earliest","is_finalized","is_latest","is_latest","is_number","is_pending","is_pending","is_safe","is_uncle","iter","len","len","length","logs_bloom","matches_block_or_num","miner","mix_hash","new","new","new","next","next","next_back","next_back","nonce","number","number","number","number","other","parent_beacon_block_root","parent_hash","parse_int_error","random","receipts_root","require_canonical","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","size","size_hint","size_hint","size_hint","source","state_root","time","timestamp","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","to_string","to_string","total_difficulty","transactions","transactions_root","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","uncle","uncles","uncles_hash","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","withdrawals","withdrawals_root","All","Bundle","CallInput","CallInputError","CallRequest","EthCallResponse","Index","StateContext","TransactionIndex","access_list","blob_versioned_hashes","block_number","block_override","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chain_id","check_unique_input","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","data","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","eq","eq","error","fee_cap","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","gas","gas_price","has_empty_blob_hashes","hash","hash","index","input","input","input","into","into","into","into","into","into","into","into_input","is_all","max_fee_per_blob_gas","max_fee_per_gas","max_priority_fee_per_gas","maybe_input","new","nonce","output","serialize","serialize","serialize","serialize","serialize","serialize","to","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","transaction_index","transaction_type","transactions","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into_unique_input","type_id","type_id","type_id","type_id","type_id","type_id","type_id","unique_input","value","vzip","vzip","vzip","vzip","vzip","vzip","vzip","FeeHistory","TxGasAndReward","base_fee_per_gas","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","default","deserialize","eq","eq","fmt","fmt","from","from","gas_used","gas_used_ratio","into","into","oldest_block","partial_cmp","reward","reward","serialize","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","Array","Array","AtBlockHash","BloomFilter","Empty","Filter","FilterBlockOption","FilterChanges","FilterId","FilterSet","FilteredParams","Full","Hashes","Hashes","Logs","Num","PendingTransactionFilterKind","Range","RawAddressFilter","RawTopicsFilter","Str","Topic","Transactions","Value","Value","ValueOrArray","address","address","address_filter","as_range","at_block_hash","block_option","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","buf","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","eq","eq","eq","event","event_signature","events","filter","filter_address","filter_block_hash","filter_block_range","filter_topics","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_block","get_block_hash","get_from_block","get_from_block","get_to_block","get_to_block","has_topics","hash","hash","hash","hash","hash","into","into","into","into","into","into","into","into","into","is_empty","is_paginatable","len","matches","matches","matches_address","matches_topics","new","new","select","serialize","serialize","serialize","serialize","serialize","set_from_block","set_hash","set_to_block","to_block","to_bloom_filter","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_value_or_array","topic0","topic1","topic2","topic3","topics","topics_filter","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","from_block","to_block","Log","LogError","TooManyTopics","address","block_hash","block_number","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","data","deserialize","eq","fmt","fmt","fmt","from","from","hash","into","into","log_index","removed","serialize","to_owned","to_string","topics","transaction_hash","transaction_index","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","OtherFields","as_ref","borrow","borrow_mut","clone","clone_into","default","deref","deref_mut","deserialize","deserialize_into","eq","fmt","from","get_deserialized","get_with","inner","into","into_iter","into_iter","remove_deserialized","remove_entry_deserialized","remove_with","serialize","to_owned","try_from","try_into","type_id","vzip","Bool","Detailed","FullTransaction","Header","Log","Logs","Logs","NewHeads","NewPendingTransactions","None","Params","PubSubSyncStatus","Simple","SubscriptionKind","SubscriptionResult","SyncState","SyncStatusMetadata","Syncing","TransactionHash","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","current_block","default","deserialize","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","hash","highest_block","into","into","into","into","into","is_bool","is_logs","serialize","serialize","serialize","serialize","serialize","starting_block","syncing","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","Log","_alloy_rlp_payload_length","_alloy_rlp_payload_length","address","borrow","borrow_mut","clone","clone_into","data","decode","default","encode","eq","fmt","from","into","length","logs_bloom","to_owned","topics","try_from","try_into","type_id","vzip","AccountOverride","StateOverride","balance","base","borrow","borrow_mut","clone","clone_into","code","default","deserialize","eq","fmt","from","into","nonce","serialize","state","state_diff","to_owned","try_from","try_into","type_id","vzip","ChainStatus","Hex","Info","None","Number","PeerCount","PeerEthProtocolInfo","PeerInfo","PeerNetworkInfo","PeerProtocolsInfo","Peers","PipProtocolInfo","SyncInfo","SyncStatus","TransactionStats","active","block_gap","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","caps","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","connected","current_block","default","default","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","difficulty","difficulty","eq","eq","eth","first_seen","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","head","head","highest_block","id","into","into","into","into","into","into","into","into","into","into","into","local_address","max","name","network","peers","pip","propagated_to","protocols","remote_address","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","starting_block","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","version","version","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","warp_chunks_amount","warp_chunks_processed","common","filter","geth","parity","tracerequest","Error","Success","TraceResult","borrow","borrow_mut","clone","clone_into","deserialize","eq","fmt","from","into","serialize","to_owned","try_from","try_into","type_id","vzip","error","result","Intersection","TraceFilter","TraceFilterMatcher","TraceFilterMode","Union","after","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","count","default","default","deserialize","deserialize","eq","eq","eq","fmt","fmt","fmt","from","from","from","from_address","from_addresses","from_block","into","into","into","matcher","matches","mode","mode","serialize","serialize","to_address","to_addresses","to_block","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","AccountChangeKind","AccountState","BlockTraceResult","BuiltInTracer","CallConfig","CallFrame","CallLogFrame","CallTracer","CallTracer","Default","DefaultFrame","DiffMode","DiffStateKind","Error","FourByteFrame","FourByteTracer","FourByteTracer","GethDebugBuiltInTracerType","GethDebugTracerConfig","GethDebugTracerType","GethDebugTracingCallOptions","GethDebugTracingOptions","GethDefaultTracingOptions","GethTrace","JS","JsTracer","NoopFrame","NoopTracer","NoopTracer","PreStateConfig","PreStateFrame","PreStateMode","PreStateTracer","PreStateTracer","StructLog","Success","TraceResult","block","block_overrides","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","call","call_config","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","config","debug","debug","default","default","default","default","default","default","default","depth","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","disable_memory","disable_memory","disable_return_data","disable_return_data","disable_stack","disable_stack","disable_storage","disable_storage","enable_memory","enable_memory","enable_return_data","enable_return_data","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","error","failed","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","four_byte","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from_value","gas","gas","gas_cost","hash","into","into","into","into","into","into","into","into","into","into","into_call_config","into_json","into_pre_state_config","is_memory_enabled","is_null","is_return_data_enabled","is_stack_enabled","is_storage_enabled","limit","memory","memory_size","noop","op","pc","pre_state","prestate_config","refund_counter","return_data","return_value","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize_string_storage_map_opt","stack","state_overrides","storage","struct_logs","timeout","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","tracer","tracer_config","traces","tracing_options","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","with_debug","with_disable_memory","with_disable_return_data","with_disable_stack","with_disable_storage","with_enable_memory","with_enable_return_data","with_limit","with_timeout","with_tracer","error","result","CallConfig","CallFrame","CallLogFrame","address","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","calls","clone","clone","clone","clone_into","clone_into","clone_into","data","default","default","default","deserialize","deserialize","deserialize","eq","eq","eq","error","fmt","fmt","fmt","from","from","from","from","gas","gas_used","input","into","into","into","logs","only_top_call","only_top_call","output","revert_reason","serialize","serialize","serialize","to","to_owned","to_owned","to_owned","topics","try_from","try_from","try_from","try_into","try_into","try_into","typ","type_id","type_id","type_id","value","vzip","vzip","vzip","with_log","with_log","FourByteFrame","borrow","borrow_mut","clone","clone_into","default","deserialize","eq","fmt","from","into","serialize","to_owned","try_from","try_into","type_id","vzip","NoopFrame","Null","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","cmp","default","default","deserialize","deserialize","eq","eq","fmt","fmt","from","from","into","into","partial_cmp","serialize","serialize","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","AccountChangeKind","AccountState","Create","Default","Diff","DiffMode","DiffStateKind","Modify","Post","Pre","PreStateConfig","PreStateFrame","PreStateMode","SelfDestruct","as_default","as_diff","balance","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","code","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","diff_mode","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from_account_info","hash","hash","into","into","into","into","into","into","into","is_created","is_default","is_default_mode","is_diff","is_diff_mode","is_modified","is_post","is_pre","is_selfdestruct","nonce","post","pre","remove_matching_account_info","remove_zero_storage_values","retain_changed","serialize","serialize","serialize","serialize","serialize","serialize","storage","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","vzip","AccountDiff","Action","ActionType","Added","Block","Call","Call","Call","Call","CallAction","CallCode","CallOutput","CallType","Changed","ChangedType","Create","Create","Create","CreateAction","CreateOutput","DelegateCall","Delta","LocalizedTransactionTrace","MemoryDelta","None","Removed","Reward","Reward","RewardAction","RewardType","Selfdestruct","Selfdestruct","SelfdestructAction","StateDiff","StateDiff","StaticCall","StorageDelta","Trace","TraceOutput","TraceResults","TraceResultsWithTransactionHash","TraceType","TransactionTrace","Unchanged","Uncle","VmExecutedOperation","VmInstruction","VmTrace","VmTrace","action","address","address","author","balance","balance","block_hash","block_number","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","call_type","changed","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","code","code","code","cost","data","default","default","default","default","default","deref","deref_mut","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","error","ex","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","full_trace","gas","gas","gas_used","gas_used","gas_used","hash","idx","init","input","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","is_added","is_call","is_changed","is_create","is_removed","is_reward","is_selfdestruct","is_unchanged","key","kind","mem","nonce","off","op","ops","output","output","pc","push","refund_address","result","reward_type","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","set_gas_used","set_root_trace_gas_used","state_diff","storage","store","sub","subtraces","to","to","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","trace","trace","trace_address","transaction_hash","transaction_hash","transaction_position","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","used","val","value","value","value","vm_trace","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","TraceCallRequest","block_id","block_overrides","borrow","borrow_mut","call","default","deserialize","fmt","from","into","new","serialize","state_overrides","trace_types","try_from","try_into","type_id","vzip","with_block_id","with_block_overrides","with_state_override","with_statediff","with_trace","with_trace_type","with_trace_types","with_vm_trace","AccessList","AccessListItem","AccessListWithGasUsed","Parity","Signature","Transaction","TransactionInfo","TransactionReceipt","TransactionRequest","access_list","access_list","blob_versioned_hashes","block_hash","block_number","borrow","borrow_mut","chain_id","clone","clone_into","common","default","deserialize","eq","fmt","from","from","gas","gas_price","hash","input","into","max_fee_per_blob_gas","max_fee_per_gas","max_priority_fee_per_gas","nonce","other","receipt","request","serialize","signature","signature","to","to_owned","transaction_index","transaction_type","try_from","try_into","tx_type","type_id","typed","value","vzip","AccessList","AccessListItem","AccessListWithGasUsed","_alloy_rlp_payload_length","_alloy_rlp_payload_length","access_list","address","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","decode","decode","default","default","default","deserialize","deserialize","deserialize","encode","encode","eq","eq","eq","flatten","flattened","fmt","fmt","fmt","from","from","from","gas_used","hash","hash","into","into","into","into_flatten","into_flattened","length","length","serialize","serialize","serialize","size","size","storage_keys","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","TransactionInfo","base_fee","block_hash","block_number","borrow","borrow_mut","clone","clone_into","default","eq","fmt","from","hash","index","into","to_owned","try_from","try_into","type_id","vzip","TransactionReceipt","blob_gas_price","blob_gas_used","block_hash","block_number","borrow","borrow_mut","clone","clone_into","contract_address","cumulative_gas_used","deserialize","effective_gas_price","eq","fmt","from","from","gas_used","into","logs","logs_bloom","other","serialize","state_root","status_code","to","to_owned","transaction_hash","transaction_index","transaction_type","try_from","try_into","type_id","vzip","TransactionRequest","access_list","access_list","borrow","borrow_mut","clone","clone_into","data","default","deserialize","eq","fmt","from","from","gas","gas_limit","gas_price","input","into","into_typed_request","max_fee_per_gas","max_fee_per_gas","max_priority_fee_per_gas","max_priority_fee_per_gas","nonce","nonce","serialize","to","to","to_owned","transaction_type","transaction_type","try_from","try_into","type_id","value","value","vzip","Parity","Signature","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","decode","decode","decode_with_eip155_chain_id","default","deserialize","deserialize","deserialize_parity","encode","encode","encode_with_eip155_chain_id","eq","eq","fmt","fmt","from","from","from","from","hash","hash","into","into","length","payload_len","payload_len_with_eip155_chain_id","r","s","serialize","serialize","serialize_parity","size","to_bytes","to_hex_bytes","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","v","v","vzip","vzip","y_parity","EIP1559","EIP1559_TX_TYPE_ID","EIP2930","EIP2930_TX_TYPE_ID","EIP4844","EIP4844_TX_TYPE_ID","LEGACY_TX_TYPE_ID","Legacy","TxType","borrow","borrow_mut","clone","clone_into","cmp","default","deserialize","eq","fmt","from","into","partial_cmp","serialize","to_owned","try_from","try_into","type_id","vzip","Call","Create","EIP1559","EIP1559TransactionRequest","EIP2930","EIP2930TransactionRequest","Legacy","LegacyTransactionRequest","TransactionKind","TypedTransactionRequest","access_list","access_list","as_call","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chain_id","chain_id","chain_id","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","decode","decode","decode","decode","decode","decode_inner","decode_inner","deserialize","eip155_fields_len","encode","encode","encode","encode","encode","encode_eip155_fields","encode_fields","encode_fields","encode_fields","encode_for_signing","encode_for_signing","encode_for_signing","encode_with_signature","encode_with_signature","eq","eq","eq","eq","eq","fields_len","fields_len","fields_len","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","gas_limit","gas_limit","gas_limit","gas_price","gas_price","hash","input","input","input","into","into","into","into","into","kind","kind","kind","length","length","length","length","length","max_fee_per_gas","max_priority_fee_per_gas","nonce","nonce","nonce","payload_len_for_signature","payload_len_for_signature","payload_len_for_signature","payload_len_with_signature","payload_len_with_signature","payload_len_with_signature_without_header","payload_len_with_signature_without_header","serialize","signature_hash","signature_hash","signature_hash","size","size","size","size","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","tx_type","tx_type","type_id","type_id","type_id","type_id","type_id","value","value","value","vzip","vzip","vzip","vzip","vzip","TxpoolContent","TxpoolContentFrom","TxpoolInspect","TxpoolInspectSummary","TxpoolInspectSummaryVisitor","TxpoolStatus","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","eq","eq","eq","eq","eq","expecting","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","gas","gas_price","into","into","into","into","into","into","pending","pending","pending","pending","queued","queued","queued","queued","remove_from","serialize","serialize","serialize","serialize","serialize","to","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","value","visit_str","visit_string","vzip","vzip","vzip","vzip","vzip","vzip","BeaconAPIWithdrawal","GWEI_TO_WEI","Withdrawal","_alloy_rlp_payload_length","_alloy_rlp_payload_length","address","address","amount","amount","amount_wei","beacon_api_withdrawals","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","decode","default","deserialize","deserialize","deserialize_as","encode","eq","fmt","from","from","hash","index","index","into","into","length","serialize","serialize","serialize_as","size","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","validator_index","validator_index","vzip","vzip","deserialize","serialize","JsonU256","deserialize_json_u256","Hex","Int","NumberOrHexU256","U64HexOrNumber","from_int_or_hex","from_int_or_hex_opt","u64_hex_or_decimal_opt","deserialize","serialize","OtherFields","inner","Bool","Detailed","FullTransaction","Header","Log","Logs","Logs","NewHeads","NewPendingTransactions","None","Params","PubSubSyncStatus","Simple","SubscriptionKind","SubscriptionResult","SyncState","SyncStatusMetadata","Syncing","TransactionHash","current_block","highest_block","starting_block","syncing","Log","address","data","logs_bloom","topics","RpcModules","borrow","borrow_mut","clone","clone_into","default","deserialize","eq","fmt","from","into","into_modules","module_map","new","serialize","to_owned","try_from","try_into","type_id","vzip","from_int_or_hex","json_u256","num","serialize_hex_string_no_prefix","storage","u64_hex","JsonU256","JsonU256Visitor","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","cmp","default","deserialize","deserialize_json_u256","eq","expecting","fmt","fmt","from","from","from","hash","into","into","partial_cmp","serialize","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","visit_str","visit_string","visit_u64","vzip","vzip","Hex","Int","NumberOrHexU256","U64HexOrNumber","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","cmp","deserialize","deserialize","eq","fmt","fmt","from","from","from","from","from_int_or_hex","from_int_or_hex_opt","hash","into","into","partial_cmp","serialize","to","to_owned","try_from","try_from","try_into","try_into","try_into_u256","type_id","type_id","u64_hex_or_decimal_opt","vzip","vzip","deserialize","serialize","JsonStorageKey","borrow","borrow_mut","clone","clone_into","default","deserialize","deserialize_storage_map","eq","fmt","from","from","from_bytes_to_b256","into","serialize","to_owned","try_from","try_into","type_id","vzip","deserialize","serialize","AccountOverride","StateOverride","balance","base","code","nonce","state","state_diff","JsonStorageKey","deserialize_storage_map","from_bytes_to_b256","AccountChangeKind","AccountDiff","AccountState","Action","ActionType","Added","Block","BlockTraceResult","BuiltInTracer","Call","Call","Call","Call","CallAction","CallCode","CallConfig","CallFrame","CallLogFrame","CallOutput","CallTracer","CallTracer","CallType","Changed","ChangedType","Create","Create","Create","Create","CreateAction","CreateOutput","Default","Default","DefaultFrame","DelegateCall","Delta","Diff","DiffMode","DiffStateKind","Error","FourByteFrame","FourByteTracer","FourByteTracer","GethDebugBuiltInTracerType","GethDebugTracerConfig","GethDebugTracerType","GethDebugTracingCallOptions","GethDebugTracingOptions","GethDefaultTracingOptions","GethTrace","Intersection","JS","JsTracer","LocalizedTransactionTrace","MemoryDelta","Modify","None","NoopFrame","NoopTracer","NoopTracer","Post","Pre","PreStateConfig","PreStateFrame","PreStateMode","PreStateTracer","PreStateTracer","Removed","Reward","Reward","RewardAction","RewardType","SelfDestruct","Selfdestruct","Selfdestruct","SelfdestructAction","StateDiff","StateDiff","StaticCall","StorageDelta","StructLog","Success","Trace","TraceCallRequest","TraceFilter","TraceFilterMatcher","TraceFilterMode","TraceOutput","TraceResult","TraceResults","TraceResultsWithTransactionHash","TraceType","TransactionTrace","Unchanged","Uncle","Union","VmExecutedOperation","VmInstruction","VmTrace","VmTrace","action","address","address","address","after","author","balance","balance","balance","block","block_hash","block_id","block_number","block_overrides","block_overrides","call","call","call_type","calls","code","code","code","code","common","config","cost","count","data","data","debug","depth","diff_mode","disable_memory","disable_return_data","disable_stack","disable_storage","enable_memory","enable_return_data","error","error","error","ex","failed","filter","four_byte","from","from","from","from","from_address","from_addresses","from_block","full_trace","gas","gas","gas","gas","gas","gas_cost","gas_used","gas_used","gas_used","geth","hash","idx","init","input","input","key","limit","logs","mem","memory","memory_size","mode","mode","nonce","nonce","noop","off","only_top_call","op","op","ops","output","output","output","parity","pc","pc","post","pre","pre_state","push","refund_address","refund_counter","result","return_data","return_value","revert_reason","reward_type","stack","state_diff","state_overrides","state_overrides","storage","storage","storage","store","struct_logs","sub","subtraces","timeout","to","to","to","to_address","to_addresses","to_block","topics","trace","trace","trace_address","trace_types","tracer","tracer_config","tracerequest","traces","tracing_options","transaction_hash","transaction_hash","transaction_position","typ","used","val","value","value","value","value","vm_trace","with_log","error","result","CallConfig","CallFrame","CallLogFrame","address","calls","data","error","from","gas","gas_used","input","logs","only_top_call","output","revert_reason","to","topics","typ","value","with_log","Error","Success","TraceResult","error","result","Intersection","TraceFilter","TraceFilterMatcher","TraceFilterMode","Union","after","count","from_address","from_addresses","from_block","mode","mode","to_address","to_addresses","to_block","FourByteFrame","AccountChangeKind","AccountState","BlockTraceResult","BuiltInTracer","CallConfig","CallFrame","CallLogFrame","CallTracer","CallTracer","Create","Default","Default","DefaultFrame","Diff","DiffMode","DiffStateKind","Error","FourByteFrame","FourByteTracer","FourByteTracer","GethDebugBuiltInTracerType","GethDebugTracerConfig","GethDebugTracerType","GethDebugTracingCallOptions","GethDebugTracingOptions","GethDefaultTracingOptions","GethTrace","JS","JsTracer","Modify","NoopFrame","NoopTracer","NoopTracer","Post","Pre","PreStateConfig","PreStateFrame","PreStateMode","PreStateTracer","PreStateTracer","SelfDestruct","StructLog","Success","TraceResult","address","balance","block","block_overrides","call","calls","code","config","data","debug","depth","diff_mode","disable_memory","disable_return_data","disable_stack","disable_storage","enable_memory","enable_return_data","error","error","failed","four_byte","from","gas","gas","gas","gas_cost","gas_used","hash","input","limit","logs","memory","memory_size","nonce","noop","only_top_call","op","output","pc","post","pre","pre_state","refund_counter","return_data","return_value","revert_reason","stack","state_overrides","storage","storage","struct_logs","timeout","to","topics","tracer","tracer_config","traces","tracing_options","typ","value","with_log","error","result","CallConfig","CallFrame","CallLogFrame","address","calls","data","error","from","gas","gas_used","input","logs","only_top_call","output","revert_reason","to","topics","typ","value","with_log","FourByteFrame","NoopFrame","AccountChangeKind","AccountState","Create","Default","Diff","DiffMode","DiffStateKind","Modify","Post","Pre","PreStateConfig","PreStateFrame","PreStateMode","SelfDestruct","balance","code","diff_mode","nonce","post","pre","storage","NoopFrame","AccountDiff","Action","ActionType","Added","Block","Call","Call","Call","Call","CallAction","CallCode","CallOutput","CallType","Changed","ChangedType","Create","Create","Create","CreateAction","CreateOutput","DelegateCall","Delta","LocalizedTransactionTrace","MemoryDelta","None","Removed","Reward","Reward","RewardAction","RewardType","Selfdestruct","Selfdestruct","SelfdestructAction","StateDiff","StateDiff","StaticCall","StorageDelta","Trace","TraceOutput","TraceResults","TraceResultsWithTransactionHash","TraceType","TransactionTrace","Unchanged","Uncle","VmExecutedOperation","VmInstruction","VmTrace","VmTrace","action","address","address","author","balance","balance","block_hash","block_number","call_type","code","code","code","cost","data","error","ex","from","from","from","full_trace","gas","gas","gas_used","gas_used","idx","init","input","key","mem","nonce","off","op","ops","output","output","pc","push","refund_address","result","reward_type","state_diff","storage","store","sub","subtraces","to","to","trace","trace","trace_address","transaction_hash","transaction_hash","transaction_position","used","val","value","value","value","vm_trace","AccountChangeKind","AccountState","Create","Default","Diff","DiffMode","DiffStateKind","Modify","Post","Pre","PreStateConfig","PreStateFrame","PreStateMode","SelfDestruct","balance","code","diff_mode","nonce","post","pre","storage","TraceCallRequest","block_id","block_overrides","call","state_overrides","trace_types","TxpoolContent","TxpoolContentFrom","TxpoolInspect","TxpoolInspectSummary","TxpoolStatus","gas","gas_price","pending","pending","pending","pending","queued","queued","queued","queued","to","value","deserialize","serialize","GWEI_TO_WEI","Withdrawal","address","amount","beacon_api_withdrawals","index","validator_index","deserialize","serialize"],"q":[[0,"alloy_rpc_types"],[389,"alloy_rpc_types::FilterBlockOption"],[391,"alloy_rpc_types::account"],[413,"alloy_rpc_types::eth"],[439,"alloy_rpc_types::eth::account"],[539,"alloy_rpc_types::eth::block"],[964,"alloy_rpc_types::eth::call"],[1118,"alloy_rpc_types::eth::fee"],[1157,"alloy_rpc_types::eth::filter"],[1376,"alloy_rpc_types::eth::filter::FilterBlockOption"],[1378,"alloy_rpc_types::eth::log"],[1417,"alloy_rpc_types::eth::other"],[1446,"alloy_rpc_types::eth::pubsub"],[1548,"alloy_rpc_types::eth::raw_log"],[1572,"alloy_rpc_types::eth::state"],[1596,"alloy_rpc_types::eth::syncing"],[1800,"alloy_rpc_types::eth::trace"],[1805,"alloy_rpc_types::eth::trace::common"],[1823,"alloy_rpc_types::eth::trace::common::TraceResult"],[1825,"alloy_rpc_types::eth::trace::filter"],[1887,"alloy_rpc_types::eth::trace::geth"],[2155,"alloy_rpc_types::eth::trace::geth::TraceResult"],[2157,"alloy_rpc_types::eth::trace::geth::call"],[2227,"alloy_rpc_types::eth::trace::geth::four_byte"],[2244,"alloy_rpc_types::eth::trace::geth::noop"],[2280,"alloy_rpc_types::eth::trace::geth::pre_state"],[2426,"alloy_rpc_types::eth::trace::parity"],[2930,"alloy_rpc_types::eth::trace::tracerequest"],[2957,"alloy_rpc_types::eth::transaction"],[3009,"alloy_rpc_types::eth::transaction::access_list"],[3080,"alloy_rpc_types::eth::transaction::common"],[3100,"alloy_rpc_types::eth::transaction::receipt"],[3134,"alloy_rpc_types::eth::transaction::request"],[3172,"alloy_rpc_types::eth::transaction::signature"],[3228,"alloy_rpc_types::eth::transaction::tx_type"],[3255,"alloy_rpc_types::eth::transaction::typed"],[3404,"alloy_rpc_types::eth::txpool"],[3514,"alloy_rpc_types::eth::withdrawal"],[3562,"alloy_rpc_types::eth::withdrawal::beacon_api_withdrawals"],[3564,"alloy_rpc_types::json_u256"],[3566,"alloy_rpc_types::num"],[3573,"alloy_rpc_types::num::u64_hex_or_decimal_opt"],[3575,"alloy_rpc_types::other"],[3577,"alloy_rpc_types::pubsub"],[3600,"alloy_rpc_types::raw_log"],[3605,"alloy_rpc_types::rpc"],[3625,"alloy_rpc_types::serde_helpers"],[3631,"alloy_rpc_types::serde_helpers::json_u256"],[3667,"alloy_rpc_types::serde_helpers::num"],[3706,"alloy_rpc_types::serde_helpers::num::u64_hex_or_decimal_opt"],[3708,"alloy_rpc_types::serde_helpers::storage"],[3728,"alloy_rpc_types::serde_helpers::u64_hex"],[3730,"alloy_rpc_types::state"],[3738,"alloy_rpc_types::storage"],[3741,"alloy_rpc_types::trace"],[3981,"alloy_rpc_types::trace::TraceResult"],[3983,"alloy_rpc_types::trace::call"],[4003,"alloy_rpc_types::trace::common"],[4006,"alloy_rpc_types::trace::common::TraceResult"],[4008,"alloy_rpc_types::trace::filter"],[4023,"alloy_rpc_types::trace::four_byte"],[4024,"alloy_rpc_types::trace::geth"],[4130,"alloy_rpc_types::trace::geth::TraceResult"],[4132,"alloy_rpc_types::trace::geth::call"],[4152,"alloy_rpc_types::trace::geth::four_byte"],[4153,"alloy_rpc_types::trace::geth::noop"],[4154,"alloy_rpc_types::trace::geth::pre_state"],[4175,"alloy_rpc_types::trace::noop"],[4176,"alloy_rpc_types::trace::parity"],[4284,"alloy_rpc_types::trace::pre_state"],[4305,"alloy_rpc_types::trace::tracerequest"],[4311,"alloy_rpc_types::txpool"],[4328,"alloy_rpc_types::u64_hex"],[4330,"alloy_rpc_types::withdrawal"],[4337,"alloy_rpc_types::withdrawal::beacon_api_withdrawals"],[4339,"ruint::aliases"],[4340,"core::result"],[4341,"serde::de"],[4342,"alloy_primitives::bits::bloom"],[4343,"core::iter::traits::collect"],[4344,"core::convert"],[4345,"serde::ser"],[4346,"core::fmt"],[4347,"core::fmt"],[4348,"arbitrary::unstructured"],[4349,"arbitrary::error"],[4350,"alloy_primitives::aliases"],[4351,"core::option"],[4352,"core::clone"],[4353,"alloy_rlp::error"],[4354,"serde::de"],[4355,"core::cmp"],[4356,"core::fmt"],[4357,"ruint::string"],[4358,"alloy_primitives::aliases"],[4359,"alloc::vec"],[4360,"serde::ser"],[4361,"alloc::string"],[4362,"alloy_primitives::bytes_"],[4363,"core::cmp"],[4364,"core::convert"],[4365,"serde::de"],[4366,"core::ops::range"],[4367,"serde_json::value"],[4368,"alloc::collections::btree::map"],[4369,"serde_json::error"],[4370,"core::ops::function"],[4371,"serde_json::error"],[4372,"alloc::boxed"],[4373,"core::iter::traits::iterator"],[4374,"bytes::bytes"],[4375,"core::fmt"]],"d":["AccessList as defined in EIP-2930","A list of addresses and storage keys that the transaction …","Access list with gas used appended.","Account information.","A vector of values","The hash of the block if the filter only targets a single …","Block representation","Error that can occur when converting other types to blocks","Either a block hash or a block number","A Block Identifier …","Block number and hash.","A block Number (or tag - “latest”, “earliest”, “…","BlockOverrides is a set of header fields to override.","An iterator over the transaction hashes of a block.","An Iterator over the transaction hashes of a block.","Block Transactions depending on the boolean attribute of …","Determines how the transactions field of Block should be …","Helper type to represent a bloom filter used for matching …","Bundle of transactions","Transaction will call this address or transfer funds to …","Helper type that supports both data and input fields that …","Error thrown when both data and input fields are set and …","Call request for eth_call and adjacent methods.","Chain status.","No to field set, this transaction will create a contract","Response for EIP-1186 account proof eth_getProof","Data structure with proof for one single storage-entry","Transaction with Priority fee","An EIP1559 Transaction Request.","Represents an EIP-1559 transaction request","Identifier for an EIP1559 transaction.","AccessList transaction","An EIP2930 transaction request.","Represents an EIP-2930 transaction request","Identifier for an EIP2930 transaction.","Shard Blob Transactions - EIP-4844","Identifier for an EIP4844 transaction.","Earliest block (genesis)","Empty result,","CallResponse for eth_callMany","Extended account information (used by parity_allAccountInfo…","Response type for eth_feeHistory","Filter for logs.","Represents the target range of blocks for the filter","Response of the eth_getFilterChanges RPC.","Owned equivalent of a SubscriptionId","FilterSet is a set of values that will be used to filter …","Support for matching Filters","Finalized block accepted as canonical","Block number and hash of the forked block.","Full transactions","Include full transaction objects: BlockTransactions::Full","Receive full details of the transactions.","A block hash and an optional bool that defines if it’s …","A block hash","Only hashes","Only include hashes: BlockTransactions::Hashes","New hashes (block or transactions)","Receive only the hashes of the transactions.","Block header representation.","Peer count as hex","Thrown when a 0x-prefixed hex string was expected","Info when syncing","A transaction failed sender recovery","Identifier for legacy transaction, however a legacy tx is …","Latest block","Legacy transaction pre EIP-2929","A Legacy Transaction request.","Represents a legacy transaction request","Ethereum Log emitted by a transaction","Error that can occur when converting other types to logs","New logs.","Block numbers should be 0x-prefixed","Not syncing","Numeric id","Block by number from canon chain","A block number","A block number","Peer count as integer","Type that represents the signature parity byte, meant for …","Error thrown when parsing a BlockHashOrNumber from a …","Error variants when parsing a BlockNumberOrTag","Failed to parse hex value","Failed to parse hex value","Number of peers connected to.","Peer Ethereum protocol information","Peer connection information","Peer network information","Peer protocols information","Peers info","Pending block (not yet part of the blockchain)","Specifies the kind of information you wish to receive from …","Peer PIP protocol information","Represents a range of blocks with optional from and to …","Ethereum Log","account derived from a signature as well as information …","Value representation with additional info","A Block representation that allows to include additional …","Header representation with additional info.","A raw block failed to decode","A block hash which may have a boolean requireCanonical …","Represents the rpc_modules response, which returns the …","Safe head block","Container type for all signature fields in RPC","State context for callMany","String id","Syncing info","Sync status","There are too many topics","A single topic","Transaction object used in RPC","Additional fields in the context of a block that contains …","Represents the to field of a transaction request","Transaction receipt","Represents all transaction requests received from RPC","Propagation statistics for pending transaction.","New transactions.","Internal struct to calculate reward percentiles","Transaction Type","Transaction Pool Content","Transaction Pool Content From","Transaction Pool Inspect","Transaction summary as found in the Txpool Inspection …","Transaction Pool Status","Container type for various Ethereum transaction requests","Special case for uncle response.","A single value","Union type for representing a single value or a vector of …","Withdrawal represents a validator withdrawal from the …","AccessList","List with accounts accessed during transaction.","warm storage access pre-payment","","","EIP2930","","","Number of active peers","","address of the recovered account","Address","Address","Contract that emitted this log.","Account addresses that would be loaded at the start of …","Target address for withdrawn ether.","Value of the withdrawal in gwei.","","Overrides the basefee of the block.","Base fee of the block.","Base fee per unit of gas (if past London)","An array of block base fees per gas. This includes the …","The price paid by the eip-4844 transaction per blob gas.","Blob gas used","Blob gas used by the eip-4844 transaction","Blob Versioned Hashes for EIP-4844 transactions","Contains the blob hashes for eip-4844 transactions.","Describes the gap in the blockchain, if there is one: …","A block hash","A dictionary that maps blockNumber to a user-defined hash. …","Hash of the block the transaction that emitted this log …","Hash of the block.","Hash of the block this transaction was included within.","Block hash","Block Number","Number of the block the transaction that emitted this log …","Number of the block.","Number of the block this transaction was included within.","Block number","Filter block options, specifying on which blocks the …","Block overides","Capabilities","chain id","","","","The chain id of the transaction, if any.","","Overrides the coinbase address of the block.","Number of connected peers","Contract address created, or None if not a deployment.","Cumulative gas used within the block after this was …","Current block","Transaction data","Additional data fields of the log","Arbitrary length data.","Any additional data sent","Difficulty","Overrides the difficulty of the block.","Peer total difficulty if known","Peer total difficulty","The price paid post-execution by the transaction (i.e. …","eth_call output (if error)","Ethereum related types","Ethereum protocol information","Excess blob gas","Extra data","Additional fields that should be serialized into the Block …","Additional fields that should be serialized into the Block …","Additional fields that should be serialized into the Block …","The original filter, if any","Block no this transaction was first seen.","From","Address of the sender","from address","Sender","Deserializes the input into a U256, accepting both …","Gas","gas","Gas amount","Gas amount","Gas Limit","Overrides the gas limit of the block.","","","","Gas Price","legacy, gas Price","","","Gas Price","Gas Price","Gas Used","Gas used by the transaction","Estimated gas used with access list.","Gas used by this transaction alone.","An array of block gas used ratios. These are calculated as …","Block hash","Hash of the block","Block hash","Hash of the transaction.","Hash","SHA3 of peer best block hash","SHA3 of peer best block hash","Header of the block.","","Highest block seen so far","Public node id","Index of the transaction in the block","Monotonically increasing identifier issued by consensus …","Standard value.","Standard value.","Standard value.","","Transaction input data","Transaction data","","","","Data","If the signature contains chain replay protection, And the …","Json U256 serde helpers.","Storage key.","","","","Local endpoint address","Log Index in Block","Logs emitted by this transaction.","Calculate receipt logs bloom.","Logs bloom","Logs bloom","Max number of peers","Max Fee per Blob gas for EIP-4844 transactions","Configured max fee per blob gas for eip-4844 transactions","EIP-1559 Max base fee the caller is willing to pay","max base fee per gas sender is willing to pay","","Max BaseFeePerGas the user is willing to pay.","EIP-1559 Priority fee the caller is paying to the block …","miner tip","","The miner’s tip.","Account meta JSON","Alias of author","Mix Hash","","Account name","Account name","Node client ID","Network information","","Nonce","Nonce","Transaction nonce","","","","Nonce","Numeric serde helpers.","Block number","Block number","Block number","Overrides the block number.","Lowest number block of the returned range.","Support for capturing other fields","Support for arbitrary additional fields.","Support for arbitrary additional fields.","Arbitrary extra fields.","eth_call output (if no error)","Parent beacon block root","Hash of the parent","","Detailed information on peers","pending tx","pending tx","pending tx","number of pending tx","PIP protocol information.","proof for the pair","Peers this transaction was propagated to with count.","Protocols information","public key of the recovered account","Ethereum types for pub-sub","queued tx","queued tx","queued tx","number of queued tx","The R field of the signature; the point on the curve.","Overrides the prevrandao of the block.","Ethereum log object.","Transactions receipts root hash","Remote endpoint address","Geth Compatibility Field: whether this log was removed","Whether the block must be a canonical block","The effective gas tip by the transaction","An (optional) array of effective priority fee per gas data …","","The S field of the signature; the point on the curve.","Serde helpers for primitive types.","Serialize a byte vec as a hex string without the “0x” …","All flattened fields of the transaction signature.","Integer the size of this block in bytes.","Starting block","bindings for state overrides in eth_call","State root hash","The post-transaction stateroot (pre Byzantium)","Status: either 1 (success) or 0 (failure). Only present …","Storage related helpers.","","Keys of storage that would be loaded at the start of …","","Overrides the timestamp of the block.","Timestamp","To","Address of the receiver. null when its a contract creation …","to address","Recipient","Recipient (None when contract creation)","Topics (maxmimum of 4)","All topics of the log","Topics of the log. The number of logs depend on what LOG …","Total difficulty, this field is None only if representing …","Types for tracing","Transaction Hash","Transaction Hash.","Inclusive number of tx to replay in block. -1 means replay …","Index of the Transaction in the block","Index within the block.","Transaction Index","EIP-2718 type","EIP-2718 Transaction type, Some(1) for AccessList …","EIP-2718 type","EIP2718","Transactions.","Transactions","Transactions root hash","Types for the txpool namespace: …","Helper to deserialize an u64 from U64 accepting a hex …","Uncles’ hashes.","Hash of the uncles","Account UUID (None for address book entries)","For EIP-155, EIP-2930 and Blob transactions this is set to …","Index of validator associated with withdrawal.","Value that the key holds","Value","value of th tx in wei","","","","Transferred value","Transferred value","Negotiated ethereum protocol version","Negotiated PIP protocol version","Warp sync snapshot chunks total.","Warp sync snapshot chunks processed.","Withdrawal type and serde helpers.","Withdrawals in the block.","Withdrawals root hash added by EIP-4895 and is ignored in …","The y parity of the signature. This is only used for typed …","The block number or tag this filter should start at.","The block number or that this filter should end at.","Account information.","Response for EIP-1186 account proof eth_getProof","Data structure with proof for one single storage-entry","Extended account information (used by parity_allAccountInfo…","account derived from a signature as well as information …","","","address of the recovered account","","","If the signature contains chain replay protection, And the …","Storage key.","Account meta JSON","Account name","Account name","","proof for the pair","public key of the recovered account","","","Account UUID (None for address book entries)","Value that the key holds","","","","","","","","","","","","Block RPC types.","","","","","","Support for capturing other fields","Ethereum types for pub-sub","Ethereum log object.","bindings for state overrides in eth_call","","Types for tracing","","Types for the txpool namespace: …","Withdrawal type and serde helpers.","Account information.","Response for EIP-1186 account proof eth_getProof","Data structure with proof for one single storage-entry","Extended account information (used by parity_allAccountInfo…","account derived from a signature as well as information …","","","address of the recovered account","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","If the signature contains chain replay protection, And the …","Storage key.","Account meta JSON","Account name","Account name","","proof for the pair","public key of the recovered account","","","","","","","","","","","","","","","","","","","","","","","","","","","","Account UUID (None for address book entries)","Value that the key holds","","","","","","Block representation","Error that can occur when converting other types to blocks","Either a block hash or a block number","A Block Identifier …","Block number and hash.","A block Number (or tag - “latest”, “earliest”, “…","BlockOverrides is a set of header fields to override.","An iterator over the transaction hashes of a block.","","","An Iterator over the transaction hashes of a block.","Block Transactions depending on the boolean attribute of …","Determines how the transactions field of Block should be …","Earliest block (genesis)","Finalized block accepted as canonical","Block number and hash of the forked block.","Full transactions","","","Include full transaction objects: BlockTransactions::Full","A block hash and an optional bool that defines if it’s …","A block hash","Only hashes","","","Only include hashes: BlockTransactions::Hashes","Block header representation.","Thrown when a 0x-prefixed hex string was expected","A transaction failed sender recovery","Latest block","Block numbers should be 0x-prefixed","Block by number from canon chain","A block number","A block number","Error thrown when parsing a BlockHashOrNumber from a …","Error variants when parsing a BlockNumberOrTag","Failed to parse hex value","Failed to parse hex value","Pending block (not yet part of the blockchain)","Value representation with additional info","A Block representation that allows to include additional …","Header representation with additional info.","A raw block failed to decode","A block hash which may have a boolean requireCanonical …","Safe head block","Special case for uncle response.","","","","","","","Returns the block hash if it is BlockId::Hash","Returns the numeric block number if explicitly set","Returns the block number if it is a …","","Overrides the basefee of the block.","Base fee per unit of gas (if past London)","Blob gas used","A block hash","A dictionary that maps blockNumber to a user-defined hash. …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Overrides the coinbase address of the block.","Converts self into Hashes.","","","","","","","","","","","","","","","","Difficulty","Overrides the difficulty of the block.","","","","","","","","","","","","","Excess blob gas","Extra data","Additional fields that should be serialized into the Block …","Additional fields that should be serialized into the Block …","Additional fields that should be serialized into the Block …","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns an RpcBlockHash from a B256.","","","Gas Limit","Overrides the gas limit of the block.","Gas Used","","","","","Block hash","Hash of the block","Block hash","Returns an iterator over references to the transaction …","Returns an iterator over mutable references to the …","Header of the block.","","Standard value.","Standard value.","Standard value.","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Consumes Self and returns BlockNumber, BlockHash","Converts a block with Tx hashes into a full block.","Converts self into Hashes.","","","Returns true if it’s “earliest”","Returns true if it’s “finalized”","Returns true if it’s “latest”","Returns true if this is BlockNumberOrTag::Latest","Returns true if a numeric block number is set","Returns true if it’s “pending”","Returns true if this is BlockNumberOrTag::Pending","Returns true if it’s “safe”","Check if the enum variant is used for an uncle response.","Returns an iterator over the transaction hashes.","","","","Logs bloom","Returns whether or not the block matches the given …","Alias of author","Mix Hash","","","Creates a new BlockNumHash from a block number and hash.","","","","","Nonce","Block number","Block number","Block number","Overrides the block number.","Support for arbitrary additional fields.","Parent beacon block root","Hash of the parent","","Overrides the prevrandao of the block.","Transactions receipts root hash","Whether the block must be a canonical block","","","","","","","","","","Integer the size of this block in bytes.","","","","","State root hash","Overrides the timestamp of the block.","Timestamp","","","","","","","","","","","","","","","","","","","","Total difficulty, this field is None only if representing …","Transactions.","Transactions root hash","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns an instance of BlockTransactions with the Uncle …","Uncles’ hashes.","Hash of the uncles","","","","","","","","","","","","","","","","","","","","Withdrawals in the block.","Withdrawals root hash added by EIP-4895 and is ignored in …","-1 means all transactions","Bundle of transactions","Helper type that supports both data and input fields that …","Error thrown when both data and input fields are set and …","Call request for eth_call and adjacent methods.","CallResponse for eth_callMany","Transaction index","State context for callMany","Represents a transaction index where -1 means all …","AccessList","Blob Versioned Hashes for EIP-4844 transactions","Block Number","Block overides","","","","","","","","","","","","","","","chain id","","","","","","","","","","","","","","Transaction data","","","","","","","","","","","","","","","","","","","","eth_call output (if error)","Returns the configured fee cap, if any.","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","From","Gas","Gas Price","Returns true if the request has a blobVersionedHashes …","","","Returns the index if this is the index variant","Returns the optional input data.","Transaction input data","Transaction data","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Consumes the type and returns the optional input data.","Returns true if this is the all variant","Max Fee per Blob gas for EIP-4844 transactions","EIP-1559 Max base fee the caller is willing to pay","EIP-1559 Priority fee the caller is paying to the block …","Creates a new instance with the given input data.","Creates a new instance with the given input data.","Nonce","eth_call output (if no error)","","","","","","","To","","","","","","","","Inclusive number of tx to replay in block. -1 means replay …","EIP-2718 type","Transactions","","","","","","","","","","","","","","","Consumes the type and returns the optional input data.","","","","","","","","Returns the optional input data.","Value","","","","","","","","Response type for eth_feeHistory","Internal struct to calculate reward percentiles","An array of block base fees per gas. This includes the …","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Gas used by the transaction","An array of block gas used ratios. These are calculated as …","Calls U::from(self).","Calls U::from(self).","Lowest number block of the returned range.","","The effective gas tip by the transaction","An (optional) array of effective priority fee per gas data …","","","","","","","","","","","","A vector of values","A vector of values","The hash of the block if the filter only targets a single …","Helper type to represent a bloom filter used for matching …","Empty result,","Filter for logs.","Represents the target range of blocks for the filter","Response of the eth_getFilterChanges RPC.","Owned equivalent of a SubscriptionId","FilterSet is a set of values that will be used to filter …","Support for matching Filters","Receive full details of the transactions.","New hashes (block or transactions)","Receive only the hashes of the transactions.","New logs.","Numeric id","Specifies the kind of information you wish to receive from …","Represents a range of blocks with optional from and to …","","","String id","A single topic","New transactions.","A single value","A single value","Union type for representing a single value or a vector of …","Sets the inner filter object","Address","Returns the BloomFilter for the given address","Returns the range (fromBlock, toBlock) if this is a range …","Pins the block hash for the filter","Filter block options, specifying on which blocks the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Deserializes a boolean value into …","","","","","","","","Given the event signature in string form, it hashes it and …","Sets event_signature(topic0) (the event name for …","Hashes all event signatures and sets them as array to …","The original filter, if any","Returns true if the filter matches the given log.","Returns true if the filter matches the given block hash.","Returns true if the filter matches the given block number","Returns true if the log matches the filter’s topics","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","Returns the argument unchanged.","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Sets the from block number","Returns the numeric value of the fromBlock field","Returns the toBlock value, if any","Returns the numeric value of the fromBlock field","Returns the fromBlock value, if any","Returns the numeric value of the toBlock field","Returns true if at least one topic is set","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns wheter the filter is empty","Returns true if this is a range filter and has a from block","","Returns whether the given bloom matches the list of Blooms …","Returns whether the given value matches the filter. It the …","Returns true if the bloom contains one of the address …","Returns true if the bloom matches the topics","Creates a new, empty filter","Creates a new wrapper type for a Filter, if any with …","Sets the inner filter object","","","","","Serializes the PendingTransactionFilterKind into a boolean …","Sets the block number this range filter should start at.","Pins the block hash this filter should target.","Sets the block number this range filter should end at.","Sets the to block number","Returns a list of Bloom (BloomFilter) corresponding to the …","","","","","","","","Returns a ValueOrArray inside an Option, so that:","Sets topic0 (the event name for non-anonymous events)","Sets the 1st indexed topic","Sets the 2nd indexed topic","Sets the 3rd indexed topic","Topics (maxmimum of 4)","Returns the BloomFilter for the given topics","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The block number or tag this filter should start at.","The block number or that this filter should end at.","Ethereum Log emitted by a transaction","Error that can occur when converting other types to logs","There are too many topics","Address","Hash of the block the transaction that emitted this log …","Number of the block the transaction that emitted this log …","","","","","","","Additional data fields of the log","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Calls U::from(self).","Calls U::from(self).","Log Index in Block","Geth Compatibility Field: whether this log was removed","","","","All topics of the log","Transaction Hash","Index of the Transaction in the block","","","","","","","","","A type that is supposed to capture additional fields that …","","","","","","","","","","Deserialized this type into another container type","","","Returns the argument unchanged.","Returns the deserialized value of the field, if it exists","Returns the deserialized value of the field, if it exists. …","Contains all unknown fields","Calls U::from(self).","","","Removes the deserialized value of the field, if it exists","Removes the deserialized value of the field, if it exists …","Removes the deserialized value of the field, if it exists. …","","","","","","","Boolean parameter for new pending transactions.","Current Stats about syncing","Full Transaction","New block header.","Log","Logs subscription.","Log parameters.","New block headers subscription.","New Pending Transactions subscription.","No parameters passed.","Any additional parameters for a subscription.","Response type for a SyncStatus subscription","If not currently syncing, this should always be false","Subscription kind.","Subscription result.","SyncStatus","Sync status infos","Node syncing status subscription.","Transaction hash","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if it’s a bool parameter.","Returns true if it’s a log parameter.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Ethereum Log","","","Contract that emitted this log.","","","","","Arbitrary length data.","","","","","","Returns the argument unchanged.","Calls U::from(self).","","Calculate receipt logs bloom.","","Topics of the log. The number of logs depend on what LOG …","","","","","Custom account override used in call","A set of account overrides","Fake balance to set for the account before executing the …","","","","","","Fake EVM bytecode to inject into the account before …","","","","","Returns the argument unchanged.","Calls U::from(self).","Fake nonce to set for the account before executing the …","","Fake key-value mapping to override all slots in the …","Fake key-value mapping to override individual slots in the …","","","","","","Chain status.","Peer count as hex","Info when syncing","Not syncing","Peer count as integer","Number of peers connected to.","Peer Ethereum protocol information","Peer connection information","Peer network information","Peer protocols information","Peers info","Peer PIP protocol information","Syncing info","Sync status","Propagation statistics for pending transaction.","Number of active peers","Describes the gap in the blockchain, if there is one: …","","","","","","","","","","","","","","","","","","","","","","","Capabilities","","","","","","","","","","","","","","","","","","","","","","","Number of connected peers","Current block","","","","","","","","","","","","","","","","","","Peer total difficulty if known","Peer total difficulty","","","Ethereum protocol information","Block no this transaction was first seen.","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","SHA3 of peer best block hash","SHA3 of peer best block hash","Highest block seen so far","Public node id","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Local endpoint address","Max number of peers","Node client ID","Network information","Detailed information on peers","PIP protocol information.","Peers this transaction was propagated to with count.","Protocols information","Remote endpoint address","","","","","","","","","","","","Starting block","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Negotiated ethereum protocol version","Negotiated PIP protocol version","","","","","","","","","","","","Warp sync snapshot chunks total.","Warp sync snapshot chunks processed.","Types used by tracing backends","trace_filter types and support","Geth tracing types","Types for trace module.","Builder style functions for trace_call","Untagged error variant","Untagged success variant","The result of a single transaction trace.","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","Only return traces for transactions with matching from and …","Trace filter.","Helper type for matching from and to addresses. Empty sets …","How to apply from_address and to_address filters.","Return traces for transactions with matching from OR to …","Output offset","","","","","","","","","","","","","Output amount","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","From address","","From block","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns a TraceFilterMatcher for this filter.","Returns true if the given from and to addresses match this …","How to apply from_address and to_address filters.","","","","To address","","To block","","","","","","","","","","","","","","","","","","blockTraceResult represents the results of tracing a …","built-in tracer","","","","The response for call tracer","The callTracer tracks all the call frames executed during …","The response for the default struct log tracer","Geth Default struct log trace frame","","","Untagged error variant","","The response for four byte tracer","The 4byteTracer collects the function selectors of every …","Available built-in tracers","Configuration of the tracer","Available tracers","Bindings for additional debug_traceCall options","Bindings for additional debug_traceTransaction options","Default tracing options for the struct looger.","Tracing response objects","Any other trace response, such as custom javascript …","custom JS tracer","","An empty json response","This tracer is noop. It returns an empty object and is …","","","","The response for pre-state byte tracer","The prestate tracer has two modes: prestate and diff. The …","Represents a struct log entry in a trace","Untagged success variant","Result type for geth style transaction trace","Block number corresponding to the trace task","The block overrides to apply","","","","","","","","","","","","","","","","","","","","","","Configures a CallConfig","","","","","","","","","","","","","","","","","","","","","","Enables debug mode.","print output during capture end","","","","","","","","Current call depth","","","","","","","","","","","Disables memory capture.","Disable memory capture","Disables return data capture.","Disable return data capture","Disables stack capture.","disable stack capture","Disables storage capture.","Disable storage capture","Enables memory capture.","enable memory capture","Enables return data capture.","Enable return data capture","","","","","","","","","","","Error message if any","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Consumes the config and tries to deserialize it into the …","","remaining gas","cost for executing op","Block hash corresponding to the trace task","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns the CallConfig if it is a call config.","Returns the raw json value","Returns the PreStateConfig if it is a call config.","Returns true if memory capture is enabled","Returns if this is a null object","Returns true if return data capture is enabled","Returns true if stack capture is enabled","Returns true if storage capture is enabled","maximum length of output, but zero means unlimited","ref …","Size of memory.","","opcode to be executed","program counter","","Configures a PreStateConfig","Refund counter","Last call’s return data. Enabled via enableReturnData","","","","","","","","","","","","Serializes a storage map as a list of key-value pairs …","EVM stack","The state overrides to apply","Storage slots of current contract read from and written …","","A string of decimal integers that overrides the …","","","","","","","","","","","The custom tracer to use.","Config specific to given tracer.","Trace results produced by the trace task","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Sets the debug field.","Sets the disable_memory field.","Sets the disable_return_data field.","Sets the disable_stack field.","Sets the disable_storage field.","Sets the enable_memory field.","Sets the enable_return_data field.","Sets the limit field.","Sets the timeout to use for tracing","Sets the tracer to use","","","","The response object for debug_traceTransaction with …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Sets the only top call flag","When set to true, this will only trace the primary …","","","","","","","","","","","","","","","","","","","","","","","","","Sets the with log flag","","…","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","An empty frame response that’s only an empty json object …","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","Helper type to track the kind of change of an AccountState.","Represents the state of an account","","The default mode returns the accounts necessary to execute …","Diff mode returns the differences between the transaction…","Represents the account states before and after the …","Helper type for DiffMode to represent a specific set","","Corresponds to the post state of the DiffMode","Corresponds to the pre state of the DiffMode","The config for the prestate tracer.","A tracer that records AccountStates. The prestate tracer …","","","Returns the account states after the transaction is …","Returns the account states before and after the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Creates a new AccountState with the given account info.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if the account was created","Returns true if this trace was requested without diffmode.","Is default mode if diff_mode is not set","Returns true if this trace was requested with diffmode.","Returns true if this trace was requested with diffmode.","Returns true the account was modified","Returns true if this is the post state of the DiffMode","Returns true if this is the pre state of the DiffMode","Returns true the account was modified","","The account states after the transaction is executed.","The account states before the transaction is executed.","Removes balance,nonce or code if they match the given …","Removes all zero values from the storage of the …","The sets of the DiffMode should only contain changed …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Serde-friendly AccountDiff shadow.","Action","An external action type.","Added variant.","Block","Call","Contract call.","Call","Output of a regular call transaction.","Represents a certain CallType of a call or message …","Call code","Call out put type","Call type.","Changed variant.","Aux type for Diff::Changed.","Create","Contract creation.","Output of a CREATE transaction.","Represents a create action, either a CREATE operation or a …","Represents the output of a create operation.","Delegate call","Delta type","Localized transaction trace.","A diff of some chunk of memory.","None","Removed variant.","Reward","A block reward.","Reward Action.","Reward type.","Parity style traces never renamed suicide to selfdestruct: …","Contract suicide/selfdestruct.","Represents a selfdestruct action fka suicide.","New-type for list of account diffs","Provides information detailing all altered portions of the …","Static call","A diff of some storage value.","Default trace","Represents the output of a trace.","The Outcome of a traced transaction with optional settings","A FullTrace with an additional transaction hash","Different Trace diagnostic targets.","A parity style trace of a transaction.","Unchanged variant.","Uncle","A record of an executed VM operation.","Vm instruction type.","A record of a full VM trace for a CALL/CREATE.","Provides a full trace of the VM’s state throughout the …","Transaction action.","destroyed/suicided address.","Address output.","Author’s address.","Balance change.","Balance of the contract just before it was destroyed.","Hash of the block, if not pending.","Block number the transaction is included in, None if …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The type of the call.","Creates a new Delta::Changed variant","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Code change.","Code data.","The code to be executed.","The gas cost for this instruction.","The changed data.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Error message.","Information concerning the execution of the operation.","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Previous value.","Address of the sending account.","The address of the creator.","Full trace data.","The gas available for executing the call.","The gas available for the creation init code.","Returns the gas used by this trace.","Gas Used.","Resulting address.","","Index.","The init code.","The input data provided to the call.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Returns true if the value is added","Returns true if this is a call action","Returns true if the value is changed","Returns true if this is a create action","Returns true if the value is removed","Returns true if this is a reward action","Returns true if this is a selfdestruct action","Returns true if the value is unchanged","Key.","Returns what kind of action this is","If altered, the memory delta.","Nonce change.","Offset into memory the change begins.","Stringified opcode.","All executed instructions.","Output of the trace","Output","The program counter.","The stack item placed, if any.","destroyed contract heir.","Execution result.","Reward type.","","","","","","","","","","","","","","","","","","","","","","","","","","Sets the gas used by this trace.","Sets the gas used of the root trace.","Enabled if TraceType::StateDiff is provided","Storage changes.","The altered storage value, if any.","Subordinate trace of the CALL/CREATE if applicable.","Subtrace count.","Current value.","Address of the destination/target account.","","","","","","","","","","","","","","","","","","","","","","","","","","Enabled if TraceType::Trace is provided, otherwise an …","Trace of the transaction and its result. Trace of the …","Trace address path.","Transaction hash.","Hash of the transaction","Transaction index within the block, None if pending.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The total gas used.","Value.","Value transferred to the destination account.","The value with which the new account is endowed.","Reward amount.","Enabled if TraceType::VmTrace is provided","","","","","","","","","","","","","","","","","","","","","","","","","","Container type for trace_call arguments","Optional: blockId","Optional: BlockOverrides","","","call request object","","","","Returns the argument unchanged.","Calls U::from(self).","Returns a new TraceCallRequest given a CallRequest and …","","Optional: StateOverride","trace types","","","","","Sets the BlockId Note: this is optional","Sets the BlockOverrides Note: this is optional","Sets the StateOverride Note: this is optional","Inserts TraceType::StateDiff","Inserts TraceType::Trace","Inserts a single trace type.","Inserts multiple trace types from an iterator.","Inserts TraceType::VmTrace","","","","","","Transaction object used in RPC","","","","","EIP2930","Contains the blob hashes for eip-4844 transactions.","Block hash","Block number","","","The chain id of the transaction, if any.","","","Commonly used additional types that are not part of the …","","","","","Returns the argument unchanged.","Sender","Gas amount","Gas Price","Hash","Data","Calls U::from(self).","Configured max fee per blob gas for eip-4844 transactions","Max BaseFeePerGas the user is willing to pay.","The miner’s tip.","Nonce","Arbitrary extra fields.","","","","Signature related RPC values","All flattened fields of the transaction signature.","Recipient","","Transaction Index","EIP2718","","","","","The TransactionRequest is a universal representation for a …","Transferred value","","AccessList as defined in EIP-2930","A list of addresses and storage keys that the transaction …","Access list with gas used appended.","","","List with accounts accessed during transaction.","Account addresses that would be loaded at the start of …","","","","","","","","","","","","","","","","","","","","","","","","","","Returns an iterator over the list’s addresses and …","Converts the list into a vec, expected by revm","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Estimated gas used with access list.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Consumes the type and returns an iterator over the list’…","Consumes the type and converts the list into a vec, …","","","","","","Calculates a heuristic for the in-memory size of the …","Calculates a heuristic for the in-memory size of the …","Keys of storage that would be loaded at the start of …","","","","","","","","","","","","","","","","Additional fields in the context of a block that contains …","Base fee of the block.","Hash of the block.","Number of the block.","","","","","","","","Returns the argument unchanged.","Hash of the transaction.","Index of the transaction in the block","Calls U::from(self).","","","","","","Transaction receipt","The price paid by the eip-4844 transaction per blob gas.","Blob gas used by the eip-4844 transaction","Hash of the block this transaction was included within.","Number of the block this transaction was included within.","","","","","Contract address created, or None if not a deployment.","Cumulative gas used within the block after this was …","","The price paid post-execution by the transaction (i.e. …","","","Returns the argument unchanged.","Address of the sender","Gas used by this transaction alone.","Calls U::from(self).","Logs emitted by this transaction.","Logs bloom","Support for arbitrary additional fields.","","The post-transaction stateroot (pre Byzantium)","Status: either 1 (success) or 0 (failure). Only present …","Address of the receiver. null when its a contract creation …","","Transaction Hash.","Index within the block.","EIP-2718 Transaction type, Some(1) for AccessList …","","","","","Represents all transaction requests received from RPC","Sets the access list for the transaction.","warm storage access pre-payment","","","","","Any additional data sent","","","","","Returns the argument unchanged.","from address","gas","Sets the gas limit for the transaction.","legacy, gas Price","Sets the input data for the transaction.","Calls U::from(self).","Converts the request into a TypedTransactionRequest","Sets the maximum fee per gas for the transaction.","max base fee per gas sender is willing to pay","Sets the maximum priority fee per gas for the transaction.","miner tip","Sets the nonce for the transaction.","Transaction nonce","","Sets the recipient address for the transaction.","to address","","Sets the transactions type for the transactions.","EIP-2718 type","","","","Sets the value (amount) for the transaction.","value of th tx in wei","","Type that represents the signature parity byte, meant for …","Container type for all signature fields in RPC","","","","","","","","","Decodes the y_parity, r, s values without a RLP header.","","Decodes the v, r, s values without a RLP header. This will …","","","","This implementation disallows serialization of the y …","Encode the y_parity, r, s values without a RLP header. …","","Encode the v, r, s values without a RLP header. Encodes …","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","","Output the length of the signature without the length of …","Output the length of the signature without the length of …","The R field of the signature; the point on the curve.","The S field of the signature; the point on the curve.","","","","Calculates a heuristic for the in-memory size of the …","Turn this signature into its byte (hex) representation. …","Turn this signature into its hex-encoded representation.","","","","","","","","","Output the v of the signature depends on chain_id","For EIP-155, EIP-2930 and Blob transactions this is set to …","","","The y parity of the signature. This is only used for typed …","Transaction with Priority fee","Identifier for an EIP1559 transaction.","AccessList transaction","Identifier for an EIP2930 transaction.","Shard Blob Transactions - EIP-4844","Identifier for an EIP4844 transaction.","Identifier for legacy transaction, however a legacy tx is …","Legacy transaction pre EIP-2929","Transaction Type","","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","Transaction will call this address or transfer funds to …","No to field set, this transaction will create a contract","An EIP1559 Transaction Request.","Represents an EIP-1559 transaction request","An EIP2930 transaction request.","Represents an EIP-2930 transaction request","A Legacy Transaction request.","Represents a legacy transaction request","Represents the to field of a transaction request","Container type for various Ethereum transaction requests","","","If this transaction is a call this returns the address of …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Decodes the inner fields from RLP bytes.","Decodes the inner fields from RLP bytes.","","Outputs the length of EIP-155 fields. Only outputs a …","","","","","","Encodes EIP-155 arguments into the desired buffer. Only …","Encodes only the transaction’s fields into the desired …","Encodes only the transaction’s fields into the desired …","Encodes only the transaction’s fields into the desired …","Encodes the legacy transaction in RLP for signing, …","Encodes the EIP-2930 transaction in RLP for signing.","Encodes the legacy transaction in RLP for signing.","Inner encoding function that is used for both rlp Encodable…","Inner encoding function that is used for both rlp Encodable…","","","","","","Outputs the length of the transaction’s fields, without …","Outputs the length of the transaction’s fields, without …","Encodes only the transaction’s fields into the desired …","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","Outputs the length of the signature RLP encoding for the …","Outputs the length of the signature RLP encoding for the …","Outputs the length of the signature RLP encoding for the …","Output the length of the RLP signed transaction encoding. …","Output the length of the RLP signed transaction encoding. …","Output the length of the RLP signed transaction encoding, …","Output the length of the RLP signed transaction encoding, …","","Outputs the signature hash of the transaction by first …","Outputs the signature hash of the transaction by first …","Outputs the signature hash of the transaction by first …","Calculates a heuristic for the in-memory size of the …","Calculates a heuristic for the in-memory size of the …","Calculates a heuristic for the in-memory size of the …","Calculates a heuristic for the in-memory size of the …","","","","","","","","","","","","","","","","Get transaction type","Get transaction type","","","","","","","","","","","","","","Transaction Pool Content","Transaction Pool Content From","Transaction Pool Inspect","Transaction summary as found in the Txpool Inspection …","Visitor struct for TxpoolInspectSummary.","Transaction Pool Status","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Gas amount","Gas Price","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","pending tx","pending tx","pending tx","number of pending tx","queued tx","queued tx","queued tx","number of queued tx","Removes the transactions from the given sender","","","","","","Recipient (None when contract creation)","","","","","","","","","","","","","","","","","","","","","","","","Transferred value","","","","","","","","","Same as Withdrawal but respects the Beacon API format …","Multiplier for converting gwei to wei.","Withdrawal represents a validator withdrawal from the …","","","Target address for withdrawn ether.","","Value of the withdrawal in gwei.","","Return the withdrawal amount in wei.","A helper serde module to convert from/to the Beacon API …","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","Monotonically increasing identifier issued by consensus …","","Calls U::from(self).","Calls U::from(self).","","","","","Calculate a heuristic for the in-memory size of the …","","","","","","","","Index of validator associated with withdrawal.","","","","Deserialize the payload attributes for the beacon API.","Serialize the payload attributes for the beacon API.","Wrapper around primitive U256 type that also supports …","Supports parsing U256 numbers as strings via JsonU256","A hex U256","An integer","An enum that represents either a serde_json::Number …","A u64 wrapper type that deserializes from hex or a u64 and …","Deserializes the input into a U256, accepting both …","Deserializes the input into an Option<U256>, using …","serde functions for handling primitive optional u64 as U64","Deserializes an u64 accepting a hex quantity string with …","Serializes u64 as hex string","A type that is supposed to capture additional fields that …","Contains all unknown fields","Boolean parameter for new pending transactions.","Current Stats about syncing","Full Transaction","New block header.","Log","Logs subscription.","Log parameters.","New block headers subscription.","New Pending Transactions subscription.","No parameters passed.","Any additional parameters for a subscription.","Response type for a SyncStatus subscription","If not currently syncing, this should always be false","Subscription kind.","Subscription result.","SyncStatus","Sync status infos","Node syncing status subscription.","Transaction hash","","","","","Ethereum Log","Contract that emitted this log.","Arbitrary length data.","Calculate receipt logs bloom.","Topics of the log. The number of logs depend on what LOG …","Represents the rpc_modules response, which returns the …","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","Consumes self and returns the inner hashmap mapping module …","","Create a new instance of RPCModules","","","","","","","Deserializes the input into a U256, accepting both …","Json U256 serde helpers.","Numeric serde helpers.","Serialize a byte vec as a hex string without the “0x” …","Storage related helpers.","Helper to deserialize an u64 from U64 accepting a hex …","Wrapper around primitive U256 type that also supports …","","","","","","","","","","","Supports parsing U256 numbers as strings via JsonU256","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","A hex U256","An integer","An enum that represents either a serde_json::Number …","A u64 wrapper type that deserializes from hex or a u64 and …","","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Deserializes the input into a U256, accepting both …","Deserializes the input into an Option<U256>, using …","","Calls U::from(self).","Calls U::from(self).","","","Returns the wrapped u64","","","","","","Tries to convert this into a U256].","","","serde functions for handling primitive optional u64 as U64","","","Deserializes an u64 accepting a hex quantity string with …","Serializes u64 as hex string","A storage key type that can be serialized to and from a …","","","","","","","Deserializes the input into an Option<HashMap<B256, …","","","Returns the argument unchanged.","","Converts a Bytes value into a B256, accepting inputs that …","Calls U::from(self).","","","","","","","Deserializes an u64 from U64 accepting a hex quantity …","Serializes u64 as hex string","Custom account override used in call","A set of account overrides","Fake balance to set for the account before executing the …","","Fake EVM bytecode to inject into the account before …","Fake nonce to set for the account before executing the …","Fake key-value mapping to override all slots in the …","Fake key-value mapping to override individual slots in the …","A storage key type that can be serialized to and from a …","Deserializes the input into an Option<HashMap<B256, …","Converts a Bytes value into a B256, accepting inputs that …","Helper type to track the kind of change of an AccountState.","Serde-friendly AccountDiff shadow.","Represents the state of an account","Action","An external action type.","Added variant.","Block","blockTraceResult represents the results of tracing a …","built-in tracer","Call","Contract call.","Call","Output of a regular call transaction.","Represents a certain CallType of a call or message …","Call code","","The response object for debug_traceTransaction with …","","Call out put type","The response for call tracer","The callTracer tracks all the call frames executed during …","Call type.","Changed variant.","Aux type for Diff::Changed.","","Create","Contract creation.","Output of a CREATE transaction.","Represents a create action, either a CREATE operation or a …","Represents the output of a create operation.","The default mode returns the accounts necessary to execute …","The response for the default struct log tracer","Geth Default struct log trace frame","Delegate call","Delta type","Diff mode returns the differences between the transaction…","Represents the account states before and after the …","Helper type for DiffMode to represent a specific set","Untagged error variant","…","The response for four byte tracer","The 4byteTracer collects the function selectors of every …","Available built-in tracers","Configuration of the tracer","Available tracers","Bindings for additional debug_traceCall options","Bindings for additional debug_traceTransaction options","Default tracing options for the struct looger.","Tracing response objects","Only return traces for transactions with matching from and …","Any other trace response, such as custom javascript …","custom JS tracer","Localized transaction trace.","A diff of some chunk of memory.","","None","An empty frame response that’s only an empty json object …","An empty json response","This tracer is noop. It returns an empty object and is …","Corresponds to the post state of the DiffMode","Corresponds to the pre state of the DiffMode","The config for the prestate tracer.","A tracer that records AccountStates. The prestate tracer …","","The response for pre-state byte tracer","The prestate tracer has two modes: prestate and diff. The …","Removed variant.","Reward","A block reward.","Reward Action.","Reward type.","","Parity style traces never renamed suicide to selfdestruct: …","Contract suicide/selfdestruct.","Represents a selfdestruct action fka suicide.","New-type for list of account diffs","Provides information detailing all altered portions of the …","Static call","A diff of some storage value.","Represents a struct log entry in a trace","Untagged success variant","Default trace","Container type for trace_call arguments","Trace filter.","Helper type for matching from and to addresses. Empty sets …","How to apply from_address and to_address filters.","Represents the output of a trace.","Result type for geth style transaction trace","The Outcome of a traced transaction with optional settings","A FullTrace with an additional transaction hash","Different Trace diagnostic targets.","A parity style trace of a transaction.","Unchanged variant.","Uncle","Return traces for transactions with matching from OR to …","A record of an executed VM operation.","Vm instruction type.","A record of a full VM trace for a CALL/CREATE.","Provides a full trace of the VM’s state throughout the …","Transaction action.","","destroyed/suicided address.","Address output.","Output offset","Author’s address.","","Balance change.","Balance of the contract just before it was destroyed.","Block number corresponding to the trace task","Hash of the block, if not pending.","Optional: blockId","Block number the transaction is included in, None if …","The block overrides to apply","Optional: BlockOverrides","","call request object","The type of the call.","","","Code change.","Code data.","The code to be executed.","Types used by tracing backends","","The gas cost for this instruction.","Output amount","","The changed data.","print output during capture end","Current call depth","","Disable memory capture","Disable return data capture","disable stack capture","Disable storage capture","enable memory capture","Enable return data capture","","Error message if any","Error message.","Information concerning the execution of the operation.","","trace_filter types and support","","","Previous value.","Address of the sending account.","The address of the creator.","From address","","From block","Full trace data.","","","remaining gas","The gas available for executing the call.","The gas available for the creation init code.","cost for executing op","","Gas Used.","Resulting address.","Geth tracing types","Block hash corresponding to the trace task","Index.","The init code.","","The input data provided to the call.","Key.","maximum length of output, but zero means unlimited","","If altered, the memory delta.","ref …","Size of memory.","How to apply from_address and to_address filters.","","","Nonce change.","","Offset into memory the change begins.","When set to true, this will only trace the primary …","opcode to be executed","Stringified opcode.","All executed instructions.","","Output of the trace","Output","Types for trace module.","program counter","The program counter.","The account states after the transaction is executed.","The account states before the transaction is executed.","","The stack item placed, if any.","destroyed contract heir.","Refund counter","Execution result.","Last call’s return data. Enabled via enableReturnData","","","Reward type.","EVM stack","Enabled if TraceType::StateDiff is provided","The state overrides to apply","Optional: StateOverride","","Storage slots of current contract read from and written …","Storage changes.","The altered storage value, if any.","","Subordinate trace of the CALL/CREATE if applicable.","Subtrace count.","A string of decimal integers that overrides the …","","Current value.","Address of the destination/target account.","To address","","To block","","Enabled if TraceType::Trace is provided, otherwise an …","Trace of the transaction and its result. Trace of the …","Trace address path.","trace types","The custom tracer to use.","Config specific to given tracer.","Builder style functions for trace_call","Trace results produced by the trace task","","Transaction hash.","Hash of the transaction","Transaction index within the block, None if pending.","","The total gas used.","Value.","","Value transferred to the destination account.","The value with which the new account is endowed.","Reward amount.","Enabled if TraceType::VmTrace is provided","","","","","The response object for debug_traceTransaction with …","","","","","","","","","","","When set to true, this will only trace the primary …","","","","","","","","Untagged error variant","Untagged success variant","The result of a single transaction trace.","","","Only return traces for transactions with matching from and …","Trace filter.","Helper type for matching from and to addresses. Empty sets …","How to apply from_address and to_address filters.","Return traces for transactions with matching from OR to …","Output offset","Output amount","From address","","From block","How to apply from_address and to_address filters.","","To address","","To block","…","Helper type to track the kind of change of an AccountState.","Represents the state of an account","blockTraceResult represents the results of tracing a …","built-in tracer","","The response object for debug_traceTransaction with …","","The response for call tracer","The callTracer tracks all the call frames executed during …","","The default mode returns the accounts necessary to execute …","The response for the default struct log tracer","Geth Default struct log trace frame","Diff mode returns the differences between the transaction…","Represents the account states before and after the …","Helper type for DiffMode to represent a specific set","Untagged error variant","…","The response for four byte tracer","The 4byteTracer collects the function selectors of every …","Available built-in tracers","Configuration of the tracer","Available tracers","Bindings for additional debug_traceCall options","Bindings for additional debug_traceTransaction options","Default tracing options for the struct looger.","Tracing response objects","Any other trace response, such as custom javascript …","custom JS tracer","","An empty frame response that’s only an empty json object …","An empty json response","This tracer is noop. It returns an empty object and is …","Corresponds to the post state of the DiffMode","Corresponds to the pre state of the DiffMode","The config for the prestate tracer.","A tracer that records AccountStates. The prestate tracer …","","The response for pre-state byte tracer","The prestate tracer has two modes: prestate and diff. The …","","Represents a struct log entry in a trace","Untagged success variant","Result type for geth style transaction trace","","","Block number corresponding to the trace task","The block overrides to apply","","","","","","print output during capture end","Current call depth","","Disable memory capture","Disable return data capture","disable stack capture","Disable storage capture","enable memory capture","Enable return data capture","","Error message if any","","","","","","remaining gas","cost for executing op","","Block hash corresponding to the trace task","","maximum length of output, but zero means unlimited","","ref …","Size of memory.","","","When set to true, this will only trace the primary …","opcode to be executed","","program counter","The account states after the transaction is executed.","The account states before the transaction is executed.","","Refund counter","Last call’s return data. Enabled via enableReturnData","","","EVM stack","The state overrides to apply","","Storage slots of current contract read from and written …","","A string of decimal integers that overrides the …","","","The custom tracer to use.","Config specific to given tracer.","Trace results produced by the trace task","","","","","","","","The response object for debug_traceTransaction with …","","","","","","","","","","","When set to true, this will only trace the primary …","","","","","","","","…","An empty frame response that’s only an empty json object …","Helper type to track the kind of change of an AccountState.","Represents the state of an account","","The default mode returns the accounts necessary to execute …","Diff mode returns the differences between the transaction…","Represents the account states before and after the …","Helper type for DiffMode to represent a specific set","","Corresponds to the post state of the DiffMode","Corresponds to the pre state of the DiffMode","The config for the prestate tracer.","A tracer that records AccountStates. The prestate tracer …","","","","","","","The account states after the transaction is executed.","The account states before the transaction is executed.","","An empty frame response that’s only an empty json object …","Serde-friendly AccountDiff shadow.","Action","An external action type.","Added variant.","Block","Call","Contract call.","Call","Output of a regular call transaction.","Represents a certain CallType of a call or message …","Call code","Call out put type","Call type.","Changed variant.","Aux type for Diff::Changed.","Create","Contract creation.","Output of a CREATE transaction.","Represents a create action, either a CREATE operation or a …","Represents the output of a create operation.","Delegate call","Delta type","Localized transaction trace.","A diff of some chunk of memory.","None","Removed variant.","Reward","A block reward.","Reward Action.","Reward type.","Parity style traces never renamed suicide to selfdestruct: …","Contract suicide/selfdestruct.","Represents a selfdestruct action fka suicide.","New-type for list of account diffs","Provides information detailing all altered portions of the …","Static call","A diff of some storage value.","Default trace","Represents the output of a trace.","The Outcome of a traced transaction with optional settings","A FullTrace with an additional transaction hash","Different Trace diagnostic targets.","A parity style trace of a transaction.","Unchanged variant.","Uncle","A record of an executed VM operation.","Vm instruction type.","A record of a full VM trace for a CALL/CREATE.","Provides a full trace of the VM’s state throughout the …","Transaction action.","destroyed/suicided address.","Address output.","Author’s address.","Balance change.","Balance of the contract just before it was destroyed.","Hash of the block, if not pending.","Block number the transaction is included in, None if …","The type of the call.","Code change.","Code data.","The code to be executed.","The gas cost for this instruction.","The changed data.","Error message.","Information concerning the execution of the operation.","Previous value.","Address of the sending account.","The address of the creator.","Full trace data.","The gas available for executing the call.","The gas available for the creation init code.","Gas Used.","Resulting address.","Index.","The init code.","The input data provided to the call.","Key.","If altered, the memory delta.","Nonce change.","Offset into memory the change begins.","Stringified opcode.","All executed instructions.","Output of the trace","Output","The program counter.","The stack item placed, if any.","destroyed contract heir.","Execution result.","Reward type.","Enabled if TraceType::StateDiff is provided","Storage changes.","The altered storage value, if any.","Subordinate trace of the CALL/CREATE if applicable.","Subtrace count.","Current value.","Address of the destination/target account.","Enabled if TraceType::Trace is provided, otherwise an …","Trace of the transaction and its result. Trace of the …","Trace address path.","Transaction hash.","Hash of the transaction","Transaction index within the block, None if pending.","The total gas used.","Value.","Value transferred to the destination account.","The value with which the new account is endowed.","Reward amount.","Enabled if TraceType::VmTrace is provided","Helper type to track the kind of change of an AccountState.","Represents the state of an account","","The default mode returns the accounts necessary to execute …","Diff mode returns the differences between the transaction…","Represents the account states before and after the …","Helper type for DiffMode to represent a specific set","","Corresponds to the post state of the DiffMode","Corresponds to the pre state of the DiffMode","The config for the prestate tracer.","A tracer that records AccountStates. The prestate tracer …","","","","","","","The account states after the transaction is executed.","The account states before the transaction is executed.","","Container type for trace_call arguments","Optional: blockId","Optional: BlockOverrides","call request object","Optional: StateOverride","trace types","Transaction Pool Content","Transaction Pool Content From","Transaction Pool Inspect","Transaction summary as found in the Txpool Inspection …","Transaction Pool Status","Gas amount","Gas Price","pending tx","pending tx","pending tx","number of pending tx","queued tx","queued tx","queued tx","number of queued tx","Recipient (None when contract creation)","Transferred value","Deserializes an u64 from U64 accepting a hex quantity …","Serializes u64 as hex string","Multiplier for converting gwei to wei.","Withdrawal represents a validator withdrawal from the …","Target address for withdrawn ether.","Value of the withdrawal in gwei.","A helper serde module to convert from/to the Beacon API …","Monotonically increasing identifier issued by consensus …","Index of validator associated with withdrawal.","Deserialize the payload attributes for the beacon API.","Serialize the payload attributes for the beacon API."],"i":[0,0,0,0,80,84,0,0,0,0,0,0,0,0,0,0,0,0,0,195,0,0,0,0,195,0,0,194,188,0,0,194,188,0,0,194,0,28,87,0,0,0,0,0,0,0,0,0,28,0,31,34,89,25,23,31,34,87,89,0,115,0,121,48,0,28,194,188,0,0,0,87,49,121,88,28,25,23,115,0,0,0,49,49,0,0,0,0,0,0,28,0,0,84,0,0,0,0,0,48,0,0,28,0,0,88,0,0,100,0,0,0,0,0,0,0,87,0,0,0,0,0,0,0,0,31,80,0,0,73,183,187,197,198,61,0,14,114,14,16,78,94,6,181,207,207,14,41,185,36,76,186,36,186,73,61,123,30,41,94,185,186,61,70,94,185,186,61,78,69,116,73,196,197,198,61,14,41,114,186,186,113,67,94,6,187,36,41,119,120,186,71,0,118,36,36,52,53,39,91,122,73,186,187,61,0,73,187,61,199,36,41,196,197,198,73,187,196,197,61,199,36,75,183,186,76,216,36,38,185,61,119,120,35,50,113,116,185,207,52,53,39,50,73,67,196,197,198,61,16,0,13,196,197,198,117,94,186,0,36,186,114,73,61,73,187,198,61,73,187,198,61,15,36,36,209,12,15,116,116,14,36,73,187,196,197,198,61,0,216,36,38,41,76,0,35,186,61,71,36,36,50,114,200,201,202,203,118,13,122,116,16,0,200,201,202,203,190,41,0,36,117,94,30,75,76,0,190,0,0,61,35,113,0,36,186,186,0,14,181,14,41,36,73,186,187,61,199,78,94,6,35,0,94,186,70,94,186,61,73,186,187,61,35,69,36,0,0,35,36,15,190,207,13,73,187,196,197,198,61,199,119,120,113,113,0,35,36,190,217,217,0,0,0,0,0,14,14,16,14,14,16,13,15,12,15,14,13,16,14,14,15,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,16,14,12,13,14,15,16,12,13,14,15,16,12,13,14,15,16,12,13,14,15,16,14,12,13,14,15,12,13,14,15,16,12,13,14,15,12,13,14,15,16,12,13,14,15,16,12,13,14,15,16,16,13,15,12,15,14,13,16,12,13,14,15,16,14,14,12,13,14,15,16,12,13,14,15,16,12,13,14,15,16,12,13,14,15,16,15,13,12,13,14,15,16,0,0,0,0,0,0,0,0,0,0,0,0,0,28,28,0,31,33,47,34,25,23,31,33,47,34,0,0,48,28,49,28,25,23,0,0,49,49,28,0,0,0,48,0,28,31,33,47,0,23,23,23,25,28,23,30,41,36,36,30,41,31,32,33,46,47,34,48,35,36,30,28,49,37,25,38,23,50,39,41,31,32,33,46,47,34,48,35,36,30,28,49,37,25,38,23,50,39,41,31,32,33,34,35,36,30,28,37,25,38,23,39,41,31,32,33,34,35,36,30,28,37,25,38,23,39,41,41,31,23,28,37,25,38,41,39,31,35,36,28,25,23,39,41,36,41,23,31,34,35,36,30,28,25,38,23,39,41,36,36,52,53,39,31,32,33,46,47,34,48,48,35,36,30,28,28,49,49,37,37,25,38,23,50,50,39,41,52,53,31,32,33,46,47,34,34,48,35,36,30,30,28,28,28,49,49,49,49,37,25,25,25,25,25,25,38,38,38,23,23,23,50,39,41,30,28,23,36,41,36,36,28,38,23,216,36,38,31,31,35,50,52,53,39,50,31,32,33,46,47,34,48,35,36,30,28,49,37,25,38,23,50,39,41,38,35,31,32,46,28,28,28,25,28,28,25,28,31,31,32,46,23,36,38,36,36,32,46,38,32,46,32,46,36,216,36,38,41,35,36,36,50,41,36,30,31,35,36,30,28,25,23,39,41,35,32,46,23,49,36,41,36,31,32,33,34,35,36,30,28,37,25,38,23,39,41,48,28,49,37,50,35,35,36,31,32,33,46,47,34,48,35,36,30,28,49,37,25,38,23,50,39,41,31,32,33,46,47,34,48,35,36,30,28,49,37,25,38,23,50,39,41,31,32,33,46,47,34,48,35,36,30,28,49,37,25,38,23,50,39,41,31,35,36,31,32,33,46,47,34,48,35,36,30,28,49,37,25,38,23,50,39,41,35,36,72,0,0,0,0,0,72,0,0,73,73,70,69,69,70,71,72,73,67,68,69,70,71,72,73,67,68,73,67,69,70,71,72,73,67,69,70,71,72,73,67,67,69,70,71,72,73,67,68,69,70,71,72,73,67,69,70,71,72,73,67,71,73,69,70,71,72,73,67,68,68,69,70,71,72,73,67,67,67,68,73,73,73,73,73,67,72,67,73,67,69,70,71,72,73,67,68,67,72,73,73,73,67,67,73,71,69,70,71,72,73,67,73,69,70,71,72,73,67,68,70,73,69,69,70,71,72,73,67,68,69,70,71,72,73,67,68,67,69,70,71,72,73,67,68,67,73,69,70,71,72,73,67,68,0,0,76,75,76,75,76,75,76,75,76,75,76,76,75,76,75,76,75,76,75,76,75,76,76,75,75,76,76,75,76,75,76,75,76,75,76,75,76,218,80,84,0,87,0,0,0,0,0,0,89,87,89,87,88,0,84,0,0,88,0,87,218,80,0,78,78,91,84,78,78,83,82,84,78,80,91,87,88,89,83,82,84,78,80,91,87,88,89,219,82,84,78,80,87,88,89,82,84,78,80,87,88,89,83,82,84,78,91,89,82,78,80,87,88,89,82,84,78,80,87,88,89,78,78,78,91,91,91,91,91,83,82,84,78,80,91,87,88,89,93,83,83,82,82,82,82,82,82,84,84,84,84,84,84,84,84,78,80,80,80,80,91,87,88,88,89,78,78,84,78,84,78,78,82,84,78,80,88,83,82,84,78,80,91,87,88,89,82,78,219,83,82,91,91,78,91,78,78,80,87,88,89,84,84,84,78,82,82,84,78,80,87,88,89,82,78,78,78,78,78,91,83,82,84,78,80,91,87,88,89,83,82,84,78,80,91,87,88,89,83,82,84,78,80,91,87,88,89,83,82,84,78,80,91,87,88,89,217,217,0,0,100,94,94,94,94,100,94,100,94,94,94,94,94,94,100,100,94,100,94,94,100,94,94,94,94,100,94,94,94,94,100,94,100,94,100,94,100,0,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,111,108,107,107,107,110,111,110,110,111,0,0,108,0,0,107,0,110,107,107,108,109,110,111,107,108,109,110,111,107,108,109,110,111,107,108,109,110,111,109,111,107,108,109,110,111,107,108,109,110,111,107,108,109,110,111,107,108,109,110,111,110,109,107,108,109,110,111,111,111,107,108,109,110,111,109,109,107,108,109,110,111,107,108,109,110,111,107,108,109,110,111,107,108,109,110,111,107,108,109,110,111,0,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,6,6,6,6,6,6,0,0,112,180,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,0,115,121,121,115,0,0,0,0,0,0,0,0,0,0,114,123,113,114,115,116,117,118,119,120,121,122,123,113,114,115,116,117,118,119,120,121,122,123,116,113,114,115,116,117,118,119,120,121,122,123,113,114,115,116,117,118,119,120,121,122,123,114,113,113,114,116,117,118,119,120,122,123,113,115,116,117,118,119,120,121,119,120,113,121,118,122,113,114,115,116,117,118,119,120,121,122,123,113,114,115,116,117,118,119,120,121,122,123,119,120,113,116,113,114,115,116,117,118,119,120,121,122,123,117,114,116,116,114,118,122,116,117,113,114,115,116,117,118,119,120,121,122,123,113,113,114,115,116,117,118,119,120,121,122,123,113,114,115,116,117,118,119,120,121,122,123,113,114,115,116,117,118,119,120,121,122,123,113,114,115,116,117,118,119,120,121,122,123,119,120,113,114,115,116,117,118,119,120,121,122,123,113,113,0,0,0,0,0,124,124,0,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,220,221,126,0,0,0,126,125,125,126,127,125,126,127,125,126,127,125,126,127,125,125,126,125,126,125,126,127,125,126,127,125,126,127,125,127,125,125,126,127,125,127,125,127,125,126,125,127,125,125,126,127,125,126,127,125,126,127,125,126,127,125,126,127,0,0,0,135,0,0,0,133,134,133,0,0,0,222,0,133,134,0,0,0,0,0,0,0,133,135,0,133,134,0,0,0,133,134,0,222,0,130,138,130,131,132,133,134,135,136,128,137,138,130,131,132,133,134,135,136,128,137,138,0,128,130,131,132,133,134,135,136,128,137,138,130,131,132,133,134,135,136,128,137,138,128,137,137,130,131,132,136,128,137,138,132,130,131,132,133,134,135,136,128,137,138,137,137,137,137,137,137,137,137,137,137,137,137,130,131,132,133,134,135,136,128,137,138,132,131,130,131,132,133,134,135,136,128,137,138,0,130,131,132,133,133,133,133,133,133,134,135,135,136,136,128,137,138,136,131,132,132,130,130,131,132,133,134,135,136,128,137,138,136,136,136,137,136,137,137,137,137,132,132,0,132,132,0,128,132,132,131,130,131,132,133,134,135,136,128,137,138,0,132,138,132,131,128,130,131,132,133,134,135,136,128,137,138,128,128,130,138,130,131,132,133,134,135,136,128,137,138,130,131,132,133,134,135,136,128,137,138,130,131,132,133,134,135,136,128,137,138,130,131,132,133,134,135,136,128,137,138,137,137,137,137,137,137,137,137,128,128,220,221,0,0,0,146,141,146,129,141,146,129,141,141,146,129,141,146,129,146,141,146,129,141,146,129,141,146,129,141,141,146,129,141,146,129,141,141,141,141,141,146,129,141,129,129,141,141,141,146,129,141,141,146,129,146,141,146,129,141,146,129,141,141,146,129,141,141,146,129,129,129,0,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,0,0,142,147,142,147,142,147,142,147,147,142,147,142,147,142,147,142,147,142,147,142,147,147,142,147,142,147,142,147,142,147,142,147,142,147,0,0,152,140,140,0,0,152,150,150,0,0,0,152,140,140,151,140,148,149,150,151,152,144,140,148,149,150,151,152,144,140,148,149,150,151,152,144,140,148,149,150,151,152,144,151,148,149,151,152,144,140,148,149,151,152,144,144,140,148,149,150,151,152,144,140,148,149,150,151,152,144,140,148,149,150,151,152,144,151,151,152,140,148,149,150,151,152,144,152,140,144,140,144,152,150,150,152,151,149,149,151,149,149,140,148,149,151,152,144,151,140,148,149,150,151,152,144,140,148,149,150,151,152,144,140,148,149,150,151,152,144,140,148,149,150,151,152,144,140,148,149,150,151,152,144,0,0,0,153,165,160,161,162,170,0,162,0,0,153,0,160,161,170,0,0,162,0,0,0,162,153,160,161,0,0,160,161,0,0,154,162,0,154,0,0,0,0,0,153,165,0,0,0,154,171,167,169,166,158,167,172,172,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,163,153,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,158,169,173,174,176,153,158,159,162,173,159,159,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,171,174,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,157,163,164,156,163,164,170,168,169,154,174,164,163,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,153,160,153,160,153,160,160,153,177,160,175,158,176,174,173,155,168,174,175,167,171,166,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,170,155,155,158,175,174,171,157,163,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,155,172,171,156,172,172,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,175,177,163,164,166,155,154,155,156,157,153,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,0,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,0,0,0,0,0,0,0,0,0,0,61,61,61,61,61,61,61,61,61,0,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,0,0,61,0,61,61,61,61,61,61,61,0,61,0,61,61,0,0,0,181,182,183,181,181,182,183,181,182,183,181,182,183,181,182,183,181,182,181,182,183,181,182,183,181,182,181,182,183,182,182,181,182,183,181,182,183,183,181,182,181,182,183,182,182,181,182,181,182,183,181,182,181,181,182,183,181,182,183,181,182,183,181,182,183,181,182,183,0,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,0,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,186,0,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,187,0,0,190,191,190,191,190,191,190,191,190,191,190,190,190,191,0,190,191,190,190,191,190,191,190,191,191,191,190,191,190,191,191,190,190,190,190,190,191,0,190,190,190,190,191,190,191,190,191,190,191,190,190,190,191,190,194,0,194,0,194,0,0,194,0,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,195,195,188,0,188,0,188,0,0,0,197,198,195,188,196,197,198,195,188,196,197,198,195,196,197,198,188,196,197,198,195,188,196,197,198,195,188,196,197,198,195,197,198,195,196,188,196,197,198,195,196,196,197,198,196,197,198,197,198,188,196,197,198,195,196,197,198,188,196,197,198,195,188,196,197,198,195,196,197,198,196,197,195,196,197,198,188,196,197,198,195,196,197,198,188,196,197,198,195,198,198,196,197,198,196,197,198,197,198,197,198,195,196,197,198,196,197,198,195,188,196,197,198,195,188,196,197,198,195,188,196,197,198,195,197,198,188,196,197,198,195,196,197,198,188,196,197,198,195,0,0,0,0,0,0,204,199,200,201,202,203,204,199,200,201,202,203,199,200,201,202,203,199,200,201,202,203,200,201,202,203,199,200,201,202,203,199,200,201,202,203,204,204,199,200,201,202,203,204,199,200,201,202,203,199,199,204,199,200,201,202,203,200,201,202,203,200,201,202,203,200,199,200,201,202,203,199,199,200,201,202,203,204,199,200,201,202,203,204,199,200,201,202,203,204,199,200,201,202,203,199,204,204,204,199,200,201,202,203,0,0,0,207,207,207,208,207,208,207,0,207,208,207,208,207,207,207,207,207,208,208,207,207,207,207,208,207,207,208,207,208,207,207,208,208,207,207,207,208,207,208,207,208,207,208,207,208,0,0,0,0,214,214,0,0,0,0,0,0,0,0,101,111,108,107,107,107,110,111,110,110,111,0,0,108,0,0,107,0,110,107,109,109,109,109,0,6,6,0,6,0,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,0,0,0,0,0,0,0,0,212,211,212,211,211,211,211,211,211,0,211,212,212,211,212,211,211,211,212,211,211,211,211,212,211,212,211,212,211,212,212,212,212,211,214,214,0,0,213,214,213,214,213,213,213,213,214,213,213,214,213,213,213,214,0,0,213,213,214,213,213,213,213,213,214,213,214,214,213,214,0,213,214,0,0,0,215,215,215,215,215,215,0,215,215,215,215,0,215,215,215,215,215,215,215,0,0,0,0,112,180,112,112,112,112,0,0,0,0,0,0,0,0,153,165,0,135,160,161,162,170,0,162,0,0,0,0,133,134,0,153,0,152,160,161,170,0,0,140,133,0,162,0,140,0,0,222,0,133,134,0,0,0,0,0,0,0,126,133,135,0,0,152,162,0,133,134,150,150,0,0,0,133,134,153,160,161,0,0,152,160,161,0,0,154,162,0,0,222,154,0,0,0,0,0,0,0,0,0,0,153,165,126,0,0,0,154,171,146,167,169,125,166,151,158,167,130,172,178,172,138,178,0,178,163,141,151,158,169,173,0,128,174,125,146,176,137,132,144,137,137,137,137,137,137,141,132,171,174,131,0,0,141,157,163,164,125,127,125,156,141,131,132,163,164,132,141,168,169,0,130,174,164,141,163,177,137,141,175,132,132,125,127,151,158,0,176,129,132,174,173,141,155,168,0,132,174,149,149,0,175,167,132,171,132,131,141,166,132,155,138,178,151,132,158,175,131,174,171,128,141,157,163,125,127,125,146,155,172,171,178,128,128,0,130,138,156,172,172,141,175,177,141,163,164,166,155,129,220,221,0,0,0,146,141,146,141,141,141,141,141,141,129,141,141,141,146,141,141,129,124,124,0,220,221,126,0,0,0,126,125,125,125,127,125,125,127,125,127,125,0,0,0,0,135,0,0,0,133,134,152,140,133,0,140,0,0,222,0,133,134,0,0,0,0,0,0,0,133,135,152,0,133,134,150,150,0,0,0,133,134,152,0,222,0,146,151,130,138,0,141,151,128,146,137,132,144,137,137,137,137,137,137,141,132,131,0,141,141,131,132,132,141,130,141,137,141,132,132,151,0,129,132,141,132,149,149,0,132,132,131,141,132,138,151,132,131,128,141,146,128,128,130,138,141,141,129,220,221,0,0,0,146,141,146,141,141,141,141,141,141,129,141,141,141,146,141,141,129,0,0,0,0,152,140,140,0,0,152,150,150,0,0,0,152,151,151,144,151,149,149,151,0,0,0,0,153,165,160,161,162,170,0,162,0,0,153,0,160,161,170,0,0,162,0,0,0,162,153,160,161,0,0,160,161,0,0,154,162,0,154,0,0,0,0,0,153,165,0,0,0,154,171,167,169,166,158,167,172,172,163,158,169,173,174,176,171,174,157,163,164,156,163,164,168,169,174,164,163,177,175,158,176,174,173,155,168,174,175,167,171,166,155,158,175,174,171,157,163,155,172,171,156,172,172,175,177,163,164,166,155,0,0,152,140,140,0,0,152,150,150,0,0,0,152,151,151,144,151,149,149,151,0,178,178,178,178,178,0,0,0,0,0,199,199,200,201,202,203,200,201,202,203,199,199,0,0,0,0,207,207,0,207,207,0,0],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,[[2,[1]]],3],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,4,[[7,[],[[5,[6]]]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[-1,-2],2,[[10,[[9,[8]]]]],11],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[12,12],[13,13],[14,14],[15,15],[16,16],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[[],12],[[],13],[[],14],[[],15],[-1,[[2,[12]]],3],[-1,[[2,[13]]],3],[-1,[[2,[14]]],3],[-1,[[2,[15]]],3],[-1,[[2,[16]]],3],[[12,12],18],[[13,13],18],[[14,14],18],[[15,15],18],[[12,19],20],[[13,19],20],[[14,19],20],[[15,19],20],[[16,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,[[12,-1],2,11],[[13,-1],2,11],[[14,-1],2,11],[[15,-1],2,11],[[16,-1],2,11],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[22,[[24,[23]]]],[22,[[24,[23]]]],[-1,-2,[],[]],[25,[[27,[26]]]],[28,[[27,[29]]]],[23,[[27,[29]]]],[30,26],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[31,31],[32,32],[33,33],[34,34],[35,35],[36,36],[30,30],[28,28],[37,37],[25,25],[38,38],[23,23],[[[39,[-1]]],[[39,[-1]]],40],[41,41],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[31,17],[[[9,[8]]],[[42,[23]]]],[[],28],[[],37],[[],25],[[],38],[[],41],[[[39,[-1]]],-2,[],[]],[-1,[[2,[31]]],3],[-1,[[2,[35]]],3],[-1,[[2,[36]]],3],[-1,[[2,[28]]],3],[-1,[[2,[25]]],3],[-1,[[2,[23]]],3],[-1,[[2,[[39,[-2]]]]],3,43],[-1,[[2,[41]]],3],0,0,[[23,44],17],[[31,31],18],[[34,34],18],[[35,35],18],[[36,36],18],[[30,30],18],[[28,28],18],[[25,25],18],[[38,38],18],[[23,23],18],[[[39,[-1]],[39,[-1]]],18,45],[[41,41],18],0,0,0,0,0,[[31,19],20],[[32,19],20],[[33,19],20],[[46,19],20],[[47,19],20],[[34,19],20],[[48,19],20],[[48,19],20],[[35,19],20],[[36,19],20],[[30,19],20],[[28,19],20],[[28,19],20],[[49,19],20],[[49,19],20],[[37,19],20],[[37,19],20],[[25,19],20],[[38,19],20],[[23,19],20],[[50,19],20],[[50,19],20],[[[39,[-1]],19],20,51],[[41,19],20],[35,52],[36,53],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[18,34],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[26,30],[29,28],[54,28],[-1,-1,[]],[-1,-1,[]],[37,49],[55,49],[56,49],[-1,-1,[]],[-1,-1,[]],[28,25],[54,25],[[[17,[26,[27,[18]]]]],25],[29,25],[26,25],[-1,-1,[]],[[[17,[57,58]]],38],[[[17,[58,57]]],38],[26,23],[-1,-1,[]],[29,23],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[26,[27,[18]]],30],[59,[[2,[28,-1]]],[]],[59,[[2,[23,-1]]],[]],0,0,0,[[36,-1],17,60],[[28,-1],17,60],[[38,-1],17,60],[[23,-1],17,60],0,0,0,[31,32],[31,46],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[38,[[17,[58,57]]]],[[35,[62,[61]]],35],[31,31],[-1,-2,[],[]],[-1,-2,[],[]],[28,18],[28,18],[28,18],[25,18],[28,18],[28,18],[25,18],[28,18],[31,18],[31,32],[32,63],[46,63],[23,63],0,[[38,23],18],0,0,[31,32],[31,46],[[58,57],38],[32,[[27,[-1]]],[]],[46,[[27,[-1]]],[]],[32,[[27,[-1]]],[]],[46,[[27,[-1]]],[]],0,0,0,0,0,0,0,0,0,0,0,0,[[31,-1],2,11],[[35,-1],2,11],[[36,-1],2,11],[[30,-1],2,11],[[28,-1],2,11],[[25,-1],2,11],[[23,-1],2,11],[[[39,[-1]],-2],2,64,11],[[41,-1],2,11],0,[32,[[17,[63,[27,[63]]]]]],[46,[[17,[63,[27,[63]]]]]],[63,[[17,[63,[27,[63]]]]]],[49,[[27,[65]]]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,66,[]],[-1,66,[]],[-1,66,[]],[-1,66,[]],[-1,66,[]],0,0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[[],31],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[67,[[2,[17,68]]]],[69,69],[70,70],[71,71],[72,72],[73,73],[67,67],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[[],69],[[],70],[[],71],[[],72],[[],73],[[],67],[[],68],[-1,[[2,[69]]],3],[-1,[[2,[70]]],3],[-1,[[2,[71]]],3],[-1,[[2,[72]]],3],[-1,[[2,[73]]],3],[-1,[[2,[67]]],3],[[69,69],18],[[70,70],18],[[71,71],18],[[72,72],18],[[73,73],18],[[67,67],18],0,[73,[[27,[1]]]],[[69,19],20],[[70,19],20],[[71,19],20],[[72,19],20],[[73,19],20],[[67,19],20],[[68,19],20],[[68,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[[27,[74]]],67],[74,67],[-1,-1,[]],[-1,-1,[]],0,0,0,[73,18],[[73,-1],17,60],[[67,-1],17,60],[72,[[27,[63]]]],[67,[[27,[74]]]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[67,[[27,[74]]]],[72,18],0,0,0,[[[27,[74]]],67],[74,67],0,0,[[69,-1],2,11],[[70,-1],2,11],[[71,-1],2,11],[[72,-1],2,11],[[73,-1],2,11],[[67,-1],2,11],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,66,[]],0,0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[67,[[2,[[27,[74]],68]]]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[67,[[2,[[27,[74]],68]]]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[75,75],[76,76],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[75,75],77],[[],76],[-1,[[2,[76]]],3],[[75,75],18],[[76,76],18],[[75,19],20],[[76,19],20],[-1,-1,[]],[-1,-1,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,[[75,75],[[27,[77]]]],0,0,[[76,-1],2,11],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[78,-1],78,[[81,[[80,[79]]]]]],0,[[[82,[79]]],83],[84,[[17,[[27,[28]],[27,[28]]]]]],[[78,-1],78,[[81,[26]]]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[[82,[-1]]],[[82,[-1]]],[40,85,86]],[84,84],[78,78],[[[80,[-1]]],[[80,[-1]]],40],[87,87],[88,88],[89,89],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[],83],[[],[[82,[-1]]],[90,85,86]],[[],84],[[],78],[[],91],[[],89],[-1,[[2,[[82,[-2]]]]],3,[43,85,86]],[-1,[[2,[78]]],3],[-1,[[2,[[80,[-2]]]]],3,92],[-1,[[2,[87]]],3],[-1,[[2,[88]]],3],[-1,[[2,[89]]],3],[[[82,[-1]],[82,[-1]]],18,[45,85,86]],[[84,84],18],[[78,78],18],[[[80,[-1]],[80,[-1]]],18,45],[[87,87],18],[[88,88],18],[[89,89],18],[[78,59],78],[[78,-1],78,[[81,[93]]]],[[78,-2],78,[[10,[[9,[8]]]]],[[7,[],[[5,[-1]]]]]],0,[[91,94],18],[[91,26],18],[[91,29],18],[[91,94],18],[[83,19],20],[[[82,[-1]],19],20,[51,85,86]],[[84,19],20],[[78,19],20],[[[80,[-1]],19],20,51],[[91,19],20],[[87,19],20],[[88,19],20],[[89,19],20],[1,93],[-1,-1,[]],[[[62,[4]]],83],[[[62,[-1]]],[[82,[-1]]],[85,86]],[-1,-1,[]],[[[80,[[27,[-1]]]]],[[82,[-1]]],[85,86]],[-1,[[82,[-1]]],[85,86]],[[[80,[-1]]],[[82,[-1]]],[85,86]],[95,-1,[]],[-1,-1,[]],[54,84],[26,84],[[[96,[-1]]],84,[[81,[28]]]],[[[97,[-1]]],84,[[81,[28]]]],[29,84],[[[98,[-1]]],84,[[81,[28]]]],[28,84],[-1,-1,[]],[[[62,[79]]],[[80,[79]]]],[-1,-1,[]],[[[62,[26]]],[[80,[26]]]],[79,[[80,[79]]]],[-1,-1,[]],[-1,-1,[]],[99,88],[-1,-1,[]],[-1,-1,[]],[[78,-1],78,[[81,[28]]]],[78,[[27,[26]]]],[84,[[27,[28]]]],[78,[[27,[29]]]],[84,[[27,[28]]]],[78,[[27,[29]]]],[78,18],[[[82,[-1]],-2],17,[85,86],60],[[84,-1],17,60],[[78,-1],17,60],[[[80,[-1]],-2],17,86,60],[[88,-1],17,60],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[82,[-1]]],18,[85,86]],[78,18],0,[[83,4],18],[[[82,[-1]],-1],18,[85,86]],[[4,83],18],[[4,[9,[83]]],18],[[],78],[[[27,[78]]],91],[[78,-1],78,[[81,[84]]]],[[78,-1],2,11],[[[80,[-1]],-2],2,64,11],[[87,-1],2,11],[[88,-1],2,11],[[89,-1],2,11],[[84,28],84],[[84,26],84],[[84,28],84],[[78,-1],78,[[81,[28]]]],[[[82,[-1]]],83,[[10,[[9,[8]]]],85,86]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[82,[-1]]],[[27,[[80,[-1]]]]],[40,85,86]],[[78,-1],78,[[81,[93]]]],[[78,-1],78,[[81,[93]]]],[[78,-1],78,[[81,[93]]]],[[78,-1],78,[[81,[93]]]],0,[[[9,[[82,[26]]]]],[[62,[83]]]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[94,94],[[-1,-2],17,[],[]],0,[-1,[[2,[94]]],3],[[94,94],18],[[94,19],20],[[100,19],20],[[100,19],20],[-1,-1,[]],[-1,-1,[]],[[94,-1],17,60],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[94,-1],2,11],[-1,-2,[],[]],[-1,66,[]],0,0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[101,[[103,[66,102]]]],[-1,-2,[],[]],[-1,-2,[],[]],[101,101],[[-1,-2],17,[],[]],[[],101],[101,[[103,[66,102]]]],[101,-1,[]],[-1,[[2,[101]]],3],[101,[[104,[-1]]],92],[[101,101],18],[[101,19],20],[-1,-1,[]],[[101,-1],[[27,[[104,[-2]]]]],[[10,[59]]],92],[[101,-1,-3],[[27,[-2]]],[[10,[59]]],[],[[106,[102],[[105,[-2]]]]]],0,[-1,-2,[],[]],[101,-1,[]],[101,-1,[]],[[101,-1],[[27,[[104,[-2]]]]],[[10,[59]]],92],[[101,-1],[[27,[[17,[66,[104,[-2]]]]]]],[[10,[59]]],92],[[101,-1,-3],[[27,[-2]]],[[10,[59]]],[],[[106,[102],[[105,[-2]]]]]],[[101,-1],2,11],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[107,107],[108,108],[109,109],[110,110],[111,111],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[[],111],[-1,[[2,[107]]],3],[-1,[[2,[108]]],3],[-1,[[2,[109]]],3],[-1,[[2,[110]]],3],[-1,[[2,[111]]],3],[[107,107],18],[[108,108],18],[[109,109],18],[[110,110],18],[[111,111],18],[[107,19],20],[[108,19],20],[[109,19],20],[[110,19],20],[[111,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[110,-1],17,60],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[111,18],[111,18],[[107,-1],2,11],[[108,-1],2,11],[[109,-1],2,11],[[110,-1],2,11],[[111,-1],2,11],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[6,63],[6,63],0,[-1,-2,[],[]],[-1,-2,[],[]],[6,6],[[-1,-2],17,[],[]],0,[[[9,[8]]],[[42,[6]]]],[[],6],[[6,44],17],[[6,6],18],[[6,19],20],[-1,-1,[]],[-1,-2,[],[]],[6,63],[-1,4,[[7,[],[[5,[6]]]]]],[-1,-2,[],[]],0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[112,112],[[-1,-2],17,[],[]],0,[[],112],[-1,[[2,[112]]],3],[[112,112],18],[[112,19],20],[-1,-1,[]],[-1,-2,[],[]],0,[[112,-1],2,11],0,0,[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[113,113],[114,114],[115,115],[116,116],[117,117],[118,118],[119,119],[120,120],[121,121],[122,122],[123,123],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,0,[[],113],[[],114],[[],116],[[],117],[[],118],[[],119],[[],120],[[],122],[[],123],[-1,[[2,[113]]],3],[-1,[[2,[115]]],3],[-1,[[2,[116]]],3],[-1,[[2,[117]]],3],[-1,[[2,[118]]],3],[-1,[[2,[119]]],3],[-1,[[2,[120]]],3],[-1,[[2,[121]]],3],0,0,[[113,113],18],[[121,121],18],0,0,[[113,19],20],[[114,19],20],[[115,19],20],[[116,19],20],[[117,19],20],[[118,19],20],[[119,19],20],[[120,19],20],[[121,19],20],[[122,19],20],[[123,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,[[113,-1],2,11],[[114,-1],2,11],[[115,-1],2,11],[[116,-1],2,11],[[117,-1],2,11],[[118,-1],2,11],[[119,-1],2,11],[[120,-1],2,11],[[121,-1],2,11],[[122,-1],2,11],[[123,-1],2,11],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[124,[-1,-2]]],[[124,[-1,-2]]],40,40],[[-1,-2],17,[],[]],[-1,[[2,[[124,[-2,-3]]]]],3,43,43],[[[124,[-1,-2]],[124,[-1,-2]]],18,45,45],[[[124,[-1,-2]],19],20,51,51],[-1,-1,[]],[-1,-2,[],[]],[[[124,[-1,-2]],-3],2,64,64,11],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[125,125],[126,126],[127,127],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[[],125],[[],126],[-1,[[2,[125]]],3],[-1,[[2,[126]]],3],[[125,125],18],[[126,126],18],[[127,127],18],[[125,19],20],[[126,19],20],[[127,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[125,127],[[127,79,[27,[79]]],18],0,0,[[125,-1],2,11],[[126,-1],2,11],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[128,129],128],[130,130],[131,131],[132,132],[133,133],[134,134],[135,135],[136,136],[128,128],[137,137],[138,138],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[137,137],0,[[],130],[[],131],[[],132],[[],136],[[],128],[[],137],[[],138],0,[-1,[[2,[130]]],3],[-1,[[2,[131]]],3],[-1,[[2,[132]]],3],[-1,[[2,[133]]],3],[-1,[[2,[134]]],3],[-1,[[2,[135]]],3],[-1,[[2,[136]]],3],[-1,[[2,[128]]],3],[-1,[[2,[137]]],3],[-1,[[2,[138]]],3],[137,137],0,[137,137],0,[137,137],0,[137,137],0,[137,137],0,[137,137],0,[[130,130],18],[[131,131],18],[[132,132],18],[[133,133],18],[[134,134],18],[[135,135],18],[[136,136],18],[[128,128],18],[[137,137],18],[[138,138],18],0,0,[[130,19],20],[[131,19],20],[[132,19],20],[[133,19],20],[[134,19],20],[[135,19],20],[[136,19],20],[[128,19],20],[[137,19],20],[[138,19],20],0,[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[131,133],[139,133],[140,133],[-1,-1,[]],[141,133],[142,133],[-1,-1,[]],[-1,-1,[]],[134,135],[-1,-1,[]],[102,136],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[136,[[2,[-1,143]]],92],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[136,[[2,[129,143]]]],[136,102],[136,[[2,[144,143]]]],[137,18],[136,18],[137,18],[137,18],[137,18],0,0,0,0,0,0,0,[[128,144],128],0,0,0,[[130,-1],2,11],[[131,-1],2,11],[[132,-1],2,11],[[133,-1],2,11],[[134,-1],2,11],[[135,-1],2,11],[[136,-1],2,11],[[128,-1],2,11],[[137,-1],2,11],[[138,-1],2,11],[[[27,[[103,[26,26]]]],-1],2,11],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[137,18],137],[[137,18],137],[[137,18],137],[[137,18],137],[[137,18],137],[[137,18],137],[[137,18],137],[[137,29],137],[[128,145],128],[[128,135],128],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[141,141],[146,146],[129,129],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[[],141],[[],146],[[],129],[-1,[[2,[141]]],3],[-1,[[2,[146]]],3],[-1,[[2,[129]]],3],[[141,141],18],[[146,146],18],[[129,129],18],0,[[141,19],20],[[146,19],20],[[129,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[129,129],0,0,0,[[141,-1],2,11],[[146,-1],2,11],[[129,-1],2,11],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],0,[-1,21,[]],[-1,21,[]],[-1,21,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[129,129],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[139,139],[[-1,-2],17,[],[]],[[],139],[-1,[[2,[139]]],3],[[139,139],18],[[139,19],20],[-1,-1,[]],[-1,-2,[],[]],[[139,-1],2,11],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[142,142],[147,147],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[147,147],77],[[],142],[[],147],[-1,[[2,[142]]],3],[-1,[[2,[147]]],3],[[142,142],18],[[147,147],18],[[142,19],20],[[147,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[[147,147],[[27,[77]]]],[[142,-1],2,11],[[147,-1],2,11],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,[140,[[27,[148]]]],[140,[[27,[149]]]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[140,140],[148,148],[149,149],[150,150],[151,151],[152,152],[144,144],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,[[],148],[[],149],[[],151],[[],152],[[],144],[-1,[[2,[140]]],3],[-1,[[2,[148]]],3],[-1,[[2,[149]]],3],[-1,[[2,[151]]],3],[-1,[[2,[152]]],3],[-1,[[2,[144]]],3],0,[[140,140],18],[[148,148],18],[[149,149],18],[[150,150],18],[[151,151],18],[[152,152],18],[[144,144],18],[[140,19],20],[[148,19],20],[[149,19],20],[[150,19],20],[[151,19],20],[[152,19],20],[[144,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[29,1,[27,[74]]],151],[[151,-1],17,60],[[152,-1],17,60],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[152,18],[140,18],[144,18],[140,18],[144,18],[152,18],[150,18],[150,18],[152,18],0,0,0,[[151,151],17],[149,17],[149,149],[[140,-1],2,11],[[148,-1],2,11],[[149,-1],2,11],[[151,-1],2,11],[[152,-1],2,11],[[144,-1],2,11],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[[-1,-1],[[153,[-1]]],[]],[154,154],[155,155],[156,156],[[[157,[-1]]],[[157,[-1]]],40],[[[153,[-1]]],[[153,[-1]]],40],[158,158],[159,159],[160,160],[161,161],[162,162],[163,163],[164,164],[165,165],[166,166],[167,167],[168,168],[169,169],[170,170],[171,171],[172,172],[173,173],[174,174],[175,175],[176,176],[177,177],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],0,0,0,0,0,[[],[[153,[-1]]],[]],[[],158],[[],159],[[],162],[[],173],[159,-1,[]],[159,-1,[]],[-1,[[2,[154]]],3],[-1,[[2,[155]]],3],[-1,[[2,[156]]],3],[-1,[[2,[[157,[-2]]]]],3,43],[-1,[[2,[[153,[-2]]]]],3,43],[-1,[[2,[158]]],3],[-1,[[2,[159]]],3],[-1,[[2,[160]]],3],[-1,[[2,[161]]],3],[-1,[[2,[162]]],3],[-1,[[2,[163]]],3],[-1,[[2,[164]]],3],[-1,[[2,[165]]],3],[-1,[[2,[166]]],3],[-1,[[2,[167]]],3],[-1,[[2,[168]]],3],[-1,[[2,[169]]],3],[-1,[[2,[170]]],3],[-1,[[2,[171]]],3],[-1,[[2,[172]]],3],[-1,[[2,[173]]],3],[-1,[[2,[174]]],3],[-1,[[2,[175]]],3],[-1,[[2,[176]]],3],[-1,[[2,[177]]],3],[[154,154],18],[[155,155],18],[[156,156],18],[[[157,[-1]],[157,[-1]]],18,45],[[[153,[-1]],[153,[-1]]],18,45],[[158,158],18],[[159,159],18],[[160,160],18],[[161,161],18],[[162,162],18],[[163,163],18],[[164,164],18],[[165,165],18],[[166,166],18],[[167,167],18],[[168,168],18],[[169,169],18],[[170,170],18],[[171,171],18],[[172,172],18],[[173,173],18],[[174,174],18],[[175,175],18],[[176,176],18],[[177,177],18],0,0,[[154,19],20],[[155,19],20],[[156,19],20],[[[157,[-1]],19],20,51],[[[153,[-1]],19],20,51],[[158,19],20],[[159,19],20],[[160,19],20],[[161,19],20],[[162,19],20],[[163,19],20],[[164,19],20],[[165,19],20],[[166,19],20],[[167,19],20],[[168,19],20],[[169,19],20],[[170,19],20],[[171,19],20],[[172,19],20],[[173,19],20],[[174,19],20],[[175,19],20],[[176,19],20],[[177,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,0,0,[170,54],0,0,[[154,-1],17,60],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[153,[-1]]],18,[]],[160,18],[[[153,[-1]]],18,[]],[160,18],[[[153,[-1]]],18,[]],[160,18],[160,18],[[[153,[-1]]],18,[]],0,[160,161],0,0,0,0,0,0,0,0,0,0,0,0,[[154,-1],2,11],[[155,-1],2,11],[[156,-1],2,11],[[[157,[-1]],-2],2,64,11],[[[153,[-1]],-2],2,64,11],[[158,-1],2,11],[[159,-1],2,11],[[160,-1],2,11],[[161,-1],2,11],[[162,-1],2,11],[[163,-1],2,11],[[164,-1],2,11],[[165,-1],2,11],[[166,-1],2,11],[[167,-1],2,11],[[168,-1],2,11],[[169,-1],2,11],[[170,-1],2,11],[[171,-1],2,11],[[172,-1],2,11],[[173,-1],2,11],[[174,-1],2,11],[[175,-1],2,11],[[176,-1],2,11],[[177,-1],2,11],[[170,29],17],[[155,29],17],0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,[[],178],[-1,[[2,[178]]],3],[[178,19],20],[-1,-1,[]],[-1,-2,[],[]],[73,178],[[178,-1],2,11],0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],[[178,25],178],[[178,[179,[41]]],178],[[178,180],178],[178,178],[178,178],[[178,154],178],[[178,-1],178,[[7,[],[[5,[154]]]]]],[178,178],0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,[61,61],[[-1,-2],17,[],[]],0,[[],61],[-1,[[2,[61]]],3],[[61,61],18],[[61,19],20],[-1,-1,[]],0,0,0,0,0,[-1,-2,[],[]],0,0,0,0,0,0,0,[[61,-1],2,11],0,0,0,[-1,-2,[],[]],0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],0,[-1,21,[]],0,0,[-1,-2,[],[]],0,0,0,[181,63],[182,63],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[181,181],[182,182],[183,183],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[[9,[8]]],[[42,[181]]]],[[[9,[8]]],[[42,[182]]]],[[],181],[[],182],[[],183],[-1,[[2,[181]]],3],[-1,[[2,[182]]],3],[-1,[[2,[183]]],3],[[181,44],17],[[182,44],17],[[181,181],18],[[182,182],18],[[183,183],18],[182,[[0,[[184,[],[[5,[[17,[79,[62,[1]]]]]]]]]]]],[182,[[62,[[17,[79,[62,[1]]]]]]]],[[181,19],20],[[182,19],20],[[183,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,[[181,-1],17,60],[[182,-1],17,60],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[182,[[0,[[184,[],[[5,[[17,[79,[62,[1]]]]]]]]]]]],[182,[[62,[[17,[79,[62,[1]]]]]]]],[181,63],[182,63],[[181,-1],2,11],[[182,-1],2,11],[[183,-1],2,11],[181,63],[182,63],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[185,185],[[-1,-2],17,[],[]],[[],185],[[185,185],18],[[185,19],20],[-1,-1,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[186,186],[[-1,-2],17,[],[]],0,0,[-1,[[2,[186]]],3],0,[[186,186],18],[[186,19],20],[-1,-1,[]],0,0,[-1,-2,[],[]],0,0,0,[[186,-1],2,11],0,0,0,[-1,-2,[],[]],0,0,0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,[[187,182],187],0,[-1,-2,[],[]],[-1,-2,[],[]],[187,187],[[-1,-2],17,[],[]],0,[[],187],[-1,[[2,[187]]],3],[[187,187],18],[[187,19],20],[-1,-1,[]],0,0,[[187,29],187],0,[[187,74],187],[-1,-2,[],[]],[187,[[27,[188]]]],[[187,189],187],0,[[187,189],187],0,[[187,29],187],0,[[187,-1],2,11],[[187,79],187],0,[-1,-2,[],[]],[[187,8],187],0,[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[[187,189],187],0,[-1,-2,[],[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[190,190],[191,191],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[[9,[8]]],[[42,[190]]]],[[[9,[8]]],[[42,[191]]]],[[[9,[8]]],[[42,[[17,[190,[27,[29]]]]]]]],[[],190],[-1,[[2,[190]]],3],[-1,[[2,[191]]],3],[-1,[[2,[18]]],3],[[190,44],17],[[191,44],17],[[190,44,[27,[29]]],17],[[190,190],18],[[191,191],18],[[190,19],20],[[191,19],20],[-1,-1,[]],[-1,-1,[]],[1,191],[18,191],[[190,-1],17,60],[[191,-1],17,60],[-1,-2,[],[]],[-1,-2,[],[]],[191,63],[190,63],[[190,[27,[29]]],63],0,0,[[190,-1],2,11],[[191,-1],2,11],[[18,-1],2,11],[190,63],[190,[[192,[8]]]],[190,193],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[[190,[27,[29]]],29],0,[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[194,194],[[-1,-2],17,[],[]],[[194,194],77],[[],194],[-1,[[2,[194]]],3],[[194,194],18],[[194,19],20],[-1,-1,[]],[-1,-2,[],[]],[[194,194],[[27,[77]]]],[[194,-1],2,11],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,[195,[[27,[79]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[188,188],[196,196],[197,197],[198,198],[195,195],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[[9,[8]]],[[42,[188]]]],[[[9,[8]]],[[42,[196]]]],[[[9,[8]]],[[42,[197]]]],[[[9,[8]]],[[42,[198]]]],[[[9,[8]]],[[42,[195]]]],[[[9,[8]]],[[42,[197]]]],[[[9,[8]]],[[42,[198]]]],[-1,[[2,[195]]],3],[196,63],[[188,44],17],[[196,44],17],[[197,44],17],[[198,44],17],[[195,44],17],[[196,44],17],[[196,44],17],[[197,44],17],[[198,44],17],[[196,44],17],[[197,44],17],[[198,44],17],[[197,190,44,18],17],[[198,190,44,18],17],[[188,188],18],[[196,196],18],[[197,197],18],[[198,198],18],[[195,195],18],[196,63],[197,63],[198,63],[[188,19],20],[[196,19],20],[[197,19],20],[[198,19],20],[[195,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,0,[[195,-1],17,60],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[188,63],[196,63],[197,63],[198,63],[195,63],0,0,0,0,0,[196,63],[197,63],[198,63],[[197,190],63],[[198,190],63],[[197,190],63],[[198,190],63],[[195,-1],2,11],[196,26],[197,26],[198,26],[196,63],[197,63],[198,63],[195,63],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[197,194],[198,194],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[199,199],[200,200],[201,201],[202,202],[203,203],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[-1,-2],17,[],[]],[[],200],[[],201],[[],202],[[],203],[-1,[[2,[199]]],3],[-1,[[2,[200]]],3],[-1,[[2,[201]]],3],[-1,[[2,[202]]],3],[-1,[[2,[203]]],3],[[199,199],18],[[200,200],18],[[201,201],18],[[202,202],18],[[203,203],18],[[204,19],20],[[-1,19],[[2,[17,205]]],[]],[[199,19],20],[[200,19],20],[[201,19],20],[[202,19],20],[[203,19],20],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,[[200,79],201],[[199,-1],2,11],[[200,-1],2,11],[[201,-1],2,11],[[202,-1],2,11],[[203,-1],2,11],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],[-1,21,[]],0,[[204,59],[[2,[-1,-2]]],[],206],[[204,66],[[2,[-1,-2]]],[],206],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[207,63],[207,63],0,0,0,0,[207,1],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[207,207],[[-1,-2],17,[],[]],[[[9,[8]]],[[42,[207]]]],[[],207],[-1,[[2,[207]]],3],[-1,[[2,[208]]],3],[-1,[[2,[207]]],3],[[207,44],17],[[207,207],18],[[207,19],20],[-1,-1,[]],[-1,-1,[]],[[207,-1],17,60],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[207,63],[[207,-1],2,11],[[208,-1],2,11],[[207,-1],2,11],[207,63],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[207]]],3],[[207,-1],2,11],0,[-1,[[2,[1]]],3],0,0,0,0,[-1,[[2,[1]]],3],[-1,[[2,[[27,[1]]]]],3],0,[-1,[[2,[[27,[29]]]]],3],[[[27,[29]],-1],2,11],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,4,[[7,[],[[5,[6]]]]]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[209,209],[[-1,-2],17,[],[]],[[],209],[-1,[[2,[209]]],3],[[209,209],18],[[209,19],20],[-1,-1,[]],[-1,-2,[],[]],[209,[[210,[66,66]]]],0,[[[210,[66,66]]],209],[[209,-1],2,11],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],[-1,[[2,[1]]],3],0,0,[[-1,-2],2,[[10,[[9,[8]]]]],11],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[211,211],[[-1,-2],17,[],[]],[[211,211],77],[[],211],[-1,[[2,[211]]],3],[-1,[[2,[1]]],3],[[211,211],18],[[212,19],20],[[-1,19],[[2,[17,205]]],[]],[[211,19],20],[-1,-1,[]],[-1,-1,[]],[1,211],[[211,-1],17,60],[-1,-2,[],[]],[-1,-2,[],[]],[[211,211],[[27,[77]]]],[[211,-1],2,11],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,21,[]],[[212,59],[[2,[-1,-2]]],[],206],[[212,66],[[2,[-1,-2]]],[],206],[[212,29],[[2,[-1,-2]]],[],206],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[213,213],[[-1,-2],17,[],[]],[[213,213],77],[-1,[[2,[213]]],3],[-1,[[2,[214]]],3],[[213,213],18],[[213,19],20],[[214,19],20],[54,213],[-1,-1,[]],[29,213],[-1,-1,[]],[-1,[[2,[1]]],3],[-1,[[2,[[27,[1]]]]],3],[[213,-1],17,60],[-1,-2,[],[]],[-1,-2,[],[]],[[213,213],[[27,[77]]]],[[213,-1],2,11],[213,29],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[214,[[2,[1,-1]]],206],[-1,21,[]],[-1,21,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[2,[[27,[29]]]]],3],[[[27,[29]],-1],2,11],0,[-1,-2,[],[]],[-1,-2,[],[]],[215,215],[[-1,-2],17,[],[]],[[],215],[-1,[[2,[215]]],3],[-1,[[2,[[27,[[210,[26,26]]]]]]],3],[[215,215],18],[[215,19],20],[-1,-1,[]],[1,215],[74,[[2,[26]]]],[-1,-2,[],[]],[[215,-1],2,11],[-1,-2,[],[]],[-1,[[2,[-2]]],[],[]],[-1,[[2,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],[-1,[[2,[29]]],3],[[29,-1],2,11],0,0,0,0,0,0,0,0,0,[-1,[[2,[[27,[[210,[26,26]]]]]]],3],[74,[[2,[26]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,[[2,[29]]],3],[[29,-1],2,11],0,0,0,0,0,0,0,[-1,[[2,[207]]],3],[[207,-1],2,11]],"c":[817,1334],"p":[[8,"U256",4339],[6,"Result",4340],[10,"Deserializer",4341],[5,"Bloom",4342],[17,"Item"],[5,"Log",1548],[10,"IntoIterator",4343],[1,"u8"],[1,"slice"],[10,"AsRef",4344],[10,"Serializer",4345],[5,"AccountInfo",439],[5,"EIP1186StorageProof",439],[5,"EIP1186AccountProofResponse",439],[5,"ExtAccountInfo",439],[5,"RecoveredAccount",439],[1,"tuple"],[1,"bool"],[5,"Formatter",4346],[8,"Result",4346],[5,"TypeId",4347],[5,"Unstructured",4348],[6,"BlockHashOrNumber",539],[8,"Result",4349],[6,"BlockId",539],[8,"B256",4350],[6,"Option",4351],[6,"BlockNumberOrTag",539],[1,"u64"],[5,"RpcBlockHash",539],[6,"BlockTransactions",539],[5,"BlockTransactionHashes",539],[6,"BlockTransactionHashesInner",539],[6,"BlockTransactionsKind",539],[5,"Block",539],[5,"Header",539],[5,"HexStringMissingPrefixError",539],[5,"BlockNumHash",539],[5,"Rich",539],[10,"Clone",4352],[5,"BlockOverrides",539],[8,"Result",4353],[10,"Deserialize",4341],[10,"BufMut",4354],[10,"PartialEq",4355],[5,"BlockTransactionHashesMut",539],[6,"BlockTransactionHashesInnerMut",539],[6,"BlockError",539],[6,"ParseBlockNumberError",539],[5,"ParseBlockHashOrNumberError",539],[10,"Debug",4346],[8,"RichBlock",539],[8,"RichHeader",539],[8,"U64",4339],[5,"ParseIntError",4356],[6,"ParseError",4357],[8,"BlockHash",4350],[8,"BlockNumber",4350],[1,"str"],[10,"Hasher",4358],[5,"Transaction",2957],[5,"Vec",4359],[1,"usize"],[10,"Serialize",4345],[10,"Error",4360],[5,"String",4361],[5,"CallInput",964],[5,"CallInputError",964],[5,"Bundle",964],[5,"StateContext",964],[5,"EthCallResponse",964],[6,"TransactionIndex",964],[5,"CallRequest",964],[5,"Bytes",4362],[5,"TxGasAndReward",1118],[5,"FeeHistory",1118],[6,"Ordering",4355],[5,"Filter",1157],[5,"Address",4363],[6,"ValueOrArray",1157],[10,"Into",4344],[5,"FilterSet",1157],[5,"BloomFilter",1157],[6,"FilterBlockOption",1157],[10,"Eq",4355],[10,"Hash",4358],[6,"FilterChanges",1157],[6,"FilterId",1157],[6,"PendingTransactionFilterKind",1157],[10,"Default",4364],[5,"FilteredParams",1157],[10,"DeserializeOwned",4341],[8,"Topic",1157],[5,"Log",1378],[1,"never"],[5,"Range",4365],[5,"RangeFrom",4365],[5,"RangeTo",4365],[6,"SubscriptionId",4366],[6,"LogError",1378],[5,"OtherFields",1417],[6,"Value",4367],[5,"BTreeMap",4368],[8,"Result",4369],[17,"Output"],[10,"FnOnce",4370],[6,"SubscriptionResult",1446],[6,"PubSubSyncStatus",1446],[5,"SyncStatusMetadata",1446],[6,"SubscriptionKind",1446],[6,"Params",1446],[5,"AccountOverride",1572],[5,"SyncInfo",1596],[5,"Peers",1596],[6,"PeerCount",1596],[5,"PeerInfo",1596],[5,"PeerNetworkInfo",1596],[5,"PeerProtocolsInfo",1596],[5,"PeerEthProtocolInfo",1596],[5,"PipProtocolInfo",1596],[6,"SyncStatus",1596],[5,"TransactionStats",1596],[5,"ChainStatus",1596],[6,"TraceResult",1805],[5,"TraceFilter",1825],[6,"TraceFilterMode",1825],[5,"TraceFilterMatcher",1825],[5,"GethDebugTracingOptions",1887],[5,"CallConfig",2157],[5,"BlockTraceResult",1887],[5,"DefaultFrame",1887],[5,"StructLog",1887],[6,"GethTrace",1887],[6,"GethDebugBuiltInTracerType",1887],[6,"GethDebugTracerType",1887],[5,"GethDebugTracerConfig",1887],[5,"GethDefaultTracingOptions",1887],[5,"GethDebugTracingCallOptions",1887],[5,"FourByteFrame",2227],[6,"PreStateFrame",2280],[5,"CallFrame",2157],[5,"NoopFrame",2244],[5,"Error",4369],[5,"PreStateConfig",2280],[5,"Duration",4371],[5,"CallLogFrame",2157],[5,"Null",2244],[5,"PreStateMode",2280],[5,"DiffMode",2280],[6,"DiffStateKind",2280],[5,"AccountState",2280],[6,"AccountChangeKind",2280],[6,"Delta",2426],[6,"TraceType",2426],[5,"TraceResults",2426],[5,"TraceResultsWithTransactionHash",2426],[5,"ChangedType",2426],[5,"AccountDiff",2426],[5,"StateDiff",2426],[6,"Action",2426],[6,"ActionType",2426],[6,"CallType",2426],[5,"CallAction",2426],[5,"CreateAction",2426],[6,"RewardType",2426],[5,"RewardAction",2426],[5,"SelfdestructAction",2426],[5,"CallOutput",2426],[5,"CreateOutput",2426],[6,"TraceOutput",2426],[5,"TransactionTrace",2426],[5,"LocalizedTransactionTrace",2426],[5,"VmTrace",2426],[5,"VmInstruction",2426],[5,"VmExecutedOperation",2426],[5,"MemoryDelta",2426],[5,"StorageDelta",2426],[5,"TraceCallRequest",2930],[5,"Box",4372],[8,"StateOverride",1572],[5,"AccessListItem",3009],[5,"AccessList",3009],[5,"AccessListWithGasUsed",3009],[10,"Iterator",4373],[5,"TransactionInfo",3080],[5,"TransactionReceipt",3100],[5,"TransactionRequest",3134],[6,"TypedTransactionRequest",3255],[1,"u128"],[5,"Signature",3172],[5,"Parity",3172],[1,"array"],[5,"Bytes",4374],[6,"TxType",3228],[6,"TransactionKind",3255],[5,"LegacyTransactionRequest",3255],[5,"EIP2930TransactionRequest",3255],[5,"EIP1559TransactionRequest",3255],[5,"TxpoolInspectSummary",3404],[5,"TxpoolContent",3404],[5,"TxpoolContentFrom",3404],[5,"TxpoolInspect",3404],[5,"TxpoolStatus",3404],[5,"TxpoolInspectSummaryVisitor",3404],[5,"Error",4346],[10,"Error",4341],[5,"Withdrawal",3514],[5,"BeaconAPIWithdrawal",3514],[5,"RpcModules",3605],[5,"HashMap",4375],[5,"JsonU256",3631],[5,"JsonU256Visitor",3631],[5,"U64HexOrNumber",3667],[6,"NumberOrHexU256",3667],[5,"JsonStorageKey",3708],[8,"ForkBlock",539],[15,"Range",1376],[8,"RawAddressFilter",1157],[8,"RawTopicsFilter",1157],[15,"Error",1823],[15,"Success",1823],[8,"TraceResult",1887]],"b":[[708,"impl-Debug-for-BlockError"],[709,"impl-Display-for-BlockError"],[713,"impl-Debug-for-BlockNumberOrTag"],[714,"impl-Display-for-BlockNumberOrTag"],[715,"impl-Debug-for-ParseBlockNumberError"],[716,"impl-Display-for-ParseBlockNumberError"],[717,"impl-Display-for-HexStringMissingPrefixError"],[718,"impl-Debug-for-HexStringMissingPrefixError"],[722,"impl-Debug-for-ParseBlockHashOrNumberError"],[723,"impl-Display-for-ParseBlockHashOrNumberError"],[740,"impl-From%3Cu64%3E-for-BlockNumberOrTag"],[741,"impl-From%3CUint%3C64,+1%3E%3E-for-BlockNumberOrTag"],[744,"impl-From%3CHexStringMissingPrefixError%3E-for-ParseBlockNumberError"],[745,"impl-From%3CParseIntError%3E-for-ParseBlockNumberError"],[746,"impl-From%3CParseError%3E-for-ParseBlockNumberError"],[749,"impl-From%3CBlockNumberOrTag%3E-for-BlockId"],[750,"impl-From%3CUint%3C64,+1%3E%3E-for-BlockId"],[751,"impl-From%3C(FixedBytes%3C32%3E,+Option%3Cbool%3E)%3E-for-BlockId"],[752,"impl-From%3Cu64%3E-for-BlockId"],[753,"impl-From%3CFixedBytes%3C32%3E%3E-for-BlockId"],[755,"impl-From%3C(FixedBytes%3C32%3E,+u64)%3E-for-BlockNumHash"],[756,"impl-From%3C(u64,+FixedBytes%3C32%3E)%3E-for-BlockNumHash"],[757,"impl-From%3CFixedBytes%3C32%3E%3E-for-BlockHashOrNumber"],[759,"impl-From%3Cu64%3E-for-BlockHashOrNumber"],[1033,"impl-Display-for-CallInputError"],[1034,"impl-Debug-for-CallInputError"],[1040,"impl-From%3COption%3CBytes%3E%3E-for-CallInput"],[1041,"impl-From%3CBytes%3E-for-CallInput"],[1261,"impl-From%3CVec%3CT%3E%3E-for-FilterSet%3CT%3E"],[1263,"impl-From%3CValueOrArray%3COption%3CT%3E%3E%3E-for-FilterSet%3CT%3E"],[1264,"impl-From%3CT%3E-for-FilterSet%3CT%3E"],[1265,"impl-From%3CValueOrArray%3CT%3E%3E-for-FilterSet%3CT%3E"],[1268,"impl-From%3CUint%3C64,+1%3E%3E-for-FilterBlockOption"],[1269,"impl-From%3CFixedBytes%3C32%3E%3E-for-FilterBlockOption"],[1270,"impl-From%3CRange%3CT%3E%3E-for-FilterBlockOption"],[1271,"impl-From%3CRangeFrom%3CT%3E%3E-for-FilterBlockOption"],[1272,"impl-From%3Cu64%3E-for-FilterBlockOption"],[1273,"impl-From%3CRangeTo%3CT%3E%3E-for-FilterBlockOption"],[1274,"impl-From%3CBlockNumberOrTag%3E-for-FilterBlockOption"],[1276,"impl-From%3CVec%3CAddress%3E%3E-for-ValueOrArray%3CAddress%3E"],[1278,"impl-From%3CVec%3CFixedBytes%3C32%3E%3E%3E-for-ValueOrArray%3CFixedBytes%3C32%3E%3E"],[1279,"impl-From%3CAddress%3E-for-ValueOrArray%3CAddress%3E"],[1394,"impl-Display-for-LogError"],[1395,"impl-Debug-for-LogError"],[1435,"impl-IntoIterator-for-%26OtherFields"],[1436,"impl-IntoIterator-for-OtherFields"],[1549,"impl-Log"],[1550,"impl-Log"],[2027,"impl-From%3CDefaultFrame%3E-for-GethTrace"],[2028,"impl-From%3CFourByteFrame%3E-for-GethTrace"],[2029,"impl-From%3CPreStateFrame%3E-for-GethTrace"],[2031,"impl-From%3CCallFrame%3E-for-GethTrace"],[2032,"impl-From%3CNoopFrame%3E-for-GethTrace"],[3198,"impl-From%3CUint%3C256,+4%3E%3E-for-Parity"],[3199,"impl-From%3Cbool%3E-for-Parity"],[3517,"impl-Withdrawal"],[3518,"impl-Withdrawal"],[3683,"impl-From%3CUint%3C64,+1%3E%3E-for-U64HexOrNumber"],[3685,"impl-From%3Cu64%3E-for-U64HexOrNumber"]]}],\ +["alloy_signer",{"doc":"alloy-signers","t":"PPPPPGPPPPIFPPPIPPPPFKKPPGFGIOMOOOMOOOEOCOOOOMMMCCOOOCCOOEOOPPGPPPIPPPPPPGNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOFNNNNNNNNNNNNNONNNNNNHNNONNNNNNNNNNNNNNKKMMMMMNNNNNNNNNNHHHHEFENONNNONNNNNNCNNNNNNNNNNCNNNNCNNNNNNONNNNNCPPPPPPPGNNNNNNNNNNNNNNNNNNNSSPFGPONNNNNNNNNNONNNNNNNNNNNONONNNNNNNNNNNONO","n":["Bip32Error","Bip39Error","Ecdsa","EcdsaError","Err","Error","EthKeystoreError","HexError","HexError","IoError","LocalWallet","MnemonicBuilder","MnemonicBuilderError","Ok","Other","Result","SignHash","SignMessage","SignTransaction","SignTypedData","Signature","Signer","SignerSync","TransactionChainIdMismatch","UnsupportedOperation","UnsupportedSignerOperation","Wallet","WalletError","YubiWallet","_wordlist","address","address","address","address","chain_id","chain_id","chain_id","chain_id","coins_bip39","derivation_path","error","inner","password","phrase","recid","set_chain_id","sign_hash","sign_hash_sync","signature","signer","signer","signer","signer","utils","wallet","word_count","write_to","yubihsm","signer","tx","Ecdsa","Err","Error","HexError","Ok","Other","Result","SignHash","SignMessage","SignTransaction","SignTypedData","TransactionChainIdMismatch","UnsupportedOperation","UnsupportedSignerOperation","as_str","borrow","borrow","borrow_mut","borrow_mut","clone","clone_into","cmp","eq","fmt","fmt","fmt","fmt","from","from","from","from","from","into","into","is_unsupported","other","partial_cmp","source","to_owned","to_string","to_string","try_from","try_from","try_into","try_into","type_id","type_id","unsupported","vzip","vzip","signer","tx","Signature","apply_eip155","as_bytes","borrow","borrow_mut","clone","clone_into","eq","fmt","from","from_bytes","from_scalars","from_str","inner","inner","inner_mut","into","into_inner","new","new_not_normalized","normalize_s","normalize_v","r","recid","recid","recover_address_from_msg","recover_address_from_prehash","recover_from_msg","recover_from_prehash","s","set_recid","set_v","to_owned","try_from","try_from","try_into","type_id","v","vzip","Signer","SignerSync","address","chain_id","set_chain_id","sign_hash","sign_hash_sync","sign_message","sign_message","sign_message_sync","sign_message_sync","sign_typed_data","sign_typed_data","sign_typed_data_sync","sign_typed_data_sync","with_chain_id","with_chain_id","public_key_to_address","raw_public_key_to_address","secret_key_to_address","to_eip155_v","MnemonicBuilder","Wallet","WalletError","address","address","borrow","borrow_mut","chain_id","chain_id","clone","clone_into","connect","decrypt_keystore","encrypt_keystore","eq","error","fmt","from","from","from","from","from_bytes","from_key","from_slice","from_str","into","mnemonic","new","new_keystore","new_pk","new_with_signer","private_key","random","random_with","set_chain_id","sign_hash","sign_hash_sync","signer","signer","to_owned","try_from","try_into","type_id","vzip","yubi","Bip32Error","Bip39Error","EcdsaError","EthKeystoreError","HexError","IoError","MnemonicBuilderError","WalletError","borrow","borrow_mut","fmt","fmt","from","from","from","from","from","from","from","from","into","source","to_string","try_from","try_into","type_id","vzip","DEFAULT_DERIVATION_PATH","DEFAULT_DERIVATION_PATH_PREFIX","ExpectedPhraseNotFound","MnemonicBuilder","MnemonicBuilderError","UnexpectedPhraseFound","_wordlist","borrow","borrow","borrow_mut","borrow_mut","build","build_random","clone","clone_into","default","derivation_path","derivation_path","eq","fmt","fmt","fmt","from","from","index","into","into","mnemonic_to_wallet","password","password","phrase","phrase","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","word_count","word_count","write_to","write_to"],"q":[[0,"alloy_signer"],[58,"alloy_signer::Error"],[60,"alloy_signer::error"],[110,"alloy_signer::error::Error"],[112,"alloy_signer::signature"],[151,"alloy_signer::signer"],[168,"alloy_signer::utils"],[172,"alloy_signer::wallet"],[217,"alloy_signer::wallet::error"],[244,"alloy_signer::wallet::mnemonic"],[290,"alloy_primitives::bits::address"],[291,"alloy_primitives::aliases"],[292,"core::future::future"],[293,"alloc::boxed"],[294,"core::pin"],[295,"core::cmp"],[296,"core::fmt"],[297,"core::fmt"],[298,"signature::error"],[299,"const_hex::error"],[300,"core::convert"],[301,"core::option"],[302,"alloc::string"],[303,"core::result"],[304,"core::any"],[305,"k256::ecdsa"],[306,"ecdsa::recovery"],[307,"k256"],[308,"elliptic_curve::scalar::nonzero"],[309,"core::convert"],[310,"alloy_sol_types::types::struct"],[311,"core::marker"],[312,"core::marker"],[313,"core::clone"],[314,"yubihsm::connector"],[315,"yubihsm::authentication::credentials"],[316,"yubihsm::object"],[317,"yubihsm::ecdsa::signer"],[318,"std::path"],[319,"rand::rng"],[320,"rand_core"],[321,"k256"],[322,"yubihsm::domain"],[323,"alloc::vec"],[324,"std::io::error"],[325,"coins_bip32"],[326,"coins_bip39::mnemonic"],[327,"eth_keystore::error"],[328,"coins_bip39::wordlist"],[329,"core::cmp"]],"d":["coins_bip32 error.","coins_bip39 error.","ecdsa error.","ecdsa error.","Contains the error value","Generic error type for Signer implementations.","eth_keystore error.","hex error.","hex error.","std::io error.","A wallet instantiated with a locally stored private key","Represents a structure that can resolve into a …","MnemonicBuilder error.","Contains the success value","Generic error.","Result type alias for Error.","sign_hash is not supported by the signer.","sign_message is not supported by the signer.","sign_transaction is not supported by the signer.","sign_typed_data is not supported by the signer.","An Ethereum ECDSA signature.","Asynchronous Ethereum signer.","Synchronous Ethereum signer.","Mismatch between provided transaction chain ID and signer …","This operation is not supported by the signer.","An unsupported signer operation.","An Ethereum private-public key pair which can be used for …","Error thrown by the Wallet module.","A wallet instantiated with a YubiHSM","PhantomData","Returns the signer’s Ethereum Address.","The wallet’s address.","The wallet’s address.","The wallet’s address.","Returns the signer’s chain ID.","The wallet’s chain ID (for EIP-155).","The wallet’s chain ID (for EIP-155).","The wallet’s chain ID (for EIP-155).","","The derivation path at which the extended private key …","","The inner ECDSA signature.","Optional password for the mnemonic phrase.","The mnemonic phrase can be supplied to the builder as a …","The recovery ID.","Sets the signer’s chain ID.","Signs the given hash.","Signs the given hash.","","","The wallet’s private key.","The wallet’s private key.","The wallet’s private key.","Utility functions for working with Ethereum signatures.","","The mnemonic builder can also be asked to generate a new …","Optional field that if enabled, writes the mnemonic phrase …","","The signer’s chain ID.","The chain ID provided by the transaction.","ecdsa error.","Contains the error value","Generic error type for Signer implementations.","hex error.","Contains the success value","Generic error.","Result type alias for Error.","sign_hash is not supported by the signer.","sign_message is not supported by the signer.","sign_transaction is not supported by the signer.","sign_typed_data is not supported by the signer.","Mismatch between provided transaction chain ID and signer …","This operation is not supported by the signer.","An unsupported signer operation.","Returns the string representation of the operation.","","","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Returns true if the error is UnsupportedOperation.","Constructs a new Other error.","","","","","","","","","","","","Returns the UnsupportedSignerOperation if the error is …","","","The signer’s chain ID.","The chain ID provided by the transaction.","An Ethereum ECDSA signature.","Modifies the recovery ID by applying EIP-155 to a v value.","Returns the byte-array representation of this signature.","","","","","","","Returns the argument unchanged.","Parses a signature from a byte slice.","Creates a Signature from the serialized r and s scalar …","","Returns the inner ECDSA signature.","The inner ECDSA signature.","Returns the inner ECDSA signature.","Calls U::from(self).","Returns the inner ECDSA signature.","Creates a new Signature from the given ECDSA signature and …","Creates a new signature from the given inner signature and …","Normalizes the signature into “low S” form as …","Normalizes a v value, respecting raw, legacy, and EIP-155 …","Returns the r component of this signature.","Returns the recovery ID.","The recovery ID.","Recovers an Address from this signature and the given …","Recovers an Address from this signature and the given …","Recovers a VerifyingKey from this signature and the given …","Recovers a VerifyingKey from this signature and the given …","Returns the s component of this signature.","Sets the recovery ID.","Sets the recovery ID by normalizing a v value.","","","Parses a raw signature which is expected to be 65 bytes …","","","Returns the recovery ID as a u8.","","Asynchronous Ethereum signer.","Synchronous Ethereum signer.","Returns the signer’s Ethereum Address.","Returns the signer’s chain ID.","Sets the signer’s chain ID.","Signs the given hash.","Signs the given hash.","Signs the hash of the provided message after prefixing it, …","Signs the hash of the provided message after prefixing it, …","Signs the hash of the provided message after prefixing it, …","Signs the hash of the provided message after prefixing it, …","Encodes and signs the typed data according to EIP-712.","Encodes and signs the typed data according to EIP-712.","Encodes and signs the typed data according to EIP-712.","Encodes and signs the typed data according to EIP-712.","Sets the signer’s chain ID and returns self.","Sets the signer’s chain ID and returns self.","Converts an ECDSA public key to its corresponding Ethereum …","Convert a raw, uncompressed public key to its …","Converts an ECDSA private key to its corresponding …","Applies EIP-155.","","An Ethereum private-public key pair which can be used for …","","","The wallet’s address.","","","","The wallet’s chain ID (for EIP-155).","","","Connects to a yubi key’s ECDSA account at the provided id","Decrypts an encrypted JSON from the provided path to …","Creates a new encrypted JSON with the provided private key …","","","","","","","Returns the argument unchanged.","Creates a new Wallet instance from a raw scalar serialized …","Uploads the provided keypair on the yubi at the provided id","Creates a new Wallet instance from a raw scalar serialized …","","Calls U::from(self).","Specific helper functions for creating/loading a mnemonic …","Creates a new random ECDSA keypair on the yubi at the …","Creates a new random encrypted JSON with the provided …","","Construct a new wallet with an external PrehashSigner.","Specific helper functions for loading an offline K256 …","Creates a new random keypair seeded with rand::thread_rng()…","Creates a new random keypair seeded with the provided RNG.","","","","Returns this wallet’s signer.","The wallet’s private key.","","","","","","Helpers for creating wallets for YubiHSM2.","coins_bip32 error.","coins_bip39 error.","ecdsa error.","eth_keystore error.","hex error.","std::io error.","MnemonicBuilder error.","Error thrown by the Wallet module.","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","Error suggests that a phrase (path or words) was expected …","Represents a structure that can resolve into a …","Error produced by the mnemonic wallet module","Error suggests that a phrase (path or words) was not …","PhantomData","","","","","Builds a LocalWallet using the parameters set in mnemonic …","Builds a LocalWallet using the parameters set in the …","","","","Sets the derivation path of the child key to be derived.","The derivation path at which the extended private key …","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Sets the derivation path of the child key to be derived. …","Calls U::from(self).","Calls U::from(self).","","Sets the password used to construct the seed from the …","Optional password for the mnemonic phrase.","Sets the phrase in the mnemonic builder. The phrase can …","The mnemonic phrase can be supplied to the builder as a …","","","","","","","","","","","Sets the word count of a mnemonic phrase to be generated …","The mnemonic builder can also be asked to generate a new …","Sets the path to which the randomly generated phrase will …","Optional field that if enabled, writes the mnemonic phrase …"],"i":[48,48,16,48,11,0,48,16,48,48,0,0,48,11,16,0,12,12,12,12,0,0,0,16,16,0,0,0,0,62,1,70,71,41,1,70,71,41,0,62,0,10,62,62,10,1,1,9,0,0,70,71,41,0,0,62,62,0,72,72,16,11,0,16,11,16,0,12,12,12,12,16,16,0,12,16,12,16,12,12,12,12,12,16,16,12,12,16,16,16,16,12,16,12,16,16,12,16,12,16,12,16,12,16,12,16,12,16,16,12,72,72,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,0,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,0,0,1,1,1,1,9,1,1,9,9,1,1,9,9,1,1,0,0,0,0,0,0,0,41,41,41,41,41,41,41,41,41,41,41,41,0,41,41,41,41,41,41,41,41,41,41,0,41,41,41,41,0,41,41,41,41,41,41,41,41,41,41,41,41,0,48,48,48,48,48,48,48,0,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,0,0,60,0,0,60,62,62,60,62,60,62,62,62,62,62,62,62,62,62,60,60,62,60,62,62,60,62,62,62,62,62,62,60,62,60,62,60,62,60,62,60,62,62,62,62],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,2],0,0,0,[1,3],0,0,0,0,0,0,0,0,0,0,[[1,3],4],[[1,5],[[8,[[7,[6]]]]]],[[9,5],[[11,[10]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[12,13],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[12,12],[[-1,-2],4,[],[]],[[12,12],14],[[12,12],15],[[16,17],18],[[16,17],18],[[12,17],18],[[12,17],18],[[[7,[19]]],16],[20,16],[-1,-1,[]],[21,16],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[16,15],[-1,16,[[22,[[7,[19]]]]]],[[12,12],[[23,[14]]]],[16,[[23,[19]]]],[-1,-2,[],[]],[-1,24,[]],[-1,24,[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,26,[]],[-1,26,[]],[16,[[23,[12]]]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[[10,3],4],[10,[[28,[27]]]],[-1,-2,[],[]],[-1,-2,[],[]],[10,10],[[-1,-2],4,[],[]],[[10,10],15],[[10,17],18],[-1,-1,[]],[[[29,[27]],3],[[25,[10,20]]]],[[5,5,3],[[25,[10,20]]]],[13,[[25,[10,-1]]],[]],[10,30],0,[10,30],[-1,-2,[],[]],[10,30],[[30,31],10],[[30,31],10],[10,4],[3,31],[10,[[33,[32]]]],[10,31],0,[[10,-1],[[25,[2,20]]],[[34,[[29,[27]]]]]],[[10,5],[[25,[2,20]]]],[[10,-1],[[25,[35,20]]],[[34,[[29,[27]]]]]],[[10,5],[[25,[35,20]]]],[10,[[33,[32]]]],[[10,31],4],[[10,3],4],[-1,-2,[],[]],[-1,[[25,[-2]]],[],[]],[[[29,[27]]],[[25,[10,-1]]],[]],[-1,[[25,[-2]]],[],[]],[-1,26,[]],[10,27],[-1,-2,[],[]],0,0,[1,2],[1,3],[[1,3],4],[[1,5],[[8,[[7,[6]]]]]],[[9,5],[[11,[10]]]],[[1,[29,[27]]],[[8,[[7,[6]]]]]],[[1,[29,[27]]],[[8,[[7,[6]]]]]],[[9,[29,[27]]],[[11,[10]]]],[[9,[29,[27]]],[[11,[10]]]],[[1,-1,36],[[8,[[7,[6]]]]],[37,38,39]],[[1,-1,36],[[8,[[7,[6]]]]],[37,38,39]],[[9,-1,36],[[11,[10]]],37],[[9,-1,36],[[11,[10]]],37],[[1,3],1],[[1,3],1],[35,2],[[[29,[27]]],2],[40,2],[[27,3],3],0,0,0,[[[41,[-1]]],2,[[42,[[4,[30,31]]]],38,39]],0,[-1,-2,[],[]],[-1,-2,[],[]],[[[41,[-1]]],3,[[42,[[4,[30,31]]]],38,39]],0,[[[41,[-1]]],[[41,[-1]]],43],[[-1,-2],4,[],[]],[[44,45,46],[[41,[[47,[32]]]]]],[[-1,-2],[[25,[[41,[40]],48]]],[[34,[49]]],[[34,[[29,[27]]]]]],[[-1,-2,-3,-4,[23,[13]]],[[25,[[4,[[41,[40]],24]],48]]],[[34,[49]]],[50,51],[[34,[[29,[27]]]]],[[34,[[29,[27]]]]]],[[[41,[40]],[41,[40]]],15],0,[[[41,[-1]],17],18,[[42,[[4,[30,31]]]]]],[52,[[41,[40]]]],[40,[[41,[40]]]],[[[47,[32]]],[[41,[[47,[32]]]]]],[-1,-1,[]],[53,[[25,[[41,[40]],20]]]],[[44,45,46,54,55,-1],[[41,[[47,[32]]]]],[[22,[[56,[27]]]]]],[[[29,[27]]],[[25,[[41,[40]],20]]]],[13,[[25,[[41,[40]],-1]]],[]],[-1,-2,[],[]],0,[[44,45,46,54,55],[[41,[[47,[32]]]]]],[[-1,-2,-3,[23,[13]]],[[25,[[4,[[41,[40]],24]],48]]],[[34,[49]]],[50,51,51],[[34,[[29,[27]]]]]],[40,[[41,[40]]]],[[-1,2,3],[[41,[-1]]],[[42,[[4,[30,31]]]],38,39]],0,[[],[[41,[40]]]],[-1,[[41,[40]]],[50,51]],[[[41,[-1]],3],4,[[42,[[4,[30,31]]]],38,39]],[[[41,[-1]],5],[[8,[[7,[6]]]]],[[42,[[4,[30,31]]]],38,39]],[[[41,[-1]],5],[[11,[10]]],[[42,[[4,[30,31]]]]]],[[[41,[-1]]],-1,[[42,[[4,[30,31]]]],38,39]],0,[-1,-2,[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,26,[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[48,17],18],[[48,17],18],[57,48],[58,48],[21,48],[59,48],[60,48],[20,48],[-1,-1,[]],[61,48],[-1,-2,[],[]],[48,[[23,[19]]]],[-1,24,[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,26,[]],[-1,-2,[],[]],0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[62,[-1]]],[[25,[[41,[40]],48]]],63],[[[62,[-1]],-2],[[25,[[41,[40]],48]]],63,50],[[[62,[-1]]],[[62,[-1]]],[43,63]],[[-1,-2],4,[],[]],[[],[[62,[-1]]],63],[[[62,[-1]],-2],[[25,[[62,[-1]],48]]],63,[[34,[13]]]],0,[[[62,[-1]],[62,[-1]]],15,[64,63]],[[[62,[-1]],17],18,[65,63]],[[60,17],18],[[60,17],18],[-1,-1,[]],[-1,-1,[]],[[[62,[-1]],66],[[25,[[62,[-1]],48]]],63],[-1,-2,[],[]],[-1,-2,[],[]],[[[62,[-1]],[67,[-1]]],[[25,[[41,[40]],48]]],63],[[[62,[-1]],-2],[[62,[-1]]],63,[[22,[24]]]],0,[[[62,[-1]],-2],[[62,[-1]]],63,[[22,[24]]]],0,[-1,-2,[],[]],[-1,24,[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,26,[]],[-1,26,[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[62,[-1]],68],[[62,[-1]]],63],0,[[[62,[-1]],-2],[[62,[-1]]],63,[[22,[69]]]],0],"c":[],"p":[[10,"Signer",151],[5,"Address",290],[1,"u64"],[1,"tuple"],[8,"B256",291],[10,"Future",292],[5,"Box",293],[5,"Pin",294],[10,"SignerSync",151],[5,"Signature",112],[8,"Result",60],[6,"UnsupportedSignerOperation",60],[1,"str"],[6,"Ordering",295],[1,"bool"],[6,"Error",60],[5,"Formatter",296],[8,"Result",296],[10,"Error",297],[5,"Error",298],[6,"FromHexError",299],[10,"Into",300],[6,"Option",301],[5,"String",302],[6,"Result",303],[5,"TypeId",304],[1,"u8"],[1,"array"],[1,"slice"],[8,"Signature",305],[5,"RecoveryId",306],[5,"Secp256k1",307],[5,"NonZeroScalar",308],[10,"AsRef",300],[8,"VerifyingKey",305],[5,"Eip712Domain",309],[10,"SolStruct",310],[10,"Send",311],[10,"Sync",311],[8,"SigningKey",305],[5,"Wallet",172],[10,"PrehashSigner",312],[10,"Clone",313],[5,"Connector",314],[5,"Credentials",315],[8,"Id",316],[5,"Signer",317],[6,"WalletError",217],[5,"Path",318],[10,"Rng",319],[10,"CryptoRng",320],[8,"SecretKey",307],[8,"FieldBytes",307],[5,"Label",321],[5,"Domain",322],[5,"Vec",323],[5,"Error",324],[6,"Bip32Error",325],[6,"MnemonicError",326],[6,"MnemonicBuilderError",244],[6,"KeystoreError",327],[5,"MnemonicBuilder",244],[10,"Wordlist",328],[10,"PartialEq",295],[10,"Debug",296],[1,"u32"],[5,"Mnemonic",326],[1,"usize"],[5,"PathBuf",318],[8,"LocalWallet",0],[8,"YubiWallet",0],[15,"TransactionChainIdMismatch",110]],"b":[[83,"impl-Debug-for-Error"],[84,"impl-Display-for-Error"],[85,"impl-Display-for-UnsupportedSignerOperation"],[86,"impl-Debug-for-UnsupportedSignerOperation"],[87,"impl-From%3CBox%3Cdyn+Error+%2B+Send+%2B+Sync%3E%3E-for-Error"],[88,"impl-From%3CError%3E-for-Error"],[90,"impl-From%3CFromHexError%3E-for-Error"],[189,"impl-From%3CSecretKey%3CSecp256k1%3E%3E-for-Wallet%3CSigningKey%3CSecp256k1%3E%3E"],[190,"impl-From%3CSigningKey%3CSecp256k1%3E%3E-for-Wallet%3CSigningKey%3CSecp256k1%3E%3E"],[191,"impl-From%3CSigner%3CSecp256k1%3E%3E-for-Wallet%3CSigner%3CSecp256k1%3E%3E"],[227,"impl-Display-for-WalletError"],[228,"impl-Debug-for-WalletError"],[229,"impl-From%3CError%3E-for-WalletError"],[230,"impl-From%3CBip32Error%3E-for-WalletError"],[231,"impl-From%3CFromHexError%3E-for-WalletError"],[232,"impl-From%3CMnemonicError%3E-for-WalletError"],[233,"impl-From%3CMnemonicBuilderError%3E-for-WalletError"],[234,"impl-From%3CError%3E-for-WalletError"],[236,"impl-From%3CKeystoreError%3E-for-WalletError"],[264,"impl-Debug-for-MnemonicBuilderError"],[265,"impl-Display-for-MnemonicBuilderError"]]}],\ +["alloy_signer_aws",{"doc":"alloy-signer-aws","t":"FGPPPPPPPOOOOOCFGPPPPPPPNONNNNNOHNNHHNNNNNNNNNNNNNNNNOONOHHNHNNNNNNNNNNNNNNN","n":["AwsSigner","AwsSignerError","GetPublicKey","Hex","K256","PublicKeyNotFound","Sign","SignatureNotFound","Spki","address","chain_id","key_id","kms","pubkey","signer","AwsSigner","AwsSignerError","GetPublicKey","Hex","K256","PublicKeyNotFound","Sign","SignatureNotFound","Spki","address","address","borrow","borrow","borrow_mut","borrow_mut","chain_id","chain_id","check_candidate","clone","clone_into","decode_pubkey","decode_signature","fmt","fmt","fmt","from","from","from","from","from","from","from","get_pubkey","get_pubkey_for_key","into","into","into_shared","into_shared","key_id","kms","new","pubkey","request_get_pubkey","request_sign_digest","set_chain_id","sig_from_digest_bytes_trial_recovery","sign_digest","sign_digest_with_eip155","sign_digest_with_key","sign_hash","source","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip"],"q":[[0,"alloy_signer_aws"],[15,"alloy_signer_aws::signer"],[76,"alloy_primitives::bits::address"],[77,"alloy_signer::signature"],[78,"alloy_primitives::aliases"],[79,"k256::ecdsa"],[80,"aws_sdk_kms::operation::get_public_key::_get_public_key_output"],[81,"alloy_signer::error"],[82,"aws_sdk_kms::operation::sign::_sign_output"],[83,"k256::ecdsa"],[84,"core::fmt"],[85,"spki::error"],[86,"const_hex::error"],[87,"aws_sdk_kms::operation::sign"],[88,"aws_sdk_kms::error"],[89,"aws_sdk_kms::operation::get_public_key"],[90,"alloc::string"],[91,"aws_sdk_kms::client"],[92,"core::future::future"],[93,"alloc::boxed"],[94,"core::pin"],[95,"core::error"],[96,"core::option"],[97,"core::result"],[98,"core::any"]],"d":["Amazon Web Services Key Management Service (AWS KMS) …","Errors thrown by AwsSigner.","Thrown when the AWS KMS API returns an error.","hex error.","ecdsa error.","Thrown when the AWS KMS API returns a response without a …","Thrown when the AWS KMS API returns a signing error.","Thrown when the AWS KMS API returns a response without a …","spki error.","","","","","","","Amazon Web Services Key Management Service (AWS KMS) …","Errors thrown by AwsSigner.","Thrown when the AWS KMS API returns an error.","hex error.","ecdsa error.","Thrown when the AWS KMS API returns a response without a …","Thrown when the AWS KMS API returns a signing error.","Thrown when the AWS KMS API returns a response without a …","spki error.","","","","","","","","","Makes a trial recovery to check whether an RSig …","","","Decode an AWS KMS Pubkey response.","Decode an AWS KMS Signature response.","","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","Fetch the pubkey associated with this signer’s key ID.","Fetch the pubkey associated with a key ID.","Calls U::from(self).","Calls U::from(self).","","","","","Instantiate a new signer from an existing Client and key …","","","","","Recover an rsig from a signature under a known key by …","Sign a digest with this signer’s key","Sign a digest with this signer’s key and add the eip155 v…","Sign a digest with the key associated with a key ID.","","","","","","","","","","","",""],"i":[0,0,10,10,10,10,10,10,10,1,1,1,1,1,0,0,0,10,10,10,10,10,10,10,1,1,1,10,1,10,1,1,0,1,1,0,0,1,10,10,1,10,10,10,10,10,10,1,1,1,10,1,10,1,1,1,1,0,0,1,0,1,1,1,1,10,1,10,1,10,1,10,1,10,1,10],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,2],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[1,3],0,[[4,5,6],7],[1,1],[[-1,-2],8,[],[]],[9,[[11,[6,10]]]],[12,[[11,[13,10]]]],[[1,14],15],[[10,14],15],[[10,14],15],[-1,-1,[]],[16,10],[17,10],[18,10],[[[20,[19]]],10],[[[20,[21]]],10],[-1,-1,[]],[1,[[11,[6,10]]]],[[1,22],[[11,[6,10]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[[23,22,3],[[11,[1,10]]]],0,[[23,22],[[11,[9,10]]]],[[23,22,5],[[11,[12,10]]]],[[1,3],8],[[13,5,6],4],[[1,5],[[11,[13,10]]]],[[1,5,3],[[11,[4,10]]]],[[1,22,5],[[11,[13,10]]]],[[1,5],[[26,[[25,[24]]]]]],[10,[[28,[27]]]],[-1,-2,[],[]],[-1,22,[]],[-1,[[29,[-2]]],[],[]],[-1,[[29,[-2]]],[],[]],[-1,[[29,[-2]]],[],[]],[-1,[[29,[-2]]],[],[]],[-1,30,[]],[-1,30,[]],[-1,-2,[],[]],[-1,-2,[],[]]],"c":[],"p":[[5,"AwsSigner",15],[5,"Address",76],[1,"u64"],[5,"Signature",77],[8,"B256",78],[8,"VerifyingKey",79],[1,"bool"],[1,"tuple"],[5,"GetPublicKeyOutput",80],[6,"AwsSignerError",15],[8,"Result",81],[5,"SignOutput",82],[8,"Signature",79],[5,"Formatter",83],[8,"Result",83],[5,"Error",84],[6,"Error",85],[6,"FromHexError",86],[6,"SignError",87],[8,"SdkError",88],[6,"GetPublicKeyError",89],[5,"String",90],[5,"Client",91],[10,"Future",92],[5,"Box",93],[5,"Pin",94],[10,"Error",95],[6,"Option",96],[6,"Result",97],[5,"TypeId",98]],"b":[[38,"impl-Debug-for-AwsSignerError"],[39,"impl-Display-for-AwsSignerError"],[41,"impl-From%3CError%3E-for-AwsSignerError"],[42,"impl-From%3CError%3E-for-AwsSignerError"],[43,"impl-From%3CFromHexError%3E-for-AwsSignerError"],[44,"impl-From%3CSdkError%3CSignError,+Response%3E%3E-for-AwsSignerError"],[45,"impl-From%3CSdkError%3CGetPublicKeyError,+Response%3E%3E-for-AwsSignerError"]]}],\ +["alloy_signer_ledger",{"doc":"alloy-signer-ledger","t":"PGPGPPFPPPPPPOOOCOCOOFNONNNOONNNNNNNNNNNNNNNNONNNNNGPPPPGGPPPPPPPGSGPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOO","n":["Ecdsa","HDPath","HexError","LedgerError","LedgerError","LedgerLive","LedgerSigner","Legacy","Other","SemVerError","ShortResponse","UnexpectedNullResponse","UnsupportedAppVersion","address","chain_id","derivation","signer","transport","types","expected","got","LedgerSigner","address","address","borrow","borrow_mut","chain_id","chain_id","derivation","fmt","fmt","from","get_address","get_address_with_path","get_address_with_path_transport","into","new","path_to_bytes","set_chain_id","sign_hash","sign_message","sign_payload","sign_typed_data","sign_typed_data_","to_string","transport","try_from","try_into","type_id","version","vzip","DerivationType","Ecdsa","GET_APP_CONFIGURATION","GET_PUBLIC_KEY","HexError","INS","LedgerError","LedgerError","LedgerLive","Legacy","MORE","NON_CONFIRM","NO_CHAINCODE","Other","P1","P1_FIRST","P2","SIGN","SIGN_ETH_EIP_712","SIGN_PERSONAL_MESSAGE","SemVerError","ShortResponse","UnexpectedNullResponse","UnsupportedAppVersion","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","into","into","into","into","into","source","to_owned","to_owned","to_owned","to_owned","to_string","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","expected","got"],"q":[[0,"alloy_signer_ledger"],[19,"alloy_signer_ledger::LedgerError"],[21,"alloy_signer_ledger::signer"],[51,"alloy_signer_ledger::types"],[146,"alloy_signer_ledger::types::LedgerError"],[148,"alloy_primitives::bits::address"],[149,"core::fmt"],[150,"core::fmt"],[151,"coins_ledger::transports"],[152,"alloc::vec"],[153,"alloy_primitives::aliases"],[154,"core::future::future"],[155,"alloc::boxed"],[156,"core::pin"],[157,"alloy_signer::signature"],[158,"alloy_sol_types::eip712"],[159,"alloy_sol_types::types::struct"],[160,"core::marker"],[161,"core::marker"],[162,"core::result"],[163,"core::any"],[164,"semver"],[165,"core::fmt"],[166,"semver::parse"],[167,"const_hex::error"],[168,"coins_ledger::errors"],[169,"core::error"],[170,"core::option"]],"d":["ecdsa error.","Ledger wallet type","hex error.","Error when using the Ledger transport.","Underlying Ledger transport error.","Ledger Live-generated HD path","A Ledger Ethereum signer.","Legacy generated HD Path","Any other path","semver error.","Got a response, but it didn’t contain as much data as …","Device response was unexpectedly empty.","Thrown when trying to sign using EIP-712 with an …","","","","Ledger Ethereum app wrapper.","","Helpers for interacting with the Ethereum Ledger App.","Number of bytes expected.","Number of bytes received.","A Ledger Ethereum signer.","","","","","","","","","","Returns the argument unchanged.","Get the account which corresponds to our derivation path","Gets the account which corresponds to the provided …","","Calls U::from(self).","Instantiate the application by acquiring a lock on the …","","","","","Helper function for signing either transaction data, …","","","","","","","","Returns the semver of the Ethereum ledger app","","Ledger wallet type","ecdsa error.","","","hex error.","","Error when using the Ledger transport.","Underlying Ledger transport error.","Ledger Live-generated HD path","Legacy generated HD Path","","","","Any other path","","","","","","","semver error.","Got a response, but it didn’t contain as much data as …","Device response was unexpectedly empty.","Thrown when trying to sign using EIP-712 with an …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Number of bytes expected.","Number of bytes received."],"i":[6,0,6,0,6,8,0,8,8,6,6,6,6,1,1,1,0,1,0,38,38,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,6,18,18,6,0,0,6,8,8,28,28,29,8,0,0,0,18,18,18,6,6,6,6,8,6,18,28,29,8,6,18,28,29,8,18,28,29,8,18,28,29,18,28,29,8,8,6,6,18,18,28,29,8,6,6,6,6,6,18,28,29,8,6,18,28,29,6,8,18,28,29,8,6,18,8,6,18,28,29,8,6,18,28,29,8,6,18,28,29,8,6,18,28,29,38,38],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,2],0,[-1,-2,[],[]],[-1,-2,[],[]],[1,3],0,0,[[1,4],5],[[1,4],5],[-1,-1,[]],[1,[[7,[2,6]]]],[[1,8],[[7,[2,6]]]],[[9,8],[[7,[2,6]]]],[-1,-2,[],[]],[[8,3],[[7,[1,6]]]],[8,[[11,[10]]]],[[1,3],12],[[1,13],[[16,[[15,[14]]]]]],[[1,[17,[10]]],[[16,[[15,[14]]]]]],[[1,18,[17,[10]]],[[7,[19,6]]]],[[1,-1,20],[[16,[[15,[14]]]]],[21,22,23]],[[1,-1,20],[[7,[19,6]]],21],[-1,24,[]],0,[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,26,[]],[1,[[7,[27,6]]]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[8,8],[18,18],[28,28],[29,29],[[-1,-2],12,[],[]],[[-1,-2],12,[],[]],[[-1,-2],12,[],[]],[[-1,-2],12,[],[]],[[18,18],30],[[28,28],30],[[29,29],30],[[8,4],5],[[8,4],[[25,[12,31]]]],[[6,4],5],[[6,4],5],[[18,4],5],[[18,4],5],[[28,4],5],[[29,4],5],[-1,-1,[]],[32,6],[33,6],[34,6],[-1,-1,[]],[35,6],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[6,[[37,[36]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,24,[]],[-1,24,[]],[-1,24,[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,[[25,[-2]]],[],[]],[-1,26,[]],[-1,26,[]],[-1,26,[]],[-1,26,[]],[-1,26,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0],"c":[],"p":[[5,"LedgerSigner",21],[5,"Address",148],[1,"u64"],[5,"Formatter",149],[8,"Result",149],[6,"LedgerError",51],[8,"Result",150],[6,"DerivationType",51],[5,"Ledger",151],[1,"u8"],[5,"Vec",152],[1,"tuple"],[8,"B256",153],[10,"Future",154],[5,"Box",155],[5,"Pin",156],[1,"slice"],[6,"INS",51],[5,"Signature",157],[5,"Eip712Domain",158],[10,"SolStruct",159],[10,"Send",160],[10,"Sync",160],[5,"String",161],[6,"Result",162],[5,"TypeId",163],[5,"Version",164],[6,"P1",51],[6,"P2",51],[1,"bool"],[5,"Error",149],[5,"Error",165],[5,"Error",166],[6,"FromHexError",167],[6,"LedgerError",168],[10,"Error",169],[6,"Option",170],[15,"ShortResponse",146]],"b":[[29,"impl-Display-for-LedgerSigner"],[30,"impl-Debug-for-LedgerSigner"],[96,"impl-Debug-for-DerivationType"],[97,"impl-Display-for-DerivationType"],[98,"impl-Debug-for-LedgerError"],[99,"impl-Display-for-LedgerError"],[100,"impl-Debug-for-INS"],[101,"impl-Display-for-INS"],[105,"impl-From%3CError%3E-for-LedgerError"],[106,"impl-From%3CError%3E-for-LedgerError"],[107,"impl-From%3CFromHexError%3E-for-LedgerError"],[109,"impl-From%3CLedgerError%3E-for-LedgerError"]]}],\ +["alloy_signer_trezor",{"doc":"alloy-signer-trezor","t":"PPPPPPPGGPFPOOOOCCSSFNONNNONNONNNNNNNNONNNNNNNNPGPPPPPPGPFPONNNNNNNNONNNNNNNNNNNOONNNOOONONNNNNNNNNNNNNONNN","n":["Client","Ecdsa","FeaturesError","Hex","NoEnsSupport","Other","Semver","TrezorError","TrezorHDPath","TrezorLive","TrezorSigner","UnsupportedFirmwareVersion","address","chain_id","derivation","session_id","signer","types","FIRMWARE_1_MIN_VERSION","FIRMWARE_2_MIN_VERSION","TrezorSigner","address","address","borrow","borrow_mut","chain_id","chain_id","check_version","convert_path","derivation","fmt","from","get_address","get_address_with_path","get_client","initate_session","into","new","session_id","set_chain_id","sign_hash","sign_message","sign_message_","try_from","try_into","type_id","vzip","Client","DerivationType","Ecdsa","FeaturesError","Hex","NoEnsSupport","Other","Semver","TrezorError","TrezorLive","TrezorTransaction","UnsupportedFirmwareVersion","access_list","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","data","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","gas","gas_price","into","into","into","max_fee_per_gas","max_priority_fee_per_gas","nonce","source","to","to_owned","to_string","to_string","to_trimmed_big_endian","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","value","vzip","vzip","vzip"],"q":[[0,"alloy_signer_trezor"],[18,"alloy_signer_trezor::signer"],[47,"alloy_signer_trezor::types"],[107,"alloy_primitives::bits::address"],[108,"semver"],[109,"alloy_signer::error"],[110,"alloc::vec"],[111,"core::fmt"],[112,"core::fmt"],[113,"alloy_primitives::aliases"],[114,"core::future::future"],[115,"alloc::boxed"],[116,"core::pin"],[117,"alloy_signer::signature"],[118,"core::result"],[119,"core::any"],[120,"core::fmt"],[121,"const_hex::error"],[122,"semver::parse"],[123,"trezor_client::error"],[124,"core::error"],[125,"core::option"],[126,"alloc::string"],[127,"ruint::aliases"]],"d":["Underlying Trezor transport error.","ecdsa error.","Could not retrieve device features.","Thrown when converting from a hex string.","No ENS support.","Any other path.","Thrown when converting a semver requirement.","Error when using the Trezor transport","Trezor wallet type.","Trezor Live-generated HD path","A Trezor Ethereum signer.","Thrown when trying to sign an EIP-712 struct with an …","","","","","","Helpers for interacting with the Ethereum Trezor App.","","","A Trezor Ethereum signer.","","","","","","","","","","","Returns the argument unchanged.","Get the account which corresponds to our derivation path","Gets the account which corresponds to the provided …","","","Calls U::from(self).","Instantiates a new Trezor signer.","","","","","","","","","","Underlying Trezor transport error.","Trezor wallet type.","ecdsa error.","Could not retrieve device features.","Thrown when converting from a hex string.","No ENS support.","Any other path.","Thrown when converting a semver requirement.","Error when using the Trezor transport","Trezor Live-generated HD path","Trezor transaction.","Thrown when trying to sign an EIP-712 struct with an …","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","",""],"i":[6,6,6,6,6,8,6,0,0,8,0,6,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,0,6,6,6,6,8,6,0,8,0,6,32,32,8,6,32,8,6,8,8,32,8,8,6,6,32,8,6,6,6,6,6,32,32,32,8,6,32,32,32,6,32,8,8,6,32,32,8,6,32,8,6,32,8,6,32,32,8,6],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,2],0,[-1,-2,[],[]],[-1,-2,[],[]],[1,3],0,[4,[[7,[5,6]]]],[8,[[10,[9]]]],0,[[1,11],12],[-1,-1,[]],[1,[[7,[2,6]]]],[[1,8],[[7,[2,6]]]],[1,[[7,[13,6]]]],[1,[[7,[5,6]]]],[-1,-2,[],[]],[[8,3],[[7,[1,6]]]],0,[[1,3],5],[[1,14],[[17,[[16,[15]]]]]],[[1,[19,[18]]],[[17,[[16,[15]]]]]],[[1,[19,[18]]],[[7,[20,6]]]],[-1,[[21,[-2]]],[],[]],[-1,[[21,[-2]]],[],[]],[-1,22,[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[8,8],[[-1,-2],5,[],[]],0,[[8,11],12],[[8,11],[[21,[5,23]]]],[[6,11],12],[[6,11],12],[-1,-1,[]],[-1,-1,[]],[24,6],[25,6],[-1,-1,[]],[26,6],[27,6],0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[6,[[29,[28]]]],0,[-1,-2,[],[]],[-1,30,[]],[-1,30,[]],[31,[[10,[18]]]],[-1,[[21,[-2]]],[],[]],[-1,[[21,[-2]]],[],[]],[-1,[[21,[-2]]],[],[]],[-1,[[21,[-2]]],[],[]],[-1,[[21,[-2]]],[],[]],[-1,[[21,[-2]]],[],[]],[-1,22,[]],[-1,22,[]],[-1,22,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]]],"c":[],"p":[[5,"TrezorSigner",18],[5,"Address",107],[1,"u64"],[5,"Version",108],[1,"tuple"],[6,"TrezorError",47],[8,"Result",109],[6,"DerivationType",47],[1,"u32"],[5,"Vec",110],[5,"Formatter",111],[8,"Result",111],[5,"Trezor",112],[8,"B256",113],[10,"Future",114],[5,"Box",115],[5,"Pin",116],[1,"u8"],[1,"slice"],[5,"Signature",117],[6,"Result",118],[5,"TypeId",119],[5,"Error",111],[5,"Error",120],[6,"FromHexError",121],[5,"Error",122],[6,"Error",123],[10,"Error",124],[6,"Option",125],[5,"String",126],[8,"U256",127],[5,"TrezorTransaction",47]],"b":[[69,"impl-Debug-for-DerivationType"],[70,"impl-Display-for-DerivationType"],[71,"impl-Display-for-TrezorError"],[72,"impl-Debug-for-TrezorError"],[75,"impl-From%3CError%3E-for-TrezorError"],[76,"impl-From%3CFromHexError%3E-for-TrezorError"],[78,"impl-From%3CError%3E-for-TrezorError"],[79,"impl-From%3CError%3E-for-TrezorError"]]}],\ +["alloy_transport",{"doc":"alloy-transport","t":"GPPFKPPPPPPIIIPKPRKIIICCCCMMOMMCCCOOFKNNNNMNNNONNNNNNNNGPPNNNNNNNNNNNNNNNNKRKMMMMPPPPPPPPPIGINNNNNNNNNNNNNNNNOOKNNCKIIIHH","n":["Authorization","Basic","Bearer","BoxTransport","BoxTransportConnect","DeserError","Err","Err","ErrorResp","Ok","Ok","Pbf","RpcFut","RpcResult","SerError","Transport","Transport","Transport","TransportConnect","TransportError","TransportFut","TransportResult","boxed","common","connect","error","get_boxed_transport","get_transport","inner","is_local","is_local","trait","type_aliases","utils","err","text","BoxTransport","CloneTransport","borrow","borrow_mut","call","clone","clone_box","clone_into","fmt","from","inner","into","new","poll_ready","to_owned","try_from","try_into","type_id","vzip","Authorization","Basic","Bearer","basic","bearer","borrow","borrow_mut","clone","clone_into","fmt","fmt","from","into","to_owned","to_string","try_from","try_into","type_id","vzip","BoxTransportConnect","Transport","TransportConnect","get_boxed_transport","get_transport","is_local","is_local","BackendGone","Custom","DeserError","Err","ErrorResp","MissingBatchResponse","Ok","SerError","Transport","TransportError","TransportErrorKind","TransportResult","backend_gone","borrow","borrow_mut","custom","custom_str","fmt","fmt","from","into","missing_batch_response","source","to_string","try_from","try_into","type_id","vzip","err","text","Transport","boxed","boxed","private","Sealed","Pbf","RpcFut","TransportFut","guess_local_url","to_json_raw_value"],"q":[[0,"alloy_transport"],[34,"alloy_transport::TransportError"],[36,"alloy_transport::boxed"],[55,"alloy_transport::common"],[74,"alloy_transport::connect"],[81,"alloy_transport::error"],[109,"alloy_transport::error::TransportError"],[111,"alloy_transport::trait"],[115,"alloy_transport::trait::private"],[116,"alloy_transport::type_aliases"],[119,"alloy_transport::utils"],[121,"core::clone"],[122,"alloy_json_rpc::packet"],[123,"alloc::boxed"],[124,"core::fmt"],[125,"core::fmt"],[126,"core::marker"],[127,"core::result"],[128,"core::task::poll"],[129,"core::any"],[130,"core::convert"],[131,"alloc::string"],[132,"core::convert"],[133,"alloy_json_rpc::common"],[134,"core::option"],[135,"serde_json::raw"],[136,"serde::ser"]],"d":["Basic or bearer authentication in http or websocket …","HTTP Basic Auth","Bearer Auth","A boxed, Clone-able Transport trait object.","Connection details for a transport that can be boxed.","JSON deserialization error.","Contains the error value","Contains the error value","Server returned an error response.","Contains the success value","Contains the success value","Pin-boxed future.","Future for RPC-level requests.","The result of a JSON-RPC request.","JSON serialization error.","A Transport manages the JSON-RPC request/response …","Transport error.","The transport type that is returned by connect.","Connection details for a transport.","A transport error is an RpcError containing a …","Future for Transport-level requests.","A transport result is a Result containing a TransportError.","","","","","Connect to a transport, and box it.","Connect to the transport, returning a Transport instance.","","Returns true if the transport connects to a local resource.","Returns true if the transport is a local transport.","","","Misc. utilities for building transports.","The underlying serde_json error.","For deser errors, the text that failed to deserialize.","A boxed, Clone-able Transport trait object.","Helper trait for constructing BoxTransport.","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","Instantiate a new box transport from a suitable transport.","","","","","","","Basic or bearer authentication in http or websocket …","HTTP Basic Auth","Bearer Auth","Instantiate a new basic auth.","Instantiate a new bearer auth.","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","Connection details for a transport that can be boxed.","The transport type that is returned by connect.","Connection details for a transport.","Connect to a transport, and box it.","Connect to the transport, returning a Transport instance.","Returns true if the transport connects to a local resource.","Returns true if the transport is a local transport.","PubSub backend connection task has stopped.","Custom error","JSON deserialization error.","Contains the error value","Server returned an error response.","Missing batch response.","Contains the success value","JSON serialization error.","Transport error.","A transport error is an RpcError containing a …","Transport error.","A transport result is a Result containing a TransportError.","Instantiate a new TransportError::BackendGone.","","","Instantiate a new TransportError from a custom error.","Instantiate a new TransportError from a custom error.","","","Returns the argument unchanged.","Calls U::from(self).","Instantiate a new TransportError from a missing ID.","","","","","","","The underlying serde_json error.","For deser errors, the text that failed to deserialize.","A Transport manages the JSON-RPC request/response …","Convert this transport into a boxed trait object.","Convert this transport into a boxed trait object.","","","Pin-boxed future.","Future for RPC-level requests.","Future for Transport-level requests.","Guess whether the URL is local, based on the hostname.","Convert to a Box<RawValue> from a Serialize type, mapping …"],"i":[0,22,22,0,0,3,32,34,3,32,34,0,0,0,3,0,3,6,0,0,0,0,0,0,0,0,1,6,2,6,1,0,0,0,35,35,0,0,2,2,2,2,11,2,2,2,2,2,2,2,2,2,2,2,2,0,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,0,6,0,1,6,6,1,28,28,3,32,3,28,32,3,3,0,0,0,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,35,35,0,7,7,0,0,0,0,0,0,0],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,[[4,[2,3]]]],[[[6,[],[[5,[-1]]]]],[[4,[-1,3]]],[7,8]],0,[[[6,[],[[5,[-1]]]]],9,[7,8]],[1,9],0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[2,10],-1,[]],[2,2],[11,[[12,[11]]]],[[-1,-2],13,[],[]],[[2,14],15],[-1,-1,[]],0,[-1,-2,[],[]],[-1,2,[7,8,16,17]],[[2,18],[[20,[[19,[13,-1]]]]],[]],[-1,-2,[],[]],[-1,[[19,[-2]]],[],[]],[-1,[[19,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,[[-1,-2],22,[[24,[23]]],[[24,[23]]]],[-1,22,[[26,[25]]]],[-1,-2,[],[]],[-1,-2,[],[]],[22,22],[[-1,-2],13,[],[]],[[22,14],15],[[22,14],15],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,25,[]],[-1,[[19,[-2]]],[],[]],[-1,[[19,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,[1,[[4,[2,3]]]],[[[6,[],[[5,[-1]]]]],[[4,[-1,3]]],[7,8]],[[[6,[],[[5,[-1]]]]],9,[7,8]],[1,9],0,0,0,0,0,0,0,0,0,0,0,0,[[],3],[-1,-2,[],[]],[-1,-2,[],[]],[-1,3,[27,16,17]],[23,3],[[28,14],15],[[28,14],15],[-1,-1,[]],[-1,-2,[],[]],[29,3],[28,[[30,[27]]]],[-1,25,[]],[-1,[[19,[-2]]],[],[]],[-1,[[19,[-2]]],[],[]],[-1,21,[]],[-1,-2,[],[]],0,0,0,[7,2],[7,2],0,0,0,0,0,[-1,9,[[24,[23]]]],[-1,[[32,[[12,[31]]]]],33]],"c":[],"p":[[10,"BoxTransportConnect",74],[5,"BoxTransport",36],[8,"TransportError",81],[8,"Pbf",116],[17,"Transport"],[10,"TransportConnect",74],[10,"Transport",111],[10,"Clone",121],[1,"bool"],[6,"RequestPacket",122],[10,"CloneTransport",36],[5,"Box",123],[1,"tuple"],[5,"Formatter",124],[8,"Result",124],[10,"Send",125],[10,"Sync",125],[5,"Context",126],[6,"Result",127],[6,"Poll",128],[5,"TypeId",129],[6,"Authorization",55],[1,"str"],[10,"AsRef",130],[5,"String",131],[10,"Into",130],[10,"Error",132],[6,"TransportErrorKind",81],[6,"Id",133],[6,"Option",134],[5,"RawValue",135],[8,"TransportResult",81],[10,"Serialize",136],[8,"RpcResult",0],[15,"DeserError",109]],"b":[[64,"impl-Debug-for-Authorization"],[65,"impl-Display-for-Authorization"],[98,"impl-Display-for-TransportErrorKind"],[99,"impl-Debug-for-TransportErrorKind"]]}],\ +["alloy_transport_http",{"doc":"alloy-transport-http","t":"FNNNNNNNONNNNNCNNNNNNNNCNNNNNNNONN","n":["Http","borrow","borrow_mut","call","call","call","call","client","client","clone","clone_into","fmt","from","guess_local","hyper","into","new","poll_ready","poll_ready","poll_ready","poll_ready","request","request","reqwest","set_client","set_url","to_owned","try_from","try_into","type_id","url","url","vzip","with_client"],"q":[[0,"alloy_transport_http"],[34,"hyper::client::client"],[35,"alloy_json_rpc::packet"],[36,"hyper::client::connect::sealed"],[37,"core::clone"],[38,"core::marker"],[39,"core::marker"],[40,"core::fmt"],[41,"core::fmt"],[42,"core::default"],[43,"core::task::wake"],[44,"core::result"],[45,"core::task::poll"],[46,"alloy_transport::type_aliases"],[47,"core::any"]],"d":["An Http transport.","","","","","","","Get a reference to the client.","","","","","Returns the argument unchanged.","Guess whether the URL is local, based on the hostname.","","Calls U::from(self).","Create a new Http transport.","","","","","Make a request.","Make a request.","","Set the client.","Set the URL.","","","","","Get a reference to the URL.","","","Create a new Http transport with a custom client."],"i":[0,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2,2],"f":[0,[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[[1,[-1]]]],3],-2,[4,5,6,7],[]],[[[2,[[1,[-1]]]],3],-2,[4,5,6,7],[]],[[[2,[8]],3],-1,[]],[[[2,[8]],3],-1,[]],[[[2,[-1]]],-1,[]],0,[[[2,[-1]]],[[2,[-1]]],5],[[-1,-2],9,[],[]],[[[2,[-1]],10],11,12],[-1,-1,[]],[[[2,[-1]]],13,[]],0,[-1,-2,[],[]],[14,[[2,[-1]]],15],[[[2,[8]],16],[[18,[[17,[9,-1]]]]],[]],[[[2,[8]],16],[[18,[[17,[9,-1]]]]],[]],[[[2,[[1,[-1]]]],16],[[18,[[17,[9,-2]]]]],[4,5,6,7],[]],[[[2,[[1,[-1]]]],16],[[18,[[17,[9,-2]]]]],[4,5,6,7],[]],[[[2,[[1,[-1]]]],3],19,[4,5,6,7]],[[[2,[8]],3],19],0,[[[2,[-1]],-1],9,[]],[[[2,[-1]],14],9,[]],[-1,-2,[],[]],[-1,[[17,[-2]]],[],[]],[-1,[[17,[-2]]],[],[]],[-1,20,[]],[[[2,[-1]]],21,[]],0,[-1,-2,[],[]],[[-1,14],[[2,[-1]]],[]]],"c":[],"p":[[5,"Client",34],[5,"Http",0],[6,"RequestPacket",35],[10,"Connect",36],[10,"Clone",37],[10,"Send",38],[10,"Sync",38],[5,"Client",39],[1,"tuple"],[5,"Formatter",40],[8,"Result",40],[10,"Debug",40],[1,"bool"],[5,"Url",41],[10,"Default",42],[5,"Context",43],[6,"Result",44],[6,"Poll",45],[8,"TransportFut",46],[5,"TypeId",47],[1,"str"]],"b":[[3,"impl-Service%3CRequestPacket%3E-for-%26Http%3CClient%3CC%3E%3E"],[4,"impl-Service%3CRequestPacket%3E-for-Http%3CClient%3CC%3E%3E"],[5,"impl-Service%3CRequestPacket%3E-for-%26Http%3CClient%3E"],[6,"impl-Service%3CRequestPacket%3E-for-Http%3CClient%3E"],[17,"impl-Service%3CRequestPacket%3E-for-%26Http%3CClient%3E"],[18,"impl-Service%3CRequestPacket%3E-for-Http%3CClient%3E"],[19,"impl-Service%3CRequestPacket%3E-for-Http%3CClient%3CC%3E%3E"],[20,"impl-Service%3CRequestPacket%3E-for-%26Http%3CClient%3CC%3E%3E"],[21,"impl-Http%3CClient%3CC%3E%3E"],[22,"impl-Http%3CClient%3E"]]}],\ +["alloy_transport_ipc",{"doc":"alloy-transport-ipc","t":"PFFEPFINNNNOCNONNNNOONNCNNNNOONNNNNNNNNFNNNNNNNNNNNNNNQONNNNNNNNNNFNNNNNNNNNNNOONNNNN","n":["Err","IpcBackend","IpcConnect","MockIpcServer","Ok","ReadJsonStream","Result","borrow","borrow","borrow_mut","borrow_mut","buf","connect","connect","drained","fmt","from","from","from","inner","interface","into","into","mock","new","poll_next","project","project_ref","reader","socket","spawn","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","IpcConnect","borrow","borrow_mut","clone","clone_into","connect","connect","connect","connect","fmt","from","from","from","from","from","impl_connect","inner","into","is_local","is_local","is_local","is_local","to_owned","try_from","try_into","type_id","vzip","MockIpcServer","add_raw_reply","add_reply","add_response","borrow","borrow_mut","default","fmt","from","into","new","path","path","replies","spawn","try_from","try_into","type_id","vzip"],"q":[[0,"alloy_transport_ipc"],[39,"alloy_transport_ipc::connect"],[66,"alloy_transport_ipc::mock"],[85,"alloy_pubsub::handle"],[86,"std::io::error"],[87,"core::result"],[88,"interprocess::local_socket::to_name"],[89,"core::clone"],[90,"core::fmt"],[91,"core::fmt"],[92,"core::pin"],[93,"core::task::wake"],[94,"core::option"],[95,"core::task::poll"],[96,"core::any"],[97,"alloc::ffi::c_str"],[98,"alloy_transport::error"],[99,"alloy_transport::type_aliases"],[100,"alloc::string"],[101,"std::path"],[102,"std::ffi::os_str"],[103,"alloc::vec"],[104,"serde::ser"],[105,"alloy_json_rpc::response"]],"d":["Contains the error value","An IPC backend task.","An IPC Connection object.","","Contains the success value","A stream of JSON-RPC items, read from an AsyncRead stream.","","","","","","A buffer for reading data from the reader.","","Connect to a local socket. Either a unix socket or a …","Whether the buffer has been drained.","","Returns the argument unchanged.","","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Mock IPC server.","","","","","The underlying reader.","","","","","","","","","","","An IPC Connection object.","","","","","","","","","","","","","","Returns the argument unchanged.","","","Calls U::from(self).","","","","","","","","","","Mock IPC server.","Add a raw reply to the server.","Add a reply to the server.","Add a json-rpc response to the server.","","","","","Returns the argument unchanged.","Calls U::from(self).","Create a new mock IPC server.","Get the path to the socket.","Path to the socket","Replies to send, in order","Run the server.","","","",""],"i":[31,0,0,0,31,0,0,15,6,15,6,6,0,15,6,6,15,6,6,18,15,15,6,0,6,6,6,6,6,15,15,15,6,15,6,15,6,15,6,0,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0,18,18,18,18,18,18,18,18,18,18,18,0,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26],"f":[0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[-1,[[3,[1,2]]],[4,5]],0,[[[6,[-1]],7],8,9],[-1,-1,[]],[-1,[[6,[-1]]],10],[-1,-1,[]],0,0,[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,[[6,[-1]]],10],[[[11,[[6,[-1]]]],12],[[14,[[13,[-2]]]]],10,[]],[[[11,[[6,[-1]]]]],[[0,[-1]]],[]],[[[11,[[6,[-1]]]]],[[0,[-1]]],[]],0,0,[15,16],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,17,[]],[-1,17,[]],[-1,-2,[],[]],[-1,-2,[],[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[[[18,[-1]]],[[18,[-1]]],5],[[-1,-2],16,[],[]],[[[18,[19]]],[[21,[1,20]]]],[[[18,[22]]],[[21,[1,20]]]],[[[18,[23]]],[[21,[1,20]]]],[[[18,[24]]],[[21,[1,20]]]],[[[18,[-1]],7],8,9],[19,[[18,[19]]]],[24,[[18,[24]]]],[23,[[18,[23]]]],[22,[[18,[22]]]],[-1,-1,[]],0,0,[-1,-2,[],[]],[[[18,[19]]],25],[[[18,[22]]],25],[[[18,[23]]],25],[[[18,[24]]],25],[-1,-2,[],[]],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,17,[]],[-1,-2,[],[]],0,[[26,[28,[27]]],16],[[26,-1],16,29],[[26,[30,[-1]]],16,29],[-1,-2,[],[]],[-1,-2,[],[]],[[],26],[[26,7],8],[-1,-1,[]],[-1,-2,[],[]],[[],26],[26,23],0,0,[26,16],[-1,[[3,[-2]]],[],[]],[-1,[[3,[-2]]],[],[]],[-1,17,[]],[-1,-2,[],[]]],"c":[],"p":[[5,"ConnectionHandle",85],[5,"Error",86],[6,"Result",87],[10,"ToLocalSocketName",88],[10,"Clone",89],[5,"ReadJsonStream",0],[5,"Formatter",90],[8,"Result",90],[10,"Debug",90],[10,"AsyncRead",91],[5,"Pin",92],[5,"Context",93],[6,"Option",94],[6,"Poll",95],[5,"IpcBackend",0],[1,"tuple"],[5,"TypeId",96],[5,"IpcConnect",39],[5,"CString",97],[8,"TransportError",98],[8,"Pbf",99],[5,"String",100],[5,"PathBuf",101],[5,"OsString",102],[1,"bool"],[5,"MockIpcServer",66],[1,"u8"],[5,"Vec",103],[10,"Serialize",104],[5,"Response",105],[8,"Result",0]],"b":[[44,"impl-PubSubConnect-for-IpcConnect%3CCString%3E"],[45,"impl-PubSubConnect-for-IpcConnect%3CString%3E"],[46,"impl-PubSubConnect-for-IpcConnect%3CPathBuf%3E"],[47,"impl-PubSubConnect-for-IpcConnect%3COsString%3E"],[49,"impl-From%3CCString%3E-for-IpcConnect%3CCString%3E"],[50,"impl-From%3COsString%3E-for-IpcConnect%3COsString%3E"],[51,"impl-From%3CPathBuf%3E-for-IpcConnect%3CPathBuf%3E"],[52,"impl-From%3CString%3E-for-IpcConnect%3CString%3E"],[57,"impl-PubSubConnect-for-IpcConnect%3CCString%3E"],[58,"impl-PubSubConnect-for-IpcConnect%3CString%3E"],[59,"impl-PubSubConnect-for-IpcConnect%3CPathBuf%3E"],[60,"impl-PubSubConnect-for-IpcConnect%3COsString%3E"]]}],\ +["alloy_transport_ws",{"doc":"alloy-transport-ws","t":"FFONNNNNNONCNONNNNONSIFONNNNONONNONNNONNNNON","n":["WsBackend","WsConnect","auth","borrow","borrow_mut","fmt","from","handle","handle_text","interface","into","native","send","socket","spawn","try_from","try_into","type_id","url","vzip","KEEPALIVE","TungsteniteStream","WsConnect","auth","borrow","borrow_mut","clone","clone_into","closing","connect","ended","fmt","from","inner","into","into_client_request","is_local","ready","to_owned","try_from","try_into","type_id","url","vzip"],"q":[[0,"alloy_transport_ws"],[20,"alloy_transport_ws::native"],[44,"core::fmt"],[45,"core::fmt"],[46,"tokio_tungstenite::stream"],[47,"tokio_tungstenite"],[48,"tungstenite::protocol::message"],[49,"core::result"],[50,"alloc::string"],[51,"serde_json::raw"],[52,"alloc::boxed"],[53,"tungstenite::error"],[54,"core::any"],[55,"alloy_pubsub::handle"],[56,"alloy_transport::error"],[57,"alloy_transport::type_aliases"],[58,"tungstenite::handshake::client"],[59,"tungstenite::error"]],"d":["An ongoing connection to a backend.","Simple connection details for a websocket connection.","The authorization header to use.","","","","Returns the argument unchanged.","Handle a message from the server.","Handle inbound text from the websocket.","The interface to the connection.","Calls U::from(self).","","Send a message to the server.","The websocket connection.","Spawn a new backend task.","","","","The URL to connect to.","","","","Simple connection details for a websocket connection.","The authorization header to use.","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","The URL to connect to.",""],"i":[0,0,16,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,16,1,0,0,0,16,16,16,16,16,23,16,23,16,16,23,16,16,16,23,16,16,16,16,16,16],"f":[0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[1,[-1]],2],3,4],[-1,-1,[]],[[[1,[[7,[[6,[5]]]]]],8],[[10,[9,9]]]],[[[1,[-1]],11],[[10,[9,9]]],[]],0,[-1,-2,[],[]],0,[[[1,[[7,[[6,[5]]]]]],[13,[12]]],[[10,[9,14]]]],0,[[[1,[[7,[[6,[5]]]]]]],9],[-1,[[10,[-2]]],[],[]],[-1,[[10,[-2]]],[],[]],[-1,15,[]],0,[-1,-2,[],[]],0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[16,16],[[-1,-2],9,[],[]],0,[16,[[19,[17,18]]]],0,[[16,2],3],[-1,-1,[]],0,[-1,-2,[],[]],[16,[[21,[20]]]],[16,22],0,[-1,-2,[],[]],[-1,[[10,[-2]]],[],[]],[-1,[[10,[-2]]],[],[]],[-1,15,[]],0,[-1,-2,[],[]]],"c":[],"p":[[5,"WsBackend",0],[5,"Formatter",44],[8,"Result",44],[10,"Debug",44],[5,"TcpStream",45],[6,"MaybeTlsStream",46],[5,"WebSocketStream",47],[6,"Message",48],[1,"tuple"],[6,"Result",49],[5,"String",50],[5,"RawValue",51],[5,"Box",52],[6,"Error",53],[5,"TypeId",54],[5,"WsConnect",20],[5,"ConnectionHandle",55],[8,"TransportError",56],[8,"Pbf",57],[8,"Request",58],[8,"Result",53],[1,"bool"],[8,"TungsteniteStream",20]],"b":[]}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/settings.html b/settings.html new file mode 100644 index 000000000000..052569dd6331 --- /dev/null +++ b/settings.html @@ -0,0 +1,2 @@ +Settings +

Rustdoc settings

Back
\ No newline at end of file diff --git a/src-files.js b/src-files.js new file mode 100644 index 000000000000..11c0735bf954 --- /dev/null +++ b/src-files.js @@ -0,0 +1,17 @@ +var srcIndex = new Map(JSON.parse('[\ +["alloy_json_rpc",["",[["response",[],["error.rs","mod.rs","payload.rs"]]],["common.rs","error.rs","lib.rs","notification.rs","packet.rs","request.rs","result.rs"]]],\ +["alloy_networks",["",[],["lib.rs"]]],\ +["alloy_providers",["",[],["builder.rs","lib.rs","provider.rs","utils.rs"]]],\ +["alloy_pubsub",["",[["managers",[],["active_sub.rs","in_flight.rs","mod.rs","req.rs","sub.rs"]]],["connect.rs","frontend.rs","handle.rs","ix.rs","lib.rs","service.rs"]]],\ +["alloy_rpc_client",["",[],["batch.rs","builder.rs","call.rs","client.rs","lib.rs"]]],\ +["alloy_rpc_types",["",[["eth",[["trace",[["geth",[],["call.rs","four_byte.rs","mod.rs","noop.rs","pre_state.rs"]]],["common.rs","filter.rs","mod.rs","parity.rs","tracerequest.rs"]],["transaction",[],["access_list.rs","common.rs","mod.rs","receipt.rs","request.rs","signature.rs","tx_type.rs","typed.rs"]]],["account.rs","block.rs","call.rs","fee.rs","filter.rs","log.rs","mod.rs","other.rs","pubsub.rs","raw_log.rs","state.rs","syncing.rs","txpool.rs","withdrawal.rs"]],["serde_helpers",[],["json_u256.rs","mod.rs","num.rs","storage.rs","u64_hex.rs"]]],["lib.rs","rpc.rs"]]],\ +["alloy_signer",["",[["wallet",[],["error.rs","mnemonic.rs","mod.rs","private_key.rs","yubi.rs"]]],["error.rs","lib.rs","signature.rs","signer.rs","utils.rs"]]],\ +["alloy_signer_aws",["",[],["lib.rs","signer.rs"]]],\ +["alloy_signer_ledger",["",[],["lib.rs","signer.rs","types.rs"]]],\ +["alloy_signer_trezor",["",[],["lib.rs","signer.rs","types.rs"]]],\ +["alloy_transport",["",[],["boxed.rs","common.rs","connect.rs","error.rs","lib.rs","trait.rs","utils.rs"]]],\ +["alloy_transport_http",["",[],["hyper.rs","lib.rs","reqwest.rs"]]],\ +["alloy_transport_ipc",["",[],["connect.rs","lib.rs","mock.rs"]]],\ +["alloy_transport_ws",["",[],["lib.rs","native.rs"]]]\ +]')); +createSrcSidebar(); diff --git a/src/alloy_json_rpc/common.rs.html b/src/alloy_json_rpc/common.rs.html new file mode 100644 index 000000000000..4015c5150d45 --- /dev/null +++ b/src/alloy_json_rpc/common.rs.html @@ -0,0 +1,372 @@ +common.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+
use std::fmt::Display;
+
+use serde::{de::Visitor, Deserialize, Serialize};
+
+/// A JSON-RPC 2.0 ID object. This may be a number, a string, or null.
+///
+/// ### Ordering
+///
+/// This type implements [`PartialOrd`], [`Ord`], [`PartialEq`], and [`Eq`] so
+/// that it can be used as a key in a [`BTreeMap`] or an item in a
+/// [`BTreeSet`]. The ordering is as follows:
+///
+/// 1. Numbers are less than strings.
+/// 2. Strings are less than null.
+/// 3. Null is equal to null.
+///
+/// ### Hash
+///
+/// This type implements [`Hash`] so that it can be used as a key in a
+/// [`HashMap`] or an item in a [`HashSet`].
+///
+/// [`BTreeMap`]: std::collections::BTreeMap
+/// [`BTreeSet`]: std::collections::BTreeSet
+/// [`HashMap`]: std::collections::HashMap
+/// [`HashSet`]: std::collections::HashSet
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub enum Id {
+    /// A number.
+    Number(u64),
+    /// A string.
+    String(String),
+    /// Null.
+    None,
+}
+
+impl Display for Id {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            Id::Number(n) => write!(f, "{}", n),
+            Id::String(s) => write!(f, "{}", s),
+            Id::None => write!(f, "null"),
+        }
+    }
+}
+
+impl Serialize for Id {
+    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
+        match self {
+            Id::Number(n) => serializer.serialize_u64(*n),
+            Id::String(s) => serializer.serialize_str(s),
+            Id::None => serializer.serialize_none(),
+        }
+    }
+}
+
+impl<'de> Deserialize<'de> for Id {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: serde::Deserializer<'de>,
+    {
+        struct IdVisitor;
+
+        impl<'de> Visitor<'de> for IdVisitor {
+            type Value = Id;
+
+            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+                write!(formatter, "a string, a number, or null")
+            }
+
+            fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
+            where
+                E: serde::de::Error,
+            {
+                Ok(Id::String(v.to_owned()))
+            }
+
+            fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E>
+            where
+                E: serde::de::Error,
+            {
+                Ok(Id::Number(v))
+            }
+
+            fn visit_unit<E>(self) -> Result<Self::Value, E>
+            where
+                E: serde::de::Error,
+            {
+                Ok(Id::None)
+            }
+
+            fn visit_none<E>(self) -> Result<Self::Value, E>
+            where
+                E: serde::de::Error,
+            {
+                Ok(Id::None)
+            }
+        }
+
+        deserializer.deserialize_any(IdVisitor)
+    }
+}
+
+impl PartialOrd for Id {
+    fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
+        Some(self.cmp(other))
+    }
+}
+
+impl Ord for Id {
+    fn cmp(&self, other: &Self) -> std::cmp::Ordering {
+        // numbers < strings
+        // strings < null
+        // null == null
+        match (self, other) {
+            (Id::Number(a), Id::Number(b)) => a.cmp(b),
+            (Id::Number(_), _) => std::cmp::Ordering::Less,
+
+            (Id::String(_), Id::Number(_)) => std::cmp::Ordering::Greater,
+            (Id::String(a), Id::String(b)) => a.cmp(b),
+            (Id::String(_), Id::None) => std::cmp::Ordering::Less,
+
+            (Id::None, Id::None) => std::cmp::Ordering::Equal,
+            (Id::None, _) => std::cmp::Ordering::Greater,
+        }
+    }
+}
+
+impl Id {
+    /// Returns `true` if the ID is a number.
+    pub const fn is_number(&self) -> bool {
+        matches!(self, Id::Number(_))
+    }
+
+    /// Returns `true` if the ID is a string.
+    pub const fn is_string(&self) -> bool {
+        matches!(self, Id::String(_))
+    }
+
+    /// Returns `true` if the ID is `None`.
+    pub const fn is_none(&self) -> bool {
+        matches!(self, Id::None)
+    }
+
+    /// Returns the ID as a number, if it is one.
+    pub const fn as_number(&self) -> Option<u64> {
+        match self {
+            Id::Number(n) => Some(*n),
+            _ => None,
+        }
+    }
+
+    /// Returns the ID as a string, if it is one.
+    pub fn as_string(&self) -> Option<&str> {
+        match self {
+            Id::String(s) => Some(s),
+            _ => None,
+        }
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    #[derive(Deserialize, Serialize, Debug, PartialEq)]
+    struct TestCase {
+        id: Id,
+    }
+
+    #[test]
+    fn it_serializes_and_deserializes() {
+        let cases = [
+            (TestCase { id: Id::Number(1) }, r#"{"id":1}"#),
+            (TestCase { id: Id::String("foo".to_string()) }, r#"{"id":"foo"}"#),
+            (TestCase { id: Id::None }, r#"{"id":null}"#),
+        ];
+        for (case, expected) in cases {
+            let serialized = serde_json::to_string(&case).unwrap();
+            assert_eq!(serialized, expected);
+
+            let deserialized: TestCase = serde_json::from_str(expected).unwrap();
+            assert_eq!(deserialized, case);
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/error.rs.html b/src/alloy_json_rpc/error.rs.html new file mode 100644 index 000000000000..f68be62ecaf9 --- /dev/null +++ b/src/alloy_json_rpc/error.rs.html @@ -0,0 +1,192 @@ +error.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+
use serde_json::value::RawValue;
+
+use crate::{ErrorPayload, RpcReturn};
+
+/// An RPC error.
+#[derive(thiserror::Error, Debug)]
+pub enum RpcError<E, ErrResp = Box<RawValue>> {
+    /// Server returned an error response.
+    #[error("Server returned an error response: {0}")]
+    ErrorResp(ErrorPayload<ErrResp>),
+
+    /// JSON serialization error.
+    #[error("Serialization error: {0}")]
+    SerError(
+        /// The underlying serde_json error.
+        // To avoid accidentally confusing ser and deser errors, we do not use
+        // the `#[from]` tag.
+        #[source]
+        serde_json::Error,
+    ),
+    /// JSON deserialization error.
+    #[error("Deserialization error: {err}")]
+    DeserError {
+        /// The underlying serde_json error.
+        // To avoid accidentally confusing ser and deser errors, we do not use
+        // the `#[from]` tag.
+        #[source]
+        err: serde_json::Error,
+        /// For deser errors, the text that failed to deserialize.
+        text: String,
+    },
+
+    /// Transport error.
+    ///
+    /// This variant is used when the error occurs during communication.
+    #[error("Error during transport: {0}")]
+    Transport(
+        /// The underlying transport error.
+        #[from]
+        E,
+    ),
+}
+
+impl<E, ErrResp> RpcError<E, ErrResp>
+where
+    ErrResp: RpcReturn,
+{
+    /// Instantiate a new `TransportError` from an error response.
+    pub const fn err_resp(err: ErrorPayload<ErrResp>) -> Self {
+        Self::ErrorResp(err)
+    }
+}
+
+impl<E, ErrResp> RpcError<E, ErrResp> {
+    /// Instantiate a new `TransportError` from a [`serde_json::Error`]. This
+    /// should be called when the error occurs during serialization.
+    pub const fn ser_err(err: serde_json::Error) -> Self {
+        Self::SerError(err)
+    }
+
+    /// Instantiate a new `TransportError` from a [`serde_json::Error`] and the
+    /// text. This should be called when the error occurs during
+    /// deserialization.
+    pub fn deser_err(err: serde_json::Error, text: impl AsRef<str>) -> Self {
+        Self::DeserError { err, text: text.as_ref().to_owned() }
+    }
+
+    /// Check if the error is a serialization error.
+    pub const fn is_ser_error(&self) -> bool {
+        matches!(self, Self::SerError(_))
+    }
+
+    /// Check if the error is a deserialization error.
+    pub const fn is_deser_error(&self) -> bool {
+        matches!(self, Self::DeserError { .. })
+    }
+
+    /// Check if the error is a transport error.
+    pub const fn is_transport_error(&self) -> bool {
+        matches!(self, Self::Transport(_))
+    }
+
+    /// Check if the error is an error response.
+    pub const fn is_error_resp(&self) -> bool {
+        matches!(self, Self::ErrorResp(_))
+    }
+
+    /// Fallible conversion to an error response.
+    pub const fn as_error_resp(&self) -> Option<&ErrorPayload<ErrResp>> {
+        match self {
+            Self::ErrorResp(err) => Some(err),
+            _ => None,
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/lib.rs.html b/src/alloy_json_rpc/lib.rs.html new file mode 100644 index 000000000000..1a1a0e78e5ed --- /dev/null +++ b/src/alloy_json_rpc/lib.rs.html @@ -0,0 +1,286 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+
//! Alloy JSON-RPC data types.
+//!
+//! This crate provides data types for use with the JSON-RPC 2.0 protocol. It
+//! does not provide any functionality for actually sending or receiving
+//! JSON-RPC data.
+//!
+//! If you find yourself importing this crate, and you are not implementing a
+//! JSON-RPC client or transport, you are likely at the wrong layer of
+//! abstraction. If you want to _use_ a JSON-RPC client, consider using the
+//! [`alloy-transports`] crate.
+//!
+//! [`alloy-transports`]: https://docs.rs/alloy-transports/latest/alloy-transports
+//!
+//! ## Usage
+//!
+//! This crate models the JSON-RPC 2.0 protocol data-types. It is intended to
+//! be used to build JSON-RPC clients or servers. Most users will not need to
+//! import this crate.
+//!
+//! This crate provides the following low-level data types:
+//!
+//! - [`Request`] - A JSON-RPC request.
+//! - [`Response`] - A JSON-RPC response.
+//! - [`ErrorPayload`] - A JSON-RPC error response payload, including code and message.
+//! - [`ResponsePayload`] - The payload of a JSON-RPC response, either a success payload, or an
+//!   [`ErrorPayload`].
+//!
+//! For client-side Rust ergonomics, we want to map responses to [`Result`]s.
+//! To that end, we provide the following types:
+//!
+//! - [`RpcError`] - An error that can occur during JSON-RPC communication. This type aggregates
+//!   errors that are common to all transports, such as (de)serialization, error responses, and
+//!   includes a generic transport error.
+//! - [`RpcResult`] - A result modeling an Rpc outcome as `Result<T,
+//! RpcError<E>>`.
+//!
+//! We recommend that transport implementors use [`RpcResult`] as the return
+//! type for their transport methods, parameterized by their transport error
+//! type. This will allow them to return either a successful response or an
+//! error.
+//!
+//! ## Note On (De)Serialization
+//!
+//! [`Request`], [`Response`], and similar types are generic over the
+//! actual data being passed to and from the RPC. We can achieve partial
+//! (de)serialization by making them generic over a `serde_json::RawValue`.
+//!
+//! - For [`Request`] - [`PartiallySerializedRequest`] is a `Request<Box<RawValue>`. It represents a
+//!   `Request` whose parameters have been serialized. [`SerializedRequest`], on the other hand is a
+//!   request that has been totally serialized. For client-development purposes, its [`Id`] and
+//!   method have been preserved.
+//! - For [`Response`] - [`BorrowedResponse`] is a `Response<&RawValue>`. It represents a Response
+//!   whose [`Id`] and return status (success or failure) have been deserialized, but whose payload
+//!   has not.
+//!
+//! Allowing partial serialization lets us include many unlike [`Request`]
+//! objects in collections (e.g. in a batch request). This is useful for
+//! implementing a client.
+//!
+//! Allowing partial deserialization lets learn request status, and associate
+//! the raw response data with the corresponding client request before doing
+//! full deserialization work. This is useful for implementing a client.
+//!
+//! In general, partially deserialized responses can be further deserialized.
+//! E.g. an [`BorrowedRpcResult`] may have success responses deserialized
+//! with [`crate::try_deserialize_ok::<U>`], which will transform it to an
+//! [`RpcResult<U>`].
+
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+mod common;
+pub use common::Id;
+
+mod error;
+pub use error::RpcError;
+
+mod notification;
+pub use notification::{EthNotification, PubSubItem};
+
+mod packet;
+pub use packet::{BorrowedResponsePacket, RequestPacket, ResponsePacket};
+
+mod request;
+pub use request::{PartiallySerializedRequest, Request, RequestMeta, SerializedRequest};
+
+mod response;
+pub use response::{
+    BorrowedErrorPayload, BorrowedResponse, BorrowedResponsePayload, ErrorPayload, Response,
+    ResponsePayload,
+};
+
+mod result;
+pub use result::{
+    transform_response, transform_result, try_deserialize_ok, BorrowedRpcResult, RpcResult,
+};
+
+use serde::{de::DeserializeOwned, Serialize};
+
+/// An object that can be used as a JSON-RPC parameter.
+///
+/// This marker trait is blanket-implemented for every qualifying type. It is
+/// used to indicate that a type can be used as a JSON-RPC parameter.
+pub trait RpcParam: Serialize + Clone + Send + Sync + Unpin {}
+
+impl<T> RpcParam for T where T: Serialize + Clone + Send + Sync + Unpin {}
+
+/// An object that can be used as a JSON-RPC return value.
+///
+/// This marker trait is blanket-implemented for every qualifying type. It is
+/// used to indicate that a type can be used as a JSON-RPC return value.
+///
+/// # Note
+///
+/// We add the `'static` lifetime bound to indicate that the type can't borrow.
+/// This is a simplification that makes it easier to use the types in client
+/// code. It is not suitable for use in server code.
+pub trait RpcReturn: DeserializeOwned + Send + Sync + Unpin + 'static {}
+
+impl<T> RpcReturn for T where T: DeserializeOwned + Send + Sync + Unpin + 'static {}
+
+/// An object that can be used as a JSON-RPC parameter and return value.
+///
+/// This marker trait is blanket-implemented for every qualifying type. It is
+/// used to indicate that a type can be used as both a JSON-RPC parameter and
+/// return value.
+pub trait RpcObject: RpcParam + RpcReturn {}
+
+impl<T> RpcObject for T where T: RpcParam + RpcReturn {}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/notification.rs.html b/src/alloy_json_rpc/notification.rs.html new file mode 100644 index 000000000000..82e538068735 --- /dev/null +++ b/src/alloy_json_rpc/notification.rs.html @@ -0,0 +1,260 @@ +notification.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+
use crate::{Response, ResponsePayload};
+use alloy_primitives::U256;
+use serde::{
+    de::{MapAccess, Visitor},
+    Deserialize, Serialize,
+};
+
+/// An ethereum-style notification, not to be confused with a JSON-RPC
+/// notification.
+#[derive(Debug, Clone, Deserialize, Serialize)]
+pub struct EthNotification<T = Box<serde_json::value::RawValue>> {
+    /// The subscription ID.
+    pub subscription: U256,
+    /// The notification payload.
+    pub result: T,
+}
+
+/// 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.
+#[derive(Debug, Clone)]
+pub enum PubSubItem {
+    /// A [`Response`] to a JSON-RPC request.
+    Response(Response),
+    /// An Ethereum-style notification.
+    Notification(EthNotification),
+}
+
+impl<'de> Deserialize<'de> for PubSubItem {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: serde::Deserializer<'de>,
+    {
+        struct PubSubItemVisitor;
+
+        impl<'de> Visitor<'de> for PubSubItemVisitor {
+            type Value = PubSubItem;
+
+            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+                formatter.write_str("a JSON-RPC response or an Ethereum-style notification")
+            }
+
+            fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
+            where
+                A: MapAccess<'de>,
+            {
+                let mut id = None;
+                let mut subscription = None;
+                let mut result = None;
+                let mut error = None;
+
+                // Drain the map into the appropriate fields.
+                while let Ok(Some(key)) = map.next_key() {
+                    match key {
+                        "id" => {
+                            if id.is_some() {
+                                return Err(serde::de::Error::duplicate_field("id"));
+                            }
+                            id = Some(map.next_value()?);
+                        }
+                        "subscription" => {
+                            if subscription.is_some() {
+                                return Err(serde::de::Error::duplicate_field("subscription"));
+                            }
+                            subscription = Some(map.next_value()?);
+                        }
+                        "result" => {
+                            if result.is_some() {
+                                return Err(serde::de::Error::duplicate_field("result"));
+                            }
+                            result = Some(map.next_value()?);
+                        }
+                        "error" => {
+                            if error.is_some() {
+                                return Err(serde::de::Error::duplicate_field("error"));
+                            }
+                            error = Some(map.next_value()?);
+                        }
+                        // Discard unknown fields.
+                        _ => {
+                            let _ = map.next_value::<serde_json::Value>()?;
+                        }
+                    }
+                }
+
+                // If it has an ID, it is a response.
+                if let Some(id) = id {
+                    if subscription.is_some() {
+                        return Err(serde::de::Error::custom(
+                            "unexpected subscription in pubsub item",
+                        ));
+                    }
+                    // We need to differentiate error vs result here.
+                    let payload = if let Some(error) = error {
+                        ResponsePayload::Failure(error)
+                    } else if let Some(result) = result {
+                        ResponsePayload::Success(result)
+                    } else {
+                        return Err(serde::de::Error::custom(
+                            "missing `result` or `error` field in response",
+                        ));
+                    };
+                    Ok(PubSubItem::Response(Response { id, payload }))
+                } else {
+                    // Notifications cannot have an error.
+                    if error.is_some() {
+                        return Err(serde::de::Error::custom(
+                            "unexpected `error` field in subscription notification",
+                        ));
+                    }
+                    // Notifications must have a subscription and a result.
+                    if subscription.is_none() {
+                        return Err(serde::de::Error::missing_field("subscription"));
+                    }
+                    if result.is_none() {
+                        return Err(serde::de::Error::missing_field("result"));
+                    }
+
+                    Ok(PubSubItem::Notification(EthNotification {
+                        subscription: subscription.unwrap(),
+                        result: result.unwrap(),
+                    }))
+                }
+            }
+        }
+
+        deserializer.deserialize_any(PubSubItemVisitor)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/packet.rs.html b/src/alloy_json_rpc/packet.rs.html new file mode 100644 index 000000000000..de654fbf0b28 --- /dev/null +++ b/src/alloy_json_rpc/packet.rs.html @@ -0,0 +1,488 @@ +packet.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+
use crate::{Id, Response, SerializedRequest};
+use serde::{
+    de::{self, Deserializer, MapAccess, SeqAccess, Visitor},
+    Deserialize, Serialize,
+};
+use serde_json::value::RawValue;
+use std::{collections::HashSet, fmt, marker::PhantomData};
+
+/// A [`RequestPacket`] is a [`SerializedRequest`] or a batch of serialized
+/// request.
+#[derive(Debug, Clone)]
+pub enum RequestPacket {
+    /// A single request.
+    Single(SerializedRequest),
+    /// A batch of requests.
+    Batch(Vec<SerializedRequest>),
+}
+
+impl FromIterator<SerializedRequest> for RequestPacket {
+    fn from_iter<T: IntoIterator<Item = SerializedRequest>>(iter: T) -> Self {
+        Self::Batch(iter.into_iter().collect())
+    }
+}
+
+impl From<SerializedRequest> for RequestPacket {
+    fn from(req: SerializedRequest) -> Self {
+        Self::Single(req)
+    }
+}
+
+impl Serialize for RequestPacket {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: serde::Serializer,
+    {
+        match self {
+            RequestPacket::Single(single) => single.serialize(serializer),
+            RequestPacket::Batch(batch) => batch.serialize(serializer),
+        }
+    }
+}
+
+impl RequestPacket {
+    /// Create a new empty packet with the given capacity.
+    pub fn with_capacity(capacity: usize) -> Self {
+        Self::Batch(Vec::with_capacity(capacity))
+    }
+
+    /// Serialize the packet as a boxed [`RawValue`].
+    pub fn serialize(self) -> serde_json::Result<Box<RawValue>> {
+        match self {
+            RequestPacket::Single(single) => Ok(single.take_request()),
+            RequestPacket::Batch(batch) => serde_json::value::to_raw_value(&batch),
+        }
+    }
+
+    /// Get the request IDs of all subscription requests in the packet.
+    pub fn subscription_request_ids(&self) -> HashSet<&Id> {
+        match self {
+            RequestPacket::Single(single) => {
+                let mut hs = HashSet::with_capacity(1);
+                if single.method() == "eth_subscribe" {
+                    hs.insert(single.id());
+                }
+                hs
+            }
+            RequestPacket::Batch(batch) => batch
+                .iter()
+                .filter(|req| req.method() == "eth_subscribe")
+                .map(|req| req.id())
+                .collect(),
+        }
+    }
+
+    /// Get the number of requests in the packet.
+    pub fn len(&self) -> usize {
+        match self {
+            Self::Single(_) => 1,
+            Self::Batch(batch) => batch.len(),
+        }
+    }
+
+    /// Check if the packet is empty.
+    pub fn is_empty(&self) -> bool {
+        self.len() == 0
+    }
+
+    /// Push a request into the packet.
+    pub fn push(&mut self, req: SerializedRequest) {
+        if let Self::Batch(batch) = self {
+            batch.push(req);
+            return;
+        }
+        if matches!(self, Self::Single(_)) {
+            let old = std::mem::replace(self, Self::Batch(Vec::with_capacity(10)));
+            match old {
+                Self::Single(single) => {
+                    self.push(single);
+                }
+                _ => unreachable!(),
+            }
+            self.push(req);
+        }
+    }
+}
+
+/// A [`ResponsePacket`] is a [`Response`] or a batch of responses.
+#[derive(Debug, Clone)]
+pub enum ResponsePacket<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    /// A single response.
+    Single(Response<Payload, ErrData>),
+    /// A batch of responses.
+    Batch(Vec<Response<Payload, ErrData>>),
+}
+
+impl<Payload, ErrData> FromIterator<Response<Payload, ErrData>>
+    for ResponsePacket<Payload, ErrData>
+{
+    fn from_iter<T: IntoIterator<Item = Response<Payload, ErrData>>>(iter: T) -> Self {
+        let mut iter = iter.into_iter().peekable();
+        // return single if iter has exactly one element, else make a batch
+        if let Some(first) = iter.next() {
+            if iter.peek().is_none() {
+                return Self::Single(first);
+            } else {
+                let mut batch = Vec::new();
+                batch.push(first);
+                batch.extend(iter);
+                return Self::Batch(batch);
+            }
+        }
+        Self::Batch(vec![])
+    }
+}
+
+impl<Payload, ErrData> From<Vec<Response<Payload, ErrData>>> for ResponsePacket<Payload, ErrData> {
+    fn from(value: Vec<Response<Payload, ErrData>>) -> Self {
+        if value.len() == 1 {
+            Self::Single(value.into_iter().next().unwrap())
+        } else {
+            Self::Batch(value)
+        }
+    }
+}
+
+impl<'de, Payload, ErrData> Deserialize<'de> for ResponsePacket<Payload, ErrData>
+where
+    Payload: Deserialize<'de>,
+    ErrData: Deserialize<'de>,
+{
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        struct ResponsePacketVisitor<Payload, ErrData> {
+            marker: PhantomData<fn() -> ResponsePacket<Payload, ErrData>>,
+        }
+
+        impl<'de, Payload, ErrData> Visitor<'de> for ResponsePacketVisitor<Payload, ErrData>
+        where
+            Payload: Deserialize<'de>,
+            ErrData: Deserialize<'de>,
+        {
+            type Value = ResponsePacket<Payload, ErrData>;
+
+            fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+                formatter.write_str("a single response or a batch of responses")
+            }
+
+            fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error>
+            where
+                A: SeqAccess<'de>,
+            {
+                let mut responses = Vec::new();
+
+                while let Some(response) = seq.next_element()? {
+                    responses.push(response);
+                }
+
+                Ok(ResponsePacket::Batch(responses))
+            }
+
+            fn visit_map<M>(self, map: M) -> Result<Self::Value, M::Error>
+            where
+                M: MapAccess<'de>,
+            {
+                let response =
+                    Deserialize::deserialize(de::value::MapAccessDeserializer::new(map))?;
+                Ok(ResponsePacket::Single(response))
+            }
+        }
+
+        deserializer.deserialize_any(ResponsePacketVisitor { marker: PhantomData })
+    }
+}
+
+/// A [`BorrowedResponsePacket`] is a [`ResponsePacket`] that has been partially
+/// deserialized, borrowing its contents from the deserializer. This is used
+/// primarily for intermediate deserialization. Most users will not require it.
+///
+/// See the [top-level docs] for more info.
+///
+/// [top-level docs]: crate
+pub type BorrowedResponsePacket<'a> = ResponsePacket<&'a RawValue, &'a RawValue>;
+
+impl BorrowedResponsePacket<'_> {
+    /// Convert this borrowed response packet into an owned packet by copying
+    /// the data from the deserializer (if necessary).
+    pub fn into_owned(self) -> ResponsePacket {
+        match self {
+            Self::Single(single) => ResponsePacket::Single(single.into_owned()),
+            Self::Batch(batch) => {
+                ResponsePacket::Batch(batch.into_iter().map(Response::into_owned).collect())
+            }
+        }
+    }
+}
+
+impl<Payload, ErrData> ResponsePacket<Payload, ErrData> {
+    /// Find responses by a list of IDs.
+    ///
+    /// This is intended to be used in conjunction with
+    /// [`RequestPacket::subscription_request_ids`] to identify subscription
+    /// responses.
+    ///
+    /// # Note
+    ///
+    /// - Responses are not guaranteed to be in the same order.
+    /// - Responses are not guaranteed to be in the set.
+    /// - If the packet contains duplicate IDs, both will be found.
+    pub fn responses_by_ids(&self, ids: &HashSet<Id>) -> Vec<&Response<Payload, ErrData>> {
+        match self {
+            Self::Single(single) => {
+                let mut resps = Vec::new();
+                if ids.contains(&single.id) {
+                    resps.push(single);
+                }
+                resps
+            }
+            Self::Batch(batch) => batch.iter().filter(|res| ids.contains(&res.id)).collect(),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/request.rs.html b/src/alloy_json_rpc/request.rs.html new file mode 100644 index 000000000000..469ddca35bf3 --- /dev/null +++ b/src/alloy_json_rpc/request.rs.html @@ -0,0 +1,430 @@ +request.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+
use crate::{common::Id, RpcParam};
+use alloy_primitives::{keccak256, B256};
+use serde::{de::DeserializeOwned, ser::SerializeMap, Deserialize, Serialize};
+use serde_json::value::RawValue;
+
+/// `RequestMeta` contains the [`Id`] and method name of a request.
+#[derive(Debug, Clone)]
+pub struct RequestMeta {
+    /// The method name.
+    pub method: &'static str,
+    /// The request ID.
+    pub id: Id,
+}
+
+/// A JSON-RPC 2.0 request object.
+///
+/// This is a generic type that can be used to represent any JSON-RPC request.
+/// The `Params` type parameter is used to represent the parameters of the
+/// request, and the `method` field is used to represent the method name.
+///
+/// ### Note
+///
+/// The value of `method` should be known at compile time.
+#[derive(Debug, Clone)]
+pub struct Request<Params> {
+    /// The request metadata (ID and method).
+    pub meta: RequestMeta,
+    /// The request parameters.
+    pub params: Params,
+}
+
+/// A [`Request`] that has been partially serialized. The request parameters
+/// have been serialized, and are represented as a boxed [`RawValue`]. This is
+/// useful for collections containing many requests, as it erases the `Param`
+/// type. It can be created with [`Request::box_params()`].
+///
+/// See the [top-level docs] for more info.
+///
+/// [top-level docs]: crate
+pub type PartiallySerializedRequest = Request<Box<RawValue>>;
+
+impl<Params> Request<Params>
+where
+    Params: RpcParam,
+{
+    /// Serialize the request parameters as a boxed [`RawValue`].
+    ///
+    /// # Panics
+    ///
+    /// If serialization of the params fails.
+    pub fn box_params(self) -> PartiallySerializedRequest {
+        Request { meta: self.meta, params: serde_json::value::to_raw_value(&self.params).unwrap() }
+    }
+
+    /// Serialize the request, including the request parameters.
+    pub fn serialize(self) -> serde_json::Result<SerializedRequest> {
+        let request = serde_json::value::to_raw_value(&self)?;
+        Ok(SerializedRequest { meta: self.meta, request })
+    }
+}
+
+impl<Params> Request<&Params>
+where
+    Params: Clone,
+{
+    /// Clone the request, including the request parameters.
+    pub fn into_owned_params(self) -> Request<Params> {
+        Request { meta: self.meta, params: self.params.clone() }
+    }
+}
+
+impl<'a, Params> Request<Params>
+where
+    Params: AsRef<RawValue> + 'a,
+{
+    /// Attempt to deserialize the params.
+    ///
+    /// To borrow from the params via the deserializer, use
+    /// [`Request::try_borrow_params_as`].
+    ///
+    /// # Returns
+    /// - `Ok(T)` if the params can be deserialized as `T`
+    /// - `Err(e)` if the params cannot be deserialized as `T`
+    pub fn try_params_as<T: DeserializeOwned>(&self) -> serde_json::Result<T> {
+        serde_json::from_str(self.params.as_ref().get())
+    }
+
+    /// Attempt to deserialize the params, borrowing from the params
+    ///
+    /// # Returns
+    /// - `Ok(T)` if the params can be deserialized as `T`
+    /// - `Err(e)` if the params cannot be deserialized as `T`
+    pub fn try_borrow_params_as<T: Deserialize<'a>>(&'a self) -> serde_json::Result<T> {
+        serde_json::from_str(self.params.as_ref().get())
+    }
+}
+
+// manually implemented to avoid adding a type for the protocol-required
+// `jsonrpc` field
+impl<Params> Serialize for Request<Params>
+where
+    Params: RpcParam,
+{
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: serde::Serializer,
+    {
+        let sized_params = std::mem::size_of::<Params>() != 0;
+
+        let mut map = serializer.serialize_map(Some(3 + sized_params as usize))?;
+        map.serialize_entry("method", self.meta.method)?;
+
+        // Params may be omitted if it is 0-sized
+        if sized_params {
+            // TODO: remove unwrap
+            map.serialize_entry("params", &self.params)?;
+        }
+
+        map.serialize_entry("id", &self.meta.id)?;
+        map.serialize_entry("jsonrpc", "2.0")?;
+        map.end()
+    }
+}
+
+/// A JSON-RPC 2.0 request object that has been serialized, with its [`Id`] and
+/// method preserved.
+///
+/// This struct is used to represent a request that has been serialized, but
+/// not yet sent. It is used by RPC clients to build batch requests and manage
+/// in-flight requests.
+#[derive(Debug, Clone)]
+pub struct SerializedRequest {
+    meta: RequestMeta,
+    request: Box<RawValue>,
+}
+
+impl<Params> std::convert::TryFrom<Request<Params>> for SerializedRequest
+where
+    Params: RpcParam,
+{
+    type Error = serde_json::Error;
+
+    fn try_from(value: Request<Params>) -> Result<Self, Self::Error> {
+        value.serialize()
+    }
+}
+
+impl SerializedRequest {
+    /// Get the request metadata (ID and Method)
+    pub const fn meta(&self) -> &RequestMeta {
+        &self.meta
+    }
+    /// Get the request ID.
+    pub const fn id(&self) -> &Id {
+        &self.meta.id
+    }
+    /// Get the request method.
+    pub const fn method(&self) -> &'static str {
+        self.meta.method
+    }
+    /// Get the serialized request.
+    pub const fn serialized(&self) -> &RawValue {
+        &self.request
+    }
+
+    /// Consumes the serialized request, returning the underlying
+    /// [`RequestMeta`] and the [`RawValue`].
+    #[allow(clippy::missing_const_for_fn)] // erroneous lint
+    pub fn decompose(self) -> (RequestMeta, Box<RawValue>) {
+        (self.meta, self.request)
+    }
+
+    /// Take the serialized request, consuming the [`SerializedRequest`].
+    #[allow(clippy::missing_const_for_fn)] // erroneous lint
+    pub fn take_request(self) -> Box<RawValue> {
+        self.request
+    }
+
+    /// Get a reference to the serialized request's params.
+    ///
+    /// This partially deserializes the request, and should be avoided if
+    /// possible.
+    pub fn params(&self) -> Option<&RawValue> {
+        #[derive(Deserialize)]
+        struct Req<'a> {
+            #[serde(borrow)]
+            params: Option<&'a RawValue>,
+        }
+
+        let req: Req<'_> = serde_json::from_str(self.request.get()).unwrap();
+        req.params
+    }
+
+    /// Get the hash of the serialized request's params.
+    ///
+    /// This partially deserializes the request, and should be avoided if
+    /// possible.
+    pub fn params_hash(&self) -> B256 {
+        if let Some(params) = self.params() {
+            keccak256(params.get())
+        } else {
+            keccak256("")
+        }
+    }
+}
+
+impl Serialize for SerializedRequest {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: serde::Serializer,
+    {
+        self.request.serialize(serializer)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/response/error.rs.html b/src/alloy_json_rpc/response/error.rs.html new file mode 100644 index 000000000000..d0e696e7f1e9 --- /dev/null +++ b/src/alloy_json_rpc/response/error.rs.html @@ -0,0 +1,434 @@ +error.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+
use serde::{
+    de::{DeserializeOwned, MapAccess, Visitor},
+    Deserialize, Deserializer, Serialize,
+};
+use serde_json::value::RawValue;
+use std::{borrow::Borrow, fmt, marker::PhantomData};
+
+/// A JSONRPC-2.0 error object.
+///
+/// This response indicates that the server received and handled the request,
+/// but that there was an error in the processing of it. The error should be
+/// included in the `message` field of the response payload.
+#[derive(Debug, Clone, Serialize)]
+pub struct ErrorPayload<ErrData = Box<RawValue>> {
+    /// The error code.
+    pub code: i64,
+    /// The error message (if any).
+    pub message: String,
+    /// The error data (if any).
+    pub data: Option<ErrData>,
+}
+
+impl<ErrData> std::fmt::Display for ErrorPayload<ErrData> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(
+            f,
+            "ErrorPayload code {}, message: \"{}\", contains payload: {}",
+            self.code,
+            self.message,
+            self.data.is_some()
+        )
+    }
+}
+
+/// A [`ErrorPayload`] that has been partially deserialized, borrowing its
+/// contents from the deserializer. This is used primarily for intermediate
+/// deserialization. Most users will not require it.
+///
+/// See the [top-level docs] for more info.
+///
+/// [top-level docs]: crate
+pub type BorrowedErrorPayload<'a> = ErrorPayload<&'a RawValue>;
+
+impl BorrowedErrorPayload<'_> {
+    /// Convert this borrowed error payload into an owned payload by copying
+    /// the data from the deserializer (if necessary).
+    pub fn into_owned(self) -> ErrorPayload {
+        ErrorPayload {
+            code: self.code,
+            message: self.message,
+            data: self.data.map(|data| data.to_owned()),
+        }
+    }
+}
+
+impl<'de, ErrData: Deserialize<'de>> Deserialize<'de> for ErrorPayload<ErrData> {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        enum Field {
+            Code,
+            Message,
+            Data,
+            Unknown,
+        }
+
+        impl<'de> Deserialize<'de> for Field {
+            fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+            where
+                D: Deserializer<'de>,
+            {
+                struct FieldVisitor;
+
+                impl<'de> serde::de::Visitor<'de> for FieldVisitor {
+                    type Value = Field;
+
+                    fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+                        formatter.write_str("`code`, `message` and `data`")
+                    }
+
+                    fn visit_str<E>(self, value: &str) -> Result<Field, E>
+                    where
+                        E: serde::de::Error,
+                    {
+                        match value {
+                            "code" => Ok(Field::Code),
+                            "message" => Ok(Field::Message),
+                            "data" => Ok(Field::Data),
+                            _ => Ok(Field::Unknown),
+                        }
+                    }
+                }
+                deserializer.deserialize_identifier(FieldVisitor)
+            }
+        }
+
+        struct ErrorPayloadVisitor<T>(PhantomData<T>);
+
+        impl<'de, Data> Visitor<'de> for ErrorPayloadVisitor<Data>
+        where
+            Data: Deserialize<'de>,
+        {
+            type Value = ErrorPayload<Data>;
+
+            fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+                write!(formatter, "a JSON-RPC2.0 error object")
+            }
+
+            fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
+            where
+                A: MapAccess<'de>,
+            {
+                let mut code = None;
+                let mut message = None;
+                let mut data = None;
+
+                while let Some(key) = map.next_key()? {
+                    match key {
+                        Field::Code => {
+                            if code.is_some() {
+                                return Err(serde::de::Error::duplicate_field("code"));
+                            }
+                            code = Some(map.next_value()?);
+                        }
+                        Field::Message => {
+                            if message.is_some() {
+                                return Err(serde::de::Error::duplicate_field("message"));
+                            }
+                            message = Some(map.next_value()?);
+                        }
+                        Field::Data => {
+                            if data.is_some() {
+                                return Err(serde::de::Error::duplicate_field("data"));
+                            }
+                            data = Some(map.next_value()?);
+                        }
+                        Field::Unknown => {
+                            let _: serde::de::IgnoredAny = map.next_value()?;
+                            // ignore
+                        }
+                    }
+                }
+                Ok(ErrorPayload {
+                    code: code.ok_or_else(|| serde::de::Error::missing_field("code"))?,
+                    message: message.unwrap_or_default(),
+                    data,
+                })
+            }
+        }
+
+        deserializer.deserialize_any(ErrorPayloadVisitor(PhantomData))
+    }
+}
+
+impl<'a, Data> ErrorPayload<Data>
+where
+    Data: Borrow<RawValue> + 'a,
+{
+    /// Deserialize the error's `data` field, borrowing from the data field if
+    /// necessary.
+    ///
+    /// # Returns
+    ///
+    /// - `None` if the error has no `data` field.
+    /// - `Some(Ok(data))` if the error has a `data` field that can be deserialized.
+    /// - `Some(Err(err))` if the error has a `data` field that can't be deserialized.
+    pub fn try_data_as<T: Deserialize<'a>>(&'a self) -> Option<serde_json::Result<T>> {
+        self.data.as_ref().map(|data| serde_json::from_str(data.borrow().get()))
+    }
+
+    /// Attempt to deserialize the data field.
+    ///
+    /// # Returns
+    ///
+    /// - `Ok(ErrorPayload<T>)` if the data field can be deserialized
+    /// - `Err(self)` if the data field can't be deserialized, or if there is no data field.
+    pub fn deser_data<T: DeserializeOwned>(self) -> Result<ErrorPayload<T>, Self> {
+        match self.try_data_as::<T>() {
+            Some(Ok(data)) => {
+                Ok(ErrorPayload { code: self.code, message: self.message, data: Some(data) })
+            }
+            _ => Err(self),
+        }
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::BorrowedErrorPayload;
+
+    #[test]
+    fn smooth_borrowing() {
+        let json = r#"{ "code": -32000, "message": "b", "data": null }"#;
+        let payload: BorrowedErrorPayload<'_> = serde_json::from_str(json).unwrap();
+
+        assert_eq!(payload.code, -32000);
+        assert_eq!(payload.message, "b");
+        assert_eq!(payload.data.unwrap().get(), "null");
+    }
+
+    #[test]
+    fn smooth_deser() {
+        #[derive(Debug, serde::Deserialize, PartialEq)]
+        struct TestData {
+            a: u32,
+            b: Option<String>,
+        }
+
+        let json = r#"{ "code": -32000, "message": "b", "data": { "a": 5, "b": null } }"#;
+
+        let payload: BorrowedErrorPayload<'_> = serde_json::from_str(json).unwrap();
+        let data: TestData = payload.try_data_as().unwrap().unwrap();
+        assert_eq!(data, TestData { a: 5, b: None });
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/response/mod.rs.html b/src/alloy_json_rpc/response/mod.rs.html new file mode 100644 index 000000000000..eb8c4104ce27 --- /dev/null +++ b/src/alloy_json_rpc/response/mod.rs.html @@ -0,0 +1,648 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+
use crate::common::Id;
+use serde::{
+    de::{DeserializeOwned, MapAccess, Visitor},
+    ser::SerializeMap,
+    Deserialize, Deserializer, Serialize,
+};
+use serde_json::value::RawValue;
+use std::{borrow::Borrow, fmt, marker::PhantomData};
+
+mod error;
+pub use error::{BorrowedErrorPayload, ErrorPayload};
+
+mod payload;
+pub use payload::{BorrowedResponsePayload, ResponsePayload};
+
+/// A JSONRPC-2.0 response object containing a [`ResponsePayload`].
+///
+/// This object is used to represent a JSONRPC-2.0 response. It may contain
+/// either a successful result or an error. The `id` field is used to match
+/// the response to the request that it is responding to, and should be
+/// mirrored from the response.
+#[derive(Debug, Clone)]
+pub struct Response<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    /// The ID of the request that this response is responding to.
+    pub id: Id,
+    /// The response payload.
+    pub payload: ResponsePayload<Payload, ErrData>,
+}
+
+/// A [`Response`] that has been partially deserialized, borrowing its contents
+/// from the deserializer. This is used primarily for intermediate
+/// deserialization. Most users will not require it.
+///
+/// See the [top-level docs] for more info.
+///
+/// [top-level docs]: crate
+pub type BorrowedResponse<'a> = Response<&'a RawValue, &'a RawValue>;
+
+impl BorrowedResponse<'_> {
+    /// Convert this borrowed response to an owned response by copying the data
+    /// from the deserializer (if necessary).
+    pub fn into_owned(self) -> Response {
+        Response { id: self.id.clone(), payload: self.payload.into_owned() }
+    }
+}
+
+impl<Payload, ErrData> Response<Payload, ErrData> {
+    /// Returns `true` if the response is a success.
+    pub const fn is_success(&self) -> bool {
+        self.payload.is_success()
+    }
+
+    /// Returns `true` if the response is an error.
+    pub const fn is_error(&self) -> bool {
+        self.payload.is_error()
+    }
+}
+
+impl<'a, Payload, ErrData> Response<Payload, ErrData>
+where
+    Payload: AsRef<RawValue> + 'a,
+{
+    /// Attempt to deserialize the success payload, borrowing from the payload
+    /// if necessary.
+    ///
+    /// See [`ResponsePayload::try_success_as`].
+    pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<serde_json::Result<T>> {
+        self.payload.try_success_as()
+    }
+
+    /// Attempt to deserialize the Success payload, transforming this type.
+    ///
+    /// # Returns
+    ///
+    /// - `Ok(Response<T, ErrData>)` if the payload is a success and can be deserialized as T, or if
+    ///   the payload is an error.
+    /// - `Err(self)` if the payload is a success and can't be deserialized.
+    pub fn deser_success<T: DeserializeOwned>(self) -> Result<Response<T, ErrData>, Self> {
+        match self.payload.deserialize_success() {
+            Ok(payload) => Ok(Response { id: self.id, payload }),
+            Err(payload) => Err(Response { id: self.id, payload }),
+        }
+    }
+}
+
+impl<'a, Payload, ErrData> Response<Payload, ErrData>
+where
+    ErrData: Borrow<RawValue> + 'a,
+{
+    /// Attempt to deserialize the error payload, borrowing from the payload if
+    /// necesary.
+    ///
+    /// See [`ResponsePayload::try_error_as`].
+    pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<serde_json::Result<T>> {
+        self.payload.try_error_as()
+    }
+
+    /// Attempt to deserialize the Error payload, transforming this type.
+    ///
+    /// # Returns
+    ///
+    /// - `Ok(Response<Payload, T>)` if the payload is an error and can be deserialized as `T`, or
+    ///   if the payload is a success.
+    /// - `Err(self)` if the payload is an error and can't be deserialized.
+    pub fn deser_err<T: DeserializeOwned>(self) -> Result<Response<Payload, T>, Self> {
+        match self.payload.deserialize_error() {
+            Ok(payload) => Ok(Response { id: self.id, payload }),
+            Err(payload) => Err(Response { id: self.id, payload }),
+        }
+    }
+}
+
+impl<'de, Payload, ErrData> Deserialize<'de> for Response<Payload, ErrData>
+where
+    Payload: Deserialize<'de>,
+    ErrData: Deserialize<'de>,
+{
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: serde::Deserializer<'de>,
+    {
+        enum Field {
+            Result,
+            Error,
+            Id,
+            Unknown,
+        }
+
+        impl<'de> Deserialize<'de> for Field {
+            fn deserialize<D>(deserializer: D) -> Result<Field, D::Error>
+            where
+                D: Deserializer<'de>,
+            {
+                struct FieldVisitor;
+
+                impl<'de> serde::de::Visitor<'de> for FieldVisitor {
+                    type Value = Field;
+
+                    fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+                        formatter.write_str("`result`, `error` and `id`")
+                    }
+
+                    fn visit_str<E>(self, value: &str) -> Result<Field, E>
+                    where
+                        E: serde::de::Error,
+                    {
+                        match value {
+                            "result" => Ok(Field::Result),
+                            "error" => Ok(Field::Error),
+                            "id" => Ok(Field::Id),
+                            _ => Ok(Field::Unknown),
+                        }
+                    }
+                }
+                deserializer.deserialize_identifier(FieldVisitor)
+            }
+        }
+
+        struct JsonRpcResponseVisitor<T>(PhantomData<T>);
+
+        impl<'de, Payload, ErrData> Visitor<'de> for JsonRpcResponseVisitor<fn() -> (Payload, ErrData)>
+        where
+            Payload: Deserialize<'de>,
+            ErrData: Deserialize<'de>,
+        {
+            type Value = Response<Payload, ErrData>;
+
+            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+                formatter.write_str(
+                    "a JSON-RPC response object, consisting of either a result or an error",
+                )
+            }
+
+            fn visit_map<M>(self, mut map: M) -> Result<Self::Value, M::Error>
+            where
+                M: MapAccess<'de>,
+            {
+                let mut result = None;
+                let mut error = None;
+                let mut id: Option<Id> = None;
+
+                while let Some(key) = map.next_key()? {
+                    match key {
+                        Field::Result => {
+                            if result.is_some() {
+                                return Err(serde::de::Error::duplicate_field("result"));
+                            }
+                            result = Some(map.next_value()?);
+                        }
+                        Field::Error => {
+                            if error.is_some() {
+                                return Err(serde::de::Error::duplicate_field("error"));
+                            }
+                            error = Some(map.next_value()?);
+                        }
+                        Field::Id => {
+                            if id.is_some() {
+                                return Err(serde::de::Error::duplicate_field("id"));
+                            }
+                            id = Some(map.next_value()?);
+                        }
+                        Field::Unknown => {
+                            let _: serde::de::IgnoredAny = map.next_value()?; // ignore
+                        }
+                    }
+                }
+                let id = id.unwrap_or(Id::None);
+
+                match (result, error) {
+                    (Some(result), None) => {
+                        Ok(Response { id, payload: ResponsePayload::Success(result) })
+                    }
+                    (None, Some(error)) => {
+                        Ok(Response { id, payload: ResponsePayload::Failure(error) })
+                    }
+                    (None, None) => Err(serde::de::Error::missing_field("result or error")),
+                    (Some(_), Some(_)) => {
+                        Err(serde::de::Error::custom("result and error are mutually exclusive"))
+                    }
+                }
+            }
+        }
+
+        deserializer.deserialize_map(JsonRpcResponseVisitor(PhantomData))
+    }
+}
+
+impl<Payload, ErrData> Serialize for Response<Payload, ErrData>
+where
+    Payload: Serialize,
+    ErrData: Serialize,
+{
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: serde::Serializer,
+    {
+        let mut map = serializer.serialize_map(Some(3))?;
+        map.serialize_entry("jsonrpc", "2.0")?;
+        map.serialize_entry("id", &self.id)?;
+        match &self.payload {
+            ResponsePayload::Success(result) => {
+                map.serialize_entry("result", result)?;
+            }
+            ResponsePayload::Failure(error) => {
+                map.serialize_entry("error", error)?;
+            }
+        }
+        map.end()
+    }
+}
+
+#[cfg(test)]
+mod test {
+    #[test]
+    fn deser_success() {
+        let response = r#"{
+            "jsonrpc": "2.0",
+            "result": "california",
+            "id": 1
+        }"#;
+        let response: super::Response = serde_json::from_str(response).unwrap();
+        assert_eq!(response.id, super::Id::Number(1));
+        assert!(matches!(response.payload, super::ResponsePayload::Success(_)));
+    }
+
+    #[test]
+    fn deser_err() {
+        let response = r#"{
+            "jsonrpc": "2.0",
+            "error": {
+                "code": -32600,
+                "message": "Invalid Request"
+            },
+            "id": null
+        }"#;
+        let response: super::Response = serde_json::from_str(response).unwrap();
+        assert_eq!(response.id, super::Id::None);
+        assert!(matches!(response.payload, super::ResponsePayload::Failure(_)));
+    }
+
+    #[test]
+    fn deser_complex_success() {
+        let response = r#"{
+            "result": {
+                "name": "california",
+                "population": 39250000,
+                "cities": [
+                    "los angeles",
+                    "san francisco"
+                ]
+            }
+        }"#;
+        let response: super::Response = serde_json::from_str(response).unwrap();
+        assert_eq!(response.id, super::Id::None);
+        assert!(matches!(response.payload, super::ResponsePayload::Success(_)));
+    }
+}
+
+// Copyright 2019-2021 Parity Technologies (UK) Ltd.
+//
+// Permission is hereby granted, free of charge, to any
+// person obtaining a copy of this software and associated
+// documentation files (the "Software"), to deal in the
+// Software without restriction, including without
+// limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following
+// conditions:
+//
+// The above copyright notice and this permission notice
+// shall be included in all copies or substantial portions
+// of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/response/payload.rs.html b/src/alloy_json_rpc/response/payload.rs.html new file mode 100644 index 000000000000..4a95d615df79 --- /dev/null +++ b/src/alloy_json_rpc/response/payload.rs.html @@ -0,0 +1,292 @@ +payload.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+
use crate::ErrorPayload;
+use serde::{de::DeserializeOwned, Deserialize};
+use serde_json::value::RawValue;
+use std::borrow::Borrow;
+
+/// A JSONRPC-2.0 response payload.
+///
+/// This enum covers both the success and error cases of a JSONRPC-2.0
+/// response. It is used to represent the `result` and `error` fields of a
+/// response object.
+///
+/// ### Note
+///
+/// This type does not implement `Serialize` or `Deserialize` directly. It is
+/// deserialized as part of the [`Response`] type.
+///
+/// [`Response`]: crate::Response
+#[derive(Debug, Clone)]
+pub enum ResponsePayload<Payload = Box<RawValue>, ErrData = Box<RawValue>> {
+    /// A successful response payload.
+    Success(Payload),
+    /// An error response payload.
+    Failure(ErrorPayload<ErrData>),
+}
+
+/// A [`ResponsePayload`] that has been partially deserialized, borrowing its
+/// contents from the deserializer. This is used primarily for intermediate
+/// deserialization. Most users will not require it.
+///
+/// See the [top-level docs] for more info.
+///
+/// [top-level docs]: crate
+pub type BorrowedResponsePayload<'a> = ResponsePayload<&'a RawValue, &'a RawValue>;
+
+impl BorrowedResponsePayload<'_> {
+    /// Convert this borrowed response payload into an owned payload by copying
+    /// the data from the deserializer (if necessary).
+    pub fn into_owned(self) -> ResponsePayload {
+        match self {
+            Self::Success(payload) => ResponsePayload::Success(payload.to_owned()),
+            Self::Failure(error) => ResponsePayload::Failure(error.into_owned()),
+        }
+    }
+}
+
+impl<Payload, ErrData> ResponsePayload<Payload, ErrData> {
+    /// Fallible conversion to the succesful payload.
+    pub const fn as_success(&self) -> Option<&Payload> {
+        match self {
+            ResponsePayload::Success(payload) => Some(payload),
+            _ => None,
+        }
+    }
+
+    /// Fallible conversion to the error object.
+    pub const fn as_error(&self) -> Option<&ErrorPayload<ErrData>> {
+        match self {
+            ResponsePayload::Failure(payload) => Some(payload),
+            _ => None,
+        }
+    }
+
+    /// Returns `true` if the response payload is a success.
+    pub const fn is_success(&self) -> bool {
+        matches!(self, ResponsePayload::Success(_))
+    }
+
+    /// Returns `true` if the response payload is an error.
+    pub const fn is_error(&self) -> bool {
+        matches!(self, ResponsePayload::Failure(_))
+    }
+}
+
+impl<'a, Payload, ErrData> ResponsePayload<Payload, ErrData>
+where
+    Payload: AsRef<RawValue> + 'a,
+{
+    /// Attempt to deserialize the success payload, borrowing from the payload
+    /// if necessary.
+    ///
+    /// # Returns
+    /// - `None` if the payload is an error
+    /// - `Some(Ok(T))` if the payload is a success and can be deserialized
+    /// - `Some(Err(serde_json::Error))` if the payload is a success and can't be deserialized as
+    ///   `T`
+    pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<serde_json::Result<T>> {
+        self.as_success().map(|payload| serde_json::from_str(payload.as_ref().get()))
+    }
+
+    /// Deserialize a Success payload, if possible, transforming this type.
+    ///
+    /// # Returns
+    ///
+    /// - `Ok(ResponsePayload<T>)` if the payload is an error, or if the payload is a success and
+    ///   can be deserialized as `T`
+    /// - `Err(self)` if the payload is a success and can't be deserialized
+    pub fn deserialize_success<T: DeserializeOwned>(
+        self,
+    ) -> Result<ResponsePayload<T, ErrData>, Self> {
+        match self {
+            ResponsePayload::Success(ref payload) => {
+                match serde_json::from_str(payload.as_ref().get()) {
+                    Ok(payload) => Ok(ResponsePayload::Success(payload)),
+                    Err(_) => Err(self),
+                }
+            }
+            ResponsePayload::Failure(e) => Ok(ResponsePayload::Failure(e)),
+        }
+    }
+}
+
+impl<'a, Payload, Data> ResponsePayload<Payload, Data>
+where
+    Data: Borrow<RawValue> + 'a,
+{
+    /// Attempt to deserialize the error payload, borrowing from the payload if
+    /// necessary.
+    ///
+    /// # Returns
+    /// - `None` if the payload is a success
+    /// - `Some(Ok(T))` if the payload is an error and can be deserialized
+    /// - `Some(Err(serde_json::Error))` if the payload is an error and can't be deserialized as `T`
+    pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<serde_json::Result<T>> {
+        self.as_error().and_then(|error| error.try_data_as::<T>())
+    }
+
+    /// Deserialize an Error payload, if possible, transforming this type.
+    ///
+    /// # Returns
+    ///
+    /// - `Ok(ResponsePayload<Payload, T>)` if the payload is an error, or if the payload is an
+    ///   error and can be deserialized as `T`.
+    /// - `Err(self)` if the payload is an error and can't be deserialized.
+    pub fn deserialize_error<T: DeserializeOwned>(
+        self,
+    ) -> Result<ResponsePayload<Payload, T>, Self> {
+        match self {
+            ResponsePayload::Failure(err) => match err.deser_data() {
+                Ok(deser) => Ok(ResponsePayload::Failure(deser)),
+                Err(err) => Err(ResponsePayload::Failure(err)),
+            },
+            ResponsePayload::Success(payload) => Ok(ResponsePayload::Success(payload)),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_json_rpc/result.rs.html b/src/alloy_json_rpc/result.rs.html new file mode 100644 index 000000000000..ca6bef5d0d9a --- /dev/null +++ b/src/alloy_json_rpc/result.rs.html @@ -0,0 +1,146 @@ +result.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+
use std::borrow::Borrow;
+
+use crate::{Response, ResponsePayload, RpcError, RpcReturn};
+
+use serde_json::value::RawValue;
+
+/// The result of a JSON-RPC request.
+///
+/// Either a success response, an error response, or a non-response error. The
+/// non-response error is intended to be used for errors returned by a
+/// transport, or serde errors.
+///
+/// The common cases are:
+/// - `Ok(T)` - The server returned a succesful response.
+/// - `Err(RpcError::ErrorResponse(ErrResp))` - The server returned an error response.
+/// - `Err(RpcError::SerError(E))` - A serialization error occurred.
+/// - `Err(RpcError::DeserError { err: E, text: String })` - A deserialization error occurred.
+/// - `Err(RpcError::TransportError(E))` - Some client-side or communication error occurred.
+pub type RpcResult<T, E, ErrResp = Box<RawValue>> = Result<T, RpcError<E, ErrResp>>;
+
+/// A partially deserialized [`RpcResult`], borrowing from the deserializer.
+pub type BorrowedRpcResult<'a, E> = RpcResult<&'a RawValue, E, &'a RawValue>;
+
+/// Transform a transport response into an [`RpcResult`], discarding the [`Id`].
+///
+/// [`Id`]: crate::Id
+#[allow(clippy::missing_const_for_fn)] // false positive
+pub fn transform_response<T, E, ErrResp>(
+    response: Response<T, ErrResp>,
+) -> Result<T, RpcError<E, ErrResp>>
+where
+    ErrResp: RpcReturn,
+{
+    match response {
+        Response { payload: ResponsePayload::Failure(err_resp), .. } => {
+            Err(RpcError::err_resp(err_resp))
+        }
+        Response { payload: ResponsePayload::Success(result), .. } => Ok(result),
+    }
+}
+
+/// Transform a transport outcome into an [`RpcResult`], discarding the [`Id`].
+///
+/// [`Id`]: crate::Id
+pub fn transform_result<T, E, ErrResp>(
+    response: Result<Response<T, ErrResp>, E>,
+) -> Result<T, RpcError<E, ErrResp>>
+where
+    ErrResp: RpcReturn,
+{
+    match response {
+        Ok(resp) => transform_response(resp),
+        Err(e) => Err(RpcError::Transport(e)),
+    }
+}
+
+/// Attempt to deserialize the `Ok(_)` variant of an [`RpcResult`].
+pub fn try_deserialize_ok<'a, J, T, E, ErrResp>(
+    result: RpcResult<J, E, ErrResp>,
+) -> RpcResult<T, E, ErrResp>
+where
+    J: Borrow<RawValue> + 'a,
+    T: RpcReturn,
+    ErrResp: RpcReturn,
+{
+    let json = result?;
+    let text = json.borrow().get();
+
+    let val = serde_json::from_str::<T>(text).map_err(|err| RpcError::deser_err(err, text))?;
+
+    Ok(val)
+}
+
\ No newline at end of file diff --git a/src/alloy_networks/lib.rs.html b/src/alloy_networks/lib.rs.html new file mode 100644 index 000000000000..93a1ad7b6f11 --- /dev/null +++ b/src/alloy_networks/lib.rs.html @@ -0,0 +1,104 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+use alloy_json_rpc::RpcObject;
+
+/// Captures type info for network-specific RPC requests/responses.
+pub trait Network: Sized + Send + Sync + 'static {
+    #[doc(hidden)]
+    /// Asserts that this trait can only be implemented on a ZST.
+    const __ASSERT_ZST: () = {
+        assert!(std::mem::size_of::<Self>() == 0, "Network must be a ZST");
+    };
+
+    /// The JSON body of a transaction request.
+    type TransactionRequest: Transaction;
+
+    /// The JSON body of a transaction receipt.
+    type Receipt: Receipt;
+
+    /// The JSON body of a transaction response.
+    type TransactionResponse: Transaction;
+}
+
+/// Captures getters and setters common across transactions and
+/// transaction-like objects across all networks.
+pub trait Transaction:
+    alloy_rlp::Encodable + alloy_rlp::Decodable + RpcObject + Clone + Sized + 'static
+{
+    /// Sets the gas price of the transaction.
+    fn set_gas(&mut self, gas: alloy_primitives::U256);
+}
+
+/// Captures getters and setters common across EIP-1559 transactions across all networks
+pub trait Eip1559Transaction: Transaction {}
+
+/// Captures getters and setters common across receipts across all networks
+pub trait Receipt: RpcObject + 'static {}
+
\ No newline at end of file diff --git a/src/alloy_providers/builder.rs.html b/src/alloy_providers/builder.rs.html new file mode 100644 index 000000000000..47b8f144d213 --- /dev/null +++ b/src/alloy_providers/builder.rs.html @@ -0,0 +1,292 @@ +builder.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+
use crate::{NetworkRpcClient, Provider};
+use alloy_networks::Network;
+use alloy_rpc_client::RpcClient;
+use alloy_transport::Transport;
+use std::marker::PhantomData;
+
+/// A layering abstraction in the vein of [`tower::Layer`]
+///
+/// [`tower::Layer`]: https://docs.rs/tower/latest/tower/trait.Layer.html
+pub trait ProviderLayer<P: Provider<N, T>, N: Network, T: Transport> {
+    type Provider: Provider<N, T>;
+
+    fn layer(&self, inner: P) -> Self::Provider;
+}
+
+pub struct Stack<T, Inner, Outer> {
+    inner: Inner,
+    outer: Outer,
+    _pd: std::marker::PhantomData<fn() -> T>,
+}
+
+impl<T, Inner, Outer> Stack<T, Inner, Outer> {
+    /// Create a new `Stack`.
+    pub fn new(inner: Inner, outer: Outer) -> Self {
+        Stack { inner, outer, _pd: std::marker::PhantomData }
+    }
+}
+
+impl<P, N, T, Inner, Outer> ProviderLayer<P, N, T> for Stack<T, Inner, Outer>
+where
+    T: Transport,
+    N: Network,
+    P: Provider<N, T>,
+    Inner: ProviderLayer<P, N, T>,
+    Outer: ProviderLayer<Inner::Provider, N, T>,
+{
+    type Provider = Outer::Provider;
+
+    fn layer(&self, provider: P) -> Self::Provider {
+        let inner = self.inner.layer(provider);
+
+        self.outer.layer(inner)
+    }
+}
+
+/// A builder for constructing a [`Provider`] from various layers.
+///
+/// This type is similar to [`tower::ServiceBuilder`], with extra complication
+/// around maintaining the network and transport types.
+///
+/// [`tower::ServiceBuilder`]: https://docs.rs/tower/latest/tower/struct.ServiceBuilder.html
+pub struct ProviderBuilder<L, N = (), T = ()> {
+    layer: L,
+
+    transport: PhantomData<T>,
+    network: PhantomData<N>,
+}
+
+impl<L, N, T> ProviderBuilder<L, N, T> {
+    /// Add a layer to the stack being built. This is similar to
+    /// [`tower::ServiceBuilder::layer`].
+    ///
+    /// ## Note:
+    ///
+    /// Layers are added in outer-to-inner order, as in
+    /// [`tower::ServiceBuilder`]. The first layer added will be the first to
+    /// see the request.
+    ///
+    ///
+    /// [`tower::ServiceBuilder::layer`]: https://docs.rs/tower/latest/tower/struct.ServiceBuilder.html#method.layer
+    /// [`tower::ServiceBuilder`]: https://docs.rs/tower/latest/tower/struct.ServiceBuilder.html
+
+    pub fn layer<Inner>(self, layer: Inner) -> ProviderBuilder<Stack<T, Inner, L>> {
+        ProviderBuilder {
+            layer: Stack::new(layer, self.layer),
+            transport: PhantomData,
+            network: PhantomData,
+        }
+    }
+
+    /// Change the network.
+    ///
+    /// By default, the network is invalid, and contains the unit type `()`.
+    /// This method MUST be called before the provider is built. The `client`
+    /// and `provider` methods only exist when the network is valid.
+    ///
+    /// ```rust,ignore
+    /// builder.network::<Arbitrum>()
+    /// ```
+    pub fn network<Net: Network>(self) -> ProviderBuilder<L, Net, T> {
+        ProviderBuilder { layer: self.layer, transport: self.transport, network: PhantomData }
+    }
+
+    /// Finish the layer stack by providing a root [`RpcClient`], outputting
+    /// the final [`Provider`] type with all stack components.
+    ///
+    /// This is a convenience function for
+    /// `ProviderBuilder::provider<NetworkRpcClient>`.
+    pub fn client(self, client: RpcClient<T>) -> L::Provider
+    where
+        L: ProviderLayer<NetworkRpcClient<N, T>, N, T>,
+        T: Transport + Clone,
+        N: Network,
+    {
+        self.provider(NetworkRpcClient::from(client))
+    }
+
+    /// Finish the layer stack by providing a root [`Provider`], outputting
+    /// the final [`Provider`] type with all stack components.
+    pub fn provider<P>(self, provider: P) -> L::Provider
+    where
+        L: ProviderLayer<P, N, T>,
+        P: Provider<N, T>,
+        T: Transport,
+        N: Network,
+    {
+        self.layer.layer(provider)
+    }
+}
+
+// Copyright (c) 2019 Tower Contributors
+
+// Permission is hereby granted, free of charge, to any
+// person obtaining a copy of this software and associated
+// documentation files (the "Software"), to deal in the
+// Software without restriction, including without
+// limitation the rights to use, copy, modify, merge,
+// publish, distribute, sublicense, and/or sell copies of
+// the Software, and to permit persons to whom the Software
+// is furnished to do so, subject to the following
+// conditions:
+
+// The above copyright notice and this permission notice
+// shall be included in all copies or substantial portions
+// of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
+// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
+// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
\ No newline at end of file diff --git a/src/alloy_providers/lib.rs.html b/src/alloy_providers/lib.rs.html new file mode 100644 index 000000000000..a8a2dc525662 --- /dev/null +++ b/src/alloy_providers/lib.rs.html @@ -0,0 +1,334 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    // TODO:
+    // missing_copy_implementations,
+    // missing_debug_implementations,
+    // missing_docs,
+    unreachable_pub,
+    // clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+use alloy_networks::{Network, Transaction};
+use alloy_primitives::Address;
+use alloy_rpc_client::RpcClient;
+use alloy_transport::{BoxTransport, Transport, TransportResult};
+use std::{borrow::Cow, marker::PhantomData};
+
+mod builder;
+pub use builder::{ProviderBuilder, ProviderLayer, Stack};
+
+pub mod provider;
+pub mod utils;
+
+/// A network-wrapped RPC client.
+///
+/// This type allows you to specify (at the type-level) that the RPC client is
+/// for a specific network. This helps avoid accidentally using the wrong
+/// connection to access a network.
+#[derive(Debug)]
+pub struct NetworkRpcClient<N: Network, T: Transport = BoxTransport> {
+    pub network: PhantomData<fn() -> N>,
+    pub client: RpcClient<T>,
+}
+
+impl<N, T> std::ops::Deref for NetworkRpcClient<N, T>
+where
+    N: Network,
+    T: Transport,
+{
+    type Target = RpcClient<T>;
+
+    fn deref(&self) -> &Self::Target {
+        &self.client
+    }
+}
+
+impl<N, T> From<RpcClient<T>> for NetworkRpcClient<N, T>
+where
+    N: Network,
+    T: Transport,
+{
+    fn from(client: RpcClient<T>) -> Self {
+        Self { network: PhantomData, client }
+    }
+}
+
+impl<N, T> From<NetworkRpcClient<N, T>> for RpcClient<T>
+where
+    N: Network,
+    T: Transport,
+{
+    fn from(client: NetworkRpcClient<N, T>) -> Self {
+        client.client
+    }
+}
+
+#[cfg_attr(target_arch = "wasm32", async_trait::async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait::async_trait)]
+/// Provider is parameterized with a network and a transport. The default
+/// transport is type-erased, but you can do `Provider<N, Http>`.
+pub trait Provider<N: Network, T: Transport = BoxTransport>: Send + Sync {
+    fn raw_client(&self) -> &RpcClient<T> {
+        &self.client().client
+    }
+
+    /// Return a reference to the inner RpcClient.
+    fn client(&self) -> &NetworkRpcClient<N, T>;
+
+    /// Return a reference to the inner Provider.
+    ///
+    /// Providers are object safe now :)
+    fn inner(&self) -> &dyn Provider<N, T>;
+
+    async fn estimate_gas(
+        &self,
+        tx: &N::TransactionRequest,
+    ) -> TransportResult<alloy_primitives::U256> {
+        self.inner().estimate_gas(tx).await
+    }
+
+    /// Get the transaction count for an address. Used for finding the
+    /// appropriate nonce.
+    ///
+    /// TODO: block number/hash/tag
+    async fn get_transaction_count(
+        &self,
+        address: Address,
+    ) -> TransportResult<alloy_primitives::U256> {
+        self.inner().get_transaction_count(address).await
+    }
+
+    /// Send a transaction to the network.
+    ///
+    /// The transaction type is defined by the network.
+    async fn send_transaction(&self, tx: &N::TransactionRequest) -> TransportResult<N::Receipt> {
+        self.inner().send_transaction(tx).await
+    }
+
+    async fn populate_gas(&self, tx: &mut N::TransactionRequest) -> TransportResult<()> {
+        let gas = self.estimate_gas(&*tx).await;
+
+        gas.map(|gas| tx.set_gas(gas))
+    }
+}
+
+#[cfg_attr(target_arch = "wasm32", async_trait::async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait::async_trait)]
+impl<N: Network, T: Transport + Clone> Provider<N, T> for NetworkRpcClient<N, T> {
+    fn client(&self) -> &NetworkRpcClient<N, T> {
+        self
+    }
+
+    fn inner(&self) -> &dyn Provider<N, T> {
+        panic!("called inner on <RpcClient as Provider>")
+    }
+
+    async fn estimate_gas(
+        &self,
+        tx: &<N as Network>::TransactionRequest,
+    ) -> TransportResult<alloy_primitives::U256> {
+        self.prepare("eth_estimateGas", Cow::Borrowed(tx)).await
+    }
+
+    async fn get_transaction_count(
+        &self,
+        address: Address,
+    ) -> TransportResult<alloy_primitives::U256> {
+        self.prepare(
+            "eth_getTransactionCount",
+            Cow::<(Address, String)>::Owned((address, "latest".to_string())),
+        )
+        .await
+    }
+
+    async fn send_transaction(&self, tx: &N::TransactionRequest) -> TransportResult<N::Receipt> {
+        self.prepare("eth_sendTransaction", Cow::Borrowed(tx)).await
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use crate::Provider;
+    use alloy_networks::Network;
+
+    // checks that `Provider<N>` is object-safe
+    fn __compile_check<N: Network>() -> Box<dyn Provider<N>> {
+        unimplemented!()
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_providers/provider.rs.html b/src/alloy_providers/provider.rs.html new file mode 100644 index 000000000000..bae2d0de18ae --- /dev/null +++ b/src/alloy_providers/provider.rs.html @@ -0,0 +1,1400 @@ +provider.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+
//! Alloy main Provider abstraction.
+
+use crate::utils::{self, EstimatorFunction};
+use alloy_primitives::{Address, BlockHash, Bytes, StorageKey, StorageValue, TxHash, U256, U64};
+use alloy_rpc_client::{ClientBuilder, RpcClient};
+use alloy_rpc_types::{
+    trace::{GethDebugTracingOptions, GethTrace, LocalizedTransactionTrace},
+    AccessListWithGasUsed, Block, BlockId, BlockNumberOrTag, CallRequest,
+    EIP1186AccountProofResponse, FeeHistory, Filter, Log, SyncStatus, Transaction,
+    TransactionReceipt,
+};
+use alloy_transport::{BoxTransport, Transport, TransportErrorKind, TransportResult};
+use alloy_transport_http::Http;
+use auto_impl::auto_impl;
+use reqwest::Client;
+use serde::{de::DeserializeOwned, Deserialize, Serialize};
+use thiserror::Error;
+
+#[derive(Debug, Error, Serialize, Deserialize)]
+pub enum ClientError {
+    #[error("Could not parse URL")]
+    ParseError,
+    #[error("Unsupported Tag")]
+    UnsupportedBlockIdError,
+}
+
+/// An abstract provider for interacting with the [Ethereum JSON RPC
+/// API](https://github.com/ethereum/wiki/wiki/JSON-RPC). Must be instantiated
+/// with a transport which implements the [Transport] trait.
+#[derive(Debug)]
+pub struct Provider<T: Transport = BoxTransport> {
+    inner: RpcClient<T>,
+    from: Option<Address>,
+}
+
+/// Temporary Provider trait to be used until the new Provider trait with
+/// the Network abstraction is stable.
+/// Once the new Provider trait is stable, this trait will be removed.
+#[cfg_attr(target_arch = "wasm32", async_trait::async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait::async_trait)]
+#[auto_impl(&, &mut, Rc, Arc, Box)]
+pub trait TempProvider: Send + Sync {
+    /// Gets the transaction count of the corresponding address.
+    async fn get_transaction_count(
+        &self,
+        address: Address,
+        tag: Option<BlockId>,
+    ) -> TransportResult<alloy_primitives::U256>;
+
+    /// Gets the last block number available.
+    async fn get_block_number(&self) -> TransportResult<u64>;
+
+    /// Gets the balance of the account at the specified tag, which defaults to latest.
+    async fn get_balance(&self, address: Address, tag: Option<BlockId>) -> TransportResult<U256>;
+
+    /// Gets a block by either its hash, tag, or number, with full transactions or only hashes.
+    async fn get_block(&self, id: BlockId, full: bool) -> TransportResult<Option<Block>> {
+        match id {
+            BlockId::Hash(hash) => self.get_block_by_hash(hash.into(), full).await,
+            BlockId::Number(number) => self.get_block_by_number(number, full).await,
+        }
+    }
+
+    /// Gets a block by its [BlockHash], with full transactions or only hashes.
+    async fn get_block_by_hash(
+        &self,
+        hash: BlockHash,
+        full: bool,
+    ) -> TransportResult<Option<Block>>;
+
+    /// Gets a block by [BlockNumberOrTag], with full transactions or only hashes.
+    async fn get_block_by_number(
+        &self,
+        number: BlockNumberOrTag,
+        full: bool,
+    ) -> TransportResult<Option<Block>>;
+
+    /// Gets the chain ID.
+    async fn get_chain_id(&self) -> TransportResult<U64>;
+
+    /// Gets the specified storage value from [Address].
+    async fn get_storage_at(
+        &self,
+        address: Address,
+        key: StorageKey,
+        tag: Option<BlockId>,
+    ) -> TransportResult<StorageValue>;
+
+    /// Gets the bytecode located at the corresponding [Address].
+    async fn get_code_at(&self, address: Address, tag: BlockId) -> TransportResult<Bytes>;
+
+    /// Gets a [Transaction] by its [TxHash].
+    async fn get_transaction_by_hash(&self, hash: TxHash) -> TransportResult<Transaction>;
+
+    /// Retrieves a [`Vec<Log>`] with the given [Filter].
+    async fn get_logs(&self, filter: Filter) -> TransportResult<Vec<Log>>;
+
+    /// Gets the accounts in the remote node. This is usually empty unless you're using a local
+    /// node.
+    async fn get_accounts(&self) -> TransportResult<Vec<Address>>;
+
+    /// Gets the current gas price.
+    async fn get_gas_price(&self) -> TransportResult<U256>;
+
+    /// Gets a [TransactionReceipt] if it exists, by its [TxHash].
+    async fn get_transaction_receipt(
+        &self,
+        hash: TxHash,
+    ) -> TransportResult<Option<TransactionReceipt>>;
+
+    /// Returns a collection of historical gas information [FeeHistory] which
+    /// can be used to calculate the EIP1559 fields `maxFeePerGas` and `maxPriorityFeePerGas`.
+    async fn get_fee_history(
+        &self,
+        block_count: U256,
+        last_block: BlockNumberOrTag,
+        reward_percentiles: &[f64],
+    ) -> TransportResult<FeeHistory>;
+
+    /// Gets the selected block [BlockNumberOrTag] receipts.
+    async fn get_block_receipts(
+        &self,
+        block: BlockNumberOrTag,
+    ) -> TransportResult<Vec<TransactionReceipt>>;
+
+    /// Gets an uncle block through the tag [BlockId] and index [U64].
+    async fn get_uncle(&self, tag: BlockId, idx: U64) -> TransportResult<Option<Block>>;
+
+    /// Gets syncing info.
+    async fn syncing(&self) -> TransportResult<SyncStatus>;
+
+    /// Execute a smart contract call with [CallRequest] without publishing a transaction.
+    async fn call(&self, tx: CallRequest, block: Option<BlockId>) -> TransportResult<Bytes>;
+
+    /// Estimate the gas needed for a transaction.
+    async fn estimate_gas(&self, tx: CallRequest, block: Option<BlockId>) -> TransportResult<U256>;
+
+    /// Sends an already-signed transaction.
+    async fn send_raw_transaction(&self, tx: Bytes) -> TransportResult<TxHash>;
+
+    /// Estimates the EIP1559 `maxFeePerGas` and `maxPriorityFeePerGas` fields.
+    /// Receives an optional [EstimatorFunction] that can be used to modify
+    /// how to estimate these fees.
+    async fn estimate_eip1559_fees(
+        &self,
+        estimator: Option<EstimatorFunction>,
+    ) -> TransportResult<(U256, U256)>;
+
+    #[cfg(feature = "anvil")]
+    async fn set_code(&self, address: Address, code: &'static str) -> TransportResult<()>;
+
+    async fn get_proof(
+        &self,
+        address: Address,
+        keys: Vec<StorageKey>,
+        block: Option<BlockId>,
+    ) -> TransportResult<EIP1186AccountProofResponse>;
+
+    async fn create_access_list(
+        &self,
+        request: CallRequest,
+        block: Option<BlockId>,
+    ) -> TransportResult<AccessListWithGasUsed>;
+
+    /// Parity trace transaction.
+    async fn trace_transaction(
+        &self,
+        hash: TxHash,
+    ) -> TransportResult<Vec<LocalizedTransactionTrace>>;
+
+    async fn debug_trace_transaction(
+        &self,
+        hash: TxHash,
+        trace_options: GethDebugTracingOptions,
+    ) -> TransportResult<GethTrace>;
+
+    async fn trace_block(
+        &self,
+        block: BlockNumberOrTag,
+    ) -> TransportResult<Vec<LocalizedTransactionTrace>>;
+
+    async fn raw_request<P, R>(&self, method: &'static str, params: P) -> TransportResult<R>
+    where
+        P: Serialize + Send + Sync + Clone,
+        R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,
+        Self: Sync;
+}
+
+impl<T: Transport + Clone + Send + Sync> Provider<T> {
+    pub fn new(transport: T) -> Self {
+        Self {
+            // todo(onbjerg): do we just default to false
+            inner: RpcClient::new(transport, false),
+            from: None,
+        }
+    }
+
+    pub fn new_with_client(client: RpcClient<T>) -> Self {
+        Self { inner: client, from: None }
+    }
+
+    pub fn with_sender(mut self, from: Address) -> Self {
+        self.from = Some(from);
+        self
+    }
+
+    pub fn inner(&self) -> &RpcClient<T> {
+        &self.inner
+    }
+}
+
+// todo: validate usage of BlockId vs BlockNumberOrTag vs Option<BlockId> etc.
+// Simple JSON-RPC bindings.
+// In the future, this will be replaced by a Provider trait,
+// but as the interface is not stable yet, we define the bindings ourselves
+// until we can use the trait and the client abstraction that will use it.
+#[cfg_attr(target_arch = "wasm32", async_trait::async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait::async_trait)]
+impl<T: Transport + Clone + Send + Sync> TempProvider for Provider<T> {
+    /// Gets the transaction count of the corresponding address.
+    async fn get_transaction_count(
+        &self,
+        address: Address,
+        tag: Option<BlockId>,
+    ) -> TransportResult<alloy_primitives::U256> {
+        self.inner
+            .prepare(
+                "eth_getTransactionCount",
+                (address, tag.unwrap_or(BlockNumberOrTag::Latest.into())),
+            )
+            .await
+    }
+
+    /// Gets the last block number available.
+    /// Gets the last block number available.
+    async fn get_block_number(&self) -> TransportResult<u64> {
+        self.inner.prepare("eth_blockNumber", ()).await.map(|num: U64| num.to::<u64>())
+    }
+
+    /// Gets the balance of the account at the specified tag, which defaults to latest.
+    async fn get_balance(&self, address: Address, tag: Option<BlockId>) -> TransportResult<U256> {
+        self.inner
+            .prepare(
+                "eth_getBalance",
+                (address, tag.unwrap_or(BlockId::Number(BlockNumberOrTag::Latest))),
+            )
+            .await
+    }
+
+    /// Gets a block by its [BlockHash], with full transactions or only hashes.
+    async fn get_block_by_hash(
+        &self,
+        hash: BlockHash,
+        full: bool,
+    ) -> TransportResult<Option<Block>> {
+        self.inner.prepare("eth_getBlockByHash", (hash, full)).await
+    }
+
+    /// Gets a block by [BlockNumberOrTag], with full transactions or only hashes.
+    async fn get_block_by_number(
+        &self,
+        number: BlockNumberOrTag,
+        full: bool,
+    ) -> TransportResult<Option<Block>> {
+        self.inner.prepare("eth_getBlockByNumber", (number, full)).await
+    }
+
+    /// Gets the chain ID.
+    async fn get_chain_id(&self) -> TransportResult<U64> {
+        self.inner.prepare("eth_chainId", ()).await
+    }
+
+    /// Gets the specified storage value from [Address].
+    async fn get_storage_at(
+        &self,
+        address: Address,
+        key: StorageKey,
+        tag: Option<BlockId>,
+    ) -> TransportResult<StorageValue> {
+        self.inner
+            .prepare(
+                "eth_getStorageAt",
+                (address, key, tag.unwrap_or(BlockNumberOrTag::Latest.into())),
+            )
+            .await
+    }
+
+    /// Gets the bytecode located at the corresponding [Address].
+    async fn get_code_at(&self, address: Address, tag: BlockId) -> TransportResult<Bytes> {
+        self.inner.prepare("eth_getCode", (address, tag)).await
+    }
+
+    /// Gets a [Transaction] by its [TxHash].
+    async fn get_transaction_by_hash(&self, hash: TxHash) -> TransportResult<Transaction> {
+        self.inner.prepare("eth_getTransactionByHash", (hash,)).await
+    }
+
+    /// Retrieves a [`Vec<Log>`] with the given [Filter].
+    async fn get_logs(&self, filter: Filter) -> TransportResult<Vec<Log>> {
+        self.inner.prepare("eth_getLogs", vec![filter]).await
+    }
+
+    /// Gets the accounts in the remote node. This is usually empty unless you're using a local
+    /// node.
+    async fn get_accounts(&self) -> TransportResult<Vec<Address>> {
+        self.inner.prepare("eth_accounts", ()).await
+    }
+
+    /// Gets the current gas price.
+    async fn get_gas_price(&self) -> TransportResult<U256> {
+        self.inner.prepare("eth_gasPrice", ()).await
+    }
+
+    /// Gets a [TransactionReceipt] if it exists, by its [TxHash].
+    async fn get_transaction_receipt(
+        &self,
+        hash: TxHash,
+    ) -> TransportResult<Option<TransactionReceipt>> {
+        self.inner.prepare("eth_getTransactionReceipt", (hash,)).await
+    }
+
+    /// Returns a collection of historical gas information [FeeHistory] which
+    /// can be used to calculate the EIP1559 fields `maxFeePerGas` and `maxPriorityFeePerGas`.
+    async fn get_fee_history(
+        &self,
+        block_count: U256,
+        last_block: BlockNumberOrTag,
+        reward_percentiles: &[f64],
+    ) -> TransportResult<FeeHistory> {
+        self.inner.prepare("eth_feeHistory", (block_count, last_block, reward_percentiles)).await
+    }
+
+    /// Gets the selected block [BlockNumberOrTag] receipts.
+    async fn get_block_receipts(
+        &self,
+        block: BlockNumberOrTag,
+    ) -> TransportResult<Vec<TransactionReceipt>>
+where {
+        self.inner.prepare("eth_getBlockReceipts", block).await
+    }
+
+    /// Gets an uncle block through the tag [BlockId] and index [U64].
+    async fn get_uncle(&self, tag: BlockId, idx: U64) -> TransportResult<Option<Block>> {
+        match tag {
+            BlockId::Hash(hash) => {
+                self.inner.prepare("eth_getUncleByBlockHashAndIndex", (hash, idx)).await
+            }
+            BlockId::Number(number) => {
+                self.inner.prepare("eth_getUncleByBlockNumberAndIndex", (number, idx)).await
+            }
+        }
+    }
+
+    /// Gets syncing info.
+    async fn syncing(&self) -> TransportResult<SyncStatus> {
+        self.inner.prepare("eth_syncing", ()).await
+    }
+
+    /// Execute a smart contract call with [CallRequest] without publishing a transaction.
+    async fn call(&self, tx: CallRequest, block: Option<BlockId>) -> TransportResult<Bytes> {
+        self.inner.prepare("eth_call", (tx, block.unwrap_or_default())).await
+    }
+
+    /// Estimate the gas needed for a transaction.
+    async fn estimate_gas(&self, tx: CallRequest, block: Option<BlockId>) -> TransportResult<U256> {
+        if let Some(block_id) = block {
+            self.inner.prepare("eth_estimateGas", (tx, block_id)).await
+        } else {
+            self.inner.prepare("eth_estimateGas", (tx,)).await
+        }
+    }
+
+    /// Sends an already-signed transaction.
+    async fn send_raw_transaction(&self, tx: Bytes) -> TransportResult<TxHash> {
+        self.inner.prepare("eth_sendRawTransaction", tx).await
+    }
+
+    /// Estimates the EIP1559 `maxFeePerGas` and `maxPriorityFeePerGas` fields.
+    /// Receives an optional [EstimatorFunction] that can be used to modify
+    /// how to estimate these fees.
+    async fn estimate_eip1559_fees(
+        &self,
+        estimator: Option<EstimatorFunction>,
+    ) -> TransportResult<(U256, U256)> {
+        let base_fee_per_gas = match self.get_block_by_number(BlockNumberOrTag::Latest, false).await
+        {
+            Ok(Some(block)) => match block.header.base_fee_per_gas {
+                Some(base_fee_per_gas) => base_fee_per_gas,
+                None => return Err(TransportErrorKind::custom_str("EIP-1559 not activated")),
+            },
+
+            Ok(None) => return Err(TransportErrorKind::custom_str("Latest block not found")),
+
+            Err(err) => return Err(err),
+        };
+
+        let fee_history = match self
+            .get_fee_history(
+                U256::from(utils::EIP1559_FEE_ESTIMATION_PAST_BLOCKS),
+                BlockNumberOrTag::Latest,
+                &[utils::EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE],
+            )
+            .await
+        {
+            Ok(fee_history) => fee_history,
+            Err(err) => return Err(err),
+        };
+
+        // use the provided fee estimator function, or fallback to the default implementation.
+        let (max_fee_per_gas, max_priority_fee_per_gas) = if let Some(es) = estimator {
+            es(base_fee_per_gas, fee_history.reward.unwrap_or_default())
+        } else {
+            utils::eip1559_default_estimator(
+                base_fee_per_gas,
+                fee_history.reward.unwrap_or_default(),
+            )
+        };
+
+        Ok((max_fee_per_gas, max_priority_fee_per_gas))
+    }
+
+    async fn get_proof(
+        &self,
+        address: Address,
+        keys: Vec<StorageKey>,
+        block: Option<BlockId>,
+    ) -> TransportResult<EIP1186AccountProofResponse> {
+        self.inner
+            .prepare(
+                "eth_getProof",
+                (address, keys, block.unwrap_or(BlockNumberOrTag::Latest.into())),
+            )
+            .await
+    }
+
+    async fn create_access_list(
+        &self,
+        request: CallRequest,
+        block: Option<BlockId>,
+    ) -> TransportResult<AccessListWithGasUsed> {
+        self.inner
+            .prepare(
+                "eth_createAccessList",
+                (request, block.unwrap_or(BlockNumberOrTag::Latest.into())),
+            )
+            .await
+    }
+
+    /// Parity trace transaction.
+    async fn trace_transaction(
+        &self,
+        hash: TxHash,
+    ) -> TransportResult<Vec<LocalizedTransactionTrace>> {
+        self.inner.prepare("trace_transaction", vec![hash]).await
+    }
+
+    async fn debug_trace_transaction(
+        &self,
+        hash: TxHash,
+        trace_options: GethDebugTracingOptions,
+    ) -> TransportResult<GethTrace> {
+        self.inner.prepare("debug_traceTransaction", (hash, trace_options)).await
+    }
+
+    async fn trace_block(
+        &self,
+        block: BlockNumberOrTag,
+    ) -> TransportResult<Vec<LocalizedTransactionTrace>> {
+        self.inner.prepare("trace_block", block).await
+    }
+
+    /// Sends a raw request with the methods and params specified to the internal connection,
+    /// and returns the result.
+    async fn raw_request<P, R>(&self, method: &'static str, params: P) -> TransportResult<R>
+    where
+        P: Serialize + Send + Sync + Clone,
+        R: Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,
+    {
+        let res: R = self.inner.prepare(method, &params).await?;
+        Ok(res)
+    }
+
+    #[cfg(feature = "anvil")]
+    async fn set_code(&self, address: Address, code: &'static str) -> TransportResult<()> {
+        self.inner.prepare("anvil_setCode", (address, code)).await
+    }
+}
+
+impl TryFrom<&str> for Provider<Http<Client>> {
+    type Error = ClientError;
+
+    fn try_from(url: &str) -> Result<Self, Self::Error> {
+        let url = url.parse().map_err(|_e| ClientError::ParseError)?;
+        let inner = ClientBuilder::default().reqwest_http(url);
+
+        Ok(Self { inner, from: None })
+    }
+}
+
+impl TryFrom<String> for Provider<Http<Client>> {
+    type Error = ClientError;
+
+    fn try_from(value: String) -> Result<Self, Self::Error> {
+        Provider::try_from(value.as_str())
+    }
+}
+
+impl<'a> TryFrom<&'a String> for Provider<Http<Client>> {
+    type Error = ClientError;
+
+    fn try_from(value: &'a String) -> Result<Self, Self::Error> {
+        Provider::try_from(value.as_str())
+    }
+}
+
+#[cfg(test)]
+mod providers_test {
+    use crate::{
+        provider::{Provider, TempProvider},
+        utils,
+    };
+    use alloy_primitives::{address, b256, U256, U64};
+    use alloy_rpc_types::{Block, BlockNumberOrTag, Filter};
+    use ethers_core::utils::Anvil;
+
+    #[tokio::test]
+    async fn gets_block_number() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let num = provider.get_block_number().await.unwrap();
+        assert_eq!(0, num)
+    }
+
+    #[tokio::test]
+    async fn gets_block_number_with_raw_req() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let num: U64 = provider.raw_request("eth_blockNumber", ()).await.unwrap();
+        assert_eq!(0, num.to::<u64>())
+    }
+
+    #[tokio::test]
+    async fn gets_transaction_count() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let count = provider
+            .get_transaction_count(
+                address!("328375e18E7db8F1CA9d9bA8bF3E9C94ee34136A"),
+                Some(BlockNumberOrTag::Latest.into()),
+            )
+            .await
+            .unwrap();
+        assert_eq!(count, U256::from(0));
+    }
+
+    #[tokio::test]
+    async fn gets_block_by_hash() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let num = 0;
+        let tag: BlockNumberOrTag = num.into();
+        let block = provider.get_block_by_number(tag, true).await.unwrap().unwrap();
+        let hash = block.header.hash.unwrap();
+        let block = provider.get_block_by_hash(hash, true).await.unwrap().unwrap();
+        assert_eq!(block.header.hash.unwrap(), hash);
+    }
+
+    #[tokio::test]
+    async fn gets_block_by_hash_with_raw_req() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let num = 0;
+        let tag: BlockNumberOrTag = num.into();
+        let block = provider.get_block_by_number(tag, true).await.unwrap().unwrap();
+        let hash = block.header.hash.unwrap();
+        let block: Block = provider
+            .raw_request::<(alloy_primitives::FixedBytes<32>, bool), Block>(
+                "eth_getBlockByHash",
+                (hash, true),
+            )
+            .await
+            .unwrap();
+        assert_eq!(block.header.hash.unwrap(), hash);
+    }
+
+    #[tokio::test]
+    async fn gets_block_by_number_full() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let num = 0;
+        let tag: BlockNumberOrTag = num.into();
+        let block = provider.get_block_by_number(tag, true).await.unwrap().unwrap();
+        assert_eq!(block.header.number.unwrap(), U256::from(num));
+    }
+
+    #[tokio::test]
+    async fn gets_block_by_number() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let num = 0;
+        let tag: BlockNumberOrTag = num.into();
+        let block = provider.get_block_by_number(tag, true).await.unwrap().unwrap();
+        assert_eq!(block.header.number.unwrap(), U256::from(num));
+    }
+
+    #[tokio::test]
+    async fn gets_chain_id() {
+        let anvil = Anvil::new().args(vec!["--chain-id", "13371337"]).spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let chain_id = provider.get_chain_id().await.unwrap();
+        assert_eq!(chain_id, U64::from(13371337));
+    }
+
+    #[tokio::test]
+    #[cfg(feature = "anvil")]
+    async fn gets_code_at() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        // Set the code
+        let addr = alloy_primitives::Address::with_last_byte(16);
+        provider.set_code(addr, "0xbeef").await.unwrap();
+        let _code = provider
+            .get_code_at(
+                addr,
+                crate::provider::BlockId::Number(alloy_rpc_types::BlockNumberOrTag::Latest),
+            )
+            .await
+            .unwrap();
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn gets_transaction_by_hash() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let tx = provider
+            .get_transaction_by_hash(b256!(
+                "5c03fab9114ceb98994b43892ade87ddfd9ae7e8f293935c3bd29d435dc9fd95"
+            ))
+            .await
+            .unwrap();
+        assert_eq!(
+            tx.block_hash.unwrap(),
+            b256!("b20e6f35d4b46b3c4cd72152faec7143da851a0dc281d390bdd50f58bfbdb5d3")
+        );
+        assert_eq!(tx.block_number.unwrap(), U256::from(4571819));
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn gets_logs() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let filter = Filter::new()
+            .at_block_hash(b256!(
+                "b20e6f35d4b46b3c4cd72152faec7143da851a0dc281d390bdd50f58bfbdb5d3"
+            ))
+            .event_signature(b256!(
+                "e1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c"
+            ));
+        let logs = provider.get_logs(filter).await.unwrap();
+        assert_eq!(logs.len(), 1);
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn gets_tx_receipt() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let receipt = provider
+            .get_transaction_receipt(b256!(
+                "5c03fab9114ceb98994b43892ade87ddfd9ae7e8f293935c3bd29d435dc9fd95"
+            ))
+            .await
+            .unwrap();
+        assert!(receipt.is_some());
+        let receipt = receipt.unwrap();
+        assert_eq!(
+            receipt.transaction_hash.unwrap(),
+            b256!("5c03fab9114ceb98994b43892ade87ddfd9ae7e8f293935c3bd29d435dc9fd95")
+        );
+    }
+
+    #[tokio::test]
+    async fn gets_fee_history() {
+        let anvil = Anvil::new().spawn();
+        let provider = Provider::try_from(&anvil.endpoint()).unwrap();
+        let block_number = provider.get_block_number().await.unwrap();
+        let fee_history = provider
+            .get_fee_history(
+                U256::from(utils::EIP1559_FEE_ESTIMATION_PAST_BLOCKS),
+                BlockNumberOrTag::Number(block_number),
+                &[utils::EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE],
+            )
+            .await
+            .unwrap();
+        assert_eq!(fee_history.oldest_block, U256::ZERO);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_providers/utils.rs.html b/src/alloy_providers/utils.rs.html new file mode 100644 index 000000000000..01f3e1d2ff18 --- /dev/null +++ b/src/alloy_providers/utils.rs.html @@ -0,0 +1,196 @@ +utils.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+
//! Provider-related utilities.
+
+use alloy_primitives::{I256, U256};
+
+/// The number of blocks from the past for which the fee rewards are fetched for fee estimation.
+pub const EIP1559_FEE_ESTIMATION_PAST_BLOCKS: u64 = 10;
+/// The default percentile of gas premiums that are fetched for fee estimation.
+pub const EIP1559_FEE_ESTIMATION_REWARD_PERCENTILE: f64 = 5.0;
+/// The default max priority fee per gas, used in case the base fee is within a threshold.
+pub const EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE: u64 = 3_000_000_000;
+/// The threshold for base fee below which we use the default priority fee, and beyond which we
+/// estimate an appropriate value for priority fee.
+pub const EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER: u64 = 100_000_000_000;
+/// The threshold max change/difference (in %) at which we will ignore the fee history values
+/// under it.
+pub const EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE: i64 = 200;
+
+/// An estimator function for EIP1559 fees.
+pub type EstimatorFunction = fn(U256, Vec<Vec<U256>>) -> (U256, U256);
+
+fn estimate_priority_fee(rewards: Vec<Vec<U256>>) -> U256 {
+    let mut rewards: Vec<U256> = rewards.iter().map(|r| r[0]).filter(|r| *r > U256::ZERO).collect();
+    if rewards.is_empty() {
+        return U256::ZERO;
+    }
+    if rewards.len() == 1 {
+        return rewards[0];
+    }
+    // Sort the rewards as we will eventually take the median.
+    rewards.sort();
+
+    // A copy of the same vector is created for convenience to calculate percentage change
+    // between subsequent fee values.
+    let mut rewards_copy = rewards.clone();
+    rewards_copy.rotate_left(1);
+
+    let mut percentage_change: Vec<I256> = rewards
+        .iter()
+        .zip(rewards_copy.iter())
+        .map(|(a, b)| {
+            let a = I256::try_from(*a).expect("priority fee overflow");
+            let b = I256::try_from(*b).expect("priority fee overflow");
+            ((b - a) * I256::try_from(100).expect("Unexpected overflow")) / a
+        })
+        .collect();
+    percentage_change.pop();
+
+    // Fetch the max of the percentage change, and that element's index.
+    let max_change = percentage_change.iter().max().unwrap();
+    let max_change_index = percentage_change.iter().position(|&c| c == *max_change).unwrap();
+
+    // If we encountered a big change in fees at a certain position, then consider only
+    // the values >= it.
+    let values = if *max_change
+        >= I256::from_raw(U256::from(EIP1559_FEE_ESTIMATION_THRESHOLD_MAX_CHANGE))
+        && (max_change_index >= (rewards.len() / 2))
+    {
+        rewards[max_change_index..].to_vec()
+    } else {
+        rewards
+    };
+
+    // Return the median.
+    values[values.len() / 2]
+}
+
+fn base_fee_surged(base_fee_per_gas: U256) -> U256 {
+    if base_fee_per_gas <= U256::from(40_000_000_000u64) {
+        base_fee_per_gas * U256::from(2)
+    } else if base_fee_per_gas <= U256::from(100_000_000_000u64) {
+        base_fee_per_gas * U256::from(16) / U256::from(10)
+    } else if base_fee_per_gas <= U256::from(200_000_000_000u64) {
+        base_fee_per_gas * U256::from(14) / U256::from(10)
+    } else {
+        base_fee_per_gas * U256::from(12) / U256::from(10)
+    }
+}
+
+/// The default EIP-1559 fee estimator which is based on the work by [MyCrypto](https://github.com/MyCryptoHQ/MyCrypto/blob/master/src/services/ApiService/Gas/eip1559.ts)
+pub fn eip1559_default_estimator(base_fee_per_gas: U256, rewards: Vec<Vec<U256>>) -> (U256, U256) {
+    let max_priority_fee_per_gas =
+        if base_fee_per_gas < U256::from(EIP1559_FEE_ESTIMATION_PRIORITY_FEE_TRIGGER) {
+            U256::from(EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE)
+        } else {
+            std::cmp::max(
+                estimate_priority_fee(rewards),
+                U256::from(EIP1559_FEE_ESTIMATION_DEFAULT_PRIORITY_FEE),
+            )
+        };
+    let potential_max_fee = base_fee_surged(base_fee_per_gas);
+    let max_fee_per_gas = if max_priority_fee_per_gas > potential_max_fee {
+        max_priority_fee_per_gas + potential_max_fee
+    } else {
+        potential_max_fee
+    };
+    (max_fee_per_gas, max_priority_fee_per_gas)
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/connect.rs.html b/src/alloy_pubsub/connect.rs.html new file mode 100644 index 000000000000..5a0e505fe8ef --- /dev/null +++ b/src/alloy_pubsub/connect.rs.html @@ -0,0 +1,68 @@ +connect.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
use crate::{handle::ConnectionHandle, service::PubSubService, PubSubFrontend};
+use alloy_transport::{Pbf, TransportError};
+
+/// Configuration objects that contain connection details for a backend.
+///
+/// Implementers should contain configuration options for the underlying
+/// transport.
+pub trait PubSubConnect: Sized + Send + Sync + 'static {
+    /// Returns `true` if the transport connects to a local resource.
+    fn is_local(&self) -> bool;
+
+    /// Spawn the backend, returning a handle to it.
+    ///
+    /// This function MUST create a long-lived task containing a
+    /// [`ConnectionInterface`], and return the corresponding handle.
+    ///
+    /// [`ConnectionInterface`]: crate::ConnectionInterface
+    fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError>;
+
+    /// Attempt to reconnect the transport.
+    ///
+    /// Override this to add custom reconnection logic to your connector. This
+    /// will be used by the internal pubsub connection managers in the event the
+    /// connection fails.
+    fn try_reconnect<'a: 'b, 'b>(&'a self) -> Pbf<'b, ConnectionHandle, TransportError> {
+        self.connect()
+    }
+
+    /// Convert the configuration object into a service with a running backend.
+    fn into_service(self) -> Pbf<'static, PubSubFrontend, TransportError> {
+        Box::pin(PubSubService::connect(self))
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/frontend.rs.html b/src/alloy_pubsub/frontend.rs.html new file mode 100644 index 000000000000..ae75bee871ba --- /dev/null +++ b/src/alloy_pubsub/frontend.rs.html @@ -0,0 +1,248 @@ +frontend.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+
use crate::{ix::PubSubInstruction, managers::InFlight};
+use alloy_json_rpc::{RequestPacket, Response, ResponsePacket, SerializedRequest};
+use alloy_primitives::U256;
+use alloy_transport::{TransportError, TransportErrorKind, TransportFut};
+use futures::future::try_join_all;
+use serde_json::value::RawValue;
+use std::{future::Future, pin::Pin};
+use tokio::sync::{broadcast, mpsc, oneshot};
+
+/// A `PubSubFrontend` is [`Transport`] composed of a channel to a running
+/// PubSub service.
+///
+/// [`Transport`]: alloy_transport::Transport
+#[derive(Debug, Clone)]
+pub struct PubSubFrontend {
+    tx: mpsc::UnboundedSender<PubSubInstruction>,
+}
+
+impl PubSubFrontend {
+    /// Create a new frontend.
+    pub(crate) const fn new(tx: mpsc::UnboundedSender<PubSubInstruction>) -> Self {
+        Self { tx }
+    }
+
+    /// Get the subscription ID for a local ID.
+    pub async fn get_subscription(
+        &self,
+        id: U256,
+    ) -> Result<broadcast::Receiver<Box<RawValue>>, TransportError> {
+        let (tx, rx) = oneshot::channel();
+        self.tx
+            .send(PubSubInstruction::GetSub(id, tx))
+            .map_err(|_| TransportErrorKind::backend_gone())?;
+        rx.await.map_err(|_| TransportErrorKind::backend_gone())
+    }
+
+    /// Unsubscribe from a subscription.
+    pub async fn unsubscribe(&self, id: U256) -> Result<(), TransportError> {
+        self.tx
+            .send(PubSubInstruction::Unsubscribe(id))
+            .map_err(|_| TransportErrorKind::backend_gone())?;
+        Ok(())
+    }
+
+    /// Send a request.
+    pub fn send(
+        &self,
+        req: SerializedRequest,
+    ) -> Pin<Box<dyn Future<Output = Result<Response, TransportError>> + Send>> {
+        let (in_flight, rx) = InFlight::new(req);
+        let ix = PubSubInstruction::Request(in_flight);
+        let tx = self.tx.clone();
+
+        Box::pin(async move {
+            tx.send(ix).map_err(|_| TransportErrorKind::backend_gone())?;
+            rx.await.map_err(|_| TransportErrorKind::backend_gone())?
+        })
+    }
+
+    /// Send a packet of requests, by breaking it up into individual requests.
+    ///
+    /// Once all responses are received, we return a single response packet.
+    /// This is a bit annoying
+    pub fn send_packet(
+        &self,
+        req: RequestPacket,
+    ) -> Pin<Box<dyn Future<Output = Result<ResponsePacket, TransportError>> + Send>> {
+        match req {
+            RequestPacket::Single(req) => {
+                let fut = self.send(req);
+                Box::pin(async move { Ok(ResponsePacket::Single(fut.await?)) })
+            }
+            RequestPacket::Batch(reqs) => {
+                let futs = try_join_all(reqs.into_iter().map(|req| self.send(req)));
+                Box::pin(async move { Ok(futs.await?.into()) })
+            }
+        }
+    }
+}
+
+impl tower::Service<RequestPacket> for PubSubFrontend {
+    type Response = ResponsePacket;
+    type Error = TransportError;
+    type Future = TransportFut<'static>;
+
+    #[inline]
+    fn poll_ready(
+        &mut self,
+        _cx: &mut std::task::Context<'_>,
+    ) -> std::task::Poll<Result<(), Self::Error>> {
+        if self.tx.is_closed() {
+            return std::task::Poll::Ready(Err(TransportErrorKind::backend_gone()));
+        }
+        std::task::Poll::Ready(Ok(()))
+    }
+
+    #[inline]
+    fn call(&mut self, req: RequestPacket) -> Self::Future {
+        self.send_packet(req)
+    }
+}
+
+impl tower::Service<RequestPacket> for &PubSubFrontend {
+    type Response = ResponsePacket;
+    type Error = TransportError;
+    type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
+
+    #[inline]
+    fn poll_ready(
+        &mut self,
+        _cx: &mut std::task::Context<'_>,
+    ) -> std::task::Poll<Result<(), Self::Error>> {
+        if self.tx.is_closed() {
+            return std::task::Poll::Ready(Err(TransportErrorKind::backend_gone()));
+        }
+        std::task::Poll::Ready(Ok(()))
+    }
+
+    #[inline]
+    fn call(&mut self, req: RequestPacket) -> Self::Future {
+        self.send_packet(req)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/handle.rs.html b/src/alloy_pubsub/handle.rs.html new file mode 100644 index 000000000000..24ee1dd97120 --- /dev/null +++ b/src/alloy_pubsub/handle.rs.html @@ -0,0 +1,198 @@ +handle.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+
use alloy_json_rpc::PubSubItem;
+use serde_json::value::RawValue;
+use tokio::sync::{
+    mpsc,
+    oneshot::{self, error::TryRecvError},
+};
+
+#[derive(Debug)]
+/// A handle to a backend. Communicates to a `ConnectionInterface` on the
+/// backend.
+///
+/// The backend SHOULD shut down when the handle is dropped (as indicated by
+/// the shutdown channel).
+pub struct ConnectionHandle {
+    /// Outbound channel to server.
+    pub(crate) to_socket: mpsc::UnboundedSender<Box<RawValue>>,
+
+    /// Inbound channel from remote server via WS.
+    pub(crate) from_socket: mpsc::UnboundedReceiver<PubSubItem>,
+
+    /// Notification from the backend of a terminal error.
+    pub(crate) error: oneshot::Receiver<()>,
+
+    /// Notify the backend of intentional shutdown.
+    pub(crate) shutdown: oneshot::Sender<()>,
+}
+
+impl ConnectionHandle {
+    /// Create a new connection handle.
+    pub fn new() -> (Self, ConnectionInterface) {
+        let (to_socket, from_frontend) = mpsc::unbounded_channel();
+        let (to_frontend, from_socket) = mpsc::unbounded_channel();
+        let (error_tx, error_rx) = oneshot::channel();
+        let (shutdown_tx, shutdown_rx) = oneshot::channel();
+
+        let handle = Self { to_socket, from_socket, error: error_rx, shutdown: shutdown_tx };
+        let interface = ConnectionInterface {
+            from_frontend,
+            to_frontend,
+            error: error_tx,
+            shutdown: shutdown_rx,
+        };
+        (handle, interface)
+    }
+
+    /// Shutdown the backend.
+    pub fn shutdown(self) {
+        let _ = self.shutdown.send(());
+    }
+}
+
+/// The reciprocal of [`ConnectionHandle`].
+#[derive(Debug)]
+pub struct ConnectionInterface {
+    /// Inbound channel from frontend.
+    pub(crate) from_frontend: mpsc::UnboundedReceiver<Box<RawValue>>,
+
+    /// Channel of responses to the frontend
+    pub(crate) to_frontend: mpsc::UnboundedSender<PubSubItem>,
+
+    /// Notifies the frontend of a terminal error.
+    pub(crate) error: oneshot::Sender<()>,
+
+    /// Causes local shutdown when sender is triggered or dropped.
+    pub(crate) shutdown: oneshot::Receiver<()>,
+}
+
+impl ConnectionInterface {
+    /// Send a pubsub item to the frontend.
+    pub fn send_to_frontend(
+        &self,
+        item: PubSubItem,
+    ) -> Result<(), mpsc::error::SendError<PubSubItem>> {
+        self.to_frontend.send(item)
+    }
+
+    /// Receive a request from the frontend. Ensures that if the frontend has
+    /// dropped or issued a shutdown instruction, the backend sees no more
+    /// requests.
+    pub async fn recv_from_frontend(&mut self) -> Option<Box<RawValue>> {
+        match self.shutdown.try_recv() {
+            Ok(_) => return None,
+            Err(TryRecvError::Closed) => return None,
+            Err(TryRecvError::Empty) => {}
+        }
+
+        if self.shutdown.try_recv().is_ok() {
+            return None;
+        }
+
+        self.from_frontend.recv().await
+    }
+
+    /// Close the interface, sending an error to the frontend.
+    pub fn close_with_error(self) {
+        let _ = self.error.send(());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/ix.rs.html b/src/alloy_pubsub/ix.rs.html new file mode 100644 index 000000000000..55da643fc689 --- /dev/null +++ b/src/alloy_pubsub/ix.rs.html @@ -0,0 +1,52 @@ +ix.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
use crate::managers::InFlight;
+use alloy_primitives::U256;
+use serde_json::value::RawValue;
+use std::fmt;
+use tokio::sync::{broadcast, oneshot};
+
+/// Instructions for the pubsub service.
+pub(crate) enum PubSubInstruction {
+    /// Send a request.
+    Request(InFlight),
+    /// Get the subscription ID for a local ID.
+    GetSub(U256, oneshot::Sender<broadcast::Receiver<Box<RawValue>>>),
+    /// Unsubscribe from a subscription.
+    Unsubscribe(U256),
+}
+
+impl fmt::Debug for PubSubInstruction {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            Self::Request(arg0) => f.debug_tuple("Request").field(arg0).finish(),
+            Self::GetSub(arg0, _) => f.debug_tuple("GetSub").field(arg0).finish(),
+            Self::Unsubscribe(arg0) => f.debug_tuple("Unsubscribe").field(arg0).finish(),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/lib.rs.html b/src/alloy_pubsub/lib.rs.html new file mode 100644 index 000000000000..76620404266c --- /dev/null +++ b/src/alloy_pubsub/lib.rs.html @@ -0,0 +1,64 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+mod connect;
+pub use connect::PubSubConnect;
+
+mod frontend;
+pub use frontend::PubSubFrontend;
+
+mod ix;
+
+mod handle;
+pub use handle::{ConnectionHandle, ConnectionInterface};
+
+mod managers;
+
+mod service;
+
\ No newline at end of file diff --git a/src/alloy_pubsub/managers/active_sub.rs.html b/src/alloy_pubsub/managers/active_sub.rs.html new file mode 100644 index 000000000000..fa2464b03ba3 --- /dev/null +++ b/src/alloy_pubsub/managers/active_sub.rs.html @@ -0,0 +1,158 @@ +active_sub.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
use alloy_json_rpc::SerializedRequest;
+use alloy_primitives::B256;
+use serde_json::value::RawValue;
+use std::{fmt, hash::Hash};
+use tokio::sync::broadcast;
+
+#[derive(Clone)]
+/// An active subscription.
+pub(crate) struct ActiveSubscription {
+    /// Cached hash of the request, used for sorting and equality.
+    pub(crate) local_id: B256,
+    /// The serialized subscription request.
+    pub(crate) request: SerializedRequest,
+    /// The channel via which notifications are broadcast.
+    pub(crate) tx: broadcast::Sender<Box<RawValue>>,
+}
+
+// NB: We implement this to prevent any incorrect future implementations.
+// See: https://doc.rust-lang.org/std/hash/trait.Hash.html#hash-and-eq
+impl Hash for ActiveSubscription {
+    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+        self.local_id.hash(state);
+    }
+}
+
+impl PartialEq for ActiveSubscription {
+    fn eq(&self, other: &Self) -> bool {
+        self.local_id == other.local_id
+    }
+}
+
+impl Eq for ActiveSubscription {}
+
+impl PartialOrd for ActiveSubscription {
+    fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
+        Some(self.cmp(other))
+    }
+}
+
+impl Ord for ActiveSubscription {
+    fn cmp(&self, other: &Self) -> std::cmp::Ordering {
+        self.local_id.cmp(&other.local_id)
+    }
+}
+
+impl fmt::Debug for ActiveSubscription {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("ActiveSubscription")
+            .field("local_id", &self.local_id)
+            .field("request", &self.request)
+            .field("subscribers", &self.tx.receiver_count())
+            .finish()
+    }
+}
+
+impl ActiveSubscription {
+    /// Create a new active subscription.
+    pub(crate) fn new(request: SerializedRequest) -> (Self, broadcast::Receiver<Box<RawValue>>) {
+        let local_id = request.params_hash();
+        let (tx, rx) = broadcast::channel(16);
+        (Self { request, local_id, tx }, rx)
+    }
+
+    /// Serialize the request as a boxed [`RawValue`].
+    ///
+    /// This is used to (re-)send the request over the transport.
+    pub(crate) const fn request(&self) -> &SerializedRequest {
+        &self.request
+    }
+
+    /// Notify the subscription channel of a new value, if any receiver exists.
+    /// If no receiver exists, the notification is dropped.
+    pub(crate) fn notify(&mut self, notification: Box<RawValue>) {
+        if self.tx.receiver_count() > 0 {
+            let _ = self.tx.send(notification);
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/managers/in_flight.rs.html b/src/alloy_pubsub/managers/in_flight.rs.html new file mode 100644 index 000000000000..16dccbca1c2e --- /dev/null +++ b/src/alloy_pubsub/managers/in_flight.rs.html @@ -0,0 +1,142 @@ +in_flight.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+
use alloy_json_rpc::{Response, ResponsePayload, SerializedRequest};
+use alloy_primitives::U256;
+use alloy_transport::TransportError;
+use std::fmt;
+use tokio::sync::oneshot;
+
+/// An in-flight JSON-RPC request.
+///
+/// This struct contains the request that was sent, as well as a channel to
+/// receive the response on.
+pub(crate) struct InFlight {
+    /// The request
+    pub(crate) request: SerializedRequest,
+
+    /// The channel to send the response on.
+    pub(crate) tx: oneshot::Sender<Result<Response, TransportError>>,
+}
+
+impl fmt::Debug for InFlight {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("InFlight")
+            .field("request", &self.request)
+            .field("tx_is_closed", &self.tx.is_closed())
+            .finish()
+    }
+}
+
+impl InFlight {
+    /// Create a new in-flight request.
+    pub(crate) fn new(
+        request: SerializedRequest,
+    ) -> (Self, oneshot::Receiver<Result<Response, TransportError>>) {
+        let (tx, rx) = oneshot::channel();
+
+        (Self { request, tx }, rx)
+    }
+
+    /// Get the method
+    pub(crate) const fn method(&self) -> &'static str {
+        self.request.method()
+    }
+
+    /// Get a reference to the serialized request.
+    ///
+    /// This is used to (re-)send the request over the transport.
+    pub(crate) const fn request(&self) -> &SerializedRequest {
+        &self.request
+    }
+
+    /// Fulfill the request with a response. This consumes the in-flight
+    /// request. If the request is a subscription and the response is not an
+    /// error, the subscription ID and the in-flight request are returned.
+    pub(crate) fn fulfill(self, resp: Response) -> Option<(U256, Self)> {
+        if self.method() == "eth_subscribe" {
+            if let ResponsePayload::Success(val) = resp.payload {
+                let sub_id: serde_json::Result<U256> = serde_json::from_str(val.get());
+                match sub_id {
+                    Ok(alias) => return Some((alias, self)),
+                    Err(e) => {
+                        let _ = self.tx.send(Err(TransportError::deser_err(e, val.get())));
+                        return None;
+                    }
+                }
+            }
+        }
+
+        let _ = self.tx.send(Ok(resp));
+        None
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/managers/mod.rs.html b/src/alloy_pubsub/managers/mod.rs.html new file mode 100644 index 000000000000..7db7a4c4ebe2 --- /dev/null +++ b/src/alloy_pubsub/managers/mod.rs.html @@ -0,0 +1,24 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+
mod active_sub;
+pub(crate) use active_sub::ActiveSubscription;
+
+mod in_flight;
+pub(crate) use in_flight::InFlight;
+
+mod req;
+pub(crate) use req::RequestManager;
+
+mod sub;
+pub(crate) use sub::SubscriptionManager;
+
\ No newline at end of file diff --git a/src/alloy_pubsub/managers/req.rs.html b/src/alloy_pubsub/managers/req.rs.html new file mode 100644 index 000000000000..a08d09285d88 --- /dev/null +++ b/src/alloy_pubsub/managers/req.rs.html @@ -0,0 +1,80 @@ +req.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+
use crate::managers::InFlight;
+use alloy_json_rpc::{Id, Response};
+use alloy_primitives::U256;
+use std::collections::BTreeMap;
+
+/// Manages in-flight requests.
+#[derive(Debug, Default)]
+pub(crate) struct RequestManager {
+    reqs: BTreeMap<Id, InFlight>,
+}
+
+impl RequestManager {
+    /// Get the number of in-flight requests.
+    pub(crate) fn len(&self) -> usize {
+        self.reqs.len()
+    }
+
+    /// Get an iterator over the in-flight requests.
+    pub(crate) fn iter(&self) -> impl Iterator<Item = (&Id, &InFlight)> {
+        self.reqs.iter()
+    }
+
+    /// Insert a new in-flight request.
+    pub(crate) fn insert(&mut self, in_flight: InFlight) {
+        self.reqs.insert(in_flight.request.id().clone(), in_flight);
+    }
+
+    /// Handle a response by sending the payload to the waiter.
+    ///
+    /// If the request created a new subscription, this function returns the
+    /// subscription ID and the in-flight request for conversion to an
+    /// `ActiveSubscription`.
+    pub(crate) fn handle_response(&mut self, resp: Response) -> Option<(U256, InFlight)> {
+        if let Some(in_flight) = self.reqs.remove(&resp.id) {
+            return in_flight.fulfill(resp);
+        }
+        None
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/managers/sub.rs.html b/src/alloy_pubsub/managers/sub.rs.html new file mode 100644 index 000000000000..a1e9b5201fb5 --- /dev/null +++ b/src/alloy_pubsub/managers/sub.rs.html @@ -0,0 +1,194 @@ +sub.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+
use crate::managers::ActiveSubscription;
+use alloy_json_rpc::{EthNotification, SerializedRequest};
+use alloy_primitives::{B256, U256};
+use bimap::BiBTreeMap;
+use serde_json::value::RawValue;
+use tokio::sync::broadcast;
+
+#[derive(Default, Debug)]
+pub(crate) struct SubscriptionManager {
+    /// The subscriptions.
+    local_to_sub: BiBTreeMap<B256, ActiveSubscription>,
+    /// Tracks the CURRENT server id for a subscription.
+    local_to_server: BiBTreeMap<B256, U256>,
+}
+
+impl SubscriptionManager {
+    /// Get an iterator over the subscriptions.
+    pub(crate) fn iter(&self) -> impl Iterator<Item = (&B256, &ActiveSubscription)> {
+        self.local_to_sub.iter()
+    }
+
+    /// Get the number of subscriptions.
+    pub(crate) fn len(&self) -> usize {
+        self.local_to_sub.len()
+    }
+
+    /// Insert a subscription.
+    fn insert(
+        &mut self,
+        request: SerializedRequest,
+        server_id: U256,
+    ) -> broadcast::Receiver<Box<RawValue>> {
+        let (sub, rx) = ActiveSubscription::new(request);
+        self.local_to_server.insert(sub.local_id, server_id);
+        self.local_to_sub.insert(sub.local_id, sub);
+
+        rx
+    }
+
+    /// Insert or update the server_id for a subscription.
+    pub(crate) fn upsert(
+        &mut self,
+        request: SerializedRequest,
+        server_id: U256,
+    ) -> broadcast::Receiver<Box<RawValue>> {
+        let local_id = request.params_hash();
+
+        // If we already know a subscription with the exact params,
+        // we can just update the server_id and get a new listener.
+        if self.local_to_server.contains_left(&local_id) {
+            self.change_server_id(local_id, server_id);
+            self.get_rx(local_id).expect("checked existence")
+        } else {
+            self.insert(request, server_id)
+        }
+    }
+
+    /// De-alias an alias, getting the original ID.
+    pub(crate) fn local_id_for(&self, server_id: U256) -> Option<B256> {
+        self.local_to_server.get_by_right(&server_id).copied()
+    }
+
+    /// Drop all server_ids.
+    pub(crate) fn drop_server_ids(&mut self) {
+        self.local_to_server.clear();
+    }
+
+    /// Change the server_id of a subscription.
+    fn change_server_id(&mut self, local_id: B256, server_id: U256) {
+        self.local_to_server.insert(local_id, server_id);
+    }
+
+    /// Remove a subscription by its local_id.
+    pub(crate) fn remove_sub(&mut self, local_id: B256) {
+        let _ = self.local_to_sub.remove_by_left(&local_id);
+        let _ = self.local_to_server.remove_by_left(&local_id);
+    }
+
+    /// Notify the subscription channel of a new value, if the sub is known,
+    /// and if any receiver exists. If the sub id is unknown, or no receiver
+    /// exists, the notification is dropped.
+    pub(crate) fn notify(&mut self, notification: EthNotification) {
+        if let Some(local_id) = self.local_id_for(notification.subscription) {
+            if let Some((_, mut sub)) = self.local_to_sub.remove_by_left(&local_id) {
+                sub.notify(notification.result);
+                self.local_to_sub.insert(local_id, sub);
+            }
+        }
+    }
+
+    /// Get a receiver for a subscription.
+    pub(crate) fn get_rx(&self, local_id: B256) -> Option<broadcast::Receiver<Box<RawValue>>> {
+        let sub = self.local_to_sub.get_by_left(&local_id)?;
+        Some(sub.tx.subscribe())
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_pubsub/service.rs.html b/src/alloy_pubsub/service.rs.html new file mode 100644 index 000000000000..9e7510e8f669 --- /dev/null +++ b/src/alloy_pubsub/service.rs.html @@ -0,0 +1,490 @@ +service.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+
use crate::{
+    handle::ConnectionHandle,
+    ix::PubSubInstruction,
+    managers::{InFlight, RequestManager, SubscriptionManager},
+    PubSubConnect, PubSubFrontend,
+};
+
+use alloy_json_rpc::{Id, PubSubItem, Request, RequestMeta, Response, ResponsePayload};
+use alloy_primitives::U256;
+use alloy_transport::{
+    utils::{to_json_raw_value, Spawnable},
+    TransportError, TransportErrorKind, TransportResult,
+};
+use serde_json::value::RawValue;
+use tokio::sync::{broadcast, mpsc, oneshot};
+
+#[derive(Debug)]
+/// The service contains the backend handle, a subscription manager, and the
+/// configuration details required to reconnect.
+pub(crate) struct PubSubService<T> {
+    /// The backend handle.
+    pub(crate) handle: ConnectionHandle,
+
+    /// The configuration details required to reconnect.
+    pub(crate) connector: T,
+
+    /// The inbound requests.
+    pub(crate) reqs: mpsc::UnboundedReceiver<PubSubInstruction>,
+
+    /// The subscription manager.
+    pub(crate) subs: SubscriptionManager,
+
+    /// The request manager.
+    pub(crate) in_flights: RequestManager,
+}
+
+impl<T> PubSubService<T>
+where
+    T: PubSubConnect,
+{
+    /// Create a new service from a connector.
+    pub(crate) async fn connect(connector: T) -> Result<PubSubFrontend, TransportError> {
+        let handle = connector.connect().await?;
+
+        let (tx, reqs) = mpsc::unbounded_channel();
+        let this = Self {
+            handle,
+            connector,
+            reqs,
+            subs: Default::default(),
+            in_flights: Default::default(),
+        };
+        this.spawn();
+        Ok(PubSubFrontend::new(tx))
+    }
+
+    /// Reconnect by dropping the backend and creating a new one.
+    async fn get_new_backend(&mut self) -> Result<ConnectionHandle, TransportError> {
+        let mut handle = self.connector.try_reconnect().await?;
+        std::mem::swap(&mut self.handle, &mut handle);
+        Ok(handle)
+    }
+
+    /// Reconnect the backend, re-issue pending requests, and re-start active
+    /// subscriptions.
+    async fn reconnect(&mut self) -> TransportResult<()> {
+        tracing::info!("Reconnecting pubsub service backend.");
+
+        let mut old_handle = self.get_new_backend().await?;
+
+        tracing::debug!("Draining old backend to_handle");
+
+        // Drain the old backend
+        while let Ok(item) = old_handle.from_socket.try_recv() {
+            self.handle_item(item)?;
+        }
+
+        old_handle.shutdown();
+
+        // Re-issue pending requests.
+        tracing::debug!(count = self.in_flights.len(), "Reissuing pending requests");
+        self.in_flights
+            .iter()
+            .map(|(_, in_flight)| in_flight.request().serialized().to_owned())
+            .collect::<Vec<_>>()
+            .into_iter()
+            .try_for_each(|brv| self.dispatch_request(brv))?;
+
+        // Re-subscribe to all active subscriptions
+        tracing::debug!(count = self.subs.len(), "Re-starting active subscriptions");
+
+        // Drop all server IDs. We'll re-insert them as we get responses.
+        self.subs.drop_server_ids();
+        // Dispatch all subscription requests
+        self.subs
+            .iter()
+            .map(|(_, sub)| sub.request().serialized().to_owned())
+            .collect::<Vec<_>>()
+            .into_iter()
+            .try_for_each(|brv| self.dispatch_request(brv))?;
+
+        Ok(())
+    }
+
+    /// Dispatch a request to the socket.
+    fn dispatch_request(&mut self, brv: Box<RawValue>) -> TransportResult<()> {
+        self.handle.to_socket.send(brv).map(drop).map_err(|_| TransportErrorKind::backend_gone())
+    }
+
+    /// Service a request.
+    fn service_request(&mut self, in_flight: InFlight) -> TransportResult<()> {
+        let brv = in_flight.request();
+
+        self.dispatch_request(brv.serialized().to_owned())?;
+        self.in_flights.insert(in_flight);
+
+        Ok(())
+    }
+
+    /// Service a GetSub instruction.
+    ///
+    /// If the subscription exists, the waiter is sent a broadcast receiver. If
+    /// the subscription does not exist, the waiter is sent nothing, and the
+    /// `tx` is dropped. This notifies the waiter that the subscription does
+    /// not exist.
+    fn service_get_sub(
+        &mut self,
+        local_id: U256,
+        tx: oneshot::Sender<broadcast::Receiver<Box<RawValue>>>,
+    ) -> TransportResult<()> {
+        let local_id = local_id.into();
+
+        if let Some(rx) = self.subs.get_rx(local_id) {
+            let _ = tx.send(rx);
+        }
+
+        Ok(())
+    }
+
+    /// Service an unsubscribe instruction.
+    fn service_unsubscribe(&mut self, local_id: U256) -> TransportResult<()> {
+        let local_id = local_id.into();
+        let req = Request {
+            meta: RequestMeta { id: Id::None, method: "eth_unsubscribe" },
+            params: [local_id],
+        };
+        let brv = req.serialize().expect("no ser error").take_request();
+
+        self.dispatch_request(brv)?;
+        self.subs.remove_sub(local_id);
+        Ok(())
+    }
+
+    /// Service an instruction
+    fn service_ix(&mut self, ix: PubSubInstruction) -> TransportResult<()> {
+        tracing::trace!(?ix, "servicing instruction");
+        match ix {
+            PubSubInstruction::Request(in_flight) => self.service_request(in_flight),
+            PubSubInstruction::GetSub(alias, tx) => self.service_get_sub(alias, tx),
+            PubSubInstruction::Unsubscribe(alias) => self.service_unsubscribe(alias),
+        }
+    }
+
+    /// Handle an item from the backend.
+    fn handle_item(&mut self, item: PubSubItem) -> TransportResult<()> {
+        match item {
+            PubSubItem::Response(resp) => match self.in_flights.handle_response(resp) {
+                Some((server_id, in_flight)) => self.handle_sub_response(in_flight, server_id),
+                None => Ok(()),
+            },
+            PubSubItem::Notification(notification) => {
+                self.subs.notify(notification);
+                Ok(())
+            }
+        }
+    }
+
+    /// Rewrite the subscription id and insert into the subscriptions manager
+    fn handle_sub_response(&mut self, in_flight: InFlight, server_id: U256) -> TransportResult<()> {
+        let request = in_flight.request;
+        let id = request.id().clone();
+
+        self.subs.upsert(request, server_id);
+
+        // lie to the client about the sub id.
+        let local_id = self.subs.local_id_for(server_id).unwrap();
+        // Serialized B256 is always a valid serialized U256 too.
+        let ser_alias = to_json_raw_value(&local_id)?;
+
+        // We send back a success response with the new subscription ID.
+        // We don't care if the channel is dead.
+        let _ =
+            in_flight.tx.send(Ok(Response { id, payload: ResponsePayload::Success(ser_alias) }));
+
+        Ok(())
+    }
+
+    /// Spawn the service.
+    pub(crate) fn spawn(mut self) {
+        let fut = async move {
+            let result: TransportResult<()> = loop {
+                // We bias the loop so that we always handle new messages before
+                // reconnecting, and always reconnect before dispatching new
+                // requests.
+                tokio::select! {
+                    biased;
+
+                    item_opt = self.handle.from_socket.recv() => {
+                        if let Some(item) = item_opt {
+                            if let Err(e) = self.handle_item(item) {
+                                break Err(e)
+                            }
+                        } else if let Err(e) = self.reconnect().await {
+                            break Err(e)
+                        }
+                    }
+
+                    _ = &mut self.handle.error => {
+                        tracing::error!("Pubsub service backend error.");
+                        if let Err(e) = self.reconnect().await {
+                            break Err(e)
+                        }
+                    }
+
+                    req_opt = self.reqs.recv() => {
+                        if let Some(req) = req_opt {
+                            if let Err(e) = self.service_ix(req) {
+                                break Err(e)
+                            }
+                        } else {
+                            tracing::info!("Pubsub service request channel closed. Shutting down.");
+                           break Ok(())
+                        }
+                    }
+                }
+            };
+
+            if let Err(err) = result {
+                tracing::error!(%err, "pubsub service reconnection error");
+            }
+        };
+        fut.spawn_task();
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_client/batch.rs.html b/src/alloy_rpc_client/batch.rs.html new file mode 100644 index 000000000000..944443e41ddf --- /dev/null +++ b/src/alloy_rpc_client/batch.rs.html @@ -0,0 +1,534 @@ +batch.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+
use crate::RpcClient;
+
+use alloy_json_rpc::{
+    transform_response, try_deserialize_ok, Id, Request, RequestPacket, ResponsePacket, RpcParam,
+    RpcReturn, SerializedRequest,
+};
+use alloy_transport::{Transport, TransportError, TransportErrorKind, TransportResult};
+use futures::channel::oneshot;
+use serde_json::value::RawValue;
+use std::{
+    borrow::Cow,
+    collections::HashMap,
+    future::{Future, IntoFuture},
+    marker::PhantomData,
+    pin::Pin,
+    task::{self, ready, Poll},
+};
+
+pub(crate) type Channel = oneshot::Sender<TransportResult<Box<RawValue>>>;
+pub(crate) type ChannelMap = HashMap<Id, Channel>;
+
+/// A batch JSON-RPC request, used to bundle requests into a single transport
+/// call.
+#[derive(Debug)]
+#[must_use = "A BatchRequest does nothing unless sent via `send_batch` and `.await`"]
+pub struct BatchRequest<'a, T> {
+    /// The transport via which the batch will be sent.
+    transport: &'a RpcClient<T>,
+
+    /// The requests to be sent.
+    requests: RequestPacket,
+
+    /// The channels to send the responses through.
+    channels: ChannelMap,
+}
+
+/// Awaits a single response for a request that has been included in a batch.
+#[must_use = "A Waiter does nothing unless the corresponding BatchRequest is sent via `send_batch` and `.await`, AND the Waiter is awaited."]
+#[derive(Debug)]
+pub struct Waiter<Resp> {
+    rx: oneshot::Receiver<TransportResult<Box<RawValue>>>,
+    _resp: PhantomData<fn() -> Resp>,
+}
+
+impl<Resp> From<oneshot::Receiver<TransportResult<Box<RawValue>>>> for Waiter<Resp> {
+    fn from(rx: oneshot::Receiver<TransportResult<Box<RawValue>>>) -> Self {
+        Self { rx, _resp: PhantomData }
+    }
+}
+
+impl<Resp> std::future::Future for Waiter<Resp>
+where
+    Resp: RpcReturn,
+{
+    type Output = TransportResult<Resp>;
+
+    fn poll(mut self: std::pin::Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
+        let resp = ready!(Pin::new(&mut self.rx).poll(cx));
+
+        Poll::Ready(match resp {
+            Ok(resp) => try_deserialize_ok(resp),
+
+            Err(e) => Err(TransportErrorKind::custom(e)),
+        })
+    }
+}
+
+#[pin_project::pin_project(project = CallStateProj)]
+#[derive(Debug)]
+pub enum BatchFuture<Conn>
+where
+    Conn: Transport,
+{
+    Prepared {
+        transport: Conn,
+        requests: RequestPacket,
+        channels: ChannelMap,
+    },
+    SerError(Option<TransportError>),
+    AwaitingResponse {
+        channels: ChannelMap,
+        #[pin]
+        fut: Conn::Future,
+    },
+    Complete,
+}
+
+impl<'a, T> BatchRequest<'a, T> {
+    /// Create a new batch request.
+    pub fn new(transport: &'a RpcClient<T>) -> Self {
+        Self {
+            transport,
+            requests: RequestPacket::Batch(Vec::with_capacity(10)),
+            channels: HashMap::with_capacity(10),
+        }
+    }
+
+    fn push_raw(
+        &mut self,
+        request: SerializedRequest,
+    ) -> oneshot::Receiver<TransportResult<Box<RawValue>>> {
+        let (tx, rx) = oneshot::channel();
+        self.channels.insert(request.id().clone(), tx);
+        self.requests.push(request);
+        rx
+    }
+
+    fn push<Params: RpcParam, Resp: RpcReturn>(
+        &mut self,
+        request: Request<Params>,
+    ) -> Result<Waiter<Resp>, TransportError> {
+        let ser = request.serialize().map_err(TransportError::ser_err)?;
+        Ok(self.push_raw(ser).into())
+    }
+}
+
+impl<'a, Conn> BatchRequest<'a, Conn>
+where
+    Conn: Transport + Clone,
+{
+    #[must_use = "Waiters do nothing unless polled. A Waiter will never resolve unless the batch is sent!"]
+    /// Add a call to the batch.
+    ///
+    /// ### Errors
+    ///
+    /// If the request cannot be serialized, this will return an error.
+    pub fn add_call<Params: RpcParam, Resp: RpcReturn>(
+        &mut self,
+        method: &'static str,
+        params: &Params,
+    ) -> Result<Waiter<Resp>, TransportError> {
+        let request = self.transport.make_request(method, Cow::Borrowed(params));
+        self.push(request)
+    }
+
+    /// Send the batch future via its connection.
+    pub fn send(self) -> BatchFuture<Conn> {
+        BatchFuture::Prepared {
+            transport: self.transport.transport.clone(),
+            requests: self.requests,
+            channels: self.channels,
+        }
+    }
+}
+
+impl<'a, T> IntoFuture for BatchRequest<'a, T>
+where
+    T: Transport + Clone,
+{
+    type Output = <BatchFuture<T> as Future>::Output;
+    type IntoFuture = BatchFuture<T>;
+
+    fn into_future(self) -> Self::IntoFuture {
+        self.send()
+    }
+}
+
+impl<T> BatchFuture<T>
+where
+    T: Transport + Clone,
+{
+    fn poll_prepared(
+        mut self: Pin<&mut Self>,
+        cx: &mut task::Context<'_>,
+    ) -> Poll<<Self as Future>::Output> {
+        let CallStateProj::Prepared { transport, requests, channels } = self.as_mut().project()
+        else {
+            unreachable!("Called poll_prepared in incorrect state")
+        };
+
+        if let Err(e) = task::ready!(transport.poll_ready(cx)) {
+            self.set(BatchFuture::Complete);
+            return Poll::Ready(Err(e));
+        }
+
+        // We only have mut refs, and we want ownership, so we just replace
+        // with 0-capacity collections.
+        let channels = std::mem::replace(channels, HashMap::with_capacity(0));
+        let req = std::mem::replace(requests, RequestPacket::Batch(Vec::with_capacity(0)));
+
+        let fut = transport.call(req);
+        self.set(BatchFuture::AwaitingResponse { channels, fut });
+        cx.waker().wake_by_ref();
+        Poll::Pending
+    }
+
+    fn poll_awaiting_response(
+        mut self: Pin<&mut Self>,
+        cx: &mut task::Context<'_>,
+    ) -> Poll<<Self as Future>::Output> {
+        let CallStateProj::AwaitingResponse { channels, fut } = self.as_mut().project() else {
+            unreachable!("Called poll_awaiting_response in incorrect state")
+        };
+
+        // Has the service responded yet?
+        let responses = match ready!(fut.poll(cx)) {
+            Ok(responses) => responses,
+            Err(e) => {
+                self.set(BatchFuture::Complete);
+                return Poll::Ready(Err(e));
+            }
+        };
+
+        // Send all responses via channels
+        match responses {
+            ResponsePacket::Single(single) => {
+                if let Some(tx) = channels.remove(&single.id) {
+                    let _ = tx.send(transform_response(single));
+                }
+            }
+            ResponsePacket::Batch(responses) => {
+                for response in responses.into_iter() {
+                    if let Some(tx) = channels.remove(&response.id) {
+                        let _ = tx.send(transform_response(response));
+                    }
+                }
+            }
+        }
+
+        // Any channels remaining in the map are missing responses. To avoid
+        // hanging futures, we send an error.
+        channels.drain().for_each(|(id, tx)| {
+            let _ = tx.send(Err(TransportErrorKind::missing_batch_response(id)));
+        });
+
+        self.set(BatchFuture::Complete);
+        Poll::Ready(Ok(()))
+    }
+
+    fn poll_ser_error(
+        mut self: Pin<&mut Self>,
+        _cx: &mut task::Context<'_>,
+    ) -> Poll<<Self as Future>::Output> {
+        let e = if let CallStateProj::SerError(e) = self.as_mut().project() {
+            e.take().expect("No error. This is a bug.")
+        } else {
+            unreachable!("Called poll_ser_error in incorrect state")
+        };
+
+        self.set(BatchFuture::Complete);
+        Poll::Ready(Err(e))
+    }
+}
+
+impl<T> Future for BatchFuture<T>
+where
+    T: Transport + Clone,
+{
+    type Output = Result<(), TransportError>;
+
+    fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Self::Output> {
+        if matches!(*self.as_mut(), BatchFuture::Prepared { .. }) {
+            return self.poll_prepared(cx);
+        }
+
+        if matches!(*self.as_mut(), BatchFuture::AwaitingResponse { .. }) {
+            return self.poll_awaiting_response(cx);
+        }
+
+        if matches!(*self.as_mut(), BatchFuture::SerError(_)) {
+            return self.poll_ser_error(cx);
+        }
+
+        panic!("Called poll on CallState in invalid state")
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_client/builder.rs.html b/src/alloy_rpc_client/builder.rs.html new file mode 100644 index 000000000000..8608ec5977fa --- /dev/null +++ b/src/alloy_rpc_client/builder.rs.html @@ -0,0 +1,258 @@ +builder.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+
use crate::RpcClient;
+use alloy_transport::{
+    BoxTransport, BoxTransportConnect, Transport, TransportConnect, TransportError,
+};
+use tower::{
+    layer::util::{Identity, Stack},
+    Layer, ServiceBuilder,
+};
+
+/// A builder for the transport  [`RpcClient`].
+///
+/// This is a wrapper around [`tower::ServiceBuilder`]. It allows you to
+/// configure middleware layers that will be applied to the transport, and has
+/// some shortcuts for common layers and transports.
+///
+/// A builder accumulates Layers, and then is finished via the
+/// [`ClientBuilder::connect`] method, which produces an RPC client.
+#[derive(Debug)]
+pub struct ClientBuilder<L> {
+    pub(crate) builder: ServiceBuilder<L>,
+}
+
+impl Default for ClientBuilder<Identity> {
+    fn default() -> Self {
+        Self { builder: ServiceBuilder::new() }
+    }
+}
+
+impl<L> ClientBuilder<L> {
+    /// Add a middleware layer to the stack.
+    ///
+    /// This is a wrapper around [`tower::ServiceBuilder::layer`]. Layers that
+    /// are added first will be called with the request first.
+    pub fn layer<M>(self, layer: M) -> ClientBuilder<Stack<M, L>> {
+        ClientBuilder { builder: self.builder.layer(layer) }
+    }
+
+    /// Create a new [`RpcClient`] with the given transport and the configured
+    /// layers.
+    pub fn transport<T>(self, transport: T, is_local: bool) -> RpcClient<L::Service>
+    where
+        L: Layer<T>,
+        T: Transport,
+        L::Service: Transport,
+    {
+        RpcClient::new(self.builder.service(transport), is_local)
+    }
+
+    /// Convenience function to create a new [`RpcClient`] with a [`reqwest`]
+    /// HTTP transport.
+    #[cfg(feature = "reqwest")]
+    pub fn reqwest_http(self, url: url::Url) -> RpcClient<L::Service>
+    where
+        L: Layer<alloy_transport_http::Http<reqwest::Client>>,
+        L::Service: Transport,
+    {
+        let transport = alloy_transport_http::Http::new(url);
+        let is_local = transport.guess_local();
+
+        self.transport(transport, is_local)
+    }
+
+    /// Convenience function to create a new [`RpcClient`] with a [`hyper`]
+    /// HTTP transport.
+    #[cfg(all(not(target_arch = "wasm32"), feature = "hyper"))]
+    pub fn hyper_http(self, url: url::Url) -> RpcClient<L::Service>
+    where
+        L: Layer<alloy_transport_http::Http<hyper::client::Client<hyper::client::HttpConnector>>>,
+        L::Service: Transport,
+    {
+        let transport = alloy_transport_http::Http::new(url);
+        let is_local = transport.guess_local();
+
+        self.transport(transport, is_local)
+    }
+
+    #[cfg(feature = "pubsub")]
+    /// Connect a pubsub transport, producing an [`RpcClient`] with the provided
+    /// connection.
+    pub async fn pubsub<C>(self, pubsub_connect: C) -> Result<RpcClient<L::Service>, TransportError>
+    where
+        C: alloy_pubsub::PubSubConnect,
+        L: Layer<alloy_pubsub::PubSubFrontend>,
+        L::Service: Transport,
+    {
+        let is_local = pubsub_connect.is_local();
+        let transport = pubsub_connect.into_service().await?;
+        Ok(self.transport(transport, is_local))
+    }
+
+    #[cfg(feature = "ws")]
+    /// Connect a WS transport, producing an [`RpcClient`] with the provided
+    /// connection
+    pub async fn ws(
+        self,
+        ws_connect: alloy_transport_ws::WsConnect,
+    ) -> Result<RpcClient<L::Service>, TransportError>
+    where
+        L: Layer<alloy_pubsub::PubSubFrontend>,
+        L::Service: Transport,
+    {
+        self.pubsub(ws_connect).await
+    }
+
+    /// Connect a transport, producing an [`RpcClient`] with the provided
+    /// connection.
+    pub async fn connect<C>(self, connect: C) -> Result<RpcClient<L::Service>, TransportError>
+    where
+        C: TransportConnect,
+        L: Layer<C::Transport>,
+        L::Service: Transport,
+    {
+        let transport = connect.get_transport().await?;
+        Ok(self.transport(transport, connect.is_local()))
+    }
+
+    /// Connect a transport, producing an [`RpcClient`] with a [`BoxTransport`]
+    /// connection.
+    pub async fn connect_boxed<C>(self, connect: C) -> Result<RpcClient<L::Service>, TransportError>
+    where
+        C: BoxTransportConnect,
+        L: Layer<BoxTransport>,
+        L::Service: Transport,
+    {
+        let transport = connect.get_boxed_transport().await?;
+        Ok(self.transport(transport, connect.is_local()))
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_client/call.rs.html b/src/alloy_rpc_client/call.rs.html new file mode 100644 index 000000000000..e69a019a5c0e --- /dev/null +++ b/src/alloy_rpc_client/call.rs.html @@ -0,0 +1,448 @@ +call.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+
use alloy_json_rpc::{
+    transform_response, try_deserialize_ok, Request, RequestPacket, ResponsePacket, RpcParam,
+    RpcResult, RpcReturn,
+};
+use alloy_transport::{RpcFut, Transport, TransportError, TransportResult};
+use core::panic;
+use serde_json::value::RawValue;
+use std::{
+    fmt,
+    future::Future,
+    marker::PhantomData,
+    pin::Pin,
+    task::{self, Poll::Ready},
+};
+use tower::Service;
+
+/// The states of the [`RpcCall`] future.
+#[must_use = "futures do nothing unless you `.await` or poll them"]
+#[pin_project::pin_project(project = CallStateProj)]
+enum CallState<Params, Conn>
+where
+    Params: RpcParam,
+    Conn: Transport + Clone,
+{
+    Prepared {
+        request: Option<Request<Params>>,
+        connection: Conn,
+    },
+    AwaitingResponse {
+        #[pin]
+        fut: <Conn as Service<RequestPacket>>::Future,
+    },
+    Complete,
+}
+
+impl<Params, Conn> fmt::Debug for CallState<Params, Conn>
+where
+    Params: RpcParam,
+    Conn: Transport + Clone,
+{
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.write_str(match self {
+            Self::Prepared { .. } => "Prepared",
+            Self::AwaitingResponse { .. } => "AwaitingResponse",
+            Self::Complete => "Complete",
+        })
+    }
+}
+
+impl<Params, Conn> CallState<Params, Conn>
+where
+    Conn: Transport + Clone,
+    Params: RpcParam,
+{
+    fn poll_prepared(
+        mut self: Pin<&mut Self>,
+        cx: &mut task::Context<'_>,
+    ) -> task::Poll<<Self as Future>::Output> {
+        trace!("Polling prepared");
+        let fut = {
+            let CallStateProj::Prepared { connection, request } = self.as_mut().project() else {
+                unreachable!("Called poll_prepared in incorrect state")
+            };
+
+            if let Err(e) = task::ready!(Service::<RequestPacket>::poll_ready(connection, cx)) {
+                self.set(CallState::Complete);
+                return Ready(RpcResult::Err(e));
+            }
+            let request = request.take().expect("No request. This is a bug.").serialize();
+
+            match request {
+                Ok(request) => connection.call(request.into()),
+                Err(err) => {
+                    self.set(CallState::Complete);
+                    return Ready(RpcResult::Err(TransportError::ser_err(err)));
+                }
+            }
+        };
+
+        self.set(CallState::AwaitingResponse { fut });
+        cx.waker().wake_by_ref();
+
+        task::Poll::Pending
+    }
+
+    fn poll_awaiting(
+        mut self: Pin<&mut Self>,
+        cx: &mut task::Context<'_>,
+    ) -> task::Poll<<Self as Future>::Output> {
+        trace!("Polling awaiting");
+        let CallStateProj::AwaitingResponse { fut } = self.as_mut().project() else {
+            unreachable!("Called poll_awaiting in incorrect state")
+        };
+
+        match task::ready!(fut.poll(cx)) {
+            Ok(ResponsePacket::Single(res)) => Ready(transform_response(res)),
+            Err(e) => Ready(RpcResult::Err(e)),
+            _ => panic!("received batch response from single request"),
+        }
+    }
+}
+
+impl<Params, Conn> Future for CallState<Params, Conn>
+where
+    Conn: Transport + Clone,
+    Params: RpcParam,
+{
+    type Output = TransportResult<Box<RawValue>>;
+
+    #[instrument(skip(self, cx))]
+    fn poll(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> task::Poll<Self::Output> {
+        if matches!(*self.as_mut(), CallState::Prepared { .. }) {
+            return self.poll_prepared(cx);
+        }
+
+        if matches!(*self.as_mut(), CallState::AwaitingResponse { .. }) {
+            return self.poll_awaiting(cx);
+        }
+
+        panic!("Polled in bad state");
+    }
+}
+
+/// A prepared, but unsent, RPC call.
+///
+/// This is a future that will send the request when polled. It contains a
+/// [`Request`], a [`Transport`], and knowledge of its expected response
+/// type. Upon awaiting, it will send the request and wait for the response. It
+/// will then deserialize the response into the expected type.
+///
+/// Errors are captured in the [`RpcResult`] type. Rpc Calls will result in
+/// either a successful response of the `Resp` type, an error response, or a
+/// transport error.
+///
+/// ### Note:
+///
+/// Serializing the request is done lazily. The request is not serialized until
+/// the future is polled. This differs from the behavior of
+/// [`crate::BatchRequest`], which serializes greedily. This is because the
+/// batch request must immediately erase the `Param` type to allow batching of
+/// requests with different `Param` types, while the `RpcCall` may do so lazily.
+#[must_use = "futures do nothing unless you `.await` or poll them"]
+#[pin_project::pin_project]
+#[derive(Debug)]
+pub struct RpcCall<Conn, Params, Resp>
+where
+    Conn: Transport + Clone,
+    Params: RpcParam,
+{
+    #[pin]
+    state: CallState<Params, Conn>,
+    _pd: PhantomData<fn() -> Resp>,
+}
+
+impl<Conn, Params, Resp> RpcCall<Conn, Params, Resp>
+where
+    Conn: Transport + Clone,
+    Params: RpcParam,
+{
+    #[doc(hidden)]
+    pub fn new(req: Request<Params>, connection: Conn) -> Self {
+        Self { state: CallState::Prepared { request: Some(req), connection }, _pd: PhantomData }
+    }
+
+    /// Get a mutable reference to the params of the request.
+    ///
+    /// This is useful for modifying the params after the request has been
+    /// prepared.
+    pub fn params(&mut self) -> &mut Params {
+        if let CallState::Prepared { request, .. } = &mut self.state {
+            &mut request.as_mut().expect("No params in prepared. This is a bug").params
+        } else {
+            panic!("Cannot get params after request has been sent");
+        }
+    }
+}
+
+impl<Conn, Params, Resp> RpcCall<Conn, &Params, Resp>
+where
+    Conn: Transport + Clone,
+    Params: RpcParam + Clone,
+{
+    /// Convert this call into one with owned params, by cloning the params.
+    pub fn into_owned_params(self) -> RpcCall<Conn, Params, Resp> {
+        if let CallState::Prepared { request, connection } = self.state {
+            let request =
+                request.expect("No params in prepared. This is a bug").into_owned_params();
+            RpcCall::new(request, connection)
+        } else {
+            panic!("Cannot get params after request has been sent");
+        }
+    }
+}
+
+impl<'a, Conn, Params, Resp> RpcCall<Conn, Params, Resp>
+where
+    Conn: Transport + Clone,
+    Params: RpcParam + 'a,
+    Resp: RpcReturn,
+{
+    /// Convert this future into a boxed, pinned future, erasing its type.
+    pub fn boxed(self) -> RpcFut<'a, Resp> {
+        Box::pin(self)
+    }
+}
+
+impl<Conn, Params, Resp> Future for RpcCall<Conn, Params, Resp>
+where
+    Conn: Transport + Clone,
+    Params: RpcParam,
+    Resp: RpcReturn,
+{
+    type Output = TransportResult<Resp>;
+
+    fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> task::Poll<Self::Output> {
+        tracing::trace!(?self.state, "Polling RpcCall");
+        let this = self.project();
+
+        let result = task::ready!(this.state.poll(cx));
+
+        Ready(try_deserialize_ok(result))
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_client/client.rs.html b/src/alloy_rpc_client/client.rs.html new file mode 100644 index 000000000000..81748956e090 --- /dev/null +++ b/src/alloy_rpc_client/client.rs.html @@ -0,0 +1,330 @@ +client.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+
use crate::{BatchRequest, ClientBuilder, RpcCall};
+use alloy_json_rpc::{Id, Request, RequestMeta, RpcParam, RpcReturn};
+use alloy_transport::{BoxTransport, Transport, TransportConnect, TransportError};
+use alloy_transport_http::Http;
+use std::sync::atomic::{AtomicU64, Ordering};
+use tower::{layer::util::Identity, ServiceBuilder};
+
+/// A JSON-RPC client.
+///
+/// This struct manages a [`Transport`] and a request ID counter. It is used to
+/// build [`RpcCall`] and [`BatchRequest`] objects. The client delegates
+/// transport access to the calls.
+///
+/// ### Note
+///
+/// IDs are allocated sequentially, starting at 0. IDs are reserved via
+/// [`RpcClient::next_id`]. Note that allocated IDs may not be used. There is
+/// no guarantee that a prepared [`RpcCall`] will be sent, or that a sent call
+/// will receive a response.
+#[derive(Debug)]
+pub struct RpcClient<T> {
+    /// The underlying transport.
+    pub(crate) transport: T,
+    /// `true` if the transport is local.
+    pub(crate) is_local: bool,
+    /// The next request ID to use.
+    pub(crate) id: AtomicU64,
+}
+
+impl RpcClient<Identity> {
+    /// Create a new [`ClientBuilder`].
+    pub fn builder() -> ClientBuilder<Identity> {
+        ClientBuilder { builder: ServiceBuilder::new() }
+    }
+}
+
+impl<T> RpcClient<T> {
+    /// Create a new [`RpcClient`] with the given transport.
+    pub const fn new(t: T, is_local: bool) -> Self {
+        Self { transport: t, is_local, id: AtomicU64::new(0) }
+    }
+
+    /// Connect to a transport via a [`TransportConnect`] implementor.
+    pub async fn connect<C>(connect: C) -> Result<Self, TransportError>
+    where
+        T: Transport,
+        C: TransportConnect<Transport = T>,
+    {
+        ClientBuilder::default().connect(connect).await
+    }
+
+    /// Build a `JsonRpcRequest` with the given method and params.
+    ///
+    /// This function reserves an ID for the request, however the request
+    /// is not sent. To send a request, use [`RpcClient::prepare`] and await
+    /// the returned [`RpcCall`].
+    pub fn make_request<Params: RpcParam>(
+        &self,
+        method: &'static str,
+        params: Params,
+    ) -> Request<Params> {
+        Request { meta: RequestMeta { method, id: self.next_id() }, params }
+    }
+
+    /// `true` if the client believes the transport is local.
+    ///
+    /// This can be used to optimize remote API usage, or to change program
+    /// behavior on local endpoints. When the client is instantiated by parsing
+    /// a URL or other external input, this value is set on a best-efforts
+    /// basis and may be incorrect.
+    #[inline]
+    pub const fn is_local(&self) -> bool {
+        self.is_local
+    }
+
+    /// Set the `is_local` flag.
+    pub fn set_local(&mut self, is_local: bool) {
+        self.is_local = is_local;
+    }
+
+    /// Reserve a request ID value. This is used to generate request IDs.
+    #[inline]
+    fn increment_id(&self) -> u64 {
+        self.id.fetch_add(1, Ordering::Relaxed)
+    }
+
+    /// Reserve a request ID u64.
+    #[inline]
+    pub fn next_id(&self) -> Id {
+        Id::Number(self.increment_id())
+    }
+}
+
+impl<T> RpcClient<T>
+where
+    T: Transport + Clone,
+{
+    /// Prepare an [`RpcCall`].
+    ///
+    /// This function reserves an ID for the request, however the request
+    /// is not sent. To send a request, await the returned [`RpcCall`].
+    ///
+    /// ### Note:
+    ///
+    /// Serialization is done lazily. It will not be performed until the call
+    /// is awaited. This means that if a serializer error occurs, it will not
+    /// be caught until the call is awaited.
+    pub fn prepare<Params: RpcParam, Resp: RpcReturn>(
+        &self,
+        method: &'static str,
+        params: Params,
+    ) -> RpcCall<T, Params, Resp> {
+        let request = self.make_request(method, params);
+        RpcCall::new(request, self.transport.clone())
+    }
+
+    /// Type erase the service in the transport, allowing it to be used in a
+    /// generic context.
+    ///
+    /// ## Note:
+    ///
+    /// This is for abstracting over `RpcClient<T>` for multiple `T` by
+    /// erasing each type. E.g. if you have `RpcClient<Http>` and
+    /// `RpcClient<Ws>` you can put both into a `Vec<RpcClient<BoxTransport>>`.
+    #[inline]
+    pub fn boxed(self) -> RpcClient<BoxTransport> {
+        RpcClient { transport: self.transport.boxed(), is_local: self.is_local, id: self.id }
+    }
+}
+
+#[cfg(feature = "pubsub")]
+mod pubsub_impl {
+    use super::*;
+    use alloy_pubsub::{PubSubConnect, PubSubFrontend};
+    use tokio::sync::broadcast;
+
+    impl RpcClient<PubSubFrontend> {
+        /// Get a [`broadcast::Receiver`] for the given subscription ID.
+        pub async fn get_watcher(
+            &self,
+            id: alloy_primitives::U256,
+        ) -> broadcast::Receiver<Box<serde_json::value::RawValue>> {
+            self.transport.get_subscription(id).await.unwrap()
+        }
+
+        /// Connect to a transport via a [`PubSubConnect`] implementor.
+        pub async fn connect_pubsub<C>(
+            connect: C,
+        ) -> Result<RpcClient<PubSubFrontend>, TransportError>
+        where
+            C: PubSubConnect,
+        {
+            ClientBuilder::default().pubsub(connect).await
+        }
+    }
+}
+
+impl<T> RpcClient<Http<T>> {
+    /// Create a new [`BatchRequest`] builder.
+    #[inline]
+    pub fn new_batch(&self) -> BatchRequest<'_, Http<T>> {
+        BatchRequest::new(self)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_client/lib.rs.html b/src/alloy_rpc_client/lib.rs.html new file mode 100644 index 000000000000..104f9af456da --- /dev/null +++ b/src/alloy_rpc_client/lib.rs.html @@ -0,0 +1,76 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+#[macro_use]
+extern crate tracing;
+
+mod batch;
+pub use batch::BatchRequest;
+
+mod builder;
+pub use builder::ClientBuilder;
+
+mod call;
+pub use call::RpcCall;
+
+mod client;
+pub use client::RpcClient;
+
+#[cfg(feature = "ws")]
+pub use alloy_transport_ws::WsConnect;
+
+#[cfg(all(feature = "ipc", not(target_arch = "wasm32")))]
+pub use alloy_transport_ipc::IpcConnect;
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/account.rs.html b/src/alloy_rpc_types/eth/account.rs.html new file mode 100644 index 000000000000..7c8b24b86cd5 --- /dev/null +++ b/src/alloy_rpc_types/eth/account.rs.html @@ -0,0 +1,176 @@ +account.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+
#![allow(missing_docs)]
+use crate::serde_helpers::storage::JsonStorageKey;
+use alloy_primitives::{Address, Bytes, B256, B512, U256, U64};
+use serde::{Deserialize, Serialize};
+
+/// Account information.
+#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+pub struct AccountInfo {
+    /// Account name
+    pub name: String,
+}
+
+/// Data structure with proof for one single storage-entry
+#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct EIP1186StorageProof {
+    /// Storage key.
+    pub key: JsonStorageKey,
+    /// Value that the key holds
+    pub value: U256,
+    /// proof for the pair
+    pub proof: Vec<Bytes>,
+}
+
+/// Response for EIP-1186 account proof `eth_getProof`
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct EIP1186AccountProofResponse {
+    pub address: Address,
+    pub balance: U256,
+    pub code_hash: B256,
+    pub nonce: U64,
+    pub storage_hash: B256,
+    pub account_proof: Vec<Bytes>,
+    pub storage_proof: Vec<EIP1186StorageProof>,
+}
+
+/// Extended account information (used by `parity_allAccountInfo`).
+#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+pub struct ExtAccountInfo {
+    /// Account name
+    pub name: String,
+    /// Account meta JSON
+    pub meta: String,
+    /// Account UUID (`None` for address book entries)
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub uuid: Option<String>,
+}
+
+/// account derived from a signature
+/// as well as information that tells if it is valid for
+/// the current chain
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct RecoveredAccount {
+    /// address of the recovered account
+    pub address: Address,
+    /// public key of the recovered account
+    pub public_key: B512,
+    /// If the signature contains chain replay protection,
+    /// And the chain_id encoded within the signature
+    /// matches the current chain this would be true, otherwise false.
+    pub is_valid_for_current_chain: bool,
+}
+
+#[test]
+fn test_eip_1186_account_without_storage_proof() {
+    let response = r#"{
+       "address":"0xc36442b4a4522e871399cd717abdd847ab11fe88",
+       "accountProof":["0xf90211a0a3deb2d4417de23e3c64a80ab58fa1cf4b62d7f193e36e507c8cf3794477b5fba0fc7ce8769dcfa9ae8d9d9537098c5cc5477b5920ed494e856049f5783c843c50a0f7d083f1e79a4c0ba1686b97a0e27c79c3a49432d333dc3574d5879cad1ca897a0cd36cf391201df64a786187d99013bdbaf5f0da6bfb8f5f2d6f0f60504f76ad9a03a9f09c92c3cefe87840938dc15fe68a3586d3b28b0f47c7037b6413c95a9feda0decb7e1969758d401af2d1cab14c0951814c094a3da108dd9f606a96840bae2ba060bf0c44ccc3ccbb5ab674841858cc5ea16495529442061295f1cecefd436659a039f8b307e0a295d6d03df089ee8211b52c5ae510d071f17ae5734a7055858002a0508040aef23dfe9c8ab16813258d95c4e765b4a557c2987fb7f3751693f34f4fa0c07e58aa6cd257695cdf147acd800c6197c235e2b5242c22e9da5d86b169d56aa00f2e89ddd874d28e62326ba365fd4f26a86cbd9f867ec0b3de69441ef8870f4ea06c1eb5455e43a36ec41a0372bde915f889cee070b8c8b8a78173d4d7df3ccebaa0cee4848c4119ed28e165e963c5b46ffa6dbeb0b14c8c51726124e7d26ff3f27aa0fc5b82dce2ee5a1691aa92b91dbeec7b2ba94df8116ea985dd7d3f4d5b8292c0a03675e148c987494e22a9767b931611fb1b7c7c287af128ea23aa70b88a1c458ba04f269f556f0f8d9cb2a9a6de52d35cf5a9098f7bb8badb1dc1d496096236aed880",
+       "0xf90211a0715ed9b0b002d050084eaecb878f457a348ccd47c7a597134766a7d705303de9a0c49f0fe23b0ca61892d75aebaf7277f00fdfd2022e746bab94de5d049a96edfca0b01f9c91f2bc1373862d7936198a5d11efaf370e2b9bb1dac2134b8e256ecdafa0888395aa7e0f699bb632215f08cdf92840b01e5d8e9a61d18355098cdfd50283a0ba748d609b0018667d311527a2302267209a38b08378f7d833fdead048de0defa098878e5d1461ceddeddf62bd8277586b120b5097202aa243607bc3fc8f30fc0ba0ad4111ee1952b6db0939a384986ee3fb34e0a5fc522955588fc22e159949196fa00fc948964dff427566bad468d62b0498c59df7ca7ae799ab29555d5d829d3742a0766922a88ebc6db7dfb06b03a5b17d0773094e46e42e7f2ba6a0b8567d9f1000a0db25676c4a36591f37c5e16f7199ab16559d82a2bed8c0c6a35f528a3c166bfda0149a5d50d238722e7d44c555169ed32a7f182fcb487ea378b4410a46a63a4e66a06b2298bbfe4972113e7e18cac0a8a39792c1a940ea128218343b8f88057d90aea096b2adb84105ae2aca8a7edf937e91e40872070a8641a74891e64db94d059df0a0ddbb162125ecfbd42edad8d8ef5d5e97ca7c72f54ddc404a61ae318bad0d2108a00e9a68f3e2b0c793d5fcd607edc5c55226d53fdfacd713077d6e01cb38d00d5ba05dc099f1685b2a4b7308e063e8e7905994f5c36969b1c6bfe3780c9878a4d85c80",
+       "0xf90211a05fc921be4d63ee07fe47a509e1abf2d69b00b6ea582a755467bf4371c2d2bd1fa0d552faa477e95f4631e2f7247aeb58693d90b03b2eee57e3fe8a9ddbd19ee42da028682c15041aa6ced1a5306aff311f5dbb8bbf7e77615994305ab3132e7842b5a0e5e0316b5046bde22d09676210885c5bea6a71703bf3b4dbac2a7199910f54faa0527fccccef17df926ccfb608f76d3c259848ed43cd24857a59c2a9352b6f1fa4a02b3863355b927b78c80ca379a4f7165bbe1644aaefed8a0bfa2001ae6284b392a09964c73eccc3d12e44dba112e31d8bd3eacbc6a42b4f17985d5b99dff968f24ea0cc426479c7ff0573629dcb2872e57f7438a28bd112a5c3fb2241bdda8031432ba04987fe755f260c2f7218640078af5f6ac4d98c2d0c001e398debc30221b14668a0e811d046c21c6cbaee464bf55553cbf88e70c2bda6951800c75c3896fdeb8e13a04aa8d0ab4946ac86e784e29000a0842cd6eebddaf8a82ece8aa69b72c98cfff5a0dfc010051ddceeec55e4146027c0eb4c72d7c242a103bf1977033ebe00a57b5da039e4da79576281284bf46ce6ca90d47832e4aefea4846615d7a61a7b976c8e3ea0dad1dfff731f7dcf37c499f4afbd5618247289c2e8c14525534b826a13b0a5a6a025f356cbc0469cb4dc326d98479e3b756e4418a67cbbb8ffb2d1abab6b1910e9a03f4082bf1da27b2a76f6bdc930eaaaf1e3f0e4d3135c2a9fb85e301f47f5174d80",
+       "0xf90211a0df6448f21c4e19da33f9c64c90bbcc02a499866d344c73576f63e3b4cbd4c000a010efb3b0f1d6365e2e4a389965e114e2a508ef8901f7d6c7564ba88793ff974aa0295bef2313a4f603614a5d5af3c659f63edfaa5b59a6ea2ac1da05f69ff4657ba0d8f16d5ddf4ba09616008148d2993dc50658accc2edf9111b6f464112db5d369a084604d9e06ddb53aeb7b13bb70fbe91f60df6bdc30f59bc7dc57ff37b6fe3325a04c64bd1dbeaecc54f18b23ab1ade2200970757f437e75e285f79a8c405315a14a0868075fc7f73b13863fc653c806f9a20f8e52dce44c15d2c4f94d6711021b985a01e85c49da7a8c91068468779e79b267d93d4fad01f44183353a381207304723ea05fcf186d55c53413f6988b16aa34721f0539f1cf0917f02e9d1a6ec8d3e191ffa00ad581842eab665351913e0afb3bfc070b9e4fad4d354c073f44c4f2a0c425c9a0000cb2066d81bf07f80703a40a5c5012e2c4b387bc53d381d37ee1d0f0a6643ba061f221d01c98721e79c525af5fc2eb9cc648c2ca54bb70520b868e2bdc037967a0e580f297c477df46362eb8e20371d8f0528091454bb5ad00d40368ca3ffdbd1fa079a13d35f79699f9e51d4fa07d03cd9b9dec4de9906559c0470629a663181652a0dbb402183633dbaa73e6e6a6b66bfffc4570763b264d3a702de165032298b858a065d5321015531309bb3abe0235f825d5be4270d2e511dca3b984d1e70ef308d880",
+       "0xf90211a06d0adafe89896724704275a42a8a63f0910dce83188add0073f621b8ca1167aaa00de7d4efad36d08f5a0320cdfd964484eba803d9933efae12c292d3ff2d06a20a083341fc12fffccf4b11df314b14f7bcead154525a097493fdf15dde4ec0c0d2aa088b7759fe3aef617828e7abd9e554add2e84ef3e2e024b1a0e2f537fce7d37f9a01e73c28722d825063304c6b51be3a8c7b6312ba8be4c6e99602e623993c014c0a0e50fbe12ddbaf184f3ba0cda971675a55abbf44c73f771bc5824b393262e5255a0b1a937d4c50528cb6aeb80aa5fe83bcfa8c294124a086302caf42cead1f99f96a04c4376b13859af218b5b09ffb33e3465288837c37fa254a46f8d0e75afecae10a0f158c0171bdb454eab6bb6dc5e276e749b6aa550f53b497492c0a392425035c3a0ac496050db1fbb1d34180ee7fd7bed18efa4cf43299390a72dcf530cc3422630a02cacb30ac3b4bab293d31833be4865cd1d1de8db8630edac4af056979cc903aea090cbb538f0f4601289db4cf49485ab3a178044daeae325c525bc3978714a7219a0542021427adbe890896fcc888418a747a555b2a7121fe3c683e07dcf5012e96ca006569c5e3715f52f62dd856dec2136e60c49bbadc1cf9fb625930da3e8f1c16ea0a2539ebb66a2c10c3809626181a2389f043e0b54867cd356eb5f20daaeb521b4a0ab49972dced10010275f2604e6182722dbc426ca1b0ae128defe80c0baefd3c080",
+       "0xf90211a006c1d8a7c5deeb435ea0b080aea8b7acb58d2d898e12e3560d399594a77863a1a088105243bc96e1f10baa73d670929a834c51eb7f695cf43f4fab94e73c9a5b8da0fce3a21f09b62d65607bbdabb8d675d58a5f3bfb19ae46510a4ea2205070aa03a0039ae7a999ed83bfdb49b6df7074589059ba6c2eed22bfc6dac8ff5241c71bd7a09feca6f7331b6c147f4fd7bd94de496144b85543d868f47be6345330b3f8ccd3a00e55c30d16438567979c92d387a2b99e51a4026192ccfda2ac87a190c3aee511a0a86c5bb52651e490203c63670b569b2337e838e4d80d455cc83e64571e2552f1a0cfb31ae59b691c15ffd97658bab646ff4b90dbc72a81ec52731b3fbd38d0dd5ba0d83936fc4143cc885be5fa420ef22fb97f6a8dd24e9ece9af965792565a7b2c8a0abb179481f4b29578adb8768aa4f6ba6ed6bd43c7572d7c3405c879a362f1ab1a0506651daa07d44901dfd76c12d302b2242e5ceac385f95ea928f20a0336eccf6a010e8a7f461231438987fb26adc4c5004721dc401dc2b77e9b79d26b1308d0079a09174afa82e6d27dfdde74f556d0e782ae6222dc66104d84ea0f1e21e093578c4a0391e24ed0033cc58f149af753b485de3c8b9e4b3c8e145c308db60e51cabbefca03b0991359019197dd53e3798e55a14c8795d655b0693efd37404cf8f8d979cfba0594d95bbfe8e2ea5040b571010549a233bc33bf959792e1e41c515c65abac14480",
+       "0xf90151a0e8ed81735d358657020dd6bc4bc58cf751cc037fa57e1d0c668bf24049e720d280a03e8bf7abdd8a4190a0ee5f92a78bf1dba529312ed66dd7ead7c9be55c81a2db480a006312425a007cda585740355f52db74d0ae43c21d562c599112546e3ffe22f01a023bbbb0ffb33c7a5477ab514c0f4f3c94ba1748a5ea1dc3edc7c4b5330cd70fe80a03ed45ab6045a10fa00b2fba662914f4dedbf3f3a5f2ce1e6e53a12ee3ea21235a01e02c98684cea92a7c0b04a01658530a09d268b395840a66263923e44b93d2b5a0a585db4a911fe6452a4540bf7dc143981ca31035ccb2c51d02eccd021a6163a480a06032919dcb44e22852b6367473bbc3f43311226ac28991a90b9c9da669f9e08a80a0146aee58a46c30bc84f6e99cd76bf29b3bd238053102679498a3ea15d4ff6d53a04cf57cfdc046c135004b9579059c84b2d902a51fb6feaed51ea272f0ca1cdc648080",
+       "0xf871a059ce2e1f470580853d88511bf8672f9ffaefadd80bc07b2e3d5a18c3d7812007a0867e978faf3461d2238ccf8d6a138406cb6d8bd36dfa60caddb62af14447a6f880808080a0fc6209fdaa57d224ee35f73e96469a7f95760a54d5de3da07953430b001aee6980808080808080808080",
+       "0xf8669d20852b2b985cd8c252fddae2acb4f798d0fecdcb1e2da53726332eb559b846f8440180a079fe22fe88fc4b45db10ce94d975e02e8a42b57dc190f8ae15e321f72bbc08eaa0692e658b31cbe3407682854806658d315d61a58c7e4933a2f91d383dc00736c6"],
+       "balance":"0x0",
+       "codeHash":"0x692e658b31cbe3407682854806658d315d61a58c7e4933a2f91d383dc00736c6",
+       "nonce":"0x1",
+       "storageHash":"0x79fe22fe88fc4b45db10ce94d975e02e8a42b57dc190f8ae15e321f72bbc08ea",
+       "storageProof":[]
+    }"#;
+    let val = serde_json::from_str::<EIP1186AccountProofResponse>(response).unwrap();
+    serde_json::to_value(val).unwrap();
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/block.rs.html b/src/alloy_rpc_types/eth/block.rs.html new file mode 100644 index 000000000000..d94d9a84672a --- /dev/null +++ b/src/alloy_rpc_types/eth/block.rs.html @@ -0,0 +1,2216 @@ +block.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+
//! Block RPC types.
+
+use crate::{other::OtherFields, Transaction, Withdrawal};
+use alloy_primitives::{
+    ruint::ParseError, Address, BlockHash, BlockNumber, Bloom, Bytes, B256, B64, U256, U64,
+};
+use alloy_rlp::{bytes, Decodable, Encodable, Error as RlpError};
+use serde::{
+    de::{MapAccess, Visitor},
+    ser::{Error, SerializeStruct},
+    Deserialize, Deserializer, Serialize, Serializer,
+};
+use std::{collections::BTreeMap, fmt, num::ParseIntError, ops::Deref, str::FromStr};
+
+#[doc(hidden)]
+#[deprecated = "use `BlockTransactionHashes` instead"]
+pub type BlockTransactionsHashIterator<'a> = BlockTransactionHashes<'a>;
+
+/// Block Transactions depending on the boolean attribute of `eth_getBlockBy*`,
+/// or if used by `eth_getUncle*`
+#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum BlockTransactions {
+    /// Only hashes
+    Hashes(Vec<B256>),
+    /// Full transactions
+    Full(Vec<Transaction>),
+    /// Special case for uncle response.
+    Uncle,
+}
+
+impl BlockTransactions {
+    /// Converts `self` into `Hashes`.
+    pub fn convert_to_hashes(&mut self) {
+        *self = Self::Hashes(self.hashes().copied().collect());
+    }
+
+    /// Converts `self` into `Hashes`.
+    pub fn into_hashes(mut self) -> Self {
+        self.convert_to_hashes();
+        self
+    }
+
+    /// Check if the enum variant is used for an uncle response.
+    pub const fn is_uncle(&self) -> bool {
+        matches!(self, Self::Uncle)
+    }
+
+    /// Returns an iterator over the transaction hashes.
+    #[deprecated = "use `hashes` instead"]
+    #[inline]
+    pub fn iter(&self) -> BlockTransactionHashes<'_> {
+        self.hashes()
+    }
+
+    /// Returns an iterator over references to the transaction hashes.
+    #[inline]
+    pub fn hashes(&self) -> BlockTransactionHashes<'_> {
+        BlockTransactionHashes::new(self)
+    }
+
+    /// Returns an iterator over mutable references to the transaction hashes.
+    #[inline]
+    pub fn hashes_mut(&mut self) -> BlockTransactionHashesMut<'_> {
+        BlockTransactionHashesMut::new(self)
+    }
+
+    /// Returns an instance of BlockTransactions with the Uncle special case.
+    pub fn uncle() -> Self {
+        Self::Uncle
+    }
+}
+
+/// An iterator over the transaction hashes of a block.
+///
+/// See [`BlockTransactions::hashes`].
+#[derive(Clone, Debug)]
+pub struct BlockTransactionHashes<'a>(BlockTransactionHashesInner<'a>);
+
+#[derive(Clone, Debug)]
+enum BlockTransactionHashesInner<'a> {
+    Hashes(std::slice::Iter<'a, B256>),
+    Full(std::slice::Iter<'a, Transaction>),
+    Uncle,
+}
+
+impl<'a> BlockTransactionHashes<'a> {
+    #[inline]
+    fn new(txs: &'a BlockTransactions) -> Self {
+        Self(match txs {
+            BlockTransactions::Hashes(txs) => BlockTransactionHashesInner::Hashes(txs.iter()),
+            BlockTransactions::Full(txs) => BlockTransactionHashesInner::Full(txs.iter()),
+            BlockTransactions::Uncle => BlockTransactionHashesInner::Uncle,
+        })
+    }
+}
+
+impl<'a> Iterator for BlockTransactionHashes<'a> {
+    type Item = &'a B256;
+
+    #[inline]
+    fn next(&mut self) -> Option<Self::Item> {
+        match &mut self.0 {
+            BlockTransactionHashesInner::Full(txs) => txs.next().map(|tx| &tx.hash),
+            BlockTransactionHashesInner::Hashes(txs) => txs.next(),
+            BlockTransactionHashesInner::Uncle => None,
+        }
+    }
+
+    #[inline]
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        match &self.0 {
+            BlockTransactionHashesInner::Full(txs) => txs.size_hint(),
+            BlockTransactionHashesInner::Hashes(txs) => txs.size_hint(),
+            BlockTransactionHashesInner::Uncle => (0, Some(0)),
+        }
+    }
+}
+
+impl ExactSizeIterator for BlockTransactionHashes<'_> {
+    #[inline]
+    fn len(&self) -> usize {
+        match &self.0 {
+            BlockTransactionHashesInner::Full(txs) => txs.len(),
+            BlockTransactionHashesInner::Hashes(txs) => txs.len(),
+            BlockTransactionHashesInner::Uncle => 0,
+        }
+    }
+}
+
+impl DoubleEndedIterator for BlockTransactionHashes<'_> {
+    #[inline]
+    fn next_back(&mut self) -> Option<Self::Item> {
+        match &mut self.0 {
+            BlockTransactionHashesInner::Full(txs) => txs.next_back().map(|tx| &tx.hash),
+            BlockTransactionHashesInner::Hashes(txs) => txs.next_back(),
+            BlockTransactionHashesInner::Uncle => None,
+        }
+    }
+}
+
+impl<'a> std::iter::FusedIterator for BlockTransactionHashes<'a> {}
+
+/// An Iterator over the transaction hashes of a block.
+///
+/// See [`BlockTransactions::hashes_mut`].
+#[derive(Debug)]
+pub struct BlockTransactionHashesMut<'a>(BlockTransactionHashesInnerMut<'a>);
+
+#[derive(Debug)]
+enum BlockTransactionHashesInnerMut<'a> {
+    Hashes(std::slice::IterMut<'a, B256>),
+    Full(std::slice::IterMut<'a, Transaction>),
+    Uncle,
+}
+
+impl<'a> BlockTransactionHashesMut<'a> {
+    #[inline]
+    fn new(txs: &'a mut BlockTransactions) -> Self {
+        Self(match txs {
+            BlockTransactions::Hashes(txs) => {
+                BlockTransactionHashesInnerMut::Hashes(txs.iter_mut())
+            }
+            BlockTransactions::Full(txs) => BlockTransactionHashesInnerMut::Full(txs.iter_mut()),
+            BlockTransactions::Uncle => BlockTransactionHashesInnerMut::Uncle,
+        })
+    }
+}
+
+impl<'a> Iterator for BlockTransactionHashesMut<'a> {
+    type Item = &'a mut B256;
+
+    #[inline]
+    fn next(&mut self) -> Option<Self::Item> {
+        match &mut self.0 {
+            BlockTransactionHashesInnerMut::Full(txs) => txs.next().map(|tx| &mut tx.hash),
+            BlockTransactionHashesInnerMut::Hashes(txs) => txs.next(),
+            BlockTransactionHashesInnerMut::Uncle => None,
+        }
+    }
+
+    #[inline]
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        match &self.0 {
+            BlockTransactionHashesInnerMut::Full(txs) => txs.size_hint(),
+            BlockTransactionHashesInnerMut::Hashes(txs) => txs.size_hint(),
+            BlockTransactionHashesInnerMut::Uncle => (0, Some(0)),
+        }
+    }
+}
+
+impl ExactSizeIterator for BlockTransactionHashesMut<'_> {
+    #[inline]
+    fn len(&self) -> usize {
+        match &self.0 {
+            BlockTransactionHashesInnerMut::Full(txs) => txs.len(),
+            BlockTransactionHashesInnerMut::Hashes(txs) => txs.len(),
+            BlockTransactionHashesInnerMut::Uncle => 0,
+        }
+    }
+}
+
+impl DoubleEndedIterator for BlockTransactionHashesMut<'_> {
+    #[inline]
+    fn next_back(&mut self) -> Option<Self::Item> {
+        match &mut self.0 {
+            BlockTransactionHashesInnerMut::Full(txs) => txs.next_back().map(|tx| &mut tx.hash),
+            BlockTransactionHashesInnerMut::Hashes(txs) => txs.next_back(),
+            BlockTransactionHashesInnerMut::Uncle => None,
+        }
+    }
+}
+
+impl<'a> std::iter::FusedIterator for BlockTransactionHashesMut<'a> {}
+
+/// Determines how the `transactions` field of [Block] should be filled.
+///
+/// This essentially represents the `full:bool` argument in RPC calls that determine whether the
+/// response should include full transaction objects or just the hashes.
+#[derive(Debug, Clone, Eq, PartialEq)]
+pub enum BlockTransactionsKind {
+    /// Only include hashes: [BlockTransactions::Hashes]
+    Hashes,
+    /// Include full transaction objects: [BlockTransactions::Full]
+    Full,
+}
+
+impl From<bool> for BlockTransactionsKind {
+    fn from(is_full: bool) -> Self {
+        if is_full {
+            BlockTransactionsKind::Full
+        } else {
+            BlockTransactionsKind::Hashes
+        }
+    }
+}
+
+/// Error that can occur when converting other types to blocks
+#[derive(Debug, thiserror::Error)]
+pub enum BlockError {
+    /// A transaction failed sender recovery
+    #[error("transaction failed sender recovery")]
+    InvalidSignature,
+    /// A raw block failed to decode
+    #[error("failed to decode raw block {0}")]
+    RlpDecodeRawBlock(alloy_rlp::Error),
+}
+
+/// Block representation
+#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct Block {
+    /// Header of the block.
+    #[serde(flatten)]
+    pub header: Header,
+    /// Total difficulty, this field is None only if representing
+    /// an Uncle block.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub total_difficulty: Option<U256>,
+    /// Uncles' hashes.
+    pub uncles: Vec<B256>,
+    /// Transactions.
+    #[serde(skip_serializing_if = "BlockTransactions::is_uncle")]
+    #[serde(default = "BlockTransactions::uncle")]
+    pub transactions: BlockTransactions,
+    /// Integer the size of this block in bytes.
+    pub size: Option<U256>,
+    /// Withdrawals in the block.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub withdrawals: Option<Vec<Withdrawal>>,
+    /// Support for arbitrary additional fields.
+    #[serde(flatten)]
+    pub other: OtherFields,
+}
+
+impl Block {
+    /// Converts a block with Tx hashes into a full block.
+    pub fn into_full_block(self, txs: Vec<Transaction>) -> Self {
+        Self { transactions: BlockTransactions::Full(txs), ..self }
+    }
+}
+
+/// Block header representation.
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Hash)]
+#[serde(rename_all = "camelCase")]
+pub struct Header {
+    /// Hash of the block
+    pub hash: Option<B256>,
+    /// Hash of the parent
+    pub parent_hash: B256,
+    /// Hash of the uncles
+    #[serde(rename = "sha3Uncles")]
+    pub uncles_hash: B256,
+    /// Alias of `author`
+    pub miner: Address,
+    /// State root hash
+    pub state_root: B256,
+    /// Transactions root hash
+    pub transactions_root: B256,
+    /// Transactions receipts root hash
+    pub receipts_root: B256,
+    /// Logs bloom
+    pub logs_bloom: Bloom,
+    /// Difficulty
+    pub difficulty: U256,
+    /// Block number
+    pub number: Option<U256>,
+    /// Gas Limit
+    pub gas_limit: U256,
+    /// Gas Used
+    pub gas_used: U256,
+    /// Timestamp
+    pub timestamp: U256,
+    /// Extra data
+    pub extra_data: Bytes,
+    /// Mix Hash
+    ///
+    /// Before the merge this proves, combined with the nonce, that a sufficient amount of
+    /// computation has been carried out on this block: the Proof-of-Work (PoF).
+    ///
+    /// After the merge this is `prevRandao`: Randomness value for the generated payload.
+    ///
+    /// This is an Option because it is not always set by non-ethereum networks.
+    ///
+    /// See also <https://eips.ethereum.org/EIPS/eip-4399>
+    /// And <https://github.com/ethereum/execution-apis/issues/328>
+    pub mix_hash: Option<B256>,
+    /// Nonce
+    pub nonce: Option<B64>,
+    /// Base fee per unit of gas (if past London)
+    #[serde(rename = "baseFeePerGas", skip_serializing_if = "Option::is_none")]
+    pub base_fee_per_gas: Option<U256>,
+    /// Withdrawals root hash added by EIP-4895 and is ignored in legacy headers.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub withdrawals_root: Option<B256>,
+    /// Blob gas used
+    #[serde(rename = "blobGasUsed", skip_serializing_if = "Option::is_none")]
+    pub blob_gas_used: Option<U64>,
+    /// Excess blob gas
+    #[serde(rename = "excessBlobGas", skip_serializing_if = "Option::is_none")]
+    pub excess_blob_gas: Option<U64>,
+    /// Parent beacon block root
+    #[serde(rename = "parentBeaconBlockRoot", skip_serializing_if = "Option::is_none")]
+    pub parent_beacon_block_root: Option<B256>,
+}
+
+/// A block hash which may have
+/// a boolean requireCanonical field.
+/// If false, an RPC call should raise if a block
+/// matching the hash is not found.
+/// If true, an RPC call should additionaly raise if
+/// the block is not in the canonical chain.
+/// <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md#specification>
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize)]
+pub struct RpcBlockHash {
+    /// A block hash
+    pub block_hash: B256,
+    /// Whether the block must be a canonical block
+    pub require_canonical: Option<bool>,
+}
+
+impl RpcBlockHash {
+    /// Returns an [RpcBlockHash] from a [B256].
+    pub const fn from_hash(block_hash: B256, require_canonical: Option<bool>) -> Self {
+        RpcBlockHash { block_hash, require_canonical }
+    }
+}
+
+impl From<B256> for RpcBlockHash {
+    fn from(value: B256) -> Self {
+        Self::from_hash(value, None)
+    }
+}
+
+impl From<RpcBlockHash> for B256 {
+    fn from(value: RpcBlockHash) -> Self {
+        value.block_hash
+    }
+}
+
+impl AsRef<B256> for RpcBlockHash {
+    fn as_ref(&self) -> &B256 {
+        &self.block_hash
+    }
+}
+
+/// A block Number (or tag - "latest", "earliest", "pending")
+#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash)]
+pub enum BlockNumberOrTag {
+    /// Latest block
+    #[default]
+    Latest,
+    /// Finalized block accepted as canonical
+    Finalized,
+    /// Safe head block
+    Safe,
+    /// Earliest block (genesis)
+    Earliest,
+    /// Pending block (not yet part of the blockchain)
+    Pending,
+    /// Block by number from canon chain
+    Number(u64),
+}
+
+impl BlockNumberOrTag {
+    /// Returns the numeric block number if explicitly set
+    pub const fn as_number(&self) -> Option<u64> {
+        match *self {
+            BlockNumberOrTag::Number(num) => Some(num),
+            _ => None,
+        }
+    }
+
+    /// Returns `true` if a numeric block number is set
+    pub const fn is_number(&self) -> bool {
+        matches!(self, BlockNumberOrTag::Number(_))
+    }
+
+    /// Returns `true` if it's "latest"
+    pub const fn is_latest(&self) -> bool {
+        matches!(self, BlockNumberOrTag::Latest)
+    }
+
+    /// Returns `true` if it's "finalized"
+    pub const fn is_finalized(&self) -> bool {
+        matches!(self, BlockNumberOrTag::Finalized)
+    }
+
+    /// Returns `true` if it's "safe"
+    pub const fn is_safe(&self) -> bool {
+        matches!(self, BlockNumberOrTag::Safe)
+    }
+
+    /// Returns `true` if it's "pending"
+    pub const fn is_pending(&self) -> bool {
+        matches!(self, BlockNumberOrTag::Pending)
+    }
+
+    /// Returns `true` if it's "earliest"
+    pub const fn is_earliest(&self) -> bool {
+        matches!(self, BlockNumberOrTag::Earliest)
+    }
+}
+
+impl From<u64> for BlockNumberOrTag {
+    fn from(num: u64) -> Self {
+        BlockNumberOrTag::Number(num)
+    }
+}
+
+impl From<U64> for BlockNumberOrTag {
+    fn from(num: U64) -> Self {
+        num.to::<u64>().into()
+    }
+}
+
+impl Serialize for BlockNumberOrTag {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match *self {
+            BlockNumberOrTag::Number(ref x) => serializer.serialize_str(&format!("0x{x:x}")),
+            BlockNumberOrTag::Latest => serializer.serialize_str("latest"),
+            BlockNumberOrTag::Finalized => serializer.serialize_str("finalized"),
+            BlockNumberOrTag::Safe => serializer.serialize_str("safe"),
+            BlockNumberOrTag::Earliest => serializer.serialize_str("earliest"),
+            BlockNumberOrTag::Pending => serializer.serialize_str("pending"),
+        }
+    }
+}
+
+impl<'de> Deserialize<'de> for BlockNumberOrTag {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        let s = String::deserialize(deserializer)?.to_lowercase();
+        s.parse().map_err(serde::de::Error::custom)
+    }
+}
+
+impl FromStr for BlockNumberOrTag {
+    type Err = ParseBlockNumberError;
+
+    fn from_str(s: &str) -> Result<Self, Self::Err> {
+        let block = match s {
+            "latest" => Self::Latest,
+            "finalized" => Self::Finalized,
+            "safe" => Self::Safe,
+            "earliest" => Self::Earliest,
+            "pending" => Self::Pending,
+            _number => {
+                if let Some(hex_val) = s.strip_prefix("0x") {
+                    let number = u64::from_str_radix(hex_val, 16);
+                    BlockNumberOrTag::Number(number?)
+                } else {
+                    return Err(HexStringMissingPrefixError::default().into());
+                }
+            }
+        };
+        Ok(block)
+    }
+}
+
+impl fmt::Display for BlockNumberOrTag {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            BlockNumberOrTag::Number(ref x) => format!("0x{x:x}").fmt(f),
+            BlockNumberOrTag::Latest => f.write_str("latest"),
+            BlockNumberOrTag::Finalized => f.write_str("finalized"),
+            BlockNumberOrTag::Safe => f.write_str("safe"),
+            BlockNumberOrTag::Earliest => f.write_str("earliest"),
+            BlockNumberOrTag::Pending => f.write_str("pending"),
+        }
+    }
+}
+
+/// Error variants when parsing a [BlockNumberOrTag]
+#[derive(Debug, thiserror::Error)]
+pub enum ParseBlockNumberError {
+    /// Failed to parse hex value
+    #[error(transparent)]
+    ParseIntErr(#[from] ParseIntError),
+    /// Failed to parse hex value
+    #[error(transparent)]
+    ParseErr(#[from] ParseError),
+    /// Block numbers should be 0x-prefixed
+    #[error(transparent)]
+    MissingPrefix(#[from] HexStringMissingPrefixError),
+}
+
+/// Thrown when a 0x-prefixed hex string was expected
+#[derive(Copy, Clone, Debug, Default, thiserror::Error)]
+#[non_exhaustive]
+#[error("hex string without 0x prefix")]
+pub struct HexStringMissingPrefixError;
+
+/// A Block Identifier
+/// <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md>
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+pub enum BlockId {
+    /// A block hash and an optional bool that defines if it's canonical
+    Hash(RpcBlockHash),
+    /// A block number
+    Number(BlockNumberOrTag),
+}
+
+// === impl BlockId ===
+
+impl BlockId {
+    /// Returns the block hash if it is [BlockId::Hash]
+    pub const fn as_block_hash(&self) -> Option<B256> {
+        match self {
+            BlockId::Hash(hash) => Some(hash.block_hash),
+            BlockId::Number(_) => None,
+        }
+    }
+
+    /// Returns true if this is [BlockNumberOrTag::Latest]
+    pub const fn is_latest(&self) -> bool {
+        matches!(self, BlockId::Number(BlockNumberOrTag::Latest))
+    }
+
+    /// Returns true if this is [BlockNumberOrTag::Pending]
+    pub const fn is_pending(&self) -> bool {
+        matches!(self, BlockId::Number(BlockNumberOrTag::Pending))
+    }
+}
+
+impl Default for BlockId {
+    fn default() -> Self {
+        BlockId::Number(BlockNumberOrTag::Latest)
+    }
+}
+
+impl From<u64> for BlockId {
+    fn from(num: u64) -> Self {
+        BlockNumberOrTag::Number(num).into()
+    }
+}
+
+impl From<U64> for BlockId {
+    fn from(num: U64) -> Self {
+        BlockNumberOrTag::Number(num.to()).into()
+    }
+}
+
+impl From<BlockNumberOrTag> for BlockId {
+    fn from(num: BlockNumberOrTag) -> Self {
+        BlockId::Number(num)
+    }
+}
+
+impl From<B256> for BlockId {
+    fn from(block_hash: B256) -> Self {
+        BlockId::Hash(RpcBlockHash { block_hash, require_canonical: None })
+    }
+}
+
+impl From<(B256, Option<bool>)> for BlockId {
+    fn from(hash_can: (B256, Option<bool>)) -> Self {
+        BlockId::Hash(RpcBlockHash { block_hash: hash_can.0, require_canonical: hash_can.1 })
+    }
+}
+
+impl Serialize for BlockId {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match *self {
+            BlockId::Hash(RpcBlockHash { ref block_hash, ref require_canonical }) => {
+                let mut s = serializer.serialize_struct("BlockIdEip1898", 1)?;
+                s.serialize_field("blockHash", block_hash)?;
+                if let Some(require_canonical) = require_canonical {
+                    s.serialize_field("requireCanonical", require_canonical)?;
+                }
+                s.end()
+            }
+            BlockId::Number(ref num) => num.serialize(serializer),
+        }
+    }
+}
+
+impl<'de> Deserialize<'de> for BlockId {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        struct BlockIdVisitor;
+
+        impl<'de> Visitor<'de> for BlockIdVisitor {
+            type Value = BlockId;
+
+            fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+                formatter.write_str("Block identifier following EIP-1898")
+            }
+
+            fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>
+            where
+                E: serde::de::Error,
+            {
+                // Since there is no way to clearly distinguish between a DATA parameter and a QUANTITY parameter. A str is therefor deserialized into a Block Number: <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1898.md>
+                // However, since the hex string should be a QUANTITY, we can safely assume that if the len is 66 bytes, it is in fact a hash, ref <https://github.com/ethereum/go-ethereum/blob/ee530c0d5aa70d2c00ab5691a89ab431b73f8165/rpc/types.go#L184-L184>
+                if v.len() == 66 {
+                    Ok(BlockId::Hash(v.parse::<B256>().map_err(serde::de::Error::custom)?.into()))
+                } else {
+                    // quantity hex string or tag
+                    Ok(BlockId::Number(v.parse().map_err(serde::de::Error::custom)?))
+                }
+            }
+
+            fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
+            where
+                A: MapAccess<'de>,
+            {
+                let mut number = None;
+                let mut block_hash = None;
+                let mut require_canonical = None;
+                while let Some(key) = map.next_key::<String>()? {
+                    match key.as_str() {
+                        "blockNumber" => {
+                            if number.is_some() || block_hash.is_some() {
+                                return Err(serde::de::Error::duplicate_field("blockNumber"));
+                            }
+                            if require_canonical.is_some() {
+                                return Err(serde::de::Error::custom(
+                                    "Non-valid require_canonical field",
+                                ));
+                            }
+                            number = Some(map.next_value::<BlockNumberOrTag>()?)
+                        }
+                        "blockHash" => {
+                            if number.is_some() || block_hash.is_some() {
+                                return Err(serde::de::Error::duplicate_field("blockHash"));
+                            }
+
+                            block_hash = Some(map.next_value::<B256>()?);
+                        }
+                        "requireCanonical" => {
+                            if number.is_some() || require_canonical.is_some() {
+                                return Err(serde::de::Error::duplicate_field("requireCanonical"));
+                            }
+
+                            require_canonical = Some(map.next_value::<bool>()?)
+                        }
+                        key => {
+                            return Err(serde::de::Error::unknown_field(
+                                key,
+                                &["blockNumber", "blockHash", "requireCanonical"],
+                            ))
+                        }
+                    }
+                }
+
+                if let Some(number) = number {
+                    Ok(BlockId::Number(number))
+                } else if let Some(block_hash) = block_hash {
+                    Ok(BlockId::Hash(RpcBlockHash { block_hash, require_canonical }))
+                } else {
+                    Err(serde::de::Error::custom(
+                        "Expected `blockNumber` or `blockHash` with `requireCanonical` optionally",
+                    ))
+                }
+            }
+        }
+
+        deserializer.deserialize_any(BlockIdVisitor)
+    }
+}
+
+/// Block number and hash.
+#[derive(Clone, Copy, Hash, Default, PartialEq, Eq)]
+pub struct BlockNumHash {
+    /// Block number
+    pub number: BlockNumber,
+    /// Block hash
+    pub hash: BlockHash,
+}
+
+/// Block number and hash of the forked block.
+pub type ForkBlock = BlockNumHash;
+
+impl fmt::Debug for BlockNumHash {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_tuple("").field(&self.number).field(&self.hash).finish()
+    }
+}
+
+impl BlockNumHash {
+    /// Creates a new `BlockNumHash` from a block number and hash.
+    pub fn new(number: BlockNumber, hash: BlockHash) -> Self {
+        Self { number, hash }
+    }
+
+    /// Consumes `Self` and returns [`BlockNumber`], [`BlockHash`]
+    pub fn into_components(self) -> (BlockNumber, BlockHash) {
+        (self.number, self.hash)
+    }
+
+    /// Returns whether or not the block matches the given [BlockHashOrNumber].
+    pub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool {
+        match block {
+            BlockHashOrNumber::Hash(hash) => self.hash == *hash,
+            BlockHashOrNumber::Number(number) => self.number == *number,
+        }
+    }
+}
+
+impl From<(BlockNumber, BlockHash)> for BlockNumHash {
+    fn from(val: (BlockNumber, BlockHash)) -> Self {
+        BlockNumHash { number: val.0, hash: val.1 }
+    }
+}
+
+impl From<(BlockHash, BlockNumber)> for BlockNumHash {
+    fn from(val: (BlockHash, BlockNumber)) -> Self {
+        BlockNumHash { hash: val.0, number: val.1 }
+    }
+}
+
+/// Either a block hash _or_ a block number
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+#[cfg_attr(
+    any(test, feature = "arbitrary"),
+    derive(proptest_derive::Arbitrary, arbitrary::Arbitrary)
+)]
+pub enum BlockHashOrNumber {
+    /// A block hash
+    Hash(B256),
+    /// A block number
+    Number(u64),
+}
+
+// === impl BlockHashOrNumber ===
+
+impl BlockHashOrNumber {
+    /// Returns the block number if it is a [`BlockHashOrNumber::Number`].
+    #[inline]
+    pub fn as_number(self) -> Option<u64> {
+        match self {
+            BlockHashOrNumber::Hash(_) => None,
+            BlockHashOrNumber::Number(num) => Some(num),
+        }
+    }
+}
+
+impl From<B256> for BlockHashOrNumber {
+    fn from(value: B256) -> Self {
+        BlockHashOrNumber::Hash(value)
+    }
+}
+
+impl From<u64> for BlockHashOrNumber {
+    fn from(value: u64) -> Self {
+        BlockHashOrNumber::Number(value)
+    }
+}
+
+/// Allows for RLP encoding of either a block hash or block number
+impl Encodable for BlockHashOrNumber {
+    fn encode(&self, out: &mut dyn bytes::BufMut) {
+        match self {
+            Self::Hash(block_hash) => block_hash.encode(out),
+            Self::Number(block_number) => block_number.encode(out),
+        }
+    }
+    fn length(&self) -> usize {
+        match self {
+            Self::Hash(block_hash) => block_hash.length(),
+            Self::Number(block_number) => block_number.length(),
+        }
+    }
+}
+
+/// Allows for RLP decoding of a block hash or block number
+impl Decodable for BlockHashOrNumber {
+    fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        let header: u8 = *buf.first().ok_or(RlpError::InputTooShort)?;
+        // if the byte string is exactly 32 bytes, decode it into a Hash
+        // 0xa0 = 0x80 (start of string) + 0x20 (32, length of string)
+        if header == 0xa0 {
+            // strip the first byte, parsing the rest of the string.
+            // If the rest of the string fails to decode into 32 bytes, we'll bubble up the
+            // decoding error.
+            let hash = B256::decode(buf)?;
+            Ok(Self::Hash(hash))
+        } else {
+            // a block number when encoded as bytes ranges from 0 to any number of bytes - we're
+            // going to accept numbers which fit in less than 64 bytes.
+            // Any data larger than this which is not caught by the Hash decoding should error and
+            // is considered an invalid block number.
+            Ok(Self::Number(u64::decode(buf)?))
+        }
+    }
+}
+
+/// Error thrown when parsing a [BlockHashOrNumber] from a string.
+#[derive(Debug, thiserror::Error)]
+#[error("failed to parse {input:?} as a number: {parse_int_error} or hash: {hex_error}")]
+pub struct ParseBlockHashOrNumberError {
+    input: String,
+    parse_int_error: ParseIntError,
+    hex_error: alloy_primitives::hex::FromHexError,
+}
+
+impl FromStr for BlockHashOrNumber {
+    type Err = ParseBlockHashOrNumberError;
+
+    fn from_str(s: &str) -> Result<Self, Self::Err> {
+        match u64::from_str(s) {
+            Ok(val) => Ok(val.into()),
+            Err(pares_int_error) => match B256::from_str(s) {
+                Ok(val) => Ok(val.into()),
+                Err(hex_error) => Err(ParseBlockHashOrNumberError {
+                    input: s.to_string(),
+                    parse_int_error: pares_int_error,
+                    hex_error,
+                }),
+            },
+        }
+    }
+}
+
+/// A Block representation that allows to include additional fields
+pub type RichBlock = Rich<Block>;
+
+impl From<Block> for RichBlock {
+    fn from(block: Block) -> Self {
+        Rich { inner: block, extra_info: Default::default() }
+    }
+}
+
+/// Header representation with additional info.
+pub type RichHeader = Rich<Header>;
+
+impl From<Header> for RichHeader {
+    fn from(header: Header) -> Self {
+        Rich { inner: header, extra_info: Default::default() }
+    }
+}
+
+/// Value representation with additional info
+#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
+pub struct Rich<T> {
+    /// Standard value.
+    #[serde(flatten)]
+    pub inner: T,
+    /// Additional fields that should be serialized into the `Block` object
+    #[serde(flatten)]
+    pub extra_info: BTreeMap<String, serde_json::Value>,
+}
+
+impl<T> Deref for Rich<T> {
+    type Target = T;
+    fn deref(&self) -> &Self::Target {
+        &self.inner
+    }
+}
+
+impl<T: Serialize> Serialize for Rich<T> {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        if self.extra_info.is_empty() {
+            return self.inner.serialize(serializer);
+        }
+
+        let inner = serde_json::to_value(&self.inner);
+        let extras = serde_json::to_value(&self.extra_info);
+
+        if let (Ok(serde_json::Value::Object(mut value)), Ok(serde_json::Value::Object(extras))) =
+            (inner, extras)
+        {
+            value.extend(extras);
+            value.serialize(serializer)
+        } else {
+            Err(S::Error::custom("Unserializable structures: expected objects"))
+        }
+    }
+}
+
+/// BlockOverrides is a set of header fields to override.
+#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
+#[serde(default, rename_all = "camelCase", deny_unknown_fields)]
+pub struct BlockOverrides {
+    /// Overrides the block number.
+    ///
+    /// For `eth_callMany` this will be the block number of the first simulated block. Each
+    /// following block increments its block number by 1
+    // Note: geth uses `number`, erigon uses `blockNumber`
+    #[serde(default, skip_serializing_if = "Option::is_none", alias = "blockNumber")]
+    pub number: Option<U256>,
+    /// Overrides the difficulty of the block.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub difficulty: Option<U256>,
+    /// Overrides the timestamp of the block.
+    // Note: geth uses `time`, erigon uses `timestamp`
+    #[serde(default, skip_serializing_if = "Option::is_none", alias = "timestamp")]
+    pub time: Option<U64>,
+    /// Overrides the gas limit of the block.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub gas_limit: Option<U64>,
+    /// Overrides the coinbase address of the block.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub coinbase: Option<Address>,
+    /// Overrides the prevrandao of the block.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub random: Option<B256>,
+    /// Overrides the basefee of the block.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub base_fee: Option<U256>,
+    /// A dictionary that maps blockNumber to a user-defined hash. It could be queried from the
+    /// solidity opcode BLOCKHASH.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub block_hash: Option<BTreeMap<u64, B256>>,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_full_conversion() {
+        let full = true;
+        assert_eq!(BlockTransactionsKind::Full, full.into());
+
+        let full = false;
+        assert_eq!(BlockTransactionsKind::Hashes, full.into());
+    }
+
+    #[test]
+    #[cfg(feature = "jsonrpsee")]
+    fn serde_json_header() {
+        use jsonrpsee_types::SubscriptionResponse;
+        let resp = r#"{"jsonrpc":"2.0","method":"eth_subscribe","params":{"subscription":"0x7eef37ff35d471f8825b1c8f67a5d3c0","result":{"hash":"0x7a7ada12e140961a32395059597764416499f4178daf1917193fad7bd2cc6386","parentHash":"0xdedbd831f496e705e7f2ec3c8dcb79051040a360bf1455dbd7eb8ea6ad03b751","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","miner":"0x0000000000000000000000000000000000000000","stateRoot":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","number":"0x8","gasUsed":"0x0","gasLimit":"0x1c9c380","extraData":"0x","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","timestamp":"0x642aa48f","difficulty":"0x0","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000"}}}"#;
+        let _header: SubscriptionResponse<'_, Header> = serde_json::from_str(resp).unwrap();
+
+        let resp = r#"{"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0x1a14b6bdcf4542fabf71c4abee244e47","result":{"author":"0x000000568b9b5a365eaa767d42e74ed88915c204","difficulty":"0x1","extraData":"0x4e65746865726d696e6420312e392e32322d302d6463373666616366612d32308639ad8ff3d850a261f3b26bc2a55e0f3a718de0dd040a19a4ce37e7b473f2d7481448a1e1fd8fb69260825377c0478393e6055f471a5cf839467ce919a6ad2700","gasLimit":"0x7a1200","gasUsed":"0x0","hash":"0xa4856602944fdfd18c528ef93cc52a681b38d766a7e39c27a47488c8461adcb0","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x434822","parentHash":"0x1a9bdc31fc785f8a95efeeb7ae58f40f6366b8e805f47447a52335c95f4ceb49","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x261","stateRoot":"0xf38c4bf2958e541ec6df148e54ce073dc6b610f8613147ede568cb7b5c2d81ee","totalDifficulty":"0x633ebd","timestamp":"0x604726b0","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[]}}}"#;
+        let _header: SubscriptionResponse<'_, Header> = serde_json::from_str(resp).unwrap();
+    }
+
+    #[test]
+    fn serde_block() {
+        let block = Block {
+            header: Header {
+                hash: Some(B256::with_last_byte(1)),
+                parent_hash: B256::with_last_byte(2),
+                uncles_hash: B256::with_last_byte(3),
+                miner: Address::with_last_byte(4),
+                state_root: B256::with_last_byte(5),
+                transactions_root: B256::with_last_byte(6),
+                receipts_root: B256::with_last_byte(7),
+                withdrawals_root: Some(B256::with_last_byte(8)),
+                number: Some(U256::from(9)),
+                gas_used: U256::from(10),
+                gas_limit: U256::from(11),
+                extra_data: Bytes::from(vec![1, 2, 3]),
+                logs_bloom: Bloom::default(),
+                timestamp: U256::from(12),
+                difficulty: U256::from(13),
+                mix_hash: Some(B256::with_last_byte(14)),
+                nonce: Some(B64::with_last_byte(15)),
+                base_fee_per_gas: Some(U256::from(20)),
+                blob_gas_used: None,
+                excess_blob_gas: None,
+                parent_beacon_block_root: None,
+            },
+            total_difficulty: Some(U256::from(100000)),
+            uncles: vec![B256::with_last_byte(17)],
+            transactions: BlockTransactions::Hashes(vec![B256::with_last_byte(18)]),
+            size: Some(U256::from(19)),
+            withdrawals: Some(vec![]),
+            other: Default::default(),
+        };
+        let serialized = serde_json::to_string(&block).unwrap();
+        assert_eq!(
+            serialized,
+            r#"{"hash":"0x0000000000000000000000000000000000000000000000000000000000000001","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000002","sha3Uncles":"0x0000000000000000000000000000000000000000000000000000000000000003","miner":"0x0000000000000000000000000000000000000004","stateRoot":"0x0000000000000000000000000000000000000000000000000000000000000005","transactionsRoot":"0x0000000000000000000000000000000000000000000000000000000000000006","receiptsRoot":"0x0000000000000000000000000000000000000000000000000000000000000007","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0xd","number":"0x9","gasLimit":"0xb","gasUsed":"0xa","timestamp":"0xc","extraData":"0x010203","mixHash":"0x000000000000000000000000000000000000000000000000000000000000000e","nonce":"0x000000000000000f","baseFeePerGas":"0x14","withdrawalsRoot":"0x0000000000000000000000000000000000000000000000000000000000000008","totalDifficulty":"0x186a0","uncles":["0x0000000000000000000000000000000000000000000000000000000000000011"],"transactions":["0x0000000000000000000000000000000000000000000000000000000000000012"],"size":"0x13","withdrawals":[]}"#
+        );
+        let deserialized: Block = serde_json::from_str(&serialized).unwrap();
+        assert_eq!(block, deserialized);
+    }
+
+    #[test]
+    fn serde_block_with_withdrawals_set_as_none() {
+        let block = Block {
+            header: Header {
+                hash: Some(B256::with_last_byte(1)),
+                parent_hash: B256::with_last_byte(2),
+                uncles_hash: B256::with_last_byte(3),
+                miner: Address::with_last_byte(4),
+                state_root: B256::with_last_byte(5),
+                transactions_root: B256::with_last_byte(6),
+                receipts_root: B256::with_last_byte(7),
+                withdrawals_root: None,
+                number: Some(U256::from(9)),
+                gas_used: U256::from(10),
+                gas_limit: U256::from(11),
+                extra_data: Bytes::from(vec![1, 2, 3]),
+                logs_bloom: Bloom::default(),
+                timestamp: U256::from(12),
+                difficulty: U256::from(13),
+                mix_hash: Some(B256::with_last_byte(14)),
+                nonce: Some(B64::with_last_byte(15)),
+                base_fee_per_gas: Some(U256::from(20)),
+                blob_gas_used: None,
+                excess_blob_gas: None,
+                parent_beacon_block_root: None,
+            },
+            total_difficulty: Some(U256::from(100000)),
+            uncles: vec![B256::with_last_byte(17)],
+            transactions: BlockTransactions::Hashes(vec![B256::with_last_byte(18)]),
+            size: Some(U256::from(19)),
+            withdrawals: None,
+            other: Default::default(),
+        };
+        let serialized = serde_json::to_string(&block).unwrap();
+        assert_eq!(
+            serialized,
+            r#"{"hash":"0x0000000000000000000000000000000000000000000000000000000000000001","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000002","sha3Uncles":"0x0000000000000000000000000000000000000000000000000000000000000003","miner":"0x0000000000000000000000000000000000000004","stateRoot":"0x0000000000000000000000000000000000000000000000000000000000000005","transactionsRoot":"0x0000000000000000000000000000000000000000000000000000000000000006","receiptsRoot":"0x0000000000000000000000000000000000000000000000000000000000000007","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0xd","number":"0x9","gasLimit":"0xb","gasUsed":"0xa","timestamp":"0xc","extraData":"0x010203","mixHash":"0x000000000000000000000000000000000000000000000000000000000000000e","nonce":"0x000000000000000f","baseFeePerGas":"0x14","totalDifficulty":"0x186a0","uncles":["0x0000000000000000000000000000000000000000000000000000000000000011"],"transactions":["0x0000000000000000000000000000000000000000000000000000000000000012"],"size":"0x13"}"#
+        );
+        let deserialized: Block = serde_json::from_str(&serialized).unwrap();
+        assert_eq!(block, deserialized);
+    }
+
+    #[test]
+    fn block_overrides() {
+        let s = r#"{"blockNumber": "0xe39dd0"}"#;
+        let _overrides = serde_json::from_str::<BlockOverrides>(s).unwrap();
+    }
+
+    #[test]
+    fn serde_rich_block() {
+        let s = r#"{
+    "hash": "0xb25d0e54ca0104e3ebfb5a1dcdf9528140854d609886a300946fd6750dcb19f4",
+    "parentHash": "0x9400ec9ef59689c157ac89eeed906f15ddd768f94e1575e0e27d37c241439a5d",
+    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
+    "miner": "0x829bd824b016326a401d083b33d092293333a830",
+    "stateRoot": "0x546e330050c66d02923e7f1f3e925efaf64e4384eeecf2288f40088714a77a84",
+    "transactionsRoot": "0xd5eb3ad6d7c7a4798cc5fb14a6820073f44a941107c5d79dac60bd16325631fe",
+    "receiptsRoot": "0xb21c41cbb3439c5af25304e1405524c885e733b16203221900cb7f4b387b62f0",
+    "logsBloom": "0x1f304e641097eafae088627298685d20202004a4a59e4d8900914724e2402b028c9d596660581f361240816e82d00fa14250c9ca89840887a381efa600288283d170010ab0b2a0694c81842c2482457e0eb77c2c02554614007f42aaf3b4dc15d006a83522c86a240c06d241013258d90540c3008888d576a02c10120808520a2221110f4805200302624d22092b2c0e94e849b1e1aa80bc4cc3206f00b249d0a603ee4310216850e47c8997a20aa81fe95040a49ca5a420464600e008351d161dc00d620970b6a801535c218d0b4116099292000c08001943a225d6485528828110645b8244625a182c1a88a41087e6d039b000a180d04300d0680700a15794",
+    "difficulty": "0xc40faff9c737d",
+    "number": "0xa9a230",
+    "gasLimit": "0xbe5a66",
+    "gasUsed": "0xbe0fcc",
+    "timestamp": "0x5f93b749",
+    "extraData": "0x7070796520e4b883e5bda9e7a59ee4bb99e9b1bc0103",
+    "mixHash": "0xd5e2b7b71fbe4ddfe552fb2377bf7cddb16bbb7e185806036cee86994c6e97fc",
+    "nonce": "0x4722f2acd35abe0f",
+    "totalDifficulty": "0x3dc957fd8167fb2684a",
+    "uncles": [],
+    "transactions": [
+        "0xf435a26acc2a9ef73ac0b73632e32e29bd0e28d5c4f46a7e18ed545c93315916"
+    ],
+    "size": "0xaeb6"
+}"#;
+
+        let block = serde_json::from_str::<RichBlock>(s).unwrap();
+        let serialized = serde_json::to_string(&block).unwrap();
+        let block2 = serde_json::from_str::<RichBlock>(&serialized).unwrap();
+        assert_eq!(block, block2);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/call.rs.html b/src/alloy_rpc_types/eth/call.rs.html new file mode 100644 index 000000000000..f73a4b35371e --- /dev/null +++ b/src/alloy_rpc_types/eth/call.rs.html @@ -0,0 +1,542 @@ +call.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+
//use crate::access_list::AccessList;
+use crate::{AccessList, BlockId, BlockOverrides};
+use alloy_primitives::{Address, Bytes, B256, U256, U64, U8};
+use serde::{Deserialize, Deserializer, Serialize, Serializer};
+/// Bundle of transactions
+#[derive(Debug, Clone, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(default, rename_all = "camelCase")]
+pub struct Bundle {
+    /// Transactions
+    pub transactions: Vec<CallRequest>,
+    /// Block overides
+    pub block_override: Option<BlockOverrides>,
+}
+
+/// State context for callMany
+#[derive(Debug, Clone, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(default, rename_all = "camelCase")]
+pub struct StateContext {
+    /// Block Number
+    pub block_number: Option<BlockId>,
+    /// Inclusive number of tx to replay in block. -1 means replay all
+    pub transaction_index: Option<TransactionIndex>,
+}
+
+/// CallResponse for eth_callMany
+#[derive(Debug, Clone, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(default, rename_all = "camelCase")]
+pub struct EthCallResponse {
+    #[serde(skip_serializing_if = "Option::is_none")]
+    /// eth_call output (if no error)
+    pub output: Option<Bytes>,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    /// eth_call output (if error)
+    pub error: Option<String>,
+}
+
+/// Represents a transaction index where -1 means all transactions
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Default)]
+pub enum TransactionIndex {
+    /// -1 means all transactions
+    #[default]
+    All,
+    /// Transaction index
+    Index(usize),
+}
+
+impl TransactionIndex {
+    /// Returns true if this is the all variant
+    pub fn is_all(&self) -> bool {
+        matches!(self, TransactionIndex::All)
+    }
+
+    /// Returns the index if this is the index variant
+    pub fn index(&self) -> Option<usize> {
+        match self {
+            TransactionIndex::All => None,
+            TransactionIndex::Index(idx) => Some(*idx),
+        }
+    }
+}
+
+impl Serialize for TransactionIndex {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match self {
+            TransactionIndex::All => serializer.serialize_i8(-1),
+            TransactionIndex::Index(idx) => idx.serialize(serializer),
+        }
+    }
+}
+
+impl<'de> Deserialize<'de> for TransactionIndex {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        match isize::deserialize(deserializer)? {
+            -1 => Ok(TransactionIndex::All),
+            idx if idx < -1 => Err(serde::de::Error::custom(format!(
+                "Invalid transaction index, expected -1 or positive integer, got {}",
+                idx
+            ))),
+            idx => Ok(TransactionIndex::Index(idx as usize)),
+        }
+    }
+}
+
+/// Call request for `eth_call` and adjacent methods.
+#[derive(Debug, Clone, Default, Eq, PartialEq, Serialize, Deserialize, Hash)]
+#[serde(default, rename_all = "camelCase")]
+pub struct CallRequest {
+    /// From
+    pub from: Option<Address>,
+    /// To
+    pub to: Option<Address>,
+    /// Gas Price
+    pub gas_price: Option<U256>,
+    /// EIP-1559 Max base fee the caller is willing to pay
+    pub max_fee_per_gas: Option<U256>,
+    /// EIP-1559 Priority fee the caller is paying to the block author
+    pub max_priority_fee_per_gas: Option<U256>,
+    /// Gas
+    pub gas: Option<U256>,
+    /// Value
+    pub value: Option<U256>,
+    /// Transaction input data
+    #[serde(default, flatten)]
+    pub input: CallInput,
+    /// Nonce
+    pub nonce: Option<U64>,
+    /// chain id
+    pub chain_id: Option<U64>,
+    /// AccessList
+    pub access_list: Option<AccessList>,
+    /// Max Fee per Blob gas for EIP-4844 transactions
+    pub max_fee_per_blob_gas: Option<U256>,
+    /// Blob Versioned Hashes for EIP-4844 transactions
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub blob_versioned_hashes: Option<Vec<B256>>,
+    /// EIP-2718 type
+    #[serde(rename = "type")]
+    pub transaction_type: Option<U8>,
+}
+
+impl CallRequest {
+    /// Returns the configured fee cap, if any.
+    ///
+    /// The returns `gas_price` (legacy) if set or `max_fee_per_gas` (EIP1559)
+    #[inline]
+    pub fn fee_cap(&self) -> Option<U256> {
+        self.gas_price.or(self.max_fee_per_gas)
+    }
+
+    /// Returns true if the request has a `blobVersionedHashes` field but it is empty.
+    #[inline]
+    pub fn has_empty_blob_hashes(&self) -> bool {
+        self.blob_versioned_hashes.as_ref().map(|blobs| blobs.is_empty()).unwrap_or(false)
+    }
+}
+
+/// Helper type that supports both `data` and `input` fields that map to transaction input data.
+///
+/// This is done for compatibility reasons where older implementations used `data` instead of the
+/// newer, recommended `input` field.
+///
+/// If both fields are set, it is expected that they contain the same value, otherwise an error is
+/// returned.
+#[derive(Debug, Clone, Default, Eq, PartialEq, Serialize, Deserialize, Hash)]
+pub struct CallInput {
+    /// Transaction data
+    pub input: Option<Bytes>,
+    /// Transaction data
+    ///
+    /// This is the same as `input` but is used for backwards compatibility: <https://github.com/ethereum/go-ethereum/issues/15628>
+    pub data: Option<Bytes>,
+}
+
+impl CallInput {
+    /// Creates a new instance with the given input data.
+    pub fn new(data: Bytes) -> Self {
+        Self::maybe_input(Some(data))
+    }
+
+    /// Creates a new instance with the given input data.
+    pub fn maybe_input(input: Option<Bytes>) -> Self {
+        Self { input, data: None }
+    }
+
+    /// Consumes the type and returns the optional input data.
+    #[inline]
+    pub fn into_input(self) -> Option<Bytes> {
+        self.input.or(self.data)
+    }
+
+    /// Consumes the type and returns the optional input data.
+    ///
+    /// Returns an error if both `data` and `input` fields are set and not equal.
+    #[inline]
+    pub fn try_into_unique_input(self) -> Result<Option<Bytes>, CallInputError> {
+        self.check_unique_input().map(|()| self.into_input())
+    }
+
+    /// Returns the optional input data.
+    #[inline]
+    pub fn input(&self) -> Option<&Bytes> {
+        self.input.as_ref().or(self.data.as_ref())
+    }
+
+    /// Returns the optional input data.
+    ///
+    /// Returns an error if both `data` and `input` fields are set and not equal.
+    #[inline]
+    pub fn unique_input(&self) -> Result<Option<&Bytes>, CallInputError> {
+        self.check_unique_input().map(|()| self.input())
+    }
+
+    fn check_unique_input(&self) -> Result<(), CallInputError> {
+        if let (Some(input), Some(data)) = (&self.input, &self.data) {
+            if input != data {
+                return Err(CallInputError::default());
+            }
+        }
+        Ok(())
+    }
+}
+
+impl From<Bytes> for CallInput {
+    fn from(input: Bytes) -> Self {
+        Self { input: Some(input), data: None }
+    }
+}
+
+impl From<Option<Bytes>> for CallInput {
+    fn from(input: Option<Bytes>) -> Self {
+        Self { input, data: None }
+    }
+}
+
+/// Error thrown when both `data` and `input` fields are set and not equal.
+#[derive(Debug, Default, thiserror::Error)]
+#[error("both \"data\" and \"input\" are set and not equal. Please use \"input\" to pass transaction call data")]
+#[non_exhaustive]
+pub struct CallInputError;
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn transaction_index() {
+        let s = "-1";
+        let idx = serde_json::from_str::<TransactionIndex>(s).unwrap();
+        assert_eq!(idx, TransactionIndex::All);
+
+        let s = "5";
+        let idx = serde_json::from_str::<TransactionIndex>(s).unwrap();
+        assert_eq!(idx, TransactionIndex::Index(5));
+
+        let s = "-2";
+        let res = serde_json::from_str::<TransactionIndex>(s);
+        assert!(res.is_err());
+    }
+
+    #[test]
+    fn serde_call_request() {
+        let s = r#"{"accessList":[],"data":"0x0902f1ac","to":"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11","type":"0x02"}"#;
+        let _req = serde_json::from_str::<CallRequest>(s).unwrap();
+    }
+
+    #[test]
+    fn serde_unique_call_input() {
+        let s = r#"{"accessList":[],"data":"0x0902f1ac", "input":"0x0902f1ac","to":"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11","type":"0x02"}"#;
+        let req = serde_json::from_str::<CallRequest>(s).unwrap();
+        assert!(req.input.try_into_unique_input().unwrap().is_some());
+
+        let s = r#"{"accessList":[],"data":"0x0902f1ac","to":"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11","type":"0x02"}"#;
+        let req = serde_json::from_str::<CallRequest>(s).unwrap();
+        assert!(req.input.try_into_unique_input().unwrap().is_some());
+
+        let s = r#"{"accessList":[],"input":"0x0902f1ac","to":"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11","type":"0x02"}"#;
+        let req = serde_json::from_str::<CallRequest>(s).unwrap();
+        assert!(req.input.try_into_unique_input().unwrap().is_some());
+
+        let s = r#"{"accessList":[],"data":"0x0902f1ac", "input":"0x0902f1","to":"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11","type":"0x02"}"#;
+        let req = serde_json::from_str::<CallRequest>(s).unwrap();
+        assert!(req.input.try_into_unique_input().is_err());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/fee.rs.html b/src/alloy_rpc_types/eth/fee.rs.html new file mode 100644 index 000000000000..cba2780b73ce --- /dev/null +++ b/src/alloy_rpc_types/eth/fee.rs.html @@ -0,0 +1,114 @@ +fee.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+
use alloy_primitives::U256;
+use serde::{Deserialize, Serialize};
+
+/// Internal struct to calculate reward percentiles
+#[derive(Clone, Debug, PartialEq, Eq)]
+pub struct TxGasAndReward {
+    /// Gas used by the transaction
+    pub gas_used: u64,
+    /// The effective gas tip by the transaction
+    pub reward: u128,
+}
+
+impl PartialOrd for TxGasAndReward {
+    fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
+        Some(self.cmp(other))
+    }
+}
+
+impl Ord for TxGasAndReward {
+    fn cmp(&self, other: &Self) -> std::cmp::Ordering {
+        // compare only the reward
+        // see:
+        // <https://github.com/ethereum/go-ethereum/blob/ee8e83fa5f6cb261dad2ed0a7bbcde4930c41e6c/eth/gasprice/feehistory.go#L85>
+        self.reward.cmp(&other.reward)
+    }
+}
+
+/// Response type for `eth_feeHistory`
+#[derive(Debug, Clone, Default, PartialEq, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct FeeHistory {
+    /// An array of block base fees per gas.
+    /// This includes the next block after the newest of the returned range,
+    /// because this value can be derived from the newest block. Zeroes are
+    /// returned for pre-EIP-1559 blocks.
+    ///
+    /// # Note
+    ///
+    /// The `Option` is only for compatability with Erigon and Geth.
+    /// Empty list is skipped only for compatability with Erigon and Geth.
+    #[serde(default, skip_serializing_if = "Vec::is_empty")]
+    pub base_fee_per_gas: Vec<U256>,
+    /// An array of block gas used ratios. These are calculated as the ratio
+    /// of `gasUsed` and `gasLimit`.
+    ///
+    /// # Note
+    ///
+    /// The `Option` is only for compatability with Erigon and Geth.
+    pub gas_used_ratio: Vec<f64>,
+    /// Lowest number block of the returned range.
+    pub oldest_block: U256,
+    /// An (optional) array of effective priority fee per gas data points from a single
+    /// block. All zeroes are returned if the block is empty.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub reward: Option<Vec<Vec<U256>>>,
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/filter.rs.html b/src/alloy_rpc_types/eth/filter.rs.html new file mode 100644 index 000000000000..13e4fd3d1560 --- /dev/null +++ b/src/alloy_rpc_types/eth/filter.rs.html @@ -0,0 +1,2344 @@ +filter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+
use crate::{eth::log::Log as RpcLog, BlockNumberOrTag, Log, Transaction};
+use alloy_primitives::{keccak256, Address, Bloom, BloomInput, B256, U256, U64};
+use itertools::{EitherOrBoth::*, Itertools};
+use serde::{
+    de::{DeserializeOwned, MapAccess, Visitor},
+    ser::SerializeStruct,
+    Deserialize, Deserializer, Serialize, Serializer,
+};
+use std::{
+    collections::HashSet,
+    hash::Hash,
+    ops::{Range, RangeFrom, RangeTo},
+};
+
+/// Helper type to represent a bloom filter used for matching logs.
+#[derive(Default, Debug)]
+pub struct BloomFilter(Vec<Bloom>);
+
+impl From<Vec<Bloom>> for BloomFilter {
+    fn from(src: Vec<Bloom>) -> Self {
+        BloomFilter(src)
+    }
+}
+
+impl BloomFilter {
+    /// Returns whether the given bloom matches the list of Blooms in the current filter.
+    /// If the filter is empty (the list is empty), then any bloom matches
+    /// Otherwise, there must be at least one matche for the BloomFilter to match.
+    pub fn matches(&self, bloom: Bloom) -> bool {
+        self.0.is_empty() || self.0.iter().any(|a| bloom.contains(a))
+    }
+}
+
+#[derive(Default, Debug, PartialEq, Eq, Clone, Deserialize)]
+/// FilterSet is a set of values that will be used to filter logs
+pub struct FilterSet<T: Eq + Hash>(HashSet<T>);
+
+impl<T: Eq + Hash> From<T> for FilterSet<T> {
+    fn from(src: T) -> Self {
+        FilterSet(HashSet::from([src]))
+    }
+}
+
+impl<T: Eq + Hash> Hash for FilterSet<T> {
+    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+        for value in &self.0 {
+            value.hash(state);
+        }
+    }
+}
+
+impl<T: Eq + Hash> From<Vec<T>> for FilterSet<T> {
+    fn from(src: Vec<T>) -> Self {
+        FilterSet(HashSet::from_iter(src.into_iter().map(Into::into)))
+    }
+}
+
+impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T> {
+    fn from(src: ValueOrArray<T>) -> Self {
+        match src {
+            ValueOrArray::Value(val) => val.into(),
+            ValueOrArray::Array(arr) => arr.into(),
+        }
+    }
+}
+
+impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T> {
+    fn from(src: ValueOrArray<Option<T>>) -> Self {
+        match src {
+            ValueOrArray::Value(None) => FilterSet(HashSet::new()),
+            ValueOrArray::Value(Some(val)) => val.into(),
+            ValueOrArray::Array(arr) => {
+                // If the array contains at least one `null` (ie. None), as it's considered
+                // a "wildcard" value, the whole filter should be treated as matching everything,
+                // thus is empty.
+                if arr.iter().contains(&None) {
+                    FilterSet(HashSet::new())
+                } else {
+                    // Otherwise, we flatten the array, knowing there are no `None` values
+                    arr.into_iter().flatten().collect::<Vec<T>>().into()
+                }
+            }
+        }
+    }
+}
+
+impl<T: Eq + Hash> FilterSet<T> {
+    /// Returns wheter the filter is empty
+    pub fn is_empty(&self) -> bool {
+        self.0.is_empty()
+    }
+
+    /// Returns whether the given value matches the filter. It the filter is empty
+    /// any value matches. Otherwise, the filter must include the value
+    pub fn matches(&self, value: &T) -> bool {
+        self.is_empty() || self.0.contains(value)
+    }
+}
+
+impl<T: AsRef<[u8]> + Eq + Hash> FilterSet<T> {
+    /// Returns a list of Bloom (BloomFilter) corresponding to the filter's values
+    pub fn to_bloom_filter(&self) -> BloomFilter {
+        self.0.iter().map(|a| BloomInput::Raw(a.as_ref()).into()).collect::<Vec<Bloom>>().into()
+    }
+}
+
+impl<T: Clone + Eq + Hash> FilterSet<T> {
+    /// Returns a ValueOrArray inside an Option, so that:
+    ///   - If the filter is empty, it returns None
+    ///   - If the filter has only 1 value, it returns the single value
+    ///   - Otherwise it returns an array of values
+    /// This should be useful for serialization
+    pub fn to_value_or_array(&self) -> Option<ValueOrArray<T>> {
+        let mut values = self.0.iter().cloned().collect::<Vec<T>>();
+        match values.len() {
+            0 => None,
+            1 => Some(ValueOrArray::Value(values.pop().expect("values length is one"))),
+            _ => Some(ValueOrArray::Array(values)),
+        }
+    }
+}
+
+/// A single topic
+pub type Topic = FilterSet<B256>;
+
+impl From<U256> for Topic {
+    fn from(src: U256) -> Self {
+        Into::<B256>::into(src).into()
+    }
+}
+
+/// Represents the target range of blocks for the filter
+#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
+pub enum FilterBlockOption {
+    /// Represents a range of blocks with optional from and to blocks
+    ///
+    /// Note: ranges are considered to be __inclusive__
+    Range {
+        /// The block number or tag this filter should start at.
+        from_block: Option<BlockNumberOrTag>,
+        /// The block number or that this filter should end at.
+        to_block: Option<BlockNumberOrTag>,
+    },
+    /// The hash of the block if the filter only targets a single block
+    AtBlockHash(B256),
+}
+
+impl FilterBlockOption {
+    /// Returns the `fromBlock` value, if any
+    pub fn get_to_block(&self) -> Option<&BlockNumberOrTag> {
+        match self {
+            FilterBlockOption::Range { to_block, .. } => to_block.as_ref(),
+            FilterBlockOption::AtBlockHash(_) => None,
+        }
+    }
+
+    /// Returns the `toBlock` value, if any
+    pub fn get_from_block(&self) -> Option<&BlockNumberOrTag> {
+        match self {
+            FilterBlockOption::Range { from_block, .. } => from_block.as_ref(),
+            FilterBlockOption::AtBlockHash(_) => None,
+        }
+    }
+
+    /// Returns the range (`fromBlock`, `toBlock`) if this is a range filter.
+    pub fn as_range(&self) -> (Option<&BlockNumberOrTag>, Option<&BlockNumberOrTag>) {
+        match self {
+            FilterBlockOption::Range { from_block, to_block } => {
+                (from_block.as_ref(), to_block.as_ref())
+            }
+            FilterBlockOption::AtBlockHash(_) => (None, None),
+        }
+    }
+}
+
+impl From<BlockNumberOrTag> for FilterBlockOption {
+    fn from(block: BlockNumberOrTag) -> Self {
+        let block = Some(block);
+        FilterBlockOption::Range { from_block: block, to_block: block }
+    }
+}
+
+impl From<U64> for FilterBlockOption {
+    fn from(block: U64) -> Self {
+        BlockNumberOrTag::from(block).into()
+    }
+}
+
+impl From<u64> for FilterBlockOption {
+    fn from(block: u64) -> Self {
+        BlockNumberOrTag::from(block).into()
+    }
+}
+
+impl<T: Into<BlockNumberOrTag>> From<Range<T>> for FilterBlockOption {
+    fn from(r: Range<T>) -> Self {
+        let from_block = Some(r.start.into());
+        let to_block = Some(r.end.into());
+        FilterBlockOption::Range { from_block, to_block }
+    }
+}
+
+impl<T: Into<BlockNumberOrTag>> From<RangeTo<T>> for FilterBlockOption {
+    fn from(r: RangeTo<T>) -> Self {
+        let to_block = Some(r.end.into());
+        FilterBlockOption::Range { from_block: Some(BlockNumberOrTag::Earliest), to_block }
+    }
+}
+
+impl<T: Into<BlockNumberOrTag>> From<RangeFrom<T>> for FilterBlockOption {
+    fn from(r: RangeFrom<T>) -> Self {
+        let from_block = Some(r.start.into());
+        FilterBlockOption::Range { from_block, to_block: Some(BlockNumberOrTag::Latest) }
+    }
+}
+
+impl From<B256> for FilterBlockOption {
+    fn from(hash: B256) -> Self {
+        FilterBlockOption::AtBlockHash(hash)
+    }
+}
+
+impl Default for FilterBlockOption {
+    fn default() -> Self {
+        FilterBlockOption::Range { from_block: None, to_block: None }
+    }
+}
+
+impl FilterBlockOption {
+    /// Sets the block number this range filter should start at.
+    #[must_use]
+    pub fn set_from_block(&self, block: BlockNumberOrTag) -> Self {
+        let to_block =
+            if let FilterBlockOption::Range { to_block, .. } = self { *to_block } else { None };
+
+        FilterBlockOption::Range { from_block: Some(block), to_block }
+    }
+
+    /// Sets the block number this range filter should end at.
+    #[must_use]
+    pub fn set_to_block(&self, block: BlockNumberOrTag) -> Self {
+        let from_block =
+            if let FilterBlockOption::Range { from_block, .. } = self { *from_block } else { None };
+
+        FilterBlockOption::Range { from_block, to_block: Some(block) }
+    }
+
+    /// Pins the block hash this filter should target.
+    #[must_use]
+    pub fn set_hash(&self, hash: B256) -> Self {
+        FilterBlockOption::AtBlockHash(hash)
+    }
+}
+
+/// Filter for logs.
+#[derive(Default, Debug, PartialEq, Eq, Clone, Hash)]
+pub struct Filter {
+    /// Filter block options, specifying on which blocks the filter should
+    /// match.
+    // https://eips.ethereum.org/EIPS/eip-234
+    pub block_option: FilterBlockOption,
+    /// Address
+    pub address: FilterSet<Address>,
+    /// Topics (maxmimum of 4)
+    pub topics: [Topic; 4],
+}
+
+impl Filter {
+    /// Creates a new, empty filter
+    pub fn new() -> Self {
+        Self::default()
+    }
+
+    /// Sets the inner filter object
+    ///
+    /// *NOTE:* ranges are always inclusive
+    ///
+    /// # Examples
+    ///
+    /// Match only a specific block
+    ///
+    /// ```rust
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let filter = Filter::new().select(69u64);
+    /// # }
+    /// ```
+    /// This is the same as `Filter::new().from_block(1337u64).to_block(1337u64)`
+    ///
+    /// Match the latest block only
+    ///
+    /// ```rust
+    /// # use alloy_rpc_types::BlockNumberOrTag;
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let filter = Filter::new().select(BlockNumberOrTag::Latest);
+    /// # }
+    /// ```
+    ///
+    /// Match a block by its hash
+    ///
+    /// ```rust
+    /// # use alloy_primitives::B256;
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let filter = Filter::new().select(B256::ZERO);
+    /// # }
+    /// ```
+    /// This is the same as `at_block_hash`
+    ///
+    /// Match a range of blocks
+    ///
+    /// ```rust
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let filter = Filter::new().select(0u64..100u64);
+    /// # }
+    /// ```
+    ///
+    /// Match all blocks in range `(1337..BlockNumberOrTag::Latest)`
+    ///
+    /// ```rust
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let filter = Filter::new().select(1337u64..);
+    /// # }
+    /// ```
+    ///
+    /// Match all blocks in range `(BlockNumberOrTag::Earliest..1337)`
+    ///
+    /// ```rust
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let filter = Filter::new().select(..1337u64);
+    /// # }
+    /// ```
+    #[must_use]
+    pub fn select(mut self, filter: impl Into<FilterBlockOption>) -> Self {
+        self.block_option = filter.into();
+        self
+    }
+
+    /// Sets the from block number
+    #[allow(clippy::wrong_self_convention)]
+    #[must_use]
+    pub fn from_block<T: Into<BlockNumberOrTag>>(mut self, block: T) -> Self {
+        self.block_option = self.block_option.set_from_block(block.into());
+        self
+    }
+
+    /// Sets the to block number
+    #[allow(clippy::wrong_self_convention)]
+    #[must_use]
+    pub fn to_block<T: Into<BlockNumberOrTag>>(mut self, block: T) -> Self {
+        self.block_option = self.block_option.set_to_block(block.into());
+        self
+    }
+
+    /// Pins the block hash for the filter
+    #[must_use]
+    pub fn at_block_hash<T: Into<B256>>(mut self, hash: T) -> Self {
+        self.block_option = self.block_option.set_hash(hash.into());
+        self
+    }
+    /// Sets the inner filter object
+    ///
+    /// *NOTE:* ranges are always inclusive
+    ///
+    /// # Examples
+    ///
+    /// Match only a specific address `("0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF")`
+    ///
+    /// ```rust
+    /// # use alloy_primitives::Address;
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let filter = Filter::new()
+    ///     .address("0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF".parse::<Address>().unwrap());
+    /// # }
+    /// ```
+    ///
+    /// Match all addresses in array `(vec!["0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF",
+    /// "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8"])`
+    ///
+    /// ```rust
+    /// # use alloy_primitives::Address;
+    /// # use alloy_rpc_types::Filter;
+    /// # fn main() {
+    /// let addresses = vec![
+    ///     "0xAc4b3DacB91461209Ae9d41EC517c2B9Cb1B7DAF".parse::<Address>().unwrap(),
+    ///     "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8".parse::<Address>().unwrap(),
+    /// ];
+    /// let filter = Filter::new().address(addresses);
+    /// # }
+    /// ```
+    #[must_use]
+    pub fn address<T: Into<ValueOrArray<Address>>>(mut self, address: T) -> Self {
+        self.address = address.into().into();
+        self
+    }
+
+    /// Given the event signature in string form, it hashes it and adds it to the topics to monitor
+    #[must_use]
+    pub fn event(self, event_name: &str) -> Self {
+        let hash = keccak256(event_name.as_bytes());
+        self.event_signature(hash)
+    }
+
+    /// Hashes all event signatures and sets them as array to event_signature(topic0)
+    #[must_use]
+    pub fn events(self, events: impl IntoIterator<Item = impl AsRef<[u8]>>) -> Self {
+        let events = events.into_iter().map(|e| keccak256(e.as_ref())).collect::<Vec<_>>();
+        self.event_signature(events)
+    }
+
+    /// Sets event_signature(topic0) (the event name for non-anonymous events)
+    #[must_use]
+    pub fn event_signature<T: Into<Topic>>(mut self, topic: T) -> Self {
+        self.topics[0] = topic.into();
+        self
+    }
+
+    /// Sets topic0 (the event name for non-anonymous events)
+    #[must_use]
+    #[deprecated(note = "use `event_signature` instead")]
+    pub fn topic0<T: Into<Topic>>(mut self, topic: T) -> Self {
+        self.topics[0] = topic.into();
+        self
+    }
+
+    /// Sets the 1st indexed topic
+    #[must_use]
+    pub fn topic1<T: Into<Topic>>(mut self, topic: T) -> Self {
+        self.topics[1] = topic.into();
+        self
+    }
+
+    /// Sets the 2nd indexed topic
+    #[must_use]
+    pub fn topic2<T: Into<Topic>>(mut self, topic: T) -> Self {
+        self.topics[2] = topic.into();
+        self
+    }
+
+    /// Sets the 3rd indexed topic
+    #[must_use]
+    pub fn topic3<T: Into<Topic>>(mut self, topic: T) -> Self {
+        self.topics[3] = topic.into();
+        self
+    }
+
+    /// Returns true if this is a range filter and has a from block
+    pub fn is_paginatable(&self) -> bool {
+        self.get_from_block().is_some()
+    }
+
+    /// Returns the numeric value of the `toBlock` field
+    pub fn get_to_block(&self) -> Option<u64> {
+        self.block_option.get_to_block().and_then(|b| b.as_number())
+    }
+
+    /// Returns the numeric value of the `fromBlock` field
+    pub fn get_from_block(&self) -> Option<u64> {
+        self.block_option.get_from_block().and_then(|b| b.as_number())
+    }
+
+    /// Returns the numeric value of the `fromBlock` field
+    pub fn get_block_hash(&self) -> Option<B256> {
+        match self.block_option {
+            FilterBlockOption::AtBlockHash(hash) => Some(hash),
+            FilterBlockOption::Range { .. } => None,
+        }
+    }
+
+    /// Returns true if at least one topic is set
+    pub fn has_topics(&self) -> bool {
+        self.topics.iter().any(|t| !t.is_empty())
+    }
+}
+
+impl Serialize for Filter {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        let mut s = serializer.serialize_struct("Filter", 5)?;
+        match self.block_option {
+            FilterBlockOption::Range { from_block, to_block } => {
+                if let Some(ref from_block) = from_block {
+                    s.serialize_field("fromBlock", from_block)?;
+                }
+
+                if let Some(ref to_block) = to_block {
+                    s.serialize_field("toBlock", to_block)?;
+                }
+            }
+
+            FilterBlockOption::AtBlockHash(ref h) => s.serialize_field("blockHash", h)?,
+        }
+
+        if let Some(address) = self.address.to_value_or_array() {
+            s.serialize_field("address", &address)?;
+        }
+
+        let mut filtered_topics = Vec::new();
+        let mut filtered_topics_len = 0;
+        for (i, topic) in self.topics.iter().enumerate() {
+            if !topic.is_empty() {
+                filtered_topics_len = i + 1;
+            }
+            filtered_topics.push(topic.to_value_or_array());
+        }
+        filtered_topics.truncate(filtered_topics_len);
+        s.serialize_field("topics", &filtered_topics)?;
+
+        s.end()
+    }
+}
+
+type RawAddressFilter = ValueOrArray<Option<Address>>;
+type RawTopicsFilter = Vec<Option<ValueOrArray<Option<B256>>>>;
+
+impl<'de> Deserialize<'de> for Filter {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        struct FilterVisitor;
+
+        impl<'de> Visitor<'de> for FilterVisitor {
+            type Value = Filter;
+
+            fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+                formatter.write_str("Filter object")
+            }
+
+            fn visit_map<A>(self, mut map: A) -> Result<Self::Value, A::Error>
+            where
+                A: MapAccess<'de>,
+            {
+                let mut from_block: Option<Option<BlockNumberOrTag>> = None;
+                let mut to_block: Option<Option<BlockNumberOrTag>> = None;
+                let mut block_hash: Option<Option<B256>> = None;
+                let mut address: Option<Option<RawAddressFilter>> = None;
+                let mut topics: Option<Option<RawTopicsFilter>> = None;
+
+                while let Some(key) = map.next_key::<String>()? {
+                    match key.as_str() {
+                        "fromBlock" => {
+                            if from_block.is_some() {
+                                return Err(serde::de::Error::duplicate_field("fromBlock"));
+                            }
+                            if block_hash.is_some() {
+                                return Err(serde::de::Error::custom(
+                                    "fromBlock not allowed with blockHash",
+                                ));
+                            }
+                            from_block = Some(map.next_value()?)
+                        }
+                        "toBlock" => {
+                            if to_block.is_some() {
+                                return Err(serde::de::Error::duplicate_field("toBlock"));
+                            }
+                            if block_hash.is_some() {
+                                return Err(serde::de::Error::custom(
+                                    "toBlock not allowed with blockHash",
+                                ));
+                            }
+                            to_block = Some(map.next_value()?)
+                        }
+                        "blockHash" => {
+                            if block_hash.is_some() {
+                                return Err(serde::de::Error::duplicate_field("blockHash"));
+                            }
+                            if from_block.is_some() || to_block.is_some() {
+                                return Err(serde::de::Error::custom(
+                                    "fromBlock,toBlock not allowed with blockHash",
+                                ));
+                            }
+                            block_hash = Some(map.next_value()?)
+                        }
+                        "address" => {
+                            if address.is_some() {
+                                return Err(serde::de::Error::duplicate_field("address"));
+                            }
+                            address = Some(map.next_value()?)
+                        }
+                        "topics" => {
+                            if topics.is_some() {
+                                return Err(serde::de::Error::duplicate_field("topics"));
+                            }
+                            topics = Some(map.next_value()?)
+                        }
+
+                        key => {
+                            return Err(serde::de::Error::unknown_field(
+                                key,
+                                &["fromBlock", "toBlock", "address", "topics", "blockHash"],
+                            ))
+                        }
+                    }
+                }
+
+                let from_block = from_block.unwrap_or_default();
+                let to_block = to_block.unwrap_or_default();
+                let block_hash = block_hash.unwrap_or_default();
+                let address = address.flatten().map(|a| a.into()).unwrap_or_default();
+                let topics_vec = topics.flatten().unwrap_or_default();
+
+                // maximum allowed filter len
+                if topics_vec.len() > 4 {
+                    return Err(serde::de::Error::custom("exceeded maximum topics len"));
+                }
+                let mut topics: [Topic; 4] = [
+                    Default::default(),
+                    Default::default(),
+                    Default::default(),
+                    Default::default(),
+                ];
+                for (idx, topic) in topics_vec.into_iter().enumerate() {
+                    topics[idx] = topic.map(|t| t.into()).unwrap_or_default();
+                }
+
+                let block_option = if let Some(block_hash) = block_hash {
+                    FilterBlockOption::AtBlockHash(block_hash)
+                } else {
+                    FilterBlockOption::Range { from_block, to_block }
+                };
+
+                Ok(Filter { block_option, address, topics })
+            }
+        }
+
+        deserializer.deserialize_any(FilterVisitor)
+    }
+}
+
+/// Union type for representing a single value or a vector of values inside a filter
+#[derive(Debug, PartialEq, Eq, Clone, Hash)]
+pub enum ValueOrArray<T> {
+    /// A single value
+    Value(T),
+    /// A vector of values
+    Array(Vec<T>),
+}
+
+impl From<Address> for ValueOrArray<Address> {
+    fn from(src: Address) -> Self {
+        ValueOrArray::Value(src)
+    }
+}
+
+impl From<Vec<Address>> for ValueOrArray<Address> {
+    fn from(src: Vec<Address>) -> Self {
+        ValueOrArray::Array(src)
+    }
+}
+
+impl From<Vec<B256>> for ValueOrArray<B256> {
+    fn from(src: Vec<B256>) -> Self {
+        ValueOrArray::Array(src)
+    }
+}
+
+impl<T> Serialize for ValueOrArray<T>
+where
+    T: Serialize,
+{
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match self {
+            ValueOrArray::Value(inner) => inner.serialize(serializer),
+            ValueOrArray::Array(inner) => inner.serialize(serializer),
+        }
+    }
+}
+
+impl<'a, T> Deserialize<'a> for ValueOrArray<T>
+where
+    T: DeserializeOwned,
+{
+    fn deserialize<D>(deserializer: D) -> Result<ValueOrArray<T>, D::Error>
+    where
+        D: Deserializer<'a>,
+    {
+        let value = serde_json::Value::deserialize(deserializer)?;
+
+        if value.is_null() {
+            return Ok(ValueOrArray::Array(Vec::new()));
+        }
+
+        #[derive(Deserialize)]
+        #[serde(untagged)]
+        enum Variadic<T> {
+            Value(T),
+            Array(Vec<T>),
+        }
+
+        match serde_json::from_value::<Variadic<T>>(value).map_err(|err| {
+            serde::de::Error::custom(format!("Invalid variadic value or array type: {err}"))
+        })? {
+            Variadic::Value(val) => Ok(ValueOrArray::Value(val)),
+            Variadic::Array(arr) => Ok(ValueOrArray::Array(arr)),
+        }
+    }
+}
+
+/// Support for matching [Filter]s
+#[derive(Debug, Default)]
+pub struct FilteredParams {
+    /// The original filter, if any
+    pub filter: Option<Filter>,
+}
+
+impl FilteredParams {
+    /// Creates a new wrapper type for a [Filter], if any with flattened topics, that can be used
+    /// for matching
+    pub fn new(filter: Option<Filter>) -> Self {
+        if let Some(filter) = filter {
+            FilteredParams { filter: Some(filter) }
+        } else {
+            Default::default()
+        }
+    }
+
+    /// Returns the [BloomFilter] for the given address
+    pub fn address_filter(address: &FilterSet<Address>) -> BloomFilter {
+        address.to_bloom_filter()
+    }
+
+    /// Returns the [BloomFilter] for the given topics
+    pub fn topics_filter(topics: &[FilterSet<B256>]) -> Vec<BloomFilter> {
+        topics.iter().map(|t| t.to_bloom_filter()).collect()
+    }
+
+    /// Returns `true` if the bloom matches the topics
+    pub fn matches_topics(bloom: Bloom, topic_filters: &[BloomFilter]) -> bool {
+        if topic_filters.is_empty() {
+            return true;
+        }
+
+        // for each filter, iterate through the list of filter blooms. for each set of filter
+        // (each BloomFilter), the given `bloom` must match at least one of them, unless the list is
+        // empty (no filters).
+        for filter in topic_filters.iter() {
+            if !filter.matches(bloom) {
+                return false;
+            }
+        }
+        true
+    }
+
+    /// Returns `true` if the bloom contains one of the address blooms, or the address blooms
+    /// list is empty (thus, no filters)
+    pub fn matches_address(bloom: Bloom, address_filter: &BloomFilter) -> bool {
+        address_filter.matches(bloom)
+    }
+
+    /// Returns true if the filter matches the given block number
+    pub fn filter_block_range(&self, block_number: u64) -> bool {
+        if self.filter.is_none() {
+            return true;
+        }
+        let filter = self.filter.as_ref().unwrap();
+        let mut res = true;
+
+        if let Some(BlockNumberOrTag::Number(num)) = filter.block_option.get_from_block() {
+            if *num > block_number {
+                res = false;
+            }
+        }
+
+        if let Some(to) = filter.block_option.get_to_block() {
+            match to {
+                BlockNumberOrTag::Number(num) => {
+                    if *num < block_number {
+                        res = false;
+                    }
+                }
+                BlockNumberOrTag::Earliest => {
+                    res = false;
+                }
+                _ => {}
+            }
+        }
+        res
+    }
+
+    /// Returns `true` if the filter matches the given block hash.
+    pub fn filter_block_hash(&self, block_hash: B256) -> bool {
+        if let Some(h) = self.filter.as_ref().and_then(|f| f.get_block_hash()) {
+            if h != block_hash {
+                return false;
+            }
+        }
+        true
+    }
+
+    /// Returns `true` if the filter matches the given log.
+    pub fn filter_address(&self, log: &Log) -> bool {
+        self.filter.as_ref().map(|f| f.address.matches(&log.address)).unwrap_or(true)
+    }
+
+    /// Returns `true` if the log matches the filter's topics
+    pub fn filter_topics(&self, log: &Log) -> bool {
+        let topics = match self.filter.as_ref() {
+            None => return true,
+            Some(f) => &f.topics,
+        };
+        for topic_tuple in topics.iter().zip_longest(log.topics.iter()) {
+            match topic_tuple {
+                // We exhausted the `log.topics`, so if there's a filter set for
+                // this topic index, there is no match. Otherwise (empty filter), continue.
+                Left(filter_topic) => {
+                    if !filter_topic.is_empty() {
+                        return false;
+                    }
+                }
+                // We exhausted the filter topics, therefore any subsequent log topic
+                // will match.
+                Right(_) => return true,
+                // Check that `log_topic` is included in `filter_topic`
+                Both(filter_topic, log_topic) => {
+                    if !filter_topic.matches(log_topic) {
+                        return false;
+                    }
+                }
+            }
+        }
+        true
+    }
+}
+/// Response of the `eth_getFilterChanges` RPC.
+#[derive(Clone, Debug, Eq, PartialEq)]
+pub enum FilterChanges {
+    /// New logs.
+    Logs(Vec<RpcLog>),
+    /// New hashes (block or transactions)
+    Hashes(Vec<B256>),
+    /// New transactions.
+    Transactions(Vec<Transaction>),
+    /// Empty result,
+    Empty,
+}
+
+impl Serialize for FilterChanges {
+    fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match self {
+            FilterChanges::Logs(logs) => logs.serialize(s),
+            FilterChanges::Hashes(hashes) => hashes.serialize(s),
+            FilterChanges::Transactions(transactions) => transactions.serialize(s),
+            FilterChanges::Empty => (&[] as &[serde_json::Value]).serialize(s),
+        }
+    }
+}
+
+impl<'de> Deserialize<'de> for FilterChanges {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        #[derive(Deserialize)]
+        #[serde(untagged)]
+        enum Changes {
+            Logs(Vec<RpcLog>),
+            Hashes(Vec<B256>),
+        }
+
+        let changes = Changes::deserialize(deserializer)?;
+        let changes = match changes {
+            Changes::Logs(vals) => {
+                if vals.is_empty() {
+                    FilterChanges::Empty
+                } else {
+                    FilterChanges::Logs(vals)
+                }
+            }
+            Changes::Hashes(vals) => {
+                if vals.is_empty() {
+                    FilterChanges::Empty
+                } else {
+                    FilterChanges::Hashes(vals)
+                }
+            }
+        };
+        Ok(changes)
+    }
+}
+
+/// Owned equivalent of a `SubscriptionId`
+#[derive(Debug, PartialEq, Clone, Hash, Eq, Deserialize, Serialize)]
+#[serde(deny_unknown_fields)]
+#[serde(untagged)]
+pub enum FilterId {
+    /// Numeric id
+    Num(u64),
+    /// String id
+    Str(String),
+}
+
+#[cfg(feature = "jsonrpsee")]
+impl From<FilterId> for jsonrpsee_types::SubscriptionId<'_> {
+    fn from(value: FilterId) -> Self {
+        match value {
+            FilterId::Num(n) => jsonrpsee_types::SubscriptionId::Num(n),
+            FilterId::Str(s) => jsonrpsee_types::SubscriptionId::Str(s.into()),
+        }
+    }
+}
+
+#[cfg(feature = "jsonrpsee")]
+impl From<jsonrpsee_types::SubscriptionId<'_>> for FilterId {
+    fn from(value: jsonrpsee_types::SubscriptionId<'_>) -> Self {
+        match value {
+            jsonrpsee_types::SubscriptionId::Num(n) => FilterId::Num(n),
+            jsonrpsee_types::SubscriptionId::Str(s) => FilterId::Str(s.into_owned()),
+        }
+    }
+}
+/// Specifies the kind of information you wish to receive from the `eth_newPendingTransactionFilter`
+/// RPC endpoint.
+///
+/// When this type is used in a request, it determines whether the client wishes to receive:
+/// - Only the transaction hashes (`Hashes` variant), or
+/// - Full transaction details (`Full` variant).
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
+pub enum PendingTransactionFilterKind {
+    /// Receive only the hashes of the transactions.
+    #[default]
+    Hashes,
+    /// Receive full details of the transactions.
+    Full,
+}
+
+impl Serialize for PendingTransactionFilterKind {
+    /// Serializes the `PendingTransactionFilterKind` into a boolean value:
+    /// - `false` for `Hashes`
+    /// - `true` for `Full`
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match self {
+            PendingTransactionFilterKind::Hashes => false.serialize(serializer),
+            PendingTransactionFilterKind::Full => true.serialize(serializer),
+        }
+    }
+}
+
+impl<'a> Deserialize<'a> for PendingTransactionFilterKind {
+    /// Deserializes a boolean value into `PendingTransactionFilterKind`:
+    /// - `false` becomes `Hashes`
+    /// - `true` becomes `Full`
+    fn deserialize<D>(deserializer: D) -> Result<PendingTransactionFilterKind, D::Error>
+    where
+        D: Deserializer<'a>,
+    {
+        let val = Option::<bool>::deserialize(deserializer)?;
+        match val {
+            Some(true) => Ok(PendingTransactionFilterKind::Full),
+            _ => Ok(PendingTransactionFilterKind::Hashes),
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use alloy_primitives::U256;
+    use serde_json::json;
+
+    fn serialize<T: serde::Serialize>(t: &T) -> serde_json::Value {
+        serde_json::to_value(t).expect("Failed to serialize value")
+    }
+
+    #[test]
+    fn test_empty_filter_topics_list() {
+        let s = r#"{"fromBlock": "0xfc359e", "toBlock": "0xfc359e", "topics": [["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"], [], ["0x0000000000000000000000000c17e776cd218252adfca8d4e761d3fe757e9778"]]}"#;
+        let filter = serde_json::from_str::<Filter>(s).unwrap();
+        similar_asserts::assert_eq!(
+            filter.topics,
+            [
+                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
+                    .parse::<B256>()
+                    .unwrap()
+                    .into(),
+                Default::default(),
+                "0x0000000000000000000000000c17e776cd218252adfca8d4e761d3fe757e9778"
+                    .parse::<B256>()
+                    .unwrap()
+                    .into(),
+                Default::default(),
+            ]
+        );
+    }
+
+    #[test]
+    fn test_filter_topics_middle_wildcard() {
+        let s = r#"{"fromBlock": "0xfc359e", "toBlock": "0xfc359e", "topics": [["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"], [], [null, "0x0000000000000000000000000c17e776cd218252adfca8d4e761d3fe757e9778"]]}"#;
+        let filter = serde_json::from_str::<Filter>(s).unwrap();
+        similar_asserts::assert_eq!(
+            filter.topics,
+            [
+                "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
+                    .parse::<B256>()
+                    .unwrap()
+                    .into(),
+                Default::default(),
+                Default::default(),
+                Default::default(),
+            ]
+        );
+    }
+
+    #[test]
+    fn can_serde_value_or_array() {
+        #[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
+        struct Item {
+            value: ValueOrArray<U256>,
+        }
+
+        let item = Item { value: ValueOrArray::Value(U256::from(1u64)) };
+        let json = serde_json::to_value(item.clone()).unwrap();
+        let deserialized: Item = serde_json::from_value(json).unwrap();
+        assert_eq!(item, deserialized);
+
+        let item = Item { value: ValueOrArray::Array(vec![U256::from(1u64), U256::ZERO]) };
+        let json = serde_json::to_value(item.clone()).unwrap();
+        let deserialized: Item = serde_json::from_value(json).unwrap();
+        assert_eq!(item, deserialized);
+    }
+
+    #[test]
+    fn filter_serialization_test() {
+        let t1 = "0000000000000000000000009729a6fbefefc8f6005933898b13dc45c3a2c8b7"
+            .parse::<B256>()
+            .unwrap();
+        let t2 = B256::from([0; 32]);
+        let t3 = U256::from(123);
+
+        let t1_padded = t1;
+        let t3_padded = B256::from({
+            let mut x = [0; 32];
+            x[31] = 123;
+            x
+        });
+
+        let event = "ValueChanged(address,string,string)";
+        let t0 = keccak256(event.as_bytes());
+        let addr: Address = "f817796F60D268A36a57b8D2dF1B97B14C0D0E1d".parse().unwrap();
+        let filter = Filter::new();
+
+        let ser = serialize(&filter);
+        assert_eq!(ser, json!({ "topics": [] }));
+
+        let filter = filter.address(ValueOrArray::Value(addr));
+
+        let ser = serialize(&filter);
+        assert_eq!(ser, json!({"address" : addr, "topics": []}));
+
+        let filter = filter.event(event);
+
+        // 0
+        let ser = serialize(&filter);
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0]}));
+
+        // 1
+        let ser = serialize(&filter.clone().topic1(t1));
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0, t1_padded]}));
+
+        // 2
+        let ser = serialize(&filter.clone().topic2(t2));
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0, null, t2]}));
+
+        // 3
+        let ser = serialize(&filter.clone().topic3(t3));
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0, null, null, t3_padded]}));
+
+        // 1 & 2
+        let ser = serialize(&filter.clone().topic1(t1).topic2(t2));
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0, t1_padded, t2]}));
+
+        // 1 & 3
+        let ser = serialize(&filter.clone().topic1(t1).topic3(t3));
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0, t1_padded, null, t3_padded]}));
+
+        // 2 & 3
+        let ser = serialize(&filter.clone().topic2(t2).topic3(t3));
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0, null, t2, t3_padded]}));
+
+        // 1 & 2 & 3
+        let ser = serialize(&filter.topic1(t1).topic2(t2).topic3(t3));
+        assert_eq!(ser, json!({ "address" : addr, "topics": [t0, t1_padded, t2, t3_padded]}));
+    }
+
+    #[test]
+    fn can_convert_to_ethers_filter() {
+        let json = json!(
+                    {
+          "fromBlock": "0x429d3b",
+          "toBlock": "0x429d3b",
+          "address": "0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907",
+          "topics": [
+          "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
+          "0x00000000000000000000000000b46c2526e227482e2ebb8f4c69e4674d262e75",
+          "0x00000000000000000000000054a2d42a40f51259dedd1978f6c118a0f0eff078"
+          ]
+        }
+            );
+
+        let filter: Filter = serde_json::from_value(json).unwrap();
+        assert_eq!(
+            filter,
+            Filter {
+                block_option: FilterBlockOption::Range {
+                    from_block: Some(4365627u64.into()),
+                    to_block: Some(4365627u64.into()),
+                },
+                address: "0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907"
+                    .parse::<Address>()
+                    .unwrap()
+                    .into(),
+                topics: [
+                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
+                        .parse::<B256>()
+                        .unwrap()
+                        .into(),
+                    "0x00000000000000000000000000b46c2526e227482e2ebb8f4c69e4674d262e75"
+                        .parse::<B256>()
+                        .unwrap()
+                        .into(),
+                    "0x00000000000000000000000054a2d42a40f51259dedd1978f6c118a0f0eff078"
+                        .parse::<B256>()
+                        .unwrap()
+                        .into(),
+                    Default::default(),
+                ],
+            }
+        );
+    }
+
+    #[test]
+    fn can_convert_to_ethers_filter_with_null_fields() {
+        let json = json!(
+                    {
+          "fromBlock": "0x429d3b",
+          "toBlock": "0x429d3b",
+          "address": null,
+          "topics": null
+        }
+            );
+
+        let filter: Filter = serde_json::from_value(json).unwrap();
+        assert_eq!(
+            filter,
+            Filter {
+                block_option: FilterBlockOption::Range {
+                    from_block: Some(4365627u64.into()),
+                    to_block: Some(4365627u64.into()),
+                },
+                address: Default::default(),
+                topics: Default::default(),
+            }
+        );
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/log.rs.html b/src/alloy_rpc_types/eth/log.rs.html new file mode 100644 index 000000000000..199c9ed56102 --- /dev/null +++ b/src/alloy_rpc_types/eth/log.rs.html @@ -0,0 +1,144 @@ +log.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+
use alloy_primitives::{Address, Bytes, B256, U256};
+use serde::{Deserialize, Serialize};
+
+/// Ethereum Log emitted by a transaction
+#[derive(Debug, Clone, Eq, PartialEq, Hash, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct Log {
+    /// Address
+    pub address: Address,
+    /// All topics of the log
+    pub topics: Vec<B256>,
+    /// Additional data fields of the log
+    pub data: Bytes,
+    /// Hash of the block the transaction that emitted this log was mined in
+    pub block_hash: Option<B256>,
+    /// Number of the block the transaction that emitted this log was mined in
+    pub block_number: Option<U256>,
+    /// Transaction Hash
+    pub transaction_hash: Option<B256>,
+    /// Index of the Transaction in the block
+    pub transaction_index: Option<U256>,
+    /// Log Index in Block
+    pub log_index: Option<U256>,
+    /// Geth Compatibility Field: whether this log was removed
+    #[serde(default)]
+    pub removed: bool,
+}
+
+impl TryFrom<Log> for alloy_primitives::Log {
+    type Error = LogError;
+
+    fn try_from(value: Log) -> Result<Self, Self::Error> {
+        alloy_primitives::Log::new(value.topics, value.data).ok_or(LogError::TooManyTopics)
+    }
+}
+
+/// Error that can occur when converting other types to logs
+#[derive(Debug, thiserror::Error)]
+pub enum LogError {
+    /// There are too many topics
+    #[error("too many topics")]
+    TooManyTopics,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn serde_log() {
+        let log = Log {
+            address: Address::with_last_byte(0x69),
+            topics: vec![B256::with_last_byte(0x69)],
+            data: Bytes::from_static(&[0x69]),
+            block_hash: Some(B256::with_last_byte(0x69)),
+            block_number: Some(U256::from(0x69)),
+            transaction_hash: Some(B256::with_last_byte(0x69)),
+            transaction_index: Some(U256::from(0x69)),
+            log_index: Some(U256::from(0x69)),
+            removed: false,
+        };
+        let serialized = serde_json::to_string(&log).unwrap();
+        assert_eq!(
+            serialized,
+            r#"{"address":"0x0000000000000000000000000000000000000069","topics":["0x0000000000000000000000000000000000000000000000000000000000000069"],"data":"0x69","blockHash":"0x0000000000000000000000000000000000000000000000000000000000000069","blockNumber":"0x69","transactionHash":"0x0000000000000000000000000000000000000000000000000000000000000069","transactionIndex":"0x69","logIndex":"0x69","removed":false}"#
+        );
+
+        let deserialized: Log = serde_json::from_str(&serialized).unwrap();
+        assert_eq!(log, deserialized);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/mod.rs.html b/src/alloy_rpc_types/eth/mod.rs.html new file mode 100644 index 000000000000..e6623aac83e1 --- /dev/null +++ b/src/alloy_rpc_types/eth/mod.rs.html @@ -0,0 +1,60 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+
//! Ethereum related types
+
+pub mod account;
+mod block;
+mod call;
+mod fee;
+mod filter;
+mod log;
+pub mod other;
+pub mod pubsub;
+pub mod raw_log;
+pub mod state;
+mod syncing;
+pub mod trace;
+mod transaction;
+pub mod txpool;
+pub mod withdrawal;
+
+pub use account::*;
+pub use block::*;
+pub use call::{Bundle, CallInput, CallInputError, CallRequest, EthCallResponse, StateContext};
+pub use fee::{FeeHistory, TxGasAndReward};
+pub use filter::*;
+pub use log::*;
+pub use raw_log::{logs_bloom, Log as RawLog};
+pub use syncing::*;
+pub use transaction::*;
+pub use txpool::*;
+pub use withdrawal::Withdrawal;
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/other.rs.html b/src/alloy_rpc_types/eth/other.rs.html new file mode 100644 index 000000000000..88ee1d955bad --- /dev/null +++ b/src/alloy_rpc_types/eth/other.rs.html @@ -0,0 +1,236 @@ +other.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+
//! Support for capturing other fields
+use serde::{de::DeserializeOwned, Deserialize, Serialize};
+use serde_json::Map;
+use std::{
+    collections::BTreeMap,
+    ops::{Deref, DerefMut},
+};
+
+/// A type that is supposed to capture additional fields that are not native to ethereum but included in ethereum adjacent networks, for example fields the [optimism `eth_getTransactionByHash` request](https://docs.alchemy.com/alchemy/apis/optimism/eth-gettransactionbyhash) returns additional fields that this type will capture
+///
+/// This type is supposed to be used with [`#[serde(flatten)`](https://serde.rs/field-attrs.html#flatten)
+#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize, Default)]
+#[serde(transparent)]
+pub struct OtherFields {
+    /// Contains all unknown fields
+    inner: BTreeMap<String, serde_json::Value>,
+}
+
+// === impl OtherFields ===
+
+impl OtherFields {
+    /// Returns the deserialized value of the field, if it exists.
+    /// Deserializes the value with the given closure
+    pub fn get_with<F, V>(&self, key: impl AsRef<str>, with: F) -> Option<V>
+    where
+        F: FnOnce(serde_json::Value) -> V,
+    {
+        self.inner.get(key.as_ref()).cloned().map(with)
+    }
+
+    /// Returns the deserialized value of the field, if it exists
+    pub fn get_deserialized<V: DeserializeOwned>(
+        &self,
+        key: impl AsRef<str>,
+    ) -> Option<serde_json::Result<V>> {
+        self.inner.get(key.as_ref()).cloned().map(serde_json::from_value)
+    }
+
+    /// Removes the deserialized value of the field, if it exists
+    ///
+    /// **Note:** this will also remove the value if deserializing it resulted in an error
+    pub fn remove_deserialized<V: DeserializeOwned>(
+        &mut self,
+        key: impl AsRef<str>,
+    ) -> Option<serde_json::Result<V>> {
+        self.inner.remove(key.as_ref()).map(serde_json::from_value)
+    }
+
+    /// Removes the deserialized value of the field, if it exists.
+    /// Deserializes the value with the given closure
+    ///
+    /// **Note:** this will also remove the value if deserializing it resulted in an error
+    pub fn remove_with<F, V>(&mut self, key: impl AsRef<str>, with: F) -> Option<V>
+    where
+        F: FnOnce(serde_json::Value) -> V,
+    {
+        self.inner.remove(key.as_ref()).map(with)
+    }
+
+    /// Removes the deserialized value of the field, if it exists and also returns the key
+    ///
+    /// **Note:** this will also remove the value if deserializing it resulted in an error
+    pub fn remove_entry_deserialized<V: DeserializeOwned>(
+        &mut self,
+        key: impl AsRef<str>,
+    ) -> Option<(String, serde_json::Result<V>)> {
+        self.inner
+            .remove_entry(key.as_ref())
+            .map(|(key, value)| (key, serde_json::from_value(value)))
+    }
+
+    /// Deserialized this type into another container type
+    pub fn deserialize_into<T: DeserializeOwned>(self) -> serde_json::Result<T> {
+        let mut map = Map::with_capacity(self.inner.len());
+        map.extend(self);
+        serde_json::from_value(serde_json::Value::Object(map))
+    }
+}
+
+impl Deref for OtherFields {
+    type Target = BTreeMap<String, serde_json::Value>;
+
+    #[inline]
+    fn deref(&self) -> &BTreeMap<String, serde_json::Value> {
+        self.as_ref()
+    }
+}
+
+impl DerefMut for OtherFields {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.inner
+    }
+}
+
+impl AsRef<BTreeMap<String, serde_json::Value>> for OtherFields {
+    fn as_ref(&self) -> &BTreeMap<String, serde_json::Value> {
+        &self.inner
+    }
+}
+
+impl IntoIterator for OtherFields {
+    type Item = (String, serde_json::Value);
+    type IntoIter = std::collections::btree_map::IntoIter<String, serde_json::Value>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.inner.into_iter()
+    }
+}
+
+impl<'a> IntoIterator for &'a OtherFields {
+    type Item = (&'a String, &'a serde_json::Value);
+    type IntoIter = std::collections::btree_map::Iter<'a, String, serde_json::Value>;
+
+    fn into_iter(self) -> Self::IntoIter {
+        self.as_ref().iter()
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/pubsub.rs.html b/src/alloy_rpc_types/eth/pubsub.rs.html new file mode 100644 index 000000000000..9ff06c6eac8d --- /dev/null +++ b/src/alloy_rpc_types/eth/pubsub.rs.html @@ -0,0 +1,340 @@ +pubsub.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+
//! Ethereum types for pub-sub
+
+use crate::{
+    eth::{Filter, Transaction},
+    Log, RichHeader,
+};
+use alloy_primitives::B256;
+use serde::{de::Error, Deserialize, Deserializer, Serialize, Serializer};
+
+/// Subscription result.
+#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
+#[serde(untagged)]
+pub enum SubscriptionResult {
+    /// New block header.
+    Header(Box<RichHeader>),
+    /// Log
+    Log(Box<Log>),
+    /// Transaction hash
+    TransactionHash(B256),
+    /// Full Transaction
+    FullTransaction(Box<Transaction>),
+    /// SyncStatus
+    SyncState(PubSubSyncStatus),
+}
+
+/// Response type for a SyncStatus subscription
+#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum PubSubSyncStatus {
+    /// If not currently syncing, this should always be `false`
+    Simple(bool),
+    /// Current Stats about syncing
+    Detailed(SyncStatusMetadata),
+}
+
+/// Sync status infos
+#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+#[allow(missing_docs)]
+pub struct SyncStatusMetadata {
+    pub syncing: bool,
+    pub starting_block: u64,
+    pub current_block: u64,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub highest_block: Option<u64>,
+}
+
+impl Serialize for SubscriptionResult {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match *self {
+            SubscriptionResult::Header(ref header) => header.serialize(serializer),
+            SubscriptionResult::Log(ref log) => log.serialize(serializer),
+            SubscriptionResult::TransactionHash(ref hash) => hash.serialize(serializer),
+            SubscriptionResult::FullTransaction(ref tx) => tx.serialize(serializer),
+            SubscriptionResult::SyncState(ref sync) => sync.serialize(serializer),
+        }
+    }
+}
+
+/// Subscription kind.
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Clone)]
+#[serde(deny_unknown_fields)]
+#[serde(rename_all = "camelCase")]
+pub enum SubscriptionKind {
+    /// 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.
+    NewHeads,
+    /// 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.
+    Logs,
+    /// 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.
+    NewPendingTransactions,
+    /// 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.
+    Syncing,
+}
+
+/// Any additional parameters for a subscription.
+#[derive(Debug, Clone, PartialEq, Eq, Default)]
+pub enum Params {
+    /// No parameters passed.
+    #[default]
+    None,
+    /// Log parameters.
+    Logs(Box<Filter>),
+    /// Boolean parameter for new pending transactions.
+    Bool(bool),
+}
+
+impl Params {
+    /// Returns true if it's a bool parameter.
+    #[inline]
+    pub fn is_bool(&self) -> bool {
+        matches!(self, Params::Bool(_))
+    }
+
+    /// Returns true if it's a log parameter.
+    #[inline]
+    pub fn is_logs(&self) -> bool {
+        matches!(self, Params::Logs(_))
+    }
+}
+
+impl Serialize for Params {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match self {
+            Params::None => (&[] as &[serde_json::Value]).serialize(serializer),
+            Params::Logs(logs) => logs.serialize(serializer),
+            Params::Bool(full) => full.serialize(serializer),
+        }
+    }
+}
+
+impl<'a> Deserialize<'a> for Params {
+    fn deserialize<D>(deserializer: D) -> Result<Params, D::Error>
+    where
+        D: Deserializer<'a>,
+    {
+        let v = serde_json::Value::deserialize(deserializer)?;
+
+        if v.is_null() {
+            return Ok(Params::None);
+        }
+
+        if let Some(val) = v.as_bool() {
+            return Ok(Params::Bool(val));
+        }
+
+        serde_json::from_value(v)
+            .map(|f| Params::Logs(Box::new(f)))
+            .map_err(|e| D::Error::custom(format!("Invalid Pub-Sub parameters: {e}")))
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn params_serde() {
+        let s: Params = serde_json::from_str("true").unwrap();
+        assert_eq!(s, Params::Bool(true));
+        let s: Params = serde_json::from_str("null").unwrap();
+        assert_eq!(s, Params::None);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/raw_log.rs.html b/src/alloy_rpc_types/eth/raw_log.rs.html new file mode 100644 index 000000000000..fd8712bdf3f0 --- /dev/null +++ b/src/alloy_rpc_types/eth/raw_log.rs.html @@ -0,0 +1,62 @@ +raw_log.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+
//! Ethereum log object.
+
+use alloy_primitives::{Address, Bloom, Bytes, B256};
+use alloy_rlp::{RlpDecodable, RlpEncodable};
+
+/// Ethereum Log
+#[derive(Clone, Debug, PartialEq, Eq, RlpDecodable, RlpEncodable, Default)]
+pub struct Log {
+    /// Contract that emitted this log.
+    pub address: Address,
+    /// Topics of the log. The number of logs depend on what `LOG` opcode is used.
+    pub topics: Vec<B256>,
+    /// Arbitrary length data.
+    pub data: Bytes,
+}
+
+/// Calculate receipt logs bloom.
+pub fn logs_bloom<'a, It>(logs: It) -> Bloom
+where
+    It: IntoIterator<Item = &'a Log>,
+{
+    let mut bloom = Bloom::ZERO;
+    for log in logs {
+        bloom.m3_2048(log.address.as_slice());
+        for topic in &log.topics {
+            bloom.m3_2048(topic.as_slice());
+        }
+    }
+    bloom
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/state.rs.html b/src/alloy_rpc_types/eth/state.rs.html new file mode 100644 index 000000000000..c33aa7782a59 --- /dev/null +++ b/src/alloy_rpc_types/eth/state.rs.html @@ -0,0 +1,140 @@ +state.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
//! bindings for state overrides in eth_call
+
+use alloy_primitives::{Address, Bytes, B256, U256, U64};
+use serde::{Deserialize, Serialize};
+use std::collections::HashMap;
+
+/// A set of account overrides
+pub type StateOverride = HashMap<Address, AccountOverride>;
+
+/// Custom account override used in call
+#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
+#[serde(default, rename_all = "camelCase", deny_unknown_fields)]
+#[allow(missing_docs)]
+pub struct AccountOverride {
+    /// Fake balance to set for the account before executing the call.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub balance: Option<U256>,
+    /// Fake nonce to set for the account before executing the call.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub nonce: Option<U64>,
+    /// Fake EVM bytecode to inject into the account before executing the call.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub code: Option<Bytes>,
+    /// Fake key-value mapping to override all slots in the account storage before executing the
+    /// call.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub state: Option<HashMap<B256, U256>>,
+    /// Fake key-value mapping to override individual slots in the account storage before executing
+    /// the call.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub state_diff: Option<HashMap<B256, U256>>,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use alloy_primitives::address;
+
+    #[test]
+    fn test_state_override() {
+        let s = r#"{
+            "0x0000000000000000000000000000000000000124": {
+                "code": "0x6080604052348015600e575f80fd5b50600436106026575f3560e01c80632096525514602a575b5f80fd5b60306044565b604051901515815260200160405180910390f35b5f604e600242605e565b5f0360595750600190565b505f90565b5f82607757634e487b7160e01b5f52601260045260245ffd5b50069056fea2646970667358221220287f77a4262e88659e3fb402138d2ee6a7ff9ba86bae487a95aa28156367d09c64736f6c63430008140033"
+            }
+        }"#;
+        let state_override: StateOverride = serde_json::from_str(s).unwrap();
+        let acc =
+            state_override.get(&address!("0000000000000000000000000000000000000124")).unwrap();
+        assert!(acc.code.is_some());
+    }
+    #[test]
+    fn test_state_override_state_diff() {
+        let s = r#"{
+                "0x1b5212AF6b76113afD94cD2B5a78a73B7d7A8222": {
+                    "balance": "0x39726378b58c400000",
+                    "stateDiff": {}
+                },
+                "0xdAC17F958D2ee523a2206206994597C13D831ec7": {
+                    "stateDiff": {
+                        "0xede27e4e7f3676edbf125879f17a896d6507958df3d57bda6219f1880cae8a41": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+                    }
+                }
+            }"#;
+        let state_override: StateOverride = serde_json::from_str(s).unwrap();
+        let acc =
+            state_override.get(&address!("1b5212AF6b76113afD94cD2B5a78a73B7d7A8222")).unwrap();
+        assert!(acc.state_diff.is_some());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/syncing.rs.html b/src/alloy_rpc_types/eth/syncing.rs.html new file mode 100644 index 000000000000..f6e9bfd0b5e9 --- /dev/null +++ b/src/alloy_rpc_types/eth/syncing.rs.html @@ -0,0 +1,324 @@ +syncing.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+
use alloy_primitives::{B512, U256, U64};
+use serde::{Deserialize, Deserializer, Serialize, Serializer};
+use std::collections::BTreeMap;
+
+/// Syncing info
+#[derive(Debug, Clone, Default, Serialize, Deserialize, Eq, PartialEq)]
+#[serde(rename_all = "camelCase")]
+pub struct SyncInfo {
+    /// Starting block
+    pub starting_block: U256,
+    /// Current block
+    pub current_block: U256,
+    /// Highest block seen so far
+    pub highest_block: U256,
+    /// Warp sync snapshot chunks total.
+    pub warp_chunks_amount: Option<U256>,
+    /// Warp sync snapshot chunks processed.
+    pub warp_chunks_processed: Option<U256>,
+}
+
+/// Peers info
+#[derive(Debug, Clone, Default, Serialize)]
+pub struct Peers {
+    /// Number of active peers
+    pub active: usize,
+    /// Number of connected peers
+    pub connected: usize,
+    /// Max number of peers
+    pub max: u32,
+    /// Detailed information on peers
+    pub peers: Vec<PeerInfo>,
+}
+
+/// Number of peers connected to.
+#[derive(Clone, Debug, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum PeerCount {
+    /// Peer count as integer
+    Number(u32),
+    /// Peer count as hex
+    Hex(U64),
+}
+
+/// Peer connection information
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+pub struct PeerInfo {
+    /// Public node id
+    pub id: Option<String>,
+    /// Node client ID
+    pub name: String,
+    /// Capabilities
+    pub caps: Vec<String>,
+    /// Network information
+    pub network: PeerNetworkInfo,
+    /// Protocols information
+    pub protocols: PeerProtocolsInfo,
+}
+
+/// Peer network information
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct PeerNetworkInfo {
+    /// Remote endpoint address
+    pub remote_address: String,
+    /// Local endpoint address
+    pub local_address: String,
+}
+
+/// Peer protocols information
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+pub struct PeerProtocolsInfo {
+    /// Ethereum protocol information
+    pub eth: Option<PeerEthProtocolInfo>,
+    /// PIP protocol information.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub pip: Option<PipProtocolInfo>,
+}
+
+/// Peer Ethereum protocol information
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+pub struct PeerEthProtocolInfo {
+    /// Negotiated ethereum protocol version
+    pub version: u32,
+    /// Peer total difficulty if known
+    pub difficulty: Option<U256>,
+    /// SHA3 of peer best block hash
+    pub head: String,
+}
+
+/// Peer PIP protocol information
+#[derive(Debug, Clone, Default, Serialize, Deserialize)]
+pub struct PipProtocolInfo {
+    /// Negotiated PIP protocol version
+    pub version: u32,
+    /// Peer total difficulty
+    pub difficulty: U256,
+    /// SHA3 of peer best block hash
+    pub head: String,
+}
+
+/// Sync status
+#[derive(Clone, Debug, Eq, PartialEq)]
+pub enum SyncStatus {
+    /// Info when syncing
+    Info(SyncInfo),
+    /// Not syncing
+    None,
+}
+
+impl<'de> Deserialize<'de> for SyncStatus {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        #[derive(Deserialize)]
+        #[serde(untagged)]
+        enum Syncing {
+            /// When client is synced to the highest block, eth_syncing with return "false"
+            None(bool),
+            IsSyncing(SyncInfo),
+        }
+
+        match Syncing::deserialize(deserializer)? {
+            Syncing::None(false) => Ok(SyncStatus::None),
+            Syncing::None(true) => Err(serde::de::Error::custom(
+                "eth_syncing returned `true` that is undefined value.",
+            )),
+            Syncing::IsSyncing(sync) => Ok(SyncStatus::Info(sync)),
+        }
+    }
+}
+
+impl Serialize for SyncStatus {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        match self {
+            SyncStatus::Info(info) => info.serialize(serializer),
+            SyncStatus::None => serializer.serialize_bool(false),
+        }
+    }
+}
+
+/// Propagation statistics for pending transaction.
+#[derive(Debug, Clone, Default, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct TransactionStats {
+    /// Block no this transaction was first seen.
+    pub first_seen: u64,
+    /// Peers this transaction was propagated to with count.
+    pub propagated_to: BTreeMap<B512, usize>,
+}
+
+/// Chain status.
+#[derive(Debug, Clone, Default, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct ChainStatus {
+    /// Describes the gap in the blockchain, if there is one: (first, last)
+    pub block_gap: Option<(U256, U256)>,
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/common.rs.html b/src/alloy_rpc_types/eth/trace/common.rs.html new file mode 100644 index 000000000000..e0670e9e9a38 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/common.rs.html @@ -0,0 +1,30 @@ +common.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+
//! Types used by tracing backends
+
+use serde::{Deserialize, Serialize};
+
+/// The result of a single transaction trace.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(untagged)]
+#[allow(missing_docs)]
+pub enum TraceResult<Ok, Err> {
+    /// Untagged success variant
+    Success { result: Ok },
+    /// Untagged error variant
+    Error { error: Err },
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/filter.rs.html b/src/alloy_rpc_types/eth/trace/filter.rs.html new file mode 100644 index 000000000000..9a6b384b7a3f --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/filter.rs.html @@ -0,0 +1,368 @@ +filter.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+
//! `trace_filter` types and support
+use crate::serde_helpers::num::u64_hex_or_decimal_opt;
+use alloy_primitives::Address;
+use serde::{Deserialize, Serialize};
+use std::collections::HashSet;
+
+/// Trace filter.
+#[derive(Debug, PartialEq, Eq, Serialize, Deserialize, Clone, Default)]
+#[serde(deny_unknown_fields)]
+#[serde(rename_all = "camelCase")]
+pub struct TraceFilter {
+    /// From block
+    #[serde(with = "u64_hex_or_decimal_opt")]
+    pub from_block: Option<u64>,
+    /// To block
+    #[serde(with = "u64_hex_or_decimal_opt")]
+    pub to_block: Option<u64>,
+    /// From address
+    #[serde(default)]
+    pub from_address: Vec<Address>,
+    /// To address
+    #[serde(default)]
+    pub to_address: Vec<Address>,
+    /// How to apply `from_address` and `to_address` filters.
+    #[serde(default)]
+    pub mode: TraceFilterMode,
+    /// Output offset
+    pub after: Option<u64>,
+    /// Output amount
+    pub count: Option<u64>,
+}
+
+// === impl TraceFilter ===
+
+impl TraceFilter {
+    /// Returns a `TraceFilterMatcher` for this filter.
+    pub fn matcher(&self) -> TraceFilterMatcher {
+        let from_addresses = self.from_address.iter().cloned().collect();
+        let to_addresses = self.to_address.iter().cloned().collect();
+        TraceFilterMatcher { mode: self.mode, from_addresses, to_addresses }
+    }
+}
+
+/// How to apply `from_address` and `to_address` filters.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub enum TraceFilterMode {
+    /// Return traces for transactions with matching `from` OR `to` addresses.
+    #[default]
+    Union,
+    /// Only return traces for transactions with matching `from` _and_ `to` addresses.
+    Intersection,
+}
+
+/// Helper type for matching `from` and `to` addresses. Empty sets match all addresses.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct TraceFilterMatcher {
+    mode: TraceFilterMode,
+    from_addresses: HashSet<Address>,
+    to_addresses: HashSet<Address>,
+}
+
+impl TraceFilterMatcher {
+    /// Returns `true` if the given `from` and `to` addresses match this filter.
+    pub fn matches(&self, from: Address, to: Option<Address>) -> bool {
+        match (self.from_addresses.is_empty(), self.to_addresses.is_empty()) {
+            (true, true) => true,
+            (false, true) => self.from_addresses.contains(&from),
+            (true, false) => to.map_or(false, |to_addr| self.to_addresses.contains(&to_addr)),
+            (false, false) => match self.mode {
+                TraceFilterMode::Union => {
+                    self.from_addresses.contains(&from)
+                        || to.map_or(false, |to_addr| self.to_addresses.contains(&to_addr))
+                }
+                TraceFilterMode::Intersection => {
+                    self.from_addresses.contains(&from)
+                        && to.map_or(false, |to_addr| self.to_addresses.contains(&to_addr))
+                }
+            },
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use serde_json::json;
+
+    #[test]
+    fn test_parse_filter() {
+        let s = r#"{"fromBlock":  "0x3","toBlock":  "0x5"}"#;
+        let filter: TraceFilter = serde_json::from_str(s).unwrap();
+        assert_eq!(filter.from_block, Some(3));
+        assert_eq!(filter.to_block, Some(5));
+    }
+
+    #[test]
+    fn test_filter_matcher_addresses_unspecified() {
+        let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap();
+        let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap();
+        let filter_json = json!({
+            "fromBlock": "0x3",
+            "toBlock": "0x5",
+        });
+        let filter: TraceFilter =
+            serde_json::from_value(filter_json).expect("Failed to parse filter");
+        let matcher = filter.matcher();
+        assert!(matcher.matches(test_addr_d8, None));
+        assert!(matcher.matches(test_addr_16, None));
+        assert!(matcher.matches(test_addr_d8, Some(test_addr_16)));
+        assert!(matcher.matches(test_addr_16, Some(test_addr_d8)));
+    }
+
+    #[test]
+    fn test_filter_matcher_from_address() {
+        let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap();
+        let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap();
+        let filter_json = json!({
+            "fromBlock": "0x3",
+            "toBlock": "0x5",
+            "fromAddress": [test_addr_d8]
+        });
+        let filter: TraceFilter = serde_json::from_value(filter_json).unwrap();
+        let matcher = filter.matcher();
+        assert!(matcher.matches(test_addr_d8, None));
+        assert!(!matcher.matches(test_addr_16, None));
+        assert!(matcher.matches(test_addr_d8, Some(test_addr_16)));
+        assert!(!matcher.matches(test_addr_16, Some(test_addr_d8)));
+    }
+
+    #[test]
+    fn test_filter_matcher_to_address() {
+        let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap();
+        let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap();
+        let filter_json = json!({
+            "fromBlock": "0x3",
+            "toBlock": "0x5",
+            "toAddress": [test_addr_d8],
+        });
+        let filter: TraceFilter = serde_json::from_value(filter_json).unwrap();
+        let matcher = filter.matcher();
+        assert!(matcher.matches(test_addr_16, Some(test_addr_d8)));
+        assert!(!matcher.matches(test_addr_16, None));
+        assert!(!matcher.matches(test_addr_d8, Some(test_addr_16)));
+    }
+
+    #[test]
+    fn test_filter_matcher_both_addresses_union() {
+        let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap();
+        let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap();
+        let filter_json = json!({
+            "fromBlock": "0x3",
+            "toBlock": "0x5",
+            "fromAddress": [test_addr_16],
+            "toAddress": [test_addr_d8],
+        });
+        let filter: TraceFilter = serde_json::from_value(filter_json).unwrap();
+        let matcher = filter.matcher();
+        assert!(matcher.matches(test_addr_16, Some(test_addr_d8)));
+        assert!(matcher.matches(test_addr_16, None));
+        assert!(matcher.matches(test_addr_d8, Some(test_addr_d8)));
+        assert!(!matcher.matches(test_addr_d8, Some(test_addr_16)));
+    }
+
+    #[test]
+    fn test_filter_matcher_both_addresses_intersection() {
+        let test_addr_d8 = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045".parse().unwrap();
+        let test_addr_16 = "0x160f5f00288e9e1cc8655b327e081566e580a71d".parse().unwrap();
+        let filter_json = json!({
+            "fromBlock": "0x3",
+            "toBlock": "0x5",
+            "fromAddress": [test_addr_16],
+            "toAddress": [test_addr_d8],
+            "mode": "intersection",
+        });
+        let filter: TraceFilter = serde_json::from_value(filter_json).unwrap();
+        let matcher = filter.matcher();
+        assert!(matcher.matches(test_addr_16, Some(test_addr_d8)));
+        assert!(!matcher.matches(test_addr_16, None));
+        assert!(!matcher.matches(test_addr_d8, Some(test_addr_d8)));
+        assert!(!matcher.matches(test_addr_d8, Some(test_addr_16)));
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/geth/call.rs.html b/src/alloy_rpc_types/eth/trace/geth/call.rs.html new file mode 100644 index 000000000000..c00f3d2f6c87 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/geth/call.rs.html @@ -0,0 +1,212 @@ +call.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+
use crate::serde_helpers::num::from_int_or_hex;
+use alloy_primitives::{Address, Bytes, B256, U256};
+use serde::{Deserialize, Serialize};
+
+/// The response object for `debug_traceTransaction` with `"tracer": "callTracer"`
+///
+/// <https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/call.go#L44>
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct CallFrame {
+    pub from: Address,
+    #[serde(default, deserialize_with = "from_int_or_hex")]
+    pub gas: U256,
+    #[serde(default, deserialize_with = "from_int_or_hex", rename = "gasUsed")]
+    pub gas_used: U256,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub to: Option<Address>,
+    pub input: Bytes,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub output: Option<Bytes>,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub error: Option<String>,
+    #[serde(default, rename = "revertReason", skip_serializing_if = "Option::is_none")]
+    pub revert_reason: Option<String>,
+    #[serde(default, skip_serializing_if = "Vec::is_empty")]
+    pub calls: Vec<CallFrame>,
+    #[serde(default, skip_serializing_if = "Vec::is_empty")]
+    pub logs: Vec<CallLogFrame>,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub value: Option<U256>,
+    #[serde(rename = "type")]
+    pub typ: String,
+}
+
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct CallLogFrame {
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub address: Option<Address>,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub topics: Option<Vec<B256>>,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub data: Option<Bytes>,
+}
+
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct CallConfig {
+    /// When set to true, this will only trace the primary (top-level) call and not any sub-calls.
+    /// It eliminates the additional processing for each call frame
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub only_top_call: Option<bool>,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub with_log: Option<bool>,
+}
+
+impl CallConfig {
+    /// Sets the only top call flag
+    pub fn only_top_call(mut self) -> Self {
+        self.only_top_call = Some(true);
+        self
+    }
+
+    /// Sets the with log flag
+    pub fn with_log(mut self) -> Self {
+        self.with_log = Some(true);
+        self
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::trace::geth::*;
+
+    // See <https://github.com/ethereum/go-ethereum/tree/master/eth/tracers/internal/tracetest/testdata>
+    const DEFAULT: &str = include_str!("../../../../test_data/call_tracer/default.json");
+    const LEGACY: &str = include_str!("../../../../test_data/call_tracer/legacy.json");
+    const ONLY_TOP_CALL: &str =
+        include_str!("../../../../test_data/call_tracer/only_top_call.json");
+    const WITH_LOG: &str = include_str!("../../../../test_data/call_tracer/with_log.json");
+
+    #[test]
+    fn test_serialize_call_trace() {
+        let mut opts = GethDebugTracingCallOptions::default();
+        opts.tracing_options.config.disable_storage = Some(false);
+        opts.tracing_options.tracer =
+            Some(GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::CallTracer));
+        opts.tracing_options.tracer_config =
+            serde_json::to_value(CallConfig { only_top_call: Some(true), with_log: Some(true) })
+                .unwrap()
+                .into();
+
+        assert_eq!(
+            serde_json::to_string(&opts).unwrap(),
+            r#"{"disableStorage":false,"tracer":"callTracer","tracerConfig":{"onlyTopCall":true,"withLog":true}}"#
+        );
+    }
+
+    #[test]
+    fn test_deserialize_call_trace() {
+        let _trace: CallFrame = serde_json::from_str(DEFAULT).unwrap();
+        let _trace: CallFrame = serde_json::from_str(LEGACY).unwrap();
+        let _trace: CallFrame = serde_json::from_str(ONLY_TOP_CALL).unwrap();
+        let _trace: CallFrame = serde_json::from_str(WITH_LOG).unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/geth/four_byte.rs.html b/src/alloy_rpc_types/eth/trace/geth/four_byte.rs.html new file mode 100644 index 000000000000..9d777d61d605 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/geth/four_byte.rs.html @@ -0,0 +1,70 @@ +four_byte.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
use serde::{Deserialize, Serialize};
+use std::collections::BTreeMap;
+
+/// <https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/4byte.go#L48>
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct FourByteFrame(pub BTreeMap<String, u64>);
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::trace::geth::*;
+
+    const DEFAULT: &str = r#"{
+        "0x27dc297e-128": 1,
+        "0x38cc4831-0": 2,
+        "0x524f3889-96": 1,
+        "0xadf59f99-288": 1,
+        "0xc281d19e-0": 1
+    }"#;
+
+    #[test]
+    fn test_serialize_four_byte_trace() {
+        let mut opts = GethDebugTracingCallOptions::default();
+        opts.tracing_options.tracer =
+            Some(GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::FourByteTracer));
+
+        assert_eq!(serde_json::to_string(&opts).unwrap(), r#"{"tracer":"4byteTracer"}"#);
+    }
+
+    #[test]
+    fn test_deserialize_four_byte_trace() {
+        let _trace: FourByteFrame = serde_json::from_str(DEFAULT).unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/geth/mod.rs.html b/src/alloy_rpc_types/eth/trace/geth/mod.rs.html new file mode 100644 index 000000000000..a45b673e863d --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/geth/mod.rs.html @@ -0,0 +1,1114 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+
//! Geth tracing types
+#![allow(missing_docs)]
+
+use crate::{state::StateOverride, BlockOverrides};
+use alloy_primitives::{Bytes, B256, U256};
+use serde::{de::DeserializeOwned, ser::SerializeMap, Deserialize, Serialize, Serializer};
+use std::{collections::BTreeMap, time::Duration};
+
+// re-exports
+pub use self::{
+    call::{CallConfig, CallFrame, CallLogFrame},
+    four_byte::FourByteFrame,
+    noop::NoopFrame,
+    pre_state::{
+        AccountChangeKind, AccountState, DiffMode, DiffStateKind, PreStateConfig, PreStateFrame,
+        PreStateMode,
+    },
+};
+
+pub mod call;
+pub mod four_byte;
+pub mod noop;
+pub mod pre_state;
+
+/// Result type for geth style transaction trace
+pub type TraceResult = crate::trace::common::TraceResult<GethTrace, String>;
+
+/// blockTraceResult represents the results of tracing a single block when an entire chain is being
+/// traced. ref <https://github.com/ethereum/go-ethereum/blob/ee530c0d5aa70d2c00ab5691a89ab431b73f8165/eth/tracers/api.go#L218-L222>
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct BlockTraceResult {
+    /// Block number corresponding to the trace task
+    pub block: U256,
+    /// Block hash corresponding to the trace task
+    pub hash: B256,
+    /// Trace results produced by the trace task
+    pub traces: Vec<TraceResult>,
+}
+
+/// Geth Default struct log trace frame
+///
+/// <https://github.com/ethereum/go-ethereum/blob/a9ef135e2dd53682d106c6a2aede9187026cc1de/eth/tracers/logger/logger.go#L406-L411>
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct DefaultFrame {
+    pub failed: bool,
+    pub gas: u64,
+    #[serde(serialize_with = "crate::serde_helpers::serialize_hex_string_no_prefix")]
+    pub return_value: Bytes,
+    pub struct_logs: Vec<StructLog>,
+}
+
+/// Represents a struct log entry in a trace
+///
+/// <https://github.com/ethereum/go-ethereum/blob/366d2169fbc0e0f803b68c042b77b6b480836dbc/eth/tracers/logger/logger.go#L413-L426>
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct StructLog {
+    /// program counter
+    pub pc: u64,
+    /// opcode to be executed
+    pub op: String,
+    /// remaining gas
+    pub gas: u64,
+    /// cost for executing op
+    #[serde(rename = "gasCost")]
+    pub gas_cost: u64,
+    /// ref <https://github.com/ethereum/go-ethereum/blob/366d2169fbc0e0f803b68c042b77b6b480836dbc/eth/tracers/logger/logger.go#L450-L452>
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub memory: Option<Vec<String>>,
+    /// Size of memory.
+    #[serde(default, rename = "memSize", skip_serializing_if = "Option::is_none")]
+    pub memory_size: Option<u64>,
+    /// EVM stack
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub stack: Option<Vec<U256>>,
+    /// Last call's return data. Enabled via enableReturnData
+    #[serde(default, rename = "returnData", skip_serializing_if = "Option::is_none")]
+    pub return_data: Option<Bytes>,
+    /// Storage slots of current contract read from and written to. Only emitted for SLOAD and
+    /// SSTORE. Disabled via disableStorage
+    #[serde(
+        default,
+        skip_serializing_if = "Option::is_none",
+        serialize_with = "serialize_string_storage_map_opt"
+    )]
+    pub storage: Option<BTreeMap<B256, B256>>,
+    /// Current call depth
+    pub depth: u64,
+    /// Refund counter
+    #[serde(default, rename = "refund", skip_serializing_if = "Option::is_none")]
+    pub refund_counter: Option<u64>,
+    /// Error message if any
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub error: Option<String>,
+}
+
+/// Tracing response objects
+///
+/// Note: This deserializes untagged, so it's possible that a custom javascript tracer response
+/// matches another variant, for example a js tracer that returns `{}` would be deserialized as
+/// [GethTrace::NoopTracer]
+#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum GethTrace {
+    /// The response for the default struct log tracer
+    Default(DefaultFrame),
+    /// The response for call tracer
+    CallTracer(CallFrame),
+    /// The response for four byte tracer
+    FourByteTracer(FourByteFrame),
+    /// The response for pre-state byte tracer
+    PreStateTracer(PreStateFrame),
+    /// An empty json response
+    NoopTracer(NoopFrame),
+    /// Any other trace response, such as custom javascript response objects
+    JS(serde_json::Value),
+}
+
+impl From<DefaultFrame> for GethTrace {
+    fn from(value: DefaultFrame) -> Self {
+        GethTrace::Default(value)
+    }
+}
+
+impl From<FourByteFrame> for GethTrace {
+    fn from(value: FourByteFrame) -> Self {
+        GethTrace::FourByteTracer(value)
+    }
+}
+
+impl From<CallFrame> for GethTrace {
+    fn from(value: CallFrame) -> Self {
+        GethTrace::CallTracer(value)
+    }
+}
+
+impl From<PreStateFrame> for GethTrace {
+    fn from(value: PreStateFrame) -> Self {
+        GethTrace::PreStateTracer(value)
+    }
+}
+
+impl From<NoopFrame> for GethTrace {
+    fn from(value: NoopFrame) -> Self {
+        GethTrace::NoopTracer(value)
+    }
+}
+
+/// Available built-in tracers
+///
+/// See <https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers>
+#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
+pub enum GethDebugBuiltInTracerType {
+    /// The 4byteTracer collects the function selectors of every function executed in the lifetime
+    /// of a transaction, along with the size of the supplied call data. The result is a
+    /// [FourByteFrame] where the keys are SELECTOR-CALLDATASIZE and the values are number of
+    /// occurrences of this key.
+    #[serde(rename = "4byteTracer")]
+    FourByteTracer,
+    /// The callTracer tracks all the call frames executed during a transaction, including depth 0.
+    /// The result will be a nested list of call frames, resembling how EVM works. They form a tree
+    /// with the top-level call at root and sub-calls as children of the higher levels.
+    #[serde(rename = "callTracer")]
+    CallTracer,
+    /// The prestate tracer has two modes: prestate and diff. The prestate mode returns the
+    /// accounts necessary to execute a given transaction. diff mode returns the differences
+    /// between the transaction's pre and post-state (i.e. what changed because the transaction
+    /// happened). The prestateTracer defaults to prestate mode. It reexecutes the given
+    /// transaction and tracks every part of state that is touched. This is similar to the concept
+    /// of a stateless witness, the difference being this tracer doesn't return any cryptographic
+    /// proof, rather only the trie leaves. The result is an object. The keys are addresses of
+    /// accounts.
+    #[serde(rename = "prestateTracer")]
+    PreStateTracer,
+    /// This tracer is noop. It returns an empty object and is only meant for testing the setup.
+    #[serde(rename = "noopTracer")]
+    NoopTracer,
+}
+
+/// Available tracers
+///
+/// See <https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers> and <https://geth.ethereum.org/docs/developers/evm-tracing/custom-tracer>
+#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum GethDebugTracerType {
+    /// built-in tracer
+    BuiltInTracer(GethDebugBuiltInTracerType),
+    /// custom JS tracer
+    JsTracer(String),
+}
+
+impl From<GethDebugBuiltInTracerType> for GethDebugTracerType {
+    fn from(value: GethDebugBuiltInTracerType) -> Self {
+        GethDebugTracerType::BuiltInTracer(value)
+    }
+}
+
+/// Configuration of the tracer
+///
+/// This is a simple wrapper around serde_json::Value.
+/// with helpers for deserializing tracer configs.
+#[derive(Debug, PartialEq, Eq, Clone, Default, Deserialize, Serialize)]
+#[serde(transparent)]
+pub struct GethDebugTracerConfig(pub serde_json::Value);
+
+// === impl GethDebugTracerConfig ===
+
+impl GethDebugTracerConfig {
+    /// Returns if this is a null object
+    pub fn is_null(&self) -> bool {
+        self.0.is_null()
+    }
+
+    /// Consumes the config and tries to deserialize it into the given type.
+    pub fn from_value<T: DeserializeOwned>(self) -> Result<T, serde_json::Error> {
+        serde_json::from_value(self.0)
+    }
+
+    /// Returns the [CallConfig] if it is a call config.
+    pub fn into_call_config(self) -> Result<CallConfig, serde_json::Error> {
+        if self.0.is_null() {
+            return Ok(Default::default());
+        }
+        self.from_value()
+    }
+
+    /// Returns the raw json value
+    pub fn into_json(self) -> serde_json::Value {
+        self.0
+    }
+
+    /// Returns the [PreStateConfig] if it is a call config.
+    pub fn into_pre_state_config(self) -> Result<PreStateConfig, serde_json::Error> {
+        if self.0.is_null() {
+            return Ok(Default::default());
+        }
+        self.from_value()
+    }
+}
+
+impl From<serde_json::Value> for GethDebugTracerConfig {
+    fn from(value: serde_json::Value) -> Self {
+        GethDebugTracerConfig(value)
+    }
+}
+
+/// Bindings for additional `debug_traceTransaction` options
+///
+/// See <https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracetransaction>
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[serde(rename_all = "camelCase")]
+pub struct GethDebugTracingOptions {
+    #[serde(default, flatten)]
+    pub config: GethDefaultTracingOptions,
+    /// The custom tracer to use.
+    ///
+    /// If `None` then the default structlog tracer is used.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub tracer: Option<GethDebugTracerType>,
+    /// Config specific to given `tracer`.
+    ///
+    /// Note default struct logger config are historically embedded in main object.
+    ///
+    /// tracerConfig is slated for Geth v1.11.0
+    /// See <https://github.com/ethereum/go-ethereum/issues/26513>
+    ///
+    /// This could be [CallConfig] or [PreStateConfig] depending on the tracer.
+    #[serde(default, skip_serializing_if = "GethDebugTracerConfig::is_null")]
+    pub tracer_config: GethDebugTracerConfig,
+    /// A string of decimal integers that overrides the JavaScript-based tracing calls default
+    /// timeout of 5 seconds.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub timeout: Option<String>,
+}
+
+impl GethDebugTracingOptions {
+    /// Sets the tracer to use
+    pub fn with_tracer(mut self, tracer: GethDebugTracerType) -> Self {
+        self.tracer = Some(tracer);
+        self
+    }
+
+    /// Sets the timeout to use for tracing
+    pub fn with_timeout(mut self, duration: Duration) -> Self {
+        self.timeout = Some(format!("{}ms", duration.as_millis()));
+        self
+    }
+
+    /// Configures a [CallConfig]
+    pub fn call_config(mut self, config: CallConfig) -> Self {
+        self.tracer_config =
+            GethDebugTracerConfig(serde_json::to_value(config).expect("is serializable"));
+        self
+    }
+
+    /// Configures a [PreStateConfig]
+    pub fn prestate_config(mut self, config: PreStateConfig) -> Self {
+        self.tracer_config =
+            GethDebugTracerConfig(serde_json::to_value(config).expect("is serializable"));
+        self
+    }
+}
+
+/// Default tracing options for the struct looger.
+///
+/// These are all known general purpose tracer options that may or not be supported by a given
+/// tracer. For example, the `enableReturnData` option is a noop on regular
+/// `debug_trace{Transaction,Block}` calls.
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[serde(rename_all = "camelCase")]
+pub struct GethDefaultTracingOptions {
+    /// enable memory capture
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub enable_memory: Option<bool>,
+    /// Disable memory capture
+    ///
+    /// This is the opposite of `enable_memory`.
+    ///
+    /// Note: memory capture used to be enabled by default on geth, but has since been flipped <https://github.com/ethereum/go-ethereum/pull/23558> and is now disabled by default.
+    /// However, at the time of writing this, erigon still defaults to enabled and supports the
+    /// `disableMemory` option. So we keep this option for compatibility, but if it's missing
+    /// OR `enableMemory` is present `enableMemory` takes precedence.
+    ///
+    /// See also <https://github.com/paradigmxyz/reth/issues/3033>
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub disable_memory: Option<bool>,
+    /// disable stack capture
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub disable_stack: Option<bool>,
+    /// Disable storage capture
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub disable_storage: Option<bool>,
+    /// Enable return data capture
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub enable_return_data: Option<bool>,
+    /// Disable return data capture
+    ///
+    /// This is the opposite of `enable_return_data`, and only supported for compatibility reasons.
+    /// See also `disable_memory`.
+    ///
+    /// If `enable_return_data` is present, `enable_return_data` always takes precedence.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub disable_return_data: Option<bool>,
+    /// print output during capture end
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub debug: Option<bool>,
+    /// maximum length of output, but zero means unlimited
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub limit: Option<u64>,
+}
+
+impl GethDefaultTracingOptions {
+    /// Enables memory capture.
+    pub fn enable_memory(self) -> Self {
+        self.with_enable_memory(true)
+    }
+
+    /// Disables memory capture.
+    pub fn disable_memory(self) -> Self {
+        self.with_disable_memory(true)
+    }
+
+    /// Disables stack capture.
+    pub fn disable_stack(self) -> Self {
+        self.with_disable_stack(true)
+    }
+
+    /// Disables storage capture.
+    pub fn disable_storage(self) -> Self {
+        self.with_disable_storage(true)
+    }
+
+    /// Enables return data capture.
+    pub fn enable_return_data(self) -> Self {
+        self.with_enable_return_data(true)
+    }
+
+    /// Disables return data capture.
+    pub fn disable_return_data(self) -> Self {
+        self.with_disable_return_data(true)
+    }
+
+    /// Enables debug mode.
+    pub fn debug(self) -> Self {
+        self.with_debug(true)
+    }
+
+    /// Sets the enable_memory field.
+    pub fn with_enable_memory(mut self, enable: bool) -> Self {
+        self.enable_memory = Some(enable);
+        self
+    }
+
+    /// Sets the disable_memory field.
+    pub fn with_disable_memory(mut self, disable: bool) -> Self {
+        self.disable_memory = Some(disable);
+        self
+    }
+
+    /// Sets the disable_stack field.
+    pub fn with_disable_stack(mut self, disable: bool) -> Self {
+        self.disable_stack = Some(disable);
+        self
+    }
+
+    /// Sets the disable_storage field.
+    pub fn with_disable_storage(mut self, disable: bool) -> Self {
+        self.disable_storage = Some(disable);
+        self
+    }
+
+    /// Sets the enable_return_data field.
+    pub fn with_enable_return_data(mut self, enable: bool) -> Self {
+        self.enable_return_data = Some(enable);
+        self
+    }
+
+    /// Sets the disable_return_data field.
+    pub fn with_disable_return_data(mut self, disable: bool) -> Self {
+        self.disable_return_data = Some(disable);
+        self
+    }
+
+    /// Sets the debug field.
+    pub fn with_debug(mut self, debug: bool) -> Self {
+        self.debug = Some(debug);
+        self
+    }
+
+    /// Sets the limit field.
+    pub fn with_limit(mut self, limit: u64) -> Self {
+        self.limit = Some(limit);
+        self
+    }
+    /// Returns `true` if return data capture is enabled
+    pub fn is_return_data_enabled(&self) -> bool {
+        self.enable_return_data
+            .or_else(|| self.disable_return_data.map(|disable| !disable))
+            .unwrap_or(false)
+    }
+
+    /// Returns `true` if memory capture is enabled
+    pub fn is_memory_enabled(&self) -> bool {
+        self.enable_memory.or_else(|| self.disable_memory.map(|disable| !disable)).unwrap_or(false)
+    }
+
+    /// Returns `true` if stack capture is enabled
+    pub fn is_stack_enabled(&self) -> bool {
+        !self.disable_stack.unwrap_or(false)
+    }
+
+    /// Returns `true` if storage capture is enabled
+    pub fn is_storage_enabled(&self) -> bool {
+        !self.disable_storage.unwrap_or(false)
+    }
+}
+/// Bindings for additional `debug_traceCall` options
+///
+/// See <https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracecall>
+#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[serde(rename_all = "camelCase")]
+pub struct GethDebugTracingCallOptions {
+    #[serde(flatten)]
+    pub tracing_options: GethDebugTracingOptions,
+    /// The state overrides to apply
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub state_overrides: Option<StateOverride>,
+    /// The block overrides to apply
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub block_overrides: Option<BlockOverrides>,
+}
+
+/// Serializes a storage map as a list of key-value pairs _without_ 0x-prefix
+fn serialize_string_storage_map_opt<S: Serializer>(
+    storage: &Option<BTreeMap<B256, B256>>,
+    s: S,
+) -> Result<S::Ok, S::Error> {
+    match storage {
+        None => s.serialize_none(),
+        Some(storage) => {
+            let mut m = s.serialize_map(Some(storage.len()))?;
+            for (key, val) in storage.iter() {
+                let key = format!("{:?}", key);
+                let val = format!("{:?}", val);
+                // skip the 0x prefix
+                m.serialize_entry(&key.as_str()[2..], &val.as_str()[2..])?;
+            }
+            m.end()
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_tracer_config() {
+        let s = "{\"tracer\": \"callTracer\"}";
+        let opts = serde_json::from_str::<GethDebugTracingOptions>(s).unwrap();
+        assert_eq!(
+            opts.tracer,
+            Some(GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::CallTracer))
+        );
+        let _call_config = opts.tracer_config.clone().into_call_config().unwrap();
+        let _prestate_config = opts.tracer_config.into_pre_state_config().unwrap();
+    }
+
+    #[test]
+    fn test_memory_capture() {
+        let mut config = GethDefaultTracingOptions::default();
+
+        // by default false
+        assert!(!config.is_memory_enabled());
+
+        config.disable_memory = Some(false);
+        // disable == false -> enable
+        assert!(config.is_memory_enabled());
+
+        config.enable_memory = Some(false);
+        // enable == false -> disable
+        assert!(!config.is_memory_enabled());
+    }
+
+    #[test]
+    fn test_return_data_capture() {
+        let mut config = GethDefaultTracingOptions::default();
+
+        // by default false
+        assert!(!config.is_return_data_enabled());
+
+        config.disable_return_data = Some(false);
+        // disable == false -> enable
+        assert!(config.is_return_data_enabled());
+
+        config.enable_return_data = Some(false);
+        // enable == false -> disable
+        assert!(!config.is_return_data_enabled());
+    }
+
+    // <https://etherscan.io/tx/0xd01212e8ab48d2fd2ea9c4f33f8670fd1cf0cfb09d2e3c6ceddfaf54152386e5>
+    #[test]
+    fn serde_default_frame() {
+        let input = include_str!("../../../../test_data/default/structlogs_01.json");
+        let _frame: DefaultFrame = serde_json::from_str(input).unwrap();
+    }
+
+    #[test]
+    fn test_serialize_storage_map() {
+        let s = r#"{"pc":3349,"op":"SLOAD","gas":23959,"gasCost":2100,"depth":1,"stack":[],"memory":[],"storage":{"6693dabf5ec7ab1a0d1c5bc58451f85d5e44d504c9ffeb75799bfdb61aa2997a":"0000000000000000000000000000000000000000000000000000000000000000"}}"#;
+        let log: StructLog = serde_json::from_str(s).unwrap();
+        let val = serde_json::to_value(&log).unwrap();
+        let input = serde_json::from_str::<serde_json::Value>(s).unwrap();
+        similar_asserts::assert_eq!(input, val);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/geth/noop.rs.html b/src/alloy_rpc_types/eth/trace/geth/noop.rs.html new file mode 100644 index 000000000000..343bae512036 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/geth/noop.rs.html @@ -0,0 +1,66 @@ +noop.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
use serde::{Deserialize, Serialize};
+use std::collections::BTreeMap;
+
+/// An empty frame response that's only an empty json object `{}`
+/// <https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/noop.go#L34>
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct NoopFrame(BTreeMap<Null, Null>);
+
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, PartialOrd, Ord)]
+struct Null;
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::trace::geth::*;
+
+    const DEFAULT: &str = r"{}";
+
+    #[test]
+    fn test_serialize_noop_trace() {
+        let mut opts = GethDebugTracingCallOptions::default();
+        opts.tracing_options.tracer =
+            Some(GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::NoopTracer));
+
+        assert_eq!(serde_json::to_string(&opts).unwrap(), r#"{"tracer":"noopTracer"}"#);
+    }
+
+    #[test]
+    fn test_deserialize_noop_trace() {
+        let _trace: NoopFrame = serde_json::from_str(DEFAULT).unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/geth/pre_state.rs.html b/src/alloy_rpc_types/eth/trace/geth/pre_state.rs.html new file mode 100644 index 000000000000..ffab768148e5 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/geth/pre_state.rs.html @@ -0,0 +1,698 @@ +pre_state.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+
use crate::serde_helpers::num::from_int_or_hex_opt;
+use alloy_primitives::{Address, Bytes, B256, U256};
+use serde::{Deserialize, Serialize};
+use std::collections::{btree_map, BTreeMap};
+
+/// A tracer that records [AccountState]s.
+/// The prestate tracer has two modes: prestate and diff
+///
+/// <https://github.com/ethereum/go-ethereum/blob/91cb6f863a965481e51d5d9c0e5ccd54796fd967/eth/tracers/native/prestate.go#L38>
+#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum PreStateFrame {
+    /// The default mode returns the accounts necessary to execute a given transaction.
+    ///
+    /// It re-executes the given transaction and tracks every part of state that is touched.
+    Default(PreStateMode),
+    /// Diff mode returns the differences between the transaction's pre and post-state (i.e. what
+    /// changed because the transaction happened).
+    Diff(DiffMode),
+}
+
+impl PreStateFrame {
+    /// Returns true if this trace was requested without diffmode.
+    pub fn is_default(&self) -> bool {
+        matches!(self, PreStateFrame::Default(_))
+    }
+
+    /// Returns true if this trace was requested with diffmode.
+    pub fn is_diff(&self) -> bool {
+        matches!(self, PreStateFrame::Diff(_))
+    }
+
+    /// Returns the account states after the transaction is executed if this trace was requested
+    /// without diffmode.
+    pub fn as_default(&self) -> Option<&PreStateMode> {
+        match self {
+            PreStateFrame::Default(mode) => Some(mode),
+            _ => None,
+        }
+    }
+
+    /// Returns the account states before and after the transaction is executed if this trace was
+    /// requested with diffmode.
+    pub fn as_diff(&self) -> Option<&DiffMode> {
+        match self {
+            PreStateFrame::Diff(mode) => Some(mode),
+            _ => None,
+        }
+    }
+}
+
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct PreStateMode(pub BTreeMap<Address, AccountState>);
+
+/// Represents the account states before and after the transaction is executed.
+///
+/// This corresponds to the [DiffMode] of the [PreStateConfig].
+///
+/// This will only contain changed [AccountState]s, created accounts will not be included in the pre
+/// state and selfdestructed accounts will not be included in the post state.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(deny_unknown_fields)]
+pub struct DiffMode {
+    /// The account states after the transaction is executed.
+    pub post: BTreeMap<Address, AccountState>,
+    /// The account states before the transaction is executed.
+    pub pre: BTreeMap<Address, AccountState>,
+}
+
+// === impl DiffMode ===
+
+impl DiffMode {
+    /// The sets of the [DiffMode] should only contain changed [AccountState]s.
+    ///
+    /// This will remove all unchanged [AccountState]s from the sets.
+    ///
+    /// In other words it removes entries that are equal (unchanged) in both the pre and post sets.
+    pub fn retain_changed(&mut self) -> &mut Self {
+        self.pre.retain(|address, pre| {
+            if let btree_map::Entry::Occupied(entry) = self.post.entry(*address) {
+                if entry.get() == pre {
+                    // remove unchanged account state from both sets
+                    entry.remove();
+                    return false;
+                }
+            }
+
+            true
+        });
+        self
+    }
+
+    /// Removes all zero values from the storage of the [AccountState]s.
+    pub fn remove_zero_storage_values(&mut self) {
+        self.pre.values_mut().for_each(|state| {
+            state.storage.retain(|_, value| *value != B256::ZERO);
+        });
+        self.post.values_mut().for_each(|state| {
+            state.storage.retain(|_, value| *value != B256::ZERO);
+        });
+    }
+}
+
+/// Helper type for [DiffMode] to represent a specific set
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum DiffStateKind {
+    /// Corresponds to the pre state of the [DiffMode]
+    Pre,
+    /// Corresponds to the post state of the [DiffMode]
+    Post,
+}
+
+impl DiffStateKind {
+    /// Returns true if this is the pre state of the [DiffMode]
+    pub fn is_pre(&self) -> bool {
+        matches!(self, DiffStateKind::Pre)
+    }
+
+    /// Returns true if this is the post state of the [DiffMode]
+    pub fn is_post(&self) -> bool {
+        matches!(self, DiffStateKind::Post)
+    }
+}
+
+/// Represents the state of an account
+#[derive(Debug, Clone, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub struct AccountState {
+    #[serde(
+        default,
+        deserialize_with = "from_int_or_hex_opt",
+        skip_serializing_if = "Option::is_none"
+    )]
+    pub balance: Option<U256>,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub code: Option<Bytes>,
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub nonce: Option<u64>,
+    #[serde(default, skip_serializing_if = "BTreeMap::is_empty")]
+    pub storage: BTreeMap<B256, B256>,
+}
+
+impl AccountState {
+    /// Creates a new `AccountState` with the given account info.
+    ///
+    /// If balance is zero, it will be omitted.
+    /// If nonce is zero, it will be omitted.
+    /// If code is empty, it will be omitted.
+    pub fn from_account_info(nonce: u64, balance: U256, code: Option<Bytes>) -> Self {
+        Self {
+            balance: Some(balance),
+            code: code.filter(|code| !code.is_empty()),
+            nonce: (nonce != 0).then_some(nonce),
+            storage: Default::default(),
+        }
+    }
+
+    /// Removes balance,nonce or code if they match the given account info.
+    ///
+    /// This is useful for comparing pre vs post state and only keep changed values in post state.
+    pub fn remove_matching_account_info(&mut self, other: &AccountState) {
+        if self.balance == other.balance {
+            self.balance = None;
+        }
+        if self.nonce == other.nonce {
+            self.nonce = None;
+        }
+        if self.code == other.code {
+            self.code = None;
+        }
+    }
+}
+
+/// Helper type to track the kind of change of an [AccountState].
+#[derive(Debug, Clone, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub enum AccountChangeKind {
+    #[default]
+    Modify,
+    Create,
+    SelfDestruct,
+}
+
+impl AccountChangeKind {
+    /// Returns true if the account was created
+    pub fn is_created(&self) -> bool {
+        matches!(self, AccountChangeKind::Create)
+    }
+
+    /// Returns true the account was modified
+    pub fn is_modified(&self) -> bool {
+        matches!(self, AccountChangeKind::Modify)
+    }
+
+    /// Returns true the account was modified
+    pub fn is_selfdestruct(&self) -> bool {
+        matches!(self, AccountChangeKind::SelfDestruct)
+    }
+}
+
+/// The config for the prestate tracer.
+///
+/// If `diffMode` is set to true, the response frame includes all the account and storage diffs for
+/// the transaction. If it's missing or set to false it only returns the accounts and storage
+/// necessary to execute the transaction.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct PreStateConfig {
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    pub diff_mode: Option<bool>,
+}
+
+impl PreStateConfig {
+    /// Returns true if this trace was requested with diffmode.
+    #[inline]
+    pub fn is_diff_mode(&self) -> bool {
+        self.diff_mode.unwrap_or_default()
+    }
+
+    /// Is default mode if diff_mode is not set
+    #[inline]
+    pub fn is_default_mode(&self) -> bool {
+        !self.is_diff_mode()
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::trace::geth::*;
+
+    // See <https://github.com/ethereum/go-ethereum/tree/master/eth/tracers/internal/tracetest/testdata>
+    const DEFAULT: &str = include_str!("../../../../test_data/pre_state_tracer/default.json");
+    const LEGACY: &str = include_str!("../../../../test_data/pre_state_tracer/legacy.json");
+    const DIFF_MODE: &str = include_str!("../../../../test_data/pre_state_tracer/diff_mode.json");
+
+    #[test]
+    fn test_serialize_pre_state_trace() {
+        let mut opts = GethDebugTracingCallOptions::default();
+        opts.tracing_options.config.disable_storage = Some(false);
+        opts.tracing_options.tracer =
+            Some(GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::PreStateTracer));
+        opts.tracing_options.tracer_config =
+            serde_json::to_value(PreStateConfig { diff_mode: Some(true) }).unwrap().into();
+
+        assert_eq!(
+            serde_json::to_string(&opts).unwrap(),
+            r#"{"disableStorage":false,"tracer":"prestateTracer","tracerConfig":{"diffMode":true}}"#
+        );
+    }
+
+    #[test]
+    fn test_deserialize_pre_state_trace() {
+        let trace: PreStateFrame = serde_json::from_str(DEFAULT).unwrap();
+        match trace {
+            PreStateFrame::Default(PreStateMode(_)) => {}
+            _ => unreachable!(),
+        }
+        let _trace: PreStateFrame = serde_json::from_str(LEGACY).unwrap();
+        let trace: PreStateFrame = serde_json::from_str(DIFF_MODE).unwrap();
+        match trace {
+            PreStateFrame::Diff(DiffMode { pre: _pre, post: _post }) => {}
+            _ => unreachable!(),
+        }
+    }
+
+    #[test]
+    fn test_is_diff_mode() {
+        assert!(PreStateConfig { diff_mode: Some(true) }.is_diff_mode());
+        assert!(!PreStateConfig { diff_mode: Some(false) }.is_diff_mode());
+        assert!(!PreStateConfig { diff_mode: None }.is_diff_mode());
+    }
+
+    #[test]
+    fn parse_prestate_default_resp() {
+        let s = r#"{
+  "0x0000000000000000000000000000000000000002": {
+    "balance": "0x0"
+  },
+  "0x008b3b2f992c0e14edaa6e2c662bec549caa8df1": {
+    "balance": "0x2638035a26d133809"
+  },
+  "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0": {
+    "balance": "0x7a48734599f7284",
+    "nonce": 1133
+  },
+  "0xc8ba32cab1757528daf49033e3673fae77dcf05d": {
+    "balance": "0x0",
+    "code": "0x",
+    "nonce": 1,
+    "storage": {
+      "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000024aea6",
+      "0x59fb7853eb21f604d010b94c123acbeae621f09ce15ee5d7616485b1e78a72e9": "0x00000000000000c42b56a52aedf18667c8ae258a0280a8912641c80c48cd9548",
+      "0x8d8ebb65ec00cb973d4fe086a607728fd1b9de14aa48208381eed9592f0dee9a": "0x00000000000000784ae4881e40b1f5ebb4437905fbb8a5914454123b0293b35f",
+      "0xff896b09014882056009dedb136458f017fcef9a4729467d0d00b4fd413fb1f1": "0x000000000000000e78ac39cb1c20e9edc753623b153705d0ccc487e31f9d6749"
+    }
+  }
+}
+"#;
+        let pre_state: PreStateFrame = serde_json::from_str(s).unwrap();
+        assert!(pre_state.is_default());
+    }
+    #[test]
+    fn parse_prestate_diff_resp() {
+        let s = r#"{
+  "post": {
+    "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0": {
+      "nonce": 1135
+    }
+  },
+  "pre": {
+    "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0": {
+      "balance": "0x7a48429e177130a",
+      "nonce": 1134
+    }
+  }
+}
+"#;
+        let pre_state: PreStateFrame = serde_json::from_str(s).unwrap();
+        assert!(pre_state.is_diff());
+    }
+
+    #[test]
+    fn test_retain_changed_accounts() {
+        let s = r#"{
+  "post": {
+    "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0": {
+      "nonce": 1135
+    }
+  },
+  "pre": {
+    "0x35a9f94af726f07b5162df7e828cc9dc8439e7d0": {
+      "balance": "0x7a48429e177130a",
+      "nonce": 1134
+    }
+  }
+}
+"#;
+        let diff: DiffMode = serde_json::from_str(s).unwrap();
+        let mut diff_changed = diff.clone();
+        diff_changed.retain_changed();
+        // different entries
+        assert_eq!(diff_changed, diff);
+
+        diff_changed.pre = diff_changed.post.clone();
+        diff_changed.retain_changed();
+        assert!(diff_changed.post.is_empty());
+        assert!(diff_changed.pre.is_empty());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/mod.rs.html b/src/alloy_rpc_types/eth/trace/mod.rs.html new file mode 100644 index 000000000000..0d362b1a66a0 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/mod.rs.html @@ -0,0 +1,26 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+
//! Types for tracing
+
+pub mod common;
+pub mod filter;
+pub mod geth;
+pub mod parity;
+pub mod tracerequest;
+
+pub use filter::*;
+pub use geth::*;
+pub use parity::*;
+pub use tracerequest::*;
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/parity.rs.html b/src/alloy_rpc_types/eth/trace/parity.rs.html new file mode 100644 index 000000000000..0f993cf5eb76 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/parity.rs.html @@ -0,0 +1,1510 @@ +parity.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+
//! Types for trace module.
+//!
+//! See <https://openethereum.github.io/JSONRPC-trace-module>
+
+use alloy_primitives::{Address, Bytes, B256, U256, U64};
+use serde::{ser::SerializeStruct, Deserialize, Serialize, Serializer};
+use std::{
+    collections::BTreeMap,
+    ops::{Deref, DerefMut},
+};
+
+/// Different Trace diagnostic targets.
+#[derive(Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub enum TraceType {
+    /// Default trace
+    Trace,
+    /// Provides a full trace of the VM’s state throughout the execution of the transaction,
+    /// including for any subcalls.
+    VmTrace,
+    /// Provides information detailing all altered portions of the Ethereum state made due to the
+    /// execution of the transaction.
+    StateDiff,
+}
+
+/// The Outcome of a traced transaction with optional settings
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct TraceResults {
+    /// Output of the trace
+    pub output: Bytes,
+    /// Enabled if [TraceType::StateDiff] is provided
+    pub state_diff: Option<StateDiff>,
+    /// Enabled if [TraceType::Trace] is provided, otherwise an empty vec
+    #[serde(default)]
+    pub trace: Vec<TransactionTrace>,
+    /// Enabled if [TraceType::VmTrace] is provided
+    pub vm_trace: Option<VmTrace>,
+}
+
+// === impl TraceResults ===
+
+impl TraceResults {
+    /// Sets the gas used of the root trace.
+    ///
+    /// The root trace's gasUsed should mirror the actual gas used by the transaction.
+    ///
+    /// This allows setting it manually by consuming the execution result's gas for example.
+    pub fn set_root_trace_gas_used(&mut self, gas_used: u64) {
+        if let Some(r) = self.trace.first_mut().and_then(|t| t.result.as_mut()) {
+            r.set_gas_used(gas_used)
+        }
+    }
+}
+
+/// A `FullTrace` with an additional transaction hash
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct TraceResultsWithTransactionHash {
+    #[serde(flatten)]
+    /// Full trace data.
+    pub full_trace: TraceResults,
+    /// Transaction hash.
+    pub transaction_hash: B256,
+}
+
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+/// Aux type for Diff::Changed.
+pub struct ChangedType<T> {
+    /// Previous value.
+    pub from: T,
+    /// Current value.
+    pub to: T,
+}
+
+#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+/// Delta type
+pub enum Delta<T> {
+    #[default]
+    #[serde(rename = "=")]
+    /// Unchanged variant.
+    Unchanged,
+    #[serde(rename = "+")]
+    /// Added variant.
+    Added(T),
+    #[serde(rename = "-")]
+    /// Removed variant.
+    Removed(T),
+    #[serde(rename = "*")]
+    /// Changed variant.
+    Changed(ChangedType<T>),
+}
+
+// === impl Delta ===
+
+impl<T> Delta<T> {
+    /// Creates a new [Delta::Changed] variant
+    pub fn changed(from: T, to: T) -> Self {
+        Self::Changed(ChangedType { from, to })
+    }
+
+    /// Returns true if the value is unchanged
+    pub fn is_unchanged(&self) -> bool {
+        matches!(self, Delta::Unchanged)
+    }
+
+    /// Returns true if the value is added
+    pub fn is_added(&self) -> bool {
+        matches!(self, Delta::Added(_))
+    }
+
+    /// Returns true if the value is removed
+    pub fn is_removed(&self) -> bool {
+        matches!(self, Delta::Removed(_))
+    }
+
+    /// Returns true if the value is changed
+    pub fn is_changed(&self) -> bool {
+        matches!(self, Delta::Changed(_))
+    }
+}
+
+#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+/// Serde-friendly `AccountDiff` shadow.
+
+pub struct AccountDiff {
+    /// Balance change.
+    pub balance: Delta<U256>,
+    /// Code change.
+    pub code: Delta<Bytes>,
+    /// Nonce change.
+    pub nonce: Delta<U64>,
+    /// Storage changes.
+    pub storage: BTreeMap<B256, Delta<B256>>,
+}
+
+/// New-type for list of account diffs
+#[derive(Clone, Debug, Eq, PartialEq, Default, Serialize, Deserialize)]
+#[serde(transparent)]
+pub struct StateDiff(pub BTreeMap<Address, AccountDiff>);
+
+impl Deref for StateDiff {
+    type Target = BTreeMap<Address, AccountDiff>;
+
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}
+
+impl DerefMut for StateDiff {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.0
+    }
+}
+
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase", tag = "type", content = "action")]
+/// Action
+pub enum Action {
+    /// Call
+    Call(CallAction),
+    /// Create
+    Create(CreateAction),
+    /// Parity style traces never renamed suicide to selfdestruct: <https://eips.ethereum.org/EIPS/eip-6>
+    ///
+    /// For compatibility reasons, this is serialized as `suicide`: <https://github.com/paradigmxyz/reth/issues/3721>
+    #[serde(rename = "suicide", alias = "selfdestruct")]
+    Selfdestruct(SelfdestructAction),
+    /// Reward
+    Reward(RewardAction),
+}
+
+impl Action {
+    /// Returns true if this is a call action
+    pub fn is_call(&self) -> bool {
+        matches!(self, Action::Call(_))
+    }
+
+    /// Returns true if this is a create action
+    pub fn is_create(&self) -> bool {
+        matches!(self, Action::Call(_))
+    }
+
+    /// Returns true if this is a selfdestruct action
+    pub fn is_selfdestruct(&self) -> bool {
+        matches!(self, Action::Selfdestruct(_))
+    }
+    /// Returns true if this is a reward action
+    pub fn is_reward(&self) -> bool {
+        matches!(self, Action::Reward(_))
+    }
+
+    /// Returns what kind of action this is
+    pub fn kind(&self) -> ActionType {
+        match self {
+            Action::Call(_) => ActionType::Call,
+            Action::Create(_) => ActionType::Create,
+            Action::Selfdestruct(_) => ActionType::Selfdestruct,
+            Action::Reward(_) => ActionType::Reward,
+        }
+    }
+}
+
+/// An external action type.
+///
+/// Used as enum identifier for [Action]
+#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
+#[serde(rename_all = "lowercase")]
+pub enum ActionType {
+    /// Contract call.
+    Call,
+    /// Contract creation.
+    Create,
+    /// Contract suicide/selfdestruct.
+    #[serde(rename = "suicide", alias = "selfdestruct")]
+    Selfdestruct,
+    /// A block reward.
+    Reward,
+}
+
+/// Call type.
+#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "lowercase")]
+pub enum CallType {
+    /// None
+    #[default]
+    None,
+    /// Call
+    Call,
+    /// Call code
+    CallCode,
+    /// Delegate call
+    DelegateCall,
+    /// Static call
+    StaticCall,
+}
+
+/// Represents a certain [CallType] of a _call_ or message transaction.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct CallAction {
+    /// Address of the sending account.
+    pub from: Address,
+    /// The type of the call.
+    pub call_type: CallType,
+    /// The gas available for executing the call.
+    pub gas: U64,
+    /// The input data provided to the call.
+    pub input: Bytes,
+    /// Address of the destination/target account.
+    pub to: Address,
+    /// Value transferred to the destination account.
+    pub value: U256,
+}
+
+/// Represents a _create_ action, either a `CREATE` operation or a CREATE transaction.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct CreateAction {
+    /// The address of the creator.
+    pub from: Address,
+    /// The gas available for the creation init code.
+    pub gas: U64,
+    /// The init code.
+    pub init: Bytes,
+    /// The value with which the new account is endowed.
+    pub value: U256,
+}
+
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+/// Reward type.
+pub enum RewardType {
+    /// Block
+    Block,
+    /// Uncle
+    Uncle,
+}
+
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+/// Reward Action.
+pub struct RewardAction {
+    /// Author's address.
+    pub author: Address,
+    /// Reward type.
+    pub reward_type: RewardType,
+    /// Reward amount.
+    pub value: U256,
+}
+
+/// Represents a _selfdestruct_ action fka `suicide`.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct SelfdestructAction {
+    /// destroyed/suicided address.
+    pub address: Address,
+    /// Balance of the contract just before it was destroyed.
+    pub balance: U256,
+    /// destroyed contract heir.
+    pub refund_address: Address,
+}
+
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+/// Call out put type
+pub struct CallOutput {
+    /// Gas Used.
+    pub gas_used: U64,
+    /// Output
+    pub output: Bytes,
+}
+/// Represents the output of a create operation.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct CreateOutput {
+    /// Address output.
+    pub address: Address,
+    /// Code data.
+    pub code: Bytes,
+    /// Resulting address.
+    pub gas_used: U64,
+}
+
+/// Represents the output of a trace.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum TraceOutput {
+    /// Output of a regular call transaction.
+    Call(CallOutput),
+    /// Output of a CREATE transaction.
+    Create(CreateOutput),
+}
+
+// === impl TraceOutput ===
+
+impl TraceOutput {
+    /// Returns the gas used by this trace.
+    pub fn gas_used(&self) -> U64 {
+        match self {
+            TraceOutput::Call(call) => call.gas_used,
+            TraceOutput::Create(create) => create.gas_used,
+        }
+    }
+
+    /// Sets the gas used by this trace.
+    pub fn set_gas_used(&mut self, gas_used: u64) {
+        match self {
+            TraceOutput::Call(call) => call.gas_used = U64::from(gas_used),
+            TraceOutput::Create(create) => create.gas_used = U64::from(gas_used),
+        }
+    }
+}
+
+/// A parity style trace of a transaction.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct TransactionTrace {
+    #[serde(flatten)]
+    /// Transaction action.
+    pub action: Action,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    /// Error message.
+    pub error: Option<String>,
+    /// Execution result.
+    pub result: Option<TraceOutput>,
+    /// Subtrace count.
+    pub subtraces: usize,
+    /// Trace address path.
+    pub trace_address: Vec<usize>,
+}
+
+#[derive(Clone, Debug, Eq, PartialEq, Deserialize)]
+#[serde(rename_all = "camelCase")]
+/// Localized transaction trace.
+pub struct LocalizedTransactionTrace {
+    /// Trace of the transaction and its result.
+    #[serde(flatten)]
+    /// Trace of the transaction and its result.
+    pub trace: TransactionTrace,
+    /// Hash of the block, if not pending.
+    ///
+    /// Note: this deviates from <https://openethereum.github.io/JSONRPC-trace-module#trace_transaction> which always returns a block number
+    pub block_hash: Option<B256>,
+    /// Block number the transaction is included in, None if pending.
+    ///
+    /// Note: this deviates from <https://openethereum.github.io/JSONRPC-trace-module#trace_transaction> which always returns a block number
+    pub block_number: Option<u64>,
+    /// Hash of the transaction
+    pub transaction_hash: Option<B256>,
+    /// Transaction index within the block, None if pending.
+    pub transaction_position: Option<u64>,
+}
+
+// Implement Serialize manually to ensure consistent ordering of fields to match other client's
+// format
+impl Serialize for LocalizedTransactionTrace {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        let mut s = serializer.serialize_struct("LocalizedTransactionTrace", 9)?;
+
+        let TransactionTrace { action, error, result, subtraces, trace_address } = &self.trace;
+
+        match action {
+            Action::Call(call_action) => {
+                s.serialize_field("action", call_action)?;
+            }
+            Action::Create(create_action) => {
+                s.serialize_field("action", create_action)?;
+            }
+            Action::Selfdestruct(selfdestruct_action) => {
+                s.serialize_field("action", selfdestruct_action)?;
+            }
+            Action::Reward(reward_action) => {
+                s.serialize_field("action", reward_action)?;
+            }
+        }
+        if let Some(block_hash) = self.block_hash {
+            s.serialize_field("blockHash", &block_hash)?;
+        }
+        if let Some(block_number) = self.block_number {
+            s.serialize_field("blockNumber", &block_number)?;
+        }
+
+        if let Some(error) = error {
+            s.serialize_field("error", error)?;
+        }
+
+        match result {
+            Some(TraceOutput::Call(call)) => {
+                s.serialize_field("result", call)?;
+            }
+            Some(TraceOutput::Create(create)) => {
+                s.serialize_field("result", create)?;
+            }
+            None => {}
+        }
+
+        s.serialize_field("subtraces", &subtraces)?;
+        s.serialize_field("traceAddress", &trace_address)?;
+
+        if let Some(transaction_hash) = &self.transaction_hash {
+            s.serialize_field("transactionHash", transaction_hash)?;
+        }
+        if let Some(transaction_position) = &self.transaction_position {
+            s.serialize_field("transactionPosition", transaction_position)?;
+        }
+
+        s.serialize_field("type", &action.kind())?;
+
+        s.end()
+    }
+}
+
+/// A record of a full VM trace for a CALL/CREATE.
+#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct VmTrace {
+    /// The code to be executed.
+    pub code: Bytes,
+    /// All executed instructions.
+    pub ops: Vec<VmInstruction>,
+}
+/// Vm instruction type.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct VmInstruction {
+    /// The gas cost for this instruction.
+    pub cost: u64,
+    /// Information concerning the execution of the operation.
+    pub ex: Option<VmExecutedOperation>,
+    /// The program counter.
+    pub pc: usize,
+    /// Subordinate trace of the CALL/CREATE if applicable.
+    pub sub: Option<VmTrace>,
+    /// Stringified opcode.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub op: Option<String>,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    /// Index.
+    pub idx: Option<String>,
+}
+
+/// A record of an executed VM operation.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct VmExecutedOperation {
+    /// The total gas used.
+    pub used: u64,
+    /// The stack item placed, if any.
+    pub push: Vec<U256>,
+    /// If altered, the memory delta.
+    pub mem: Option<MemoryDelta>,
+    /// The altered storage value, if any.
+    pub store: Option<StorageDelta>,
+}
+
+/// A diff of some chunk of memory.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct MemoryDelta {
+    /// Offset into memory the change begins.
+    pub off: usize,
+    /// The changed data.
+    pub data: Bytes,
+}
+
+/// A diff of some storage value.
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct StorageDelta {
+    /// Key.
+    pub key: U256,
+    /// Value.
+    pub val: U256,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use serde_json::{json, Value};
+    use std::str::FromStr;
+
+    #[test]
+    fn test_transaction_trace() {
+        let s = r#"{
+            "action": {
+                "from": "0x66e29f0b6b1b07071f2fde4345d512386cb66f5f",
+                "callType": "call",
+                "gas": "0x10bfc",
+                "input": "0xf6cd1e8d0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000011c37937e080000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ec6952892271c8ee13f12e118484e03149281c9600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010480862479000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000160f5f00288e9e1cc8655b327e081566e580a71d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000011c37937e080000fffffffffffffffffffffffffffffffffffffffffffffffffee3c86c81f8000000000000000000000000000000000000000000000000000000000000",
+                "to": "0x160f5f00288e9e1cc8655b327e081566e580a71d",
+                "value": "0x244b"
+            },
+            "error": "Reverted",
+            "result": {
+                "gasUsed": "0x9daf",
+                "output": "0x000000000000000000000000000000000000000000000000011c37937e080000"
+            },
+            "subtraces": 3,
+            "traceAddress": [],
+            "type": "call"
+        }"#;
+        let val = serde_json::from_str::<TransactionTrace>(s).unwrap();
+        serde_json::to_value(val).unwrap();
+    }
+
+    #[test]
+    fn test_selfdestruct_suicide() {
+        let input = r#"{
+            "action": {
+                "address": "0x66e29f0b6b1b07071f2fde4345d512386cb66f5f",
+                "refundAddress": "0x66e29f0b6b1b07071f2fde4345d512386cb66f5f",
+                "balance": "0x244b"
+            },
+            "error": "Reverted",
+            "result": {
+                "gasUsed": "0x9daf",
+                "output": "0x000000000000000000000000000000000000000000000000011c37937e080000"
+            },
+            "subtraces": 3,
+            "traceAddress": [],
+            "type": "suicide"
+        }"#;
+        let val = serde_json::from_str::<TransactionTrace>(input).unwrap();
+        assert!(val.action.is_selfdestruct());
+
+        let json = serde_json::to_value(val.clone()).unwrap();
+        let expect = serde_json::from_str::<serde_json::Value>(input).unwrap();
+        similar_asserts::assert_eq!(json, expect);
+        let s = serde_json::to_string(&val).unwrap();
+        let json = serde_json::from_str::<serde_json::Value>(&s).unwrap();
+        similar_asserts::assert_eq!(json, expect);
+
+        let input = input.replace("suicide", "selfdestruct");
+        let val = serde_json::from_str::<TransactionTrace>(&input).unwrap();
+        assert!(val.action.is_selfdestruct());
+    }
+
+    #[derive(Debug)]
+    struct TraceTestCase {
+        trace: LocalizedTransactionTrace,
+        expected_json: Value,
+    }
+
+    #[test]
+    fn test_serialization_order() {
+        let test_cases = vec![
+            TraceTestCase {
+                trace: LocalizedTransactionTrace {
+                    trace: TransactionTrace {
+                        action: Action::Call(CallAction {
+                            from: "0x4f4495243837681061c4743b74b3eedf548d56a5".parse::<Address>().unwrap(),
+                            call_type: CallType::DelegateCall,
+                            gas: U64::from(3148955),
+                            input: Bytes::from_str("0x585a9fd40000000000000000000000000000000000000000000000000000000000000040a47c5ad9a4af285720eae6cc174a9c75c5bbaf973b00f1a0c191327445b6581000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000ce16f69375520ab01377ce7b88f5ba8c48f8d666f61490331372e432315cd97447e3bc452d6c73a6e0536260a88ddab46f85c88d00000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000aab8cf0fbfb038751339cb61161fa11789b41a78f1b7b0e12cf8e467d403590b7a5f26f0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000646616e746f6d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a3078636531364636393337353532306162303133373763653742383866354241384334384638443636360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000").unwrap(),
+                            to:  "0x99b5fa03a5ea4315725c43346e55a6a6fbd94098".parse::<Address>().unwrap(),
+                            value: U256::from(0),
+                        }),
+                        error: None,
+                        result: Some(TraceOutput::Call(CallOutput { gas_used: U64::from(32364), output: Bytes::new() })),
+                        subtraces: 0,
+                        trace_address: vec![0, 10, 0],
+                    },
+                    block_hash: Some(B256::ZERO),
+                    block_number: Some(18557272),
+                    transaction_hash: Some(B256::from_str("0x54160ddcdbfaf98a43a43c328ebd44aa99faa765e0daa93e61145b06815a4071").unwrap()),
+                    transaction_position: Some(102),
+                },
+                expected_json: json!({
+                    "action": {
+                        "from": "0x4f4495243837681061c4743b74b3eedf548d56a5",
+                        "callType": "delegatecall",
+                        "gas": "0x300c9b",
+                        "input": "0x585a9fd40000000000000000000000000000000000000000000000000000000000000040a47c5ad9a4af285720eae6cc174a9c75c5bbaf973b00f1a0c191327445b6581000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000ce16f69375520ab01377ce7b88f5ba8c48f8d666f61490331372e432315cd97447e3bc452d6c73a6e0536260a88ddab46f85c88d00000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000aab8cf0fbfb038751339cb61161fa11789b41a78f1b7b0e12cf8e467d403590b7a5f26f0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000646616e746f6d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a3078636531364636393337353532306162303133373763653742383866354241384334384638443636360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000",
+                        "to": "0x99b5fa03a5ea4315725c43346e55a6a6fbd94098",
+                        "value": "0x0"
+                    },
+                    "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+                    "blockNumber": 18557272,
+                    "result": {
+                        "gasUsed": "0x7e6c",
+                        "output": "0x"
+                    },
+                    "subtraces": 0,
+                    "traceAddress": [
+                        0,
+                        10,
+                        0
+                    ],
+                    "transactionHash": "0x54160ddcdbfaf98a43a43c328ebd44aa99faa765e0daa93e61145b06815a4071",
+                    "transactionPosition": 102,
+                    "type": "call"
+                }),
+            },
+            TraceTestCase {
+                trace: LocalizedTransactionTrace {
+                    trace: TransactionTrace {
+                        action: Action::Create(CreateAction{
+                            from: "0x4f4495243837681061c4743b74b3eedf548d56a5".parse::<Address>().unwrap(),
+                            gas: U64::from(3438907),
+                            init: Bytes::from_str("0x6080604052600160005534801561001557600080fd5b50610324806100256000396000f3fe608060405234801561001057600080fd5b50600436106100355760003560e01c8062f55d9d1461003a5780631cff79cd1461004f575b600080fd5b61004d6100483660046101da565b610079565b005b61006261005d3660046101fc565b6100bb565b60405161007092919061027f565b60405180910390f35b6002600054141561009d5760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff8116ff5b60006060600260005414156100e35760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff85163b610136576040517f6f7c43f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16848460405161015d9291906102de565b6000604051808303816000865af19150503d806000811461019a576040519150601f19603f3d011682016040523d82523d6000602084013e61019f565b606091505b50600160005590969095509350505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101d557600080fd5b919050565b6000602082840312156101ec57600080fd5b6101f5826101b1565b9392505050565b60008060006040848603121561021157600080fd5b61021a846101b1565b9250602084013567ffffffffffffffff8082111561023757600080fd5b818601915086601f83011261024b57600080fd5b81358181111561025a57600080fd5b87602082850101111561026c57600080fd5b6020830194508093505050509250925092565b821515815260006020604081840152835180604085015260005b818110156102b557858101830151858201606001528201610299565b818111156102c7576000606083870101525b50601f01601f191692909201606001949350505050565b818382376000910190815291905056fea264697066735822122032cb5e746816b7fac95205c068b30da37bd40119a57265be331c162cae74712464736f6c63430008090033").unwrap(),
+                            value: U256::from(0),
+                        }),
+                        error: None,
+                        result: Some(TraceOutput::Create(CreateOutput { gas_used: U64::from(183114), address: "0x7eb6c6c1db08c0b9459a68cfdcedab64f319c138".parse::<Address>().unwrap(), code: Bytes::from_str("0x608060405234801561001057600080fd5b50600436106100355760003560e01c8062f55d9d1461003a5780631cff79cd1461004f575b600080fd5b61004d6100483660046101da565b610079565b005b61006261005d3660046101fc565b6100bb565b60405161007092919061027f565b60405180910390f35b6002600054141561009d5760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff8116ff5b60006060600260005414156100e35760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff85163b610136576040517f6f7c43f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16848460405161015d9291906102de565b6000604051808303816000865af19150503d806000811461019a576040519150601f19603f3d011682016040523d82523d6000602084013e61019f565b606091505b50600160005590969095509350505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101d557600080fd5b919050565b6000602082840312156101ec57600080fd5b6101f5826101b1565b9392505050565b60008060006040848603121561021157600080fd5b61021a846101b1565b9250602084013567ffffffffffffffff8082111561023757600080fd5b818601915086601f83011261024b57600080fd5b81358181111561025a57600080fd5b87602082850101111561026c57600080fd5b6020830194508093505050509250925092565b821515815260006020604081840152835180604085015260005b818110156102b557858101830151858201606001528201610299565b818111156102c7576000606083870101525b50601f01601f191692909201606001949350505050565b818382376000910190815291905056fea264697066735822122032cb5e746816b7fac95205c068b30da37bd40119a57265be331c162cae74712464736f6c63430008090033").unwrap() })),
+                        subtraces: 0,
+                        trace_address: vec![0, 7, 0, 0],
+                    },
+                    block_hash: Some(B256::from_str("0xd5ac5043011d4f16dba7841fa760c4659644b78f663b901af4673b679605ed0d").unwrap()),
+                    block_number: Some(18557272),
+                    transaction_hash: Some(B256::from_str("0x54160ddcdbfaf98a43a43c328ebd44aa99faa765e0daa93e61145b06815a4071").unwrap()),
+                    transaction_position: Some(102),
+                },
+                expected_json: json!({
+                    "action": {
+                        "from": "0x4f4495243837681061c4743b74b3eedf548d56a5",
+                        "gas": "0x34793b",
+                        "init": "0x6080604052600160005534801561001557600080fd5b50610324806100256000396000f3fe608060405234801561001057600080fd5b50600436106100355760003560e01c8062f55d9d1461003a5780631cff79cd1461004f575b600080fd5b61004d6100483660046101da565b610079565b005b61006261005d3660046101fc565b6100bb565b60405161007092919061027f565b60405180910390f35b6002600054141561009d5760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff8116ff5b60006060600260005414156100e35760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff85163b610136576040517f6f7c43f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16848460405161015d9291906102de565b6000604051808303816000865af19150503d806000811461019a576040519150601f19603f3d011682016040523d82523d6000602084013e61019f565b606091505b50600160005590969095509350505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101d557600080fd5b919050565b6000602082840312156101ec57600080fd5b6101f5826101b1565b9392505050565b60008060006040848603121561021157600080fd5b61021a846101b1565b9250602084013567ffffffffffffffff8082111561023757600080fd5b818601915086601f83011261024b57600080fd5b81358181111561025a57600080fd5b87602082850101111561026c57600080fd5b6020830194508093505050509250925092565b821515815260006020604081840152835180604085015260005b818110156102b557858101830151858201606001528201610299565b818111156102c7576000606083870101525b50601f01601f191692909201606001949350505050565b818382376000910190815291905056fea264697066735822122032cb5e746816b7fac95205c068b30da37bd40119a57265be331c162cae74712464736f6c63430008090033",
+                        "value": "0x0"
+                    },
+                    "blockHash": "0xd5ac5043011d4f16dba7841fa760c4659644b78f663b901af4673b679605ed0d",
+                    "blockNumber": 18557272,
+                    "result": {
+                        "address": "0x7eb6c6c1db08c0b9459a68cfdcedab64f319c138",
+                        "code": "0x608060405234801561001057600080fd5b50600436106100355760003560e01c8062f55d9d1461003a5780631cff79cd1461004f575b600080fd5b61004d6100483660046101da565b610079565b005b61006261005d3660046101fc565b6100bb565b60405161007092919061027f565b60405180910390f35b6002600054141561009d5760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff8116ff5b60006060600260005414156100e35760405163caa30f5560e01b815260040160405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff85163b610136576040517f6f7c43f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16848460405161015d9291906102de565b6000604051808303816000865af19150503d806000811461019a576040519150601f19603f3d011682016040523d82523d6000602084013e61019f565b606091505b50600160005590969095509350505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101d557600080fd5b919050565b6000602082840312156101ec57600080fd5b6101f5826101b1565b9392505050565b60008060006040848603121561021157600080fd5b61021a846101b1565b9250602084013567ffffffffffffffff8082111561023757600080fd5b818601915086601f83011261024b57600080fd5b81358181111561025a57600080fd5b87602082850101111561026c57600080fd5b6020830194508093505050509250925092565b821515815260006020604081840152835180604085015260005b818110156102b557858101830151858201606001528201610299565b818111156102c7576000606083870101525b50601f01601f191692909201606001949350505050565b818382376000910190815291905056fea264697066735822122032cb5e746816b7fac95205c068b30da37bd40119a57265be331c162cae74712464736f6c63430008090033",
+                        "gasUsed": "0x2cb4a"
+                    },
+                    "subtraces": 0,
+                    "traceAddress": [
+                        0,
+                        7,
+                        0,
+                        0
+                    ],
+                    "transactionHash": "0x54160ddcdbfaf98a43a43c328ebd44aa99faa765e0daa93e61145b06815a4071",
+                    "transactionPosition": 102,
+                    "type": "create"
+                }),
+            }
+        ];
+
+        for (i, test_case) in test_cases.iter().enumerate() {
+            let serialized = serde_json::to_string(&test_case.trace).unwrap();
+            let actual_json: Value = serde_json::from_str(&serialized).unwrap();
+
+            assert_eq!(
+                actual_json, test_case.expected_json,
+                "Test case {} failed; Trace: {:?}",
+                i, test_case.trace
+            );
+        }
+    }
+
+    #[test]
+    fn test_deserialize_serialize() {
+        let reference_data = r#"{
+  "action": {
+    "from": "0xc77820eef59629fc8d88154977bc8de8a1b2f4ae",
+    "callType": "call",
+    "gas": "0x4a0d00",
+    "input": "0x12",
+    "to": "0x4f4495243837681061c4743b74b3eedf548d56a5",
+    "value": "0x0"
+  },
+  "blockHash": "0xd5ac5043011d4f16dba7841fa760c4659644b78f663b901af4673b679605ed0d",
+  "blockNumber": 18557272,
+  "result": {
+    "gasUsed": "0x17d337",
+    "output": "0x"
+  },
+  "subtraces": 1,
+  "traceAddress": [],
+  "transactionHash": "0x54160ddcdbfaf98a43a43c328ebd44aa99faa765e0daa93e61145b06815a4071",
+  "transactionPosition": 102,
+  "type": "call"
+}"#;
+
+        let trace: LocalizedTransactionTrace = serde_json::from_str(reference_data).unwrap();
+        assert!(trace.trace.action.is_call());
+        let serialized = serde_json::to_string_pretty(&trace).unwrap();
+        similar_asserts::assert_eq!(serialized, reference_data);
+    }
+
+    #[test]
+    fn test_deserialize_serialize_selfdestruct() {
+        let reference_data = r#"{
+  "action": {
+    "address": "0xc77820eef59629fc8d88154977bc8de8a1b2f4ae",
+    "balance": "0x0",
+    "refundAddress": "0x4f4495243837681061c4743b74b3eedf548d56a5"
+  },
+  "blockHash": "0xd5ac5043011d4f16dba7841fa760c4659644b78f663b901af4673b679605ed0d",
+  "blockNumber": 18557272,
+  "result": {
+    "gasUsed": "0x17d337",
+    "output": "0x"
+  },
+  "subtraces": 1,
+  "traceAddress": [],
+  "transactionHash": "0x54160ddcdbfaf98a43a43c328ebd44aa99faa765e0daa93e61145b06815a4071",
+  "transactionPosition": 102,
+  "type": "suicide"
+}"#;
+
+        let trace: LocalizedTransactionTrace = serde_json::from_str(reference_data).unwrap();
+        assert!(trace.trace.action.is_selfdestruct());
+        let serialized = serde_json::to_string_pretty(&trace).unwrap();
+        similar_asserts::assert_eq!(serialized, reference_data);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/trace/tracerequest.rs.html b/src/alloy_rpc_types/eth/trace/tracerequest.rs.html new file mode 100644 index 000000000000..cb177f70c2f7 --- /dev/null +++ b/src/alloy_rpc_types/eth/trace/tracerequest.rs.html @@ -0,0 +1,170 @@ +tracerequest.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
//! Builder style functions for `trace_call`
+
+use crate::{
+    eth::block::BlockId, state::StateOverride, trace::parity::TraceType, BlockOverrides,
+    CallRequest,
+};
+use serde::{Deserialize, Serialize};
+use std::collections::HashSet;
+
+/// Container type for `trace_call` arguments
+#[derive(Debug, Serialize, Deserialize, Default)]
+pub struct TraceCallRequest {
+    /// call request object
+    pub call: CallRequest,
+    /// trace types
+    pub trace_types: HashSet<TraceType>,
+    /// Optional: blockId
+    pub block_id: Option<BlockId>,
+    /// Optional: StateOverride
+    pub state_overrides: Option<StateOverride>,
+    /// Optional: BlockOverrides
+    pub block_overrides: Option<Box<BlockOverrides>>,
+}
+
+impl TraceCallRequest {
+    /// Returns a new [`TraceCallRequest`] given a [`CallRequest`] and [`HashSet<TraceType>`]
+    pub fn new(call: CallRequest) -> Self {
+        Self {
+            call,
+            trace_types: HashSet::new(),
+            block_id: None,
+            state_overrides: None,
+            block_overrides: None,
+        }
+    }
+
+    /// Sets the [`BlockId`]
+    /// Note: this is optional
+    pub fn with_block_id(mut self, block_id: BlockId) -> Self {
+        self.block_id = Some(block_id);
+        self
+    }
+
+    /// Sets the [`StateOverride`]
+    /// Note: this is optional
+    pub fn with_state_override(mut self, state_overrides: StateOverride) -> Self {
+        self.state_overrides = Some(state_overrides);
+        self
+    }
+
+    /// Sets the [`BlockOverrides`]
+    /// Note: this is optional
+    pub fn with_block_overrides(mut self, block_overrides: Box<BlockOverrides>) -> Self {
+        self.block_overrides = Some(block_overrides);
+        self
+    }
+
+    /// Inserts a single trace type.
+    pub fn with_trace_type(mut self, trace_type: TraceType) -> Self {
+        self.trace_types.insert(trace_type);
+        self
+    }
+
+    /// Inserts multiple trace types from an iterator.
+    pub fn with_trace_types<I: IntoIterator<Item = TraceType>>(mut self, trace_types: I) -> Self {
+        self.trace_types.extend(trace_types);
+        self
+    }
+
+    /// Inserts [`TraceType::Trace`]
+    pub fn with_trace(self) -> Self {
+        self.with_trace_type(TraceType::Trace)
+    }
+
+    /// Inserts [`TraceType::VmTrace`]
+    pub fn with_vm_trace(self) -> Self {
+        self.with_trace_type(TraceType::VmTrace)
+    }
+
+    /// Inserts [`TraceType::StateDiff`]
+    pub fn with_statediff(self) -> Self {
+        self.with_trace_type(TraceType::StateDiff)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/access_list.rs.html b/src/alloy_rpc_types/eth/transaction/access_list.rs.html new file mode 100644 index 000000000000..67b171a7b31f --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/access_list.rs.html @@ -0,0 +1,224 @@ +access_list.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+
use alloy_primitives::{Address, B256, U256};
+use alloy_rlp::{RlpDecodable, RlpEncodable};
+use serde::{Deserialize, Serialize};
+use std::mem;
+
+/// A list of addresses and storage keys that the transaction plans to access.
+/// Accesses outside the list are possible, but become more expensive.
+#[derive(
+    Deserialize, Serialize, Clone, Debug, PartialEq, Eq, Hash, Default, RlpEncodable, RlpDecodable,
+)]
+#[serde(rename_all = "camelCase")]
+pub struct AccessListItem {
+    /// Account addresses that would be loaded at the start of execution
+    pub address: Address,
+    /// Keys of storage that would be loaded at the start of execution
+    pub storage_keys: Vec<B256>,
+}
+
+impl AccessListItem {
+    /// Calculates a heuristic for the in-memory size of the [AccessListItem].
+    #[inline]
+    pub fn size(&self) -> usize {
+        mem::size_of::<Address>() + self.storage_keys.capacity() * mem::size_of::<U256>()
+    }
+}
+
+/// AccessList as defined in EIP-2930
+#[derive(
+    Deserialize, Serialize, Clone, Debug, PartialEq, Eq, Hash, Default, RlpEncodable, RlpDecodable,
+)]
+pub struct AccessList(pub Vec<AccessListItem>);
+
+impl AccessList {
+    /// Converts the list into a vec, expected by revm
+    pub fn flattened(&self) -> Vec<(Address, Vec<U256>)> {
+        self.flatten().map(|(addr, keys)| (addr, keys.to_vec())).collect()
+    }
+
+    /// Consumes the type and converts the list into a vec, expected by revm
+    pub fn into_flattened(self) -> Vec<(Address, Vec<U256>)> {
+        self.into_flatten().collect()
+    }
+
+    /// Consumes the type and returns an iterator over the list's addresses and storage keys.
+    pub fn into_flatten(self) -> impl Iterator<Item = (Address, Vec<U256>)> {
+        self.0.into_iter().map(|item| {
+            (
+                item.address,
+                item.storage_keys.into_iter().map(|slot| U256::from_be_bytes(slot.0)).collect(),
+            )
+        })
+    }
+
+    /// Returns an iterator over the list's addresses and storage keys.
+    pub fn flatten(&self) -> impl Iterator<Item = (Address, Vec<U256>)> + '_ {
+        self.0.iter().map(|item| {
+            (
+                item.address,
+                item.storage_keys.iter().map(|slot| U256::from_be_bytes(slot.0)).collect(),
+            )
+        })
+    }
+
+    /// Calculates a heuristic for the in-memory size of the [AccessList].
+    #[inline]
+    pub fn size(&self) -> usize {
+        // take into account capacity
+        self.0.iter().map(AccessListItem::size).sum::<usize>()
+            + self.0.capacity() * mem::size_of::<AccessListItem>()
+    }
+}
+
+/// Access list with gas used appended.
+#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, Default)]
+#[serde(rename_all = "camelCase")]
+pub struct AccessListWithGasUsed {
+    /// List with accounts accessed during transaction.
+    pub access_list: AccessList,
+    /// Estimated gas used with access list.
+    pub gas_used: U256,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn access_list_serde() {
+        let list = AccessList(vec![
+            AccessListItem { address: Address::ZERO, storage_keys: vec![B256::ZERO] },
+            AccessListItem { address: Address::ZERO, storage_keys: vec![B256::ZERO] },
+        ]);
+        let json = serde_json::to_string(&list).unwrap();
+        let list2 = serde_json::from_str::<AccessList>(&json).unwrap();
+        assert_eq!(list, list2);
+    }
+
+    #[test]
+    fn access_list_with_gas_used() {
+        let list = AccessListWithGasUsed {
+            access_list: AccessList(vec![
+                AccessListItem { address: Address::ZERO, storage_keys: vec![B256::ZERO] },
+                AccessListItem { address: Address::ZERO, storage_keys: vec![B256::ZERO] },
+            ]),
+            gas_used: U256::from(100),
+        };
+        let json = serde_json::to_string(&list).unwrap();
+        let list2 = serde_json::from_str::<AccessListWithGasUsed>(&json).unwrap();
+        assert_eq!(list, list2);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/common.rs.html b/src/alloy_rpc_types/eth/transaction/common.rs.html new file mode 100644 index 000000000000..b4d8dc37ebd1 --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/common.rs.html @@ -0,0 +1,40 @@ +common.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+
//! Commonly used additional types that are not part of the JSON RPC spec but are often required
+//! when working with RPC types, such as [Transaction](crate::Transaction)
+
+use alloy_primitives::{TxHash, B256};
+
+/// Additional fields in the context of a block that contains this transaction.
+#[derive(Debug, Clone, Copy, Default, Eq, PartialEq)]
+pub struct TransactionInfo {
+    /// Hash of the transaction.
+    pub hash: Option<TxHash>,
+    /// Index of the transaction in the block
+    pub index: Option<u64>,
+    /// Hash of the block.
+    pub block_hash: Option<B256>,
+    /// Number of the block.
+    pub block_number: Option<u64>,
+    /// Base fee of the block.
+    pub base_fee: Option<u64>,
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/mod.rs.html b/src/alloy_rpc_types/eth/transaction/mod.rs.html new file mode 100644 index 000000000000..0ef344cb2e86 --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/mod.rs.html @@ -0,0 +1,324 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+
pub use access_list::{AccessList, AccessListItem, AccessListWithGasUsed};
+use alloy_primitives::{Address, Bytes, B256, U128, U256, U64};
+pub use common::TransactionInfo;
+pub use receipt::TransactionReceipt;
+pub use request::TransactionRequest;
+use serde::{Deserialize, Serialize};
+pub use signature::{Parity, Signature};
+pub use typed::*;
+
+mod access_list;
+mod common;
+mod receipt;
+mod request;
+mod signature;
+mod tx_type;
+mod typed;
+
+pub use tx_type::*;
+
+use crate::other::OtherFields;
+
+/// Transaction object used in RPC
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct Transaction {
+    /// Hash
+    pub hash: B256,
+    /// Nonce
+    pub nonce: U64,
+    /// Block hash
+    pub block_hash: Option<B256>,
+    /// Block number
+    pub block_number: Option<U256>,
+    /// Transaction Index
+    pub transaction_index: Option<U256>,
+    /// Sender
+    pub from: Address,
+    /// Recipient
+    pub to: Option<Address>,
+    /// Transferred value
+    pub value: U256,
+    /// Gas Price
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub gas_price: Option<U128>,
+    /// Gas amount
+    pub gas: U256,
+    /// Max BaseFeePerGas the user is willing to pay.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub max_fee_per_gas: Option<U128>,
+    /// The miner's tip.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub max_priority_fee_per_gas: Option<U128>,
+    /// Configured max fee per blob gas for eip-4844 transactions
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub max_fee_per_blob_gas: Option<U128>,
+    /// Data
+    pub input: Bytes,
+    /// All _flattened_ fields of the transaction signature.
+    ///
+    /// Note: this is an option so special transaction types without a signature (e.g. <https://github.com/ethereum-optimism/optimism/blob/0bf643c4147b43cd6f25a759d331ef3a2a61a2a3/specs/deposits.md#the-deposited-transaction-type>) can be supported.
+    #[serde(flatten, skip_serializing_if = "Option::is_none")]
+    pub signature: Option<Signature>,
+    /// The chain id of the transaction, if any.
+    pub chain_id: Option<U64>,
+    /// Contains the blob hashes for eip-4844 transactions.
+    #[serde(default, skip_serializing_if = "Vec::is_empty")]
+    pub blob_versioned_hashes: Vec<B256>,
+    /// EIP2930
+    ///
+    /// Pre-pay to warm storage access.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub access_list: Option<Vec<AccessListItem>>,
+    /// EIP2718
+    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
+    pub transaction_type: Option<U64>,
+    /// Arbitrary extra fields.
+    #[serde(flatten)]
+    pub other: OtherFields,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::eth::transaction::signature::Parity;
+
+    #[test]
+    fn serde_transaction() {
+        let transaction = Transaction {
+            hash: B256::with_last_byte(1),
+            nonce: U64::from(2),
+            block_hash: Some(B256::with_last_byte(3)),
+            block_number: Some(U256::from(4)),
+            transaction_index: Some(U256::from(5)),
+            from: Address::with_last_byte(6),
+            to: Some(Address::with_last_byte(7)),
+            value: U256::from(8),
+            gas_price: Some(U128::from(9)),
+            gas: U256::from(10),
+            input: Bytes::from(vec![11, 12, 13]),
+            signature: Some(Signature {
+                v: U256::from(14),
+                r: U256::from(14),
+                s: U256::from(14),
+                y_parity: None,
+            }),
+            chain_id: Some(U64::from(17)),
+            blob_versioned_hashes: vec![],
+            access_list: None,
+            transaction_type: Some(U64::from(20)),
+            max_fee_per_gas: Some(U128::from(21)),
+            max_priority_fee_per_gas: Some(U128::from(22)),
+            max_fee_per_blob_gas: None,
+            other: Default::default(),
+        };
+        let serialized = serde_json::to_string(&transaction).unwrap();
+        assert_eq!(
+            serialized,
+            r#"{"hash":"0x0000000000000000000000000000000000000000000000000000000000000001","nonce":"0x2","blockHash":"0x0000000000000000000000000000000000000000000000000000000000000003","blockNumber":"0x4","transactionIndex":"0x5","from":"0x0000000000000000000000000000000000000006","to":"0x0000000000000000000000000000000000000007","value":"0x8","gasPrice":"0x9","gas":"0xa","maxFeePerGas":"0x15","maxPriorityFeePerGas":"0x16","input":"0x0b0c0d","r":"0xe","s":"0xe","v":"0xe","chainId":"0x11","type":"0x14"}"#
+        );
+        let deserialized: Transaction = serde_json::from_str(&serialized).unwrap();
+        assert_eq!(transaction, deserialized);
+    }
+
+    #[test]
+    fn serde_transaction_with_parity_bit() {
+        let transaction = Transaction {
+            hash: B256::with_last_byte(1),
+            nonce: U64::from(2),
+            block_hash: Some(B256::with_last_byte(3)),
+            block_number: Some(U256::from(4)),
+            transaction_index: Some(U256::from(5)),
+            from: Address::with_last_byte(6),
+            to: Some(Address::with_last_byte(7)),
+            value: U256::from(8),
+            gas_price: Some(U128::from(9)),
+            gas: U256::from(10),
+            input: Bytes::from(vec![11, 12, 13]),
+            signature: Some(Signature {
+                v: U256::from(14),
+                r: U256::from(14),
+                s: U256::from(14),
+                y_parity: Some(Parity(true)),
+            }),
+            chain_id: Some(U64::from(17)),
+            blob_versioned_hashes: vec![],
+            access_list: None,
+            transaction_type: Some(U64::from(20)),
+            max_fee_per_gas: Some(U128::from(21)),
+            max_priority_fee_per_gas: Some(U128::from(22)),
+            max_fee_per_blob_gas: None,
+            other: Default::default(),
+        };
+        let serialized = serde_json::to_string(&transaction).unwrap();
+        assert_eq!(
+            serialized,
+            r#"{"hash":"0x0000000000000000000000000000000000000000000000000000000000000001","nonce":"0x2","blockHash":"0x0000000000000000000000000000000000000000000000000000000000000003","blockNumber":"0x4","transactionIndex":"0x5","from":"0x0000000000000000000000000000000000000006","to":"0x0000000000000000000000000000000000000007","value":"0x8","gasPrice":"0x9","gas":"0xa","maxFeePerGas":"0x15","maxPriorityFeePerGas":"0x16","input":"0x0b0c0d","r":"0xe","s":"0xe","v":"0xe","yParity":"0x1","chainId":"0x11","type":"0x14"}"#
+        );
+        let deserialized: Transaction = serde_json::from_str(&serialized).unwrap();
+        assert_eq!(transaction, deserialized);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/receipt.rs.html b/src/alloy_rpc_types/eth/transaction/receipt.rs.html new file mode 100644 index 000000000000..fb4888d1b540 --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/receipt.rs.html @@ -0,0 +1,116 @@ +receipt.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+
use crate::{other::OtherFields, Log};
+use alloy_primitives::{Address, Bloom, B256, U128, U256, U64, U8};
+use serde::{Deserialize, Serialize};
+
+/// Transaction receipt
+#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+pub struct TransactionReceipt {
+    /// Transaction Hash.
+    pub transaction_hash: Option<B256>,
+    /// Index within the block.
+    pub transaction_index: U64,
+    /// Hash of the block this transaction was included within.
+    pub block_hash: Option<B256>,
+    /// Number of the block this transaction was included within.
+    pub block_number: Option<U256>,
+    /// Cumulative gas used within the block after this was executed.
+    pub cumulative_gas_used: U256,
+    /// Gas used by this transaction alone.
+    pub gas_used: Option<U256>,
+    /// The price paid post-execution by the transaction (i.e. base fee + priority fee). Both
+    /// fields in 1559-style transactions are maximums (max fee + max priority fee), the amount
+    /// that's actually paid by users can only be determined post-execution
+    pub effective_gas_price: U128,
+    /// Blob gas used by the eip-4844 transaction
+    ///
+    /// This is None for non eip-4844 transactions
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub blob_gas_used: Option<U128>,
+    /// The price paid by the eip-4844 transaction per blob gas.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub blob_gas_price: Option<U128>,
+    /// Address of the sender
+    pub from: Address,
+    /// Address of the receiver. null when its a contract creation transaction.
+    pub to: Option<Address>,
+    /// Contract address created, or None if not a deployment.
+    pub contract_address: Option<Address>,
+    /// Logs emitted by this transaction.
+    pub logs: Vec<Log>,
+    /// Logs bloom
+    pub logs_bloom: Bloom,
+    /// The post-transaction stateroot (pre Byzantium)
+    ///
+    /// EIP98 makes this optional field, if it's missing then skip serializing it
+    #[serde(skip_serializing_if = "Option::is_none", rename = "root")]
+    pub state_root: Option<B256>,
+    /// Status: either 1 (success) or 0 (failure). Only present after activation of EIP-658
+    #[serde(skip_serializing_if = "Option::is_none", rename = "status")]
+    pub status_code: Option<U64>,
+    /// EIP-2718 Transaction type, Some(1) for AccessList transaction, None for Legacy
+    #[serde(rename = "type")]
+    pub transaction_type: U8,
+    /// Support for arbitrary additional fields.
+    #[serde(flatten)]
+    pub other: OtherFields,
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/request.rs.html b/src/alloy_rpc_types/eth/transaction/request.rs.html new file mode 100644 index 000000000000..371d0d28ea22 --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/request.rs.html @@ -0,0 +1,350 @@ +request.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+
use crate::eth::transaction::{
+    typed::{
+        EIP1559TransactionRequest, EIP2930TransactionRequest, LegacyTransactionRequest,
+        TransactionKind, TypedTransactionRequest,
+    },
+    AccessList,
+};
+use alloy_primitives::{Address, Bytes, U128, U256, U64, U8};
+use serde::{Deserialize, Serialize};
+
+/// Represents _all_ transaction requests received from RPC
+#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
+#[serde(deny_unknown_fields)]
+#[serde(rename_all = "camelCase")]
+pub struct TransactionRequest {
+    /// from address
+    pub from: Option<Address>,
+    /// to address
+    pub to: Option<Address>,
+    /// legacy, gas Price
+    #[serde(default)]
+    pub gas_price: Option<U128>,
+    /// max base fee per gas sender is willing to pay
+    #[serde(default)]
+    pub max_fee_per_gas: Option<U128>,
+    /// miner tip
+    #[serde(default)]
+    pub max_priority_fee_per_gas: Option<U128>,
+    /// gas
+    pub gas: Option<U256>,
+    /// value of th tx in wei
+    pub value: Option<U256>,
+    /// Any additional data sent
+    #[serde(alias = "input")]
+    pub data: Option<Bytes>,
+    /// Transaction nonce
+    pub nonce: Option<U64>,
+    /// warm storage access pre-payment
+    #[serde(default)]
+    pub access_list: Option<AccessList>,
+    /// EIP-2718 type
+    #[serde(rename = "type")]
+    pub transaction_type: Option<U8>,
+}
+
+// == impl TransactionRequest ==
+
+impl TransactionRequest {
+    /// Converts the request into a [`TypedTransactionRequest`]
+    ///
+    /// Returns None if mutual exclusive fields `gasPrice` and `max_fee_per_gas` are either missing
+    /// or both set.
+    pub fn into_typed_request(self) -> Option<TypedTransactionRequest> {
+        let TransactionRequest {
+            to,
+            gas_price,
+            max_fee_per_gas,
+            max_priority_fee_per_gas,
+            gas,
+            value,
+            data,
+            nonce,
+            mut access_list,
+            ..
+        } = self;
+        match (gas_price, max_fee_per_gas, access_list.take()) {
+            // legacy transaction
+            (Some(_), None, None) => {
+                Some(TypedTransactionRequest::Legacy(LegacyTransactionRequest {
+                    nonce: nonce.unwrap_or_default(),
+                    gas_price: gas_price.unwrap_or_default(),
+                    gas_limit: gas.unwrap_or_default(),
+                    value: value.unwrap_or_default(),
+                    input: data.unwrap_or_default(),
+                    kind: match to {
+                        Some(to) => TransactionKind::Call(to),
+                        None => TransactionKind::Create,
+                    },
+                    chain_id: None,
+                }))
+            }
+            // EIP2930
+            (_, None, Some(access_list)) => {
+                Some(TypedTransactionRequest::EIP2930(EIP2930TransactionRequest {
+                    nonce: nonce.unwrap_or_default(),
+                    gas_price: gas_price.unwrap_or_default(),
+                    gas_limit: gas.unwrap_or_default(),
+                    value: value.unwrap_or_default(),
+                    input: data.unwrap_or_default(),
+                    kind: match to {
+                        Some(to) => TransactionKind::Call(to),
+                        None => TransactionKind::Create,
+                    },
+                    chain_id: 0,
+                    access_list,
+                }))
+            }
+            // EIP1559
+            (None, Some(_), access_list) | (None, None, access_list @ None) => {
+                // Empty fields fall back to the canonical transaction schema.
+                Some(TypedTransactionRequest::EIP1559(EIP1559TransactionRequest {
+                    nonce: nonce.unwrap_or_default(),
+                    max_fee_per_gas: max_fee_per_gas.unwrap_or_default(),
+                    max_priority_fee_per_gas: max_priority_fee_per_gas.unwrap_or_default(),
+                    gas_limit: gas.unwrap_or_default(),
+                    value: value.unwrap_or_default(),
+                    input: data.unwrap_or_default(),
+                    kind: match to {
+                        Some(to) => TransactionKind::Call(to),
+                        None => TransactionKind::Create,
+                    },
+                    chain_id: 0,
+                    access_list: access_list.unwrap_or_default(),
+                }))
+            }
+
+            _ => None,
+        }
+    }
+
+    /// Sets the gas limit for the transaction.
+    pub fn gas_limit(mut self, gas_limit: u64) -> Self {
+        self.gas = Some(U256::from(gas_limit));
+        self
+    }
+
+    /// Sets the nonce for the transaction.
+    pub fn nonce(mut self, nonce: u64) -> Self {
+        self.nonce = Some(U64::from(nonce));
+        self
+    }
+
+    /// Sets the maximum fee per gas for the transaction.
+    pub fn max_fee_per_gas(mut self, max_fee_per_gas: u128) -> Self {
+        self.max_fee_per_gas = Some(U128::from(max_fee_per_gas));
+        self
+    }
+
+    /// Sets the maximum priority fee per gas for the transaction.
+    pub fn max_priority_fee_per_gas(mut self, max_priority_fee_per_gas: u128) -> Self {
+        self.max_priority_fee_per_gas = Some(U128::from(max_priority_fee_per_gas));
+        self
+    }
+
+    /// Sets the recipient address for the transaction.
+    pub fn to(mut self, to: Address) -> Self {
+        self.to = Some(to);
+        self
+    }
+    /// Sets the value (amount) for the transaction.
+
+    pub fn value(mut self, value: u128) -> Self {
+        self.value = Some(U256::from(value));
+        self
+    }
+
+    /// Sets the access list for the transaction.
+    pub fn access_list(mut self, access_list: AccessList) -> Self {
+        self.access_list = Some(access_list);
+        self
+    }
+
+    /// Sets the input data for the transaction.
+    pub fn input(mut self, input: Bytes) -> Self {
+        self.data = Some(input);
+        self
+    }
+
+    /// Sets the transactions type for the transactions.
+    pub fn transaction_type(mut self, transaction_type: u8) -> Self {
+        self.transaction_type = Some(U8::from(transaction_type));
+        self
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/signature.rs.html b/src/alloy_rpc_types/eth/transaction/signature.rs.html new file mode 100644 index 000000000000..8d718fc727f1 --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/signature.rs.html @@ -0,0 +1,722 @@ +signature.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+
//! Signature related RPC values
+use alloy_primitives::U256;
+use alloy_rlp::{Bytes, Decodable, Encodable, Error as RlpError};
+use serde::{Deserialize, Serialize};
+
+/// Container type for all signature fields in RPC
+#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, Serialize, Deserialize)]
+pub struct Signature {
+    /// The R field of the signature; the point on the curve.
+    pub r: U256,
+    /// The S field of the signature; the point on the curve.
+    pub s: U256,
+    // TODO: change these fields to an untagged enum for `v` XOR `y_parity` if/when CLs support it.
+    // See <https://github.com/ethereum/go-ethereum/issues/27727> for more information
+    /// For EIP-155, EIP-2930 and Blob transactions this is set to the parity (0 for even, 1 for
+    /// odd) of the y-value of the secp256k1 signature.
+    ///
+    /// For legacy transactions, this is the recovery id
+    ///
+    /// See also <https://ethereum.github.io/execution-apis/api-documentation/> and <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash>
+    pub v: U256,
+    /// The y parity of the signature. This is only used for typed (non-legacy) transactions.
+    #[serde(default, rename = "yParity", skip_serializing_if = "Option::is_none")]
+    pub y_parity: Option<Parity>,
+}
+
+impl Signature {
+    /// Output the length of the signature without the length of the RLP header, using the legacy
+    /// scheme with EIP-155 support depends on chain_id.
+    pub fn payload_len_with_eip155_chain_id(&self, chain_id: Option<u64>) -> usize {
+        self.v(chain_id).length() + self.r.length() + self.s.length()
+    }
+
+    /// Encode the `v`, `r`, `s` values without a RLP header.
+    /// Encodes the `v` value using the legacy scheme with EIP-155 support depends on chain_id.
+    pub fn encode_with_eip155_chain_id(
+        &self,
+        out: &mut dyn alloy_rlp::BufMut,
+        chain_id: Option<u64>,
+    ) {
+        self.v(chain_id).encode(out);
+        self.r.encode(out);
+        self.s.encode(out);
+    }
+
+    /// Output the `v` of the signature depends on chain_id
+    #[inline]
+    pub fn v(&self, chain_id: Option<u64>) -> u64 {
+        if let Some(chain_id) = chain_id {
+            // EIP-155: v = {0, 1} + CHAIN_ID * 2 + 35
+            let y_parity = u64::from(self.y_parity.unwrap_or(Parity(false)));
+            y_parity + chain_id * 2 + 35
+        } else {
+            u64::from(self.y_parity.unwrap_or(Parity(false))) + 27
+        }
+    }
+
+    /// Decodes the `v`, `r`, `s` values without a RLP header.
+    /// This will return a chain ID if the `v` value is [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) compatible.
+    pub fn decode_with_eip155_chain_id(buf: &mut &[u8]) -> alloy_rlp::Result<(Self, Option<u64>)> {
+        let v = u64::decode(buf)?;
+        let r = Decodable::decode(buf)?;
+        let s = Decodable::decode(buf)?;
+        if v >= 35 {
+            // EIP-155: v = {0, 1} + CHAIN_ID * 2 + 35
+            let y_parity = ((v - 35) % 2) != 0;
+            let chain_id = (v - 35) >> 1;
+            Ok((
+                Signature { r, s, y_parity: Some(Parity(y_parity)), v: U256::from(v) },
+                Some(chain_id),
+            ))
+        } else {
+            // non-EIP-155 legacy scheme, v = 27 for even y-parity, v = 28 for odd y-parity
+            if v != 27 && v != 28 {
+                return Err(RlpError::Custom("invalid Ethereum signature (V is not 27 or 28)"));
+            }
+            let y_parity = v == 28;
+            Ok((Signature { r, s, y_parity: Some(Parity(y_parity)), v: U256::from(v) }, None))
+        }
+    }
+
+    /// Output the length of the signature without the length of the RLP header
+    pub fn payload_len(&self) -> usize {
+        let y_parity_len = match self.y_parity {
+            Some(parity) => parity.0 as usize,
+            None => 0_usize,
+        };
+        y_parity_len + self.r.length() + self.s.length()
+    }
+
+    /// Encode the `y_parity`, `r`, `s` values without a RLP header.
+    /// Panics if the y parity is not set.
+    pub fn encode(&self, out: &mut dyn alloy_rlp::BufMut) {
+        self.y_parity.expect("y_parity not set").encode(out);
+        self.r.encode(out);
+        self.s.encode(out);
+    }
+
+    /// Decodes the `y_parity`, `r`, `s` values without a RLP header.
+    pub fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        let mut sig = Signature {
+            y_parity: Some(Decodable::decode(buf)?),
+            r: Decodable::decode(buf)?,
+            s: Decodable::decode(buf)?,
+            v: U256::ZERO,
+        };
+        sig.v = sig.y_parity.unwrap().into();
+        Ok(sig)
+    }
+
+    /// Turn this signature into its byte
+    /// (hex) representation.
+    /// Panics: if the y_parity field is not set.
+    pub fn to_bytes(&self) -> [u8; 65] {
+        let mut sig = [0u8; 65];
+        sig[..32].copy_from_slice(&self.r.to_be_bytes::<32>());
+        sig[32..64].copy_from_slice(&self.s.to_be_bytes::<32>());
+        let v = u8::from(self.y_parity.expect("y_parity not set")) + 27;
+        sig[64] = v;
+        sig
+    }
+
+    /// Turn this signature into its hex-encoded representation.
+    pub fn to_hex_bytes(&self) -> Bytes {
+        alloy_primitives::hex::encode(self.to_bytes()).into()
+    }
+
+    /// Calculates a heuristic for the in-memory size of the [Signature].
+    #[inline]
+    pub fn size(&self) -> usize {
+        std::mem::size_of::<Self>()
+    }
+}
+
+/// Type that represents the signature parity byte, meant for use in RPC.
+///
+/// This will be serialized as "0x0" if false, and "0x1" if true.
+#[derive(Copy, Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub struct Parity(
+    #[serde(serialize_with = "serialize_parity", deserialize_with = "deserialize_parity")] pub bool,
+);
+
+impl From<bool> for Parity {
+    fn from(b: bool) -> Self {
+        Self(b)
+    }
+}
+
+impl From<U256> for Parity {
+    fn from(value: U256) -> Self {
+        match value {
+            U256::ZERO => Self(false),
+            _ => Self(true),
+        }
+    }
+}
+
+impl From<Parity> for U256 {
+    fn from(p: Parity) -> Self {
+        if p.0 {
+            U256::from(1)
+        } else {
+            U256::ZERO
+        }
+    }
+}
+
+impl From<Parity> for u64 {
+    fn from(p: Parity) -> Self {
+        if p.0 {
+            1
+        } else {
+            0
+        }
+    }
+}
+
+impl From<Parity> for u8 {
+    fn from(value: Parity) -> Self {
+        match value.0 {
+            true => 1,
+            false => 0,
+        }
+    }
+}
+
+impl Encodable for Parity {
+    fn encode(&self, out: &mut dyn alloy_rlp::BufMut) {
+        let v = u8::from(*self);
+        v.encode(out);
+    }
+
+    fn length(&self) -> usize {
+        1
+    }
+}
+
+impl Decodable for Parity {
+    fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        let v = u8::decode(buf)?;
+        Ok(Self(v != 0))
+    }
+}
+
+fn serialize_parity<S>(parity: &bool, serializer: S) -> Result<S::Ok, S::Error>
+where
+    S: serde::Serializer,
+{
+    serializer.serialize_str(if *parity { "0x1" } else { "0x0" })
+}
+
+/// This implementation disallows serialization of the y parity bit that are not `"0x0"` or `"0x1"`.
+fn deserialize_parity<'de, D>(deserializer: D) -> Result<bool, D::Error>
+where
+    D: serde::Deserializer<'de>,
+{
+    let s = String::deserialize(deserializer)?;
+    match s.as_str() {
+        "0x0" => Ok(false),
+        "0x1" => Ok(true),
+        _ => Err(serde::de::Error::custom(format!(
+            "invalid parity value, parity should be either \"0x0\" or \"0x1\": {}",
+            s
+        ))),
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use std::str::FromStr;
+
+    use super::*;
+
+    #[test]
+    fn deserialize_without_parity() {
+        let raw_signature_without_y_parity = r#"{
+            "r":"0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0",
+            "s":"0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05",
+            "v":"0x1"
+        }"#;
+
+        let signature: Signature = serde_json::from_str(raw_signature_without_y_parity).unwrap();
+        let expected = Signature {
+            r: U256::from_str("0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0")
+                .unwrap(),
+            s: U256::from_str("0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05")
+                .unwrap(),
+            v: U256::from_str("1").unwrap(),
+            y_parity: None,
+        };
+
+        assert_eq!(signature, expected);
+    }
+
+    #[test]
+    fn deserialize_with_parity() {
+        let raw_signature_with_y_parity = r#"{
+            "r":"0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0",
+            "s":"0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05",
+            "v":"0x1",
+            "yParity": "0x1"
+        }"#;
+
+        let signature: Signature = serde_json::from_str(raw_signature_with_y_parity).unwrap();
+        let expected = Signature {
+            r: U256::from_str("0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0")
+                .unwrap(),
+            s: U256::from_str("0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05")
+                .unwrap(),
+            v: U256::from_str("1").unwrap(),
+            y_parity: Some(Parity(true)),
+        };
+
+        assert_eq!(signature, expected);
+    }
+
+    #[test]
+    fn serialize_both_parity() {
+        // this test should be removed if the struct moves to an enum based on tx type
+        let signature = Signature {
+            r: U256::from_str("0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0")
+                .unwrap(),
+            s: U256::from_str("0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05")
+                .unwrap(),
+            v: U256::from_str("1").unwrap(),
+            y_parity: Some(Parity(true)),
+        };
+
+        let serialized = serde_json::to_string(&signature).unwrap();
+        assert_eq!(
+            serialized,
+            r#"{"r":"0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0","s":"0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05","v":"0x1","yParity":"0x1"}"#
+        );
+    }
+
+    #[test]
+    fn serialize_v_only() {
+        // this test should be removed if the struct moves to an enum based on tx type
+        let signature = Signature {
+            r: U256::from_str("0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0")
+                .unwrap(),
+            s: U256::from_str("0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05")
+                .unwrap(),
+            v: U256::from_str("1").unwrap(),
+            y_parity: None,
+        };
+
+        let expected = r#"{"r":"0xc569c92f176a3be1a6352dd5005bfc751dcb32f57623dd2a23693e64bf4447b0","s":"0x1a891b566d369e79b7a66eecab1e008831e22daa15f91a0a0cf4f9f28f47ee05","v":"0x1"}"#;
+
+        let serialized = serde_json::to_string(&signature).unwrap();
+        assert_eq!(serialized, expected);
+    }
+
+    #[test]
+    fn serialize_parity() {
+        let parity = Parity(true);
+        let serialized = serde_json::to_string(&parity).unwrap();
+        assert_eq!(serialized, r#""0x1""#);
+
+        let parity = Parity(false);
+        let serialized = serde_json::to_string(&parity).unwrap();
+        assert_eq!(serialized, r#""0x0""#);
+    }
+
+    #[test]
+    fn deserialize_parity() {
+        let raw_parity = r#""0x1""#;
+        let parity: Parity = serde_json::from_str(raw_parity).unwrap();
+        assert_eq!(parity, Parity(true));
+
+        let raw_parity = r#""0x0""#;
+        let parity: Parity = serde_json::from_str(raw_parity).unwrap();
+        assert_eq!(parity, Parity(false));
+    }
+
+    #[test]
+    fn deserialize_parity_invalid() {
+        let raw_parity = r#""0x2""#;
+        let parity: Result<Parity, _> = serde_json::from_str(raw_parity);
+        assert!(parity.is_err());
+
+        let raw_parity = r#""0x""#;
+        let parity: Result<Parity, _> = serde_json::from_str(raw_parity);
+        assert!(parity.is_err());
+
+        // In the spec this is defined as a uint, which requires 0x
+        // yParity:
+        // <https://github.com/ethereum/execution-apis/blob/8fcafbbc86257f6e61fddd9734148e38872a71c9/src/schemas/transaction.yaml#L157>
+        //
+        // uint:
+        // <https://github.com/ethereum/execution-apis/blob/8fcafbbc86257f6e61fddd9734148e38872a71c9/src/schemas/base-types.yaml#L47>
+        let raw_parity = r#""1""#;
+        let parity: Result<Parity, _> = serde_json::from_str(raw_parity);
+        assert!(parity.is_err());
+
+        let raw_parity = r#""0""#;
+        let parity: Result<Parity, _> = serde_json::from_str(raw_parity);
+        assert!(parity.is_err());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/tx_type.rs.html b/src/alloy_rpc_types/eth/transaction/tx_type.rs.html new file mode 100644 index 000000000000..df621c2bcbd5 --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/tx_type.rs.html @@ -0,0 +1,106 @@ +tx_type.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+
use alloy_primitives::U8;
+use serde::{Deserialize, Serialize};
+
+/// Identifier for legacy transaction, however a legacy tx is technically not
+/// typed.
+pub const LEGACY_TX_TYPE_ID: u8 = 0;
+
+/// Identifier for an EIP2930 transaction.
+pub const EIP2930_TX_TYPE_ID: u8 = 1;
+
+/// Identifier for an EIP1559 transaction.
+pub const EIP1559_TX_TYPE_ID: u8 = 2;
+
+/// Identifier for an EIP4844 transaction.
+pub const EIP4844_TX_TYPE_ID: u8 = 3;
+
+/// Transaction Type
+///
+/// Currently being used as 2-bit type when encoding it to Compact on
+/// crate::TransactionSignedNoHash (see Reth's Compact encoding). Adding more transaction types will
+/// break the codec and database format on Reth.
+///
+/// Other required changes when adding a new type can be seen on [PR#3953](https://github.com/paradigmxyz/reth/pull/3953/files).
+#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Default, Serialize, Deserialize)]
+pub enum TxType {
+    /// Legacy transaction pre EIP-2929
+    #[default]
+    Legacy = 0_isize,
+    /// AccessList transaction
+    EIP2930 = 1_isize,
+    /// Transaction with Priority fee
+    EIP1559 = 2_isize,
+    /// Shard Blob Transactions - EIP-4844
+    EIP4844 = 3_isize,
+}
+
+impl From<TxType> for u8 {
+    fn from(value: TxType) -> Self {
+        match value {
+            TxType::Legacy => LEGACY_TX_TYPE_ID,
+            TxType::EIP2930 => EIP2930_TX_TYPE_ID,
+            TxType::EIP1559 => EIP1559_TX_TYPE_ID,
+            TxType::EIP4844 => EIP4844_TX_TYPE_ID,
+        }
+    }
+}
+
+impl From<TxType> for U8 {
+    fn from(value: TxType) -> Self {
+        U8::from(u8::from(value))
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/transaction/typed.rs.html b/src/alloy_rpc_types/eth/transaction/typed.rs.html new file mode 100644 index 000000000000..324985a609dc --- /dev/null +++ b/src/alloy_rpc_types/eth/transaction/typed.rs.html @@ -0,0 +1,1346 @@ +typed.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+
#![allow(missing_docs)]
+//! The [`TransactionRequest`][crate::TransactionRequest] is a universal representation for a
+//! transaction deserialized from the json input of an RPC call. Depending on what fields are set,
+//! it can be converted into the container type [`TypedTransactionRequest`].
+
+use std::{cmp::Ordering, mem};
+
+use crate::{eth::transaction::AccessList, Signature, TxType};
+use alloy_primitives::{keccak256, Address, Bytes, B256, U128, U256, U64};
+use alloy_rlp::{
+    bytes, length_of_length, Buf, BufMut, Decodable, Encodable, Error as RlpError, Header,
+    EMPTY_LIST_CODE,
+};
+use serde::{Deserialize, Serialize};
+
+/// Container type for various Ethereum transaction requests
+///
+/// Its variants correspond to specific allowed transactions:
+/// 1. Legacy (pre-EIP2718) [`LegacyTransactionRequest`]
+/// 2. EIP2930 (state access lists) [`EIP2930TransactionRequest`]
+/// 3. EIP1559 [`EIP1559TransactionRequest`]
+#[derive(Debug, Clone, Eq, PartialEq)]
+pub enum TypedTransactionRequest {
+    /// A Legacy Transaction request.
+    Legacy(LegacyTransactionRequest),
+    /// An EIP2930 transaction request.
+    EIP2930(EIP2930TransactionRequest),
+    /// An EIP1559 Transaction Request.
+    EIP1559(EIP1559TransactionRequest),
+}
+
+impl Encodable for TypedTransactionRequest {
+    fn encode(&self, out: &mut dyn BufMut) {
+        match self {
+            // Just encode as such
+            TypedTransactionRequest::Legacy(tx) => tx.encode(out),
+            // For EIP2930 and EIP1559 txs, we need to "envelop" the RLP encoding with the tx type.
+            // For EIP2930, it's 1.
+            TypedTransactionRequest::EIP2930(tx) => {
+                let id = 1_u8;
+                id.encode(out);
+                tx.encode(out)
+            }
+            // For EIP1559, it's 2.
+            TypedTransactionRequest::EIP1559(tx) => {
+                let id = 2_u8;
+                id.encode(out);
+                tx.encode(out)
+            }
+        }
+    }
+
+    fn length(&self) -> usize {
+        match self {
+            TypedTransactionRequest::Legacy(tx) => tx.length(),
+            TypedTransactionRequest::EIP2930(tx) => tx.length(),
+            TypedTransactionRequest::EIP1559(tx) => tx.length(),
+        }
+    }
+}
+
+impl Decodable for TypedTransactionRequest {
+    fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        // First, decode the tx type.
+        let tx_type = u8::decode(buf)?;
+        // Then, decode the tx based on the type.
+        match tx_type.cmp(&EMPTY_LIST_CODE) {
+            Ordering::Less => {
+                // strip out the string header
+                // NOTE: typed transaction encodings either contain a "rlp header" which contains
+                // the type of the payload and its length, or they do not contain a header and
+                // start with the tx type byte.
+                //
+                // This line works for both types of encodings because byte slices starting with
+                // 0x01 and 0x02 return a Header { list: false, payload_length: 1 } when input to
+                // Header::decode.
+                // If the encoding includes a header, the header will be properly decoded and
+                // consumed.
+                // Otherwise, header decoding will succeed but nothing is consumed.
+                let _header = Header::decode(buf)?;
+                let tx_type = *buf
+                    .first()
+                    .ok_or(RlpError::Custom("typed tx cannot be decoded from an empty slice"))?;
+                if tx_type == 0x01 {
+                    buf.advance(1);
+                    EIP2930TransactionRequest::decode(buf).map(TypedTransactionRequest::EIP2930)
+                } else if tx_type == 0x02 {
+                    buf.advance(1);
+                    EIP1559TransactionRequest::decode(buf).map(TypedTransactionRequest::EIP1559)
+                } else {
+                    Err(RlpError::Custom("invalid tx type"))
+                }
+            }
+            Ordering::Equal => {
+                Err(RlpError::Custom("an empty list is not a valid transaction encoding"))
+            }
+            Ordering::Greater => {
+                LegacyTransactionRequest::decode(buf).map(TypedTransactionRequest::Legacy)
+            }
+        }
+    }
+}
+
+/// Represents a legacy transaction request
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct LegacyTransactionRequest {
+    pub nonce: U64,
+    pub gas_price: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub chain_id: Option<u64>,
+}
+
+impl Encodable for LegacyTransactionRequest {
+    fn encode(&self, out: &mut dyn BufMut) {
+        self.nonce.encode(out);
+        self.gas_price.encode(out);
+        self.gas_limit.encode(out);
+        self.kind.encode(out);
+        self.value.encode(out);
+        self.input.0.encode(out);
+    }
+
+    fn length(&self) -> usize {
+        self.nonce.length()
+            + self.gas_price.length()
+            + self.gas_limit.length()
+            + self.kind.length()
+            + self.value.length()
+            + self.input.0.length()
+    }
+}
+
+impl Decodable for LegacyTransactionRequest {
+    fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        Ok(Self {
+            nonce: Decodable::decode(buf)?,
+            gas_price: Decodable::decode(buf)?,
+            gas_limit: Decodable::decode(buf)?,
+            kind: Decodable::decode(buf)?,
+            value: Decodable::decode(buf)?,
+            input: Decodable::decode(buf)?,
+            chain_id: None,
+        })
+    }
+}
+
+impl LegacyTransactionRequest {
+    /// Calculates a heuristic for the in-memory size of the [LegacyTransactionRequest] transaction.
+    #[inline]
+    pub fn size(&self) -> usize {
+        mem::size_of::<Option<u64>>() + // chain_id
+        mem::size_of::<U64>() + // nonce
+        mem::size_of::<U128>() + // gas_price
+        mem::size_of::<U256>() + // gas_limit
+        self.kind.size() + // to
+        mem::size_of::<U256>() + // value
+        self.input.len() // input
+    }
+
+    /// Outputs the length of the transaction's fields, without a RLP header or length of the
+    /// eip155 fields.
+    pub fn fields_len(&self) -> usize {
+        let mut len = 0;
+        len += self.nonce.length();
+        len += self.gas_price.length();
+        len += self.gas_limit.length();
+        len += self.kind.length();
+        len += self.value.length();
+        len += self.input.0.length();
+        len
+    }
+
+    /// Encodes only the transaction's fields into the desired buffer, without a RLP header or
+    /// eip155 fields.
+    pub fn encode_fields(&self, out: &mut dyn bytes::BufMut) {
+        self.nonce.encode(out);
+        self.gas_price.encode(out);
+        self.gas_limit.encode(out);
+        self.kind.encode(out);
+        self.value.encode(out);
+        self.input.0.encode(out);
+    }
+
+    /// Outputs the length of EIP-155 fields. Only outputs a non-zero value for EIP-155 legacy
+    /// transactions.
+    pub fn eip155_fields_len(&self) -> usize {
+        if let Some(id) = self.chain_id {
+            // EIP-155 encodes the chain ID and two zeroes, so we add 2 to the length of the chain
+            // ID to get the length of all 3 fields
+            // len(chain_id) + (0x00) + (0x00)
+            id.length() + 2
+        } else {
+            // this is either a pre-EIP-155 legacy transaction or a typed transaction
+            0
+        }
+    }
+
+    /// Encodes EIP-155 arguments into the desired buffer. Only encodes values for legacy
+    /// transactions.
+    pub fn encode_eip155_fields(&self, out: &mut dyn bytes::BufMut) {
+        // if this is a legacy transaction without a chain ID, it must be pre-EIP-155
+        // and does not need to encode the chain ID for the signature hash encoding
+        if let Some(id) = self.chain_id {
+            // EIP-155 encodes the chain ID and two zeroes
+            id.encode(out);
+            0x00u8.encode(out);
+            0x00u8.encode(out);
+        }
+    }
+
+    /// Encodes the legacy transaction in RLP for signing, including the EIP-155 fields if possible.
+    pub fn encode_for_signing(&self, out: &mut dyn bytes::BufMut) {
+        Header { list: true, payload_length: self.fields_len() + self.eip155_fields_len() }
+            .encode(out);
+        self.encode_fields(out);
+        self.encode_eip155_fields(out);
+    }
+
+    /// Outputs the length of the signature RLP encoding for the transaction, including the length
+    /// of the EIP-155 fields if possible.
+    pub fn payload_len_for_signature(&self) -> usize {
+        let payload_length = self.fields_len() + self.eip155_fields_len();
+        // 'header length' + 'payload length'
+        length_of_length(payload_length) + payload_length
+    }
+
+    /// Outputs the signature hash of the transaction by first encoding without a signature, then
+    /// hashing.
+    ///
+    /// See [Self::encode_for_signing] for more information on the encoding format.
+    pub fn signature_hash(&self) -> B256 {
+        let mut buf = bytes::BytesMut::with_capacity(self.payload_len_for_signature());
+        self.encode_for_signing(&mut buf);
+        keccak256(&buf)
+    }
+}
+
+/// Represents an EIP-2930 transaction request
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct EIP2930TransactionRequest {
+    pub chain_id: u64,
+    pub nonce: U64,
+    pub gas_price: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub access_list: AccessList,
+}
+
+impl Encodable for EIP2930TransactionRequest {
+    fn encode(&self, out: &mut dyn BufMut) {
+        self.chain_id.encode(out);
+        self.nonce.encode(out);
+        self.gas_price.encode(out);
+        self.gas_limit.encode(out);
+        self.kind.encode(out);
+        self.value.encode(out);
+        self.input.0.encode(out);
+        self.access_list.encode(out);
+    }
+
+    fn length(&self) -> usize {
+        self.chain_id.length()
+            + self.nonce.length()
+            + self.gas_price.length()
+            + self.gas_limit.length()
+            + self.kind.length()
+            + self.value.length()
+            + self.input.0.length()
+            + self.access_list.length()
+    }
+}
+
+impl Decodable for EIP2930TransactionRequest {
+    fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        Ok(Self {
+            chain_id: Decodable::decode(buf)?,
+            nonce: Decodable::decode(buf)?,
+            gas_price: Decodable::decode(buf)?,
+            gas_limit: Decodable::decode(buf)?,
+            kind: Decodable::decode(buf)?,
+            value: Decodable::decode(buf)?,
+            input: Decodable::decode(buf)?,
+            access_list: Decodable::decode(buf)?,
+        })
+    }
+}
+
+impl EIP2930TransactionRequest {
+    /// Calculates a heuristic for the in-memory size of the transaction.
+    #[inline]
+    pub fn size(&self) -> usize {
+        mem::size_of::<u64>() + // chain_id
+        mem::size_of::<u64>() + // nonce
+        mem::size_of::<u128>() + // gas_price
+        mem::size_of::<u64>() + // gas_limit
+        self.kind.size() + // to
+        mem::size_of::<U256>() + // value
+        self.access_list.size() + // access_list
+        self.input.len() // input
+    }
+
+    /// Decodes the inner fields from RLP bytes.
+    ///
+    /// NOTE: This assumes a RLP header has already been decoded, and _just_ decodes the following
+    /// RLP fields in the following order:
+    ///
+    /// - `chain_id`
+    /// - `nonce`
+    /// - `gas_price`
+    /// - `gas_limit`
+    /// - `to`
+    /// - `value`
+    /// - `data` (`input`)
+    /// - `access_list`
+    pub fn decode_inner(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        Ok(Self {
+            chain_id: Decodable::decode(buf)?,
+            nonce: Decodable::decode(buf)?,
+            gas_price: Decodable::decode(buf)?,
+            gas_limit: Decodable::decode(buf)?,
+            kind: Decodable::decode(buf)?,
+            value: Decodable::decode(buf)?,
+            input: Decodable::decode(buf)?,
+            access_list: Decodable::decode(buf)?,
+        })
+    }
+
+    /// Outputs the length of the transaction's fields, without a RLP header.
+    pub fn fields_len(&self) -> usize {
+        let mut len = 0;
+        len += self.chain_id.length();
+        len += self.nonce.length();
+        len += self.gas_price.length();
+        len += self.gas_limit.length();
+        len += self.kind.length();
+        len += self.value.length();
+        len += self.input.0.length();
+        len += self.access_list.length();
+        len
+    }
+
+    /// Encodes only the transaction's fields into the desired buffer, without a RLP header.
+    pub fn encode_fields(&self, out: &mut dyn bytes::BufMut) {
+        self.chain_id.encode(out);
+        self.nonce.encode(out);
+        self.gas_price.encode(out);
+        self.gas_limit.encode(out);
+        self.kind.encode(out);
+        self.value.encode(out);
+        self.input.0.encode(out);
+        self.access_list.encode(out);
+    }
+
+    /// Inner encoding function that is used for both rlp [`Encodable`] trait and for calculating
+    /// hash that for eip2718 does not require rlp header
+    pub fn encode_with_signature(
+        &self,
+        signature: &Signature,
+        out: &mut dyn bytes::BufMut,
+        with_header: bool,
+    ) {
+        let payload_length = self.fields_len() + signature.payload_len();
+        if with_header {
+            Header {
+                list: false,
+                payload_length: 1 + length_of_length(payload_length) + payload_length,
+            }
+            .encode(out);
+        }
+        out.put_u8(self.tx_type() as u8);
+        let header = Header { list: true, payload_length };
+        header.encode(out);
+        self.encode_fields(out);
+        signature.encode(out);
+    }
+
+    /// Output the length of the RLP signed transaction encoding, _without_ a RLP string header.
+    pub fn payload_len_with_signature_without_header(&self, signature: &Signature) -> usize {
+        let payload_length = self.fields_len() + signature.payload_len();
+        // 'transaction type byte length' + 'header length' + 'payload length'
+        1 + length_of_length(payload_length) + payload_length
+    }
+
+    /// Output the length of the RLP signed transaction encoding. This encodes with a RLP header.
+    pub fn payload_len_with_signature(&self, signature: &Signature) -> usize {
+        let len = self.payload_len_with_signature_without_header(signature);
+        length_of_length(len) + len
+    }
+
+    /// Get transaction type
+    pub fn tx_type(&self) -> TxType {
+        TxType::EIP2930
+    }
+
+    /// Encodes the EIP-2930 transaction in RLP for signing.
+    pub fn encode_for_signing(&self, out: &mut dyn bytes::BufMut) {
+        out.put_u8(self.tx_type() as u8);
+        Header { list: true, payload_length: self.fields_len() }.encode(out);
+        self.encode_fields(out);
+    }
+
+    /// Outputs the length of the signature RLP encoding for the transaction.
+    pub fn payload_len_for_signature(&self) -> usize {
+        let payload_length = self.fields_len();
+        // 'transaction type byte length' + 'header length' + 'payload length'
+        1 + length_of_length(payload_length) + payload_length
+    }
+
+    /// Outputs the signature hash of the transaction by first encoding without a signature, then
+    /// hashing.
+    pub fn signature_hash(&self) -> B256 {
+        let mut buf = bytes::BytesMut::with_capacity(self.payload_len_for_signature());
+        self.encode_for_signing(&mut buf);
+        keccak256(&buf)
+    }
+}
+
+/// Represents an EIP-1559 transaction request
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct EIP1559TransactionRequest {
+    pub chain_id: u64,
+    pub nonce: U64,
+    pub max_priority_fee_per_gas: U128,
+    pub max_fee_per_gas: U128,
+    pub gas_limit: U256,
+    pub kind: TransactionKind,
+    pub value: U256,
+    pub input: Bytes,
+    pub access_list: AccessList,
+}
+
+impl Encodable for EIP1559TransactionRequest {
+    fn encode(&self, out: &mut dyn BufMut) {
+        self.chain_id.encode(out);
+        self.nonce.encode(out);
+        self.max_priority_fee_per_gas.encode(out);
+        self.max_fee_per_gas.encode(out);
+        self.gas_limit.encode(out);
+        self.kind.encode(out);
+        self.value.encode(out);
+        self.input.0.encode(out);
+        self.access_list.encode(out);
+    }
+
+    fn length(&self) -> usize {
+        self.chain_id.length()
+            + self.nonce.length()
+            + self.max_priority_fee_per_gas.length()
+            + self.max_fee_per_gas.length()
+            + self.gas_limit.length()
+            + self.kind.length()
+            + self.value.length()
+            + self.input.0.length()
+            + self.access_list.length()
+    }
+}
+
+impl Decodable for EIP1559TransactionRequest {
+    fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        Ok(Self {
+            chain_id: Decodable::decode(buf)?,
+            nonce: Decodable::decode(buf)?,
+            max_priority_fee_per_gas: Decodable::decode(buf)?,
+            max_fee_per_gas: Decodable::decode(buf)?,
+            gas_limit: Decodable::decode(buf)?,
+            kind: Decodable::decode(buf)?,
+            value: Decodable::decode(buf)?,
+            input: Decodable::decode(buf)?,
+            access_list: Decodable::decode(buf)?,
+        })
+    }
+}
+
+impl EIP1559TransactionRequest {
+    /// Decodes the inner fields from RLP bytes.
+    ///
+    /// NOTE: This assumes a RLP header has already been decoded, and _just_ decodes the following
+    /// RLP fields in the following order:
+    ///
+    /// - `chain_id`
+    /// - `nonce`
+    /// - `max_priority_fee_per_gas`
+    /// - `max_fee_per_gas`
+    /// - `gas_limit`
+    /// - `to`
+    /// - `value`
+    /// - `data` (`input`)
+    /// - `access_list`
+    pub fn decode_inner(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        Ok(Self {
+            chain_id: Decodable::decode(buf)?,
+            nonce: Decodable::decode(buf)?,
+            max_priority_fee_per_gas: Decodable::decode(buf)?,
+            max_fee_per_gas: Decodable::decode(buf)?,
+            gas_limit: Decodable::decode(buf)?,
+            kind: Decodable::decode(buf)?,
+            value: Decodable::decode(buf)?,
+            input: Decodable::decode(buf)?,
+            access_list: Decodable::decode(buf)?,
+        })
+    }
+
+    /// Encodes only the transaction's fields into the desired buffer, without a RLP header.
+    pub fn fields_len(&self) -> usize {
+        let mut len = 0;
+        len += self.chain_id.length();
+        len += self.nonce.length();
+        len += self.max_priority_fee_per_gas.length();
+        len += self.max_fee_per_gas.length();
+        len += self.gas_limit.length();
+        len += self.kind.length();
+        len += self.value.length();
+        len += self.input.0.length();
+        len += self.access_list.length();
+        len
+    }
+
+    /// Encodes only the transaction's fields into the desired buffer, without a RLP header.
+    pub fn encode_fields(&self, out: &mut dyn bytes::BufMut) {
+        self.chain_id.encode(out);
+        self.nonce.encode(out);
+        self.max_priority_fee_per_gas.encode(out);
+        self.max_fee_per_gas.encode(out);
+        self.gas_limit.encode(out);
+        self.kind.encode(out);
+        self.value.encode(out);
+        self.input.0.encode(out);
+        self.access_list.encode(out);
+    }
+
+    /// Inner encoding function that is used for both rlp [`Encodable`] trait and for calculating
+    /// hash that for eip2718 does not require rlp header
+    pub fn encode_with_signature(
+        &self,
+        signature: &Signature,
+        out: &mut dyn bytes::BufMut,
+        with_header: bool,
+    ) {
+        let payload_length = self.fields_len() + signature.payload_len();
+        if with_header {
+            Header {
+                list: false,
+                payload_length: 1 + length_of_length(payload_length) + payload_length,
+            }
+            .encode(out);
+        }
+        out.put_u8(self.tx_type() as u8);
+        let header = Header { list: true, payload_length };
+        header.encode(out);
+        self.encode_fields(out);
+        signature.encode(out);
+    }
+
+    /// Output the length of the RLP signed transaction encoding, _without_ a RLP string header.
+    pub fn payload_len_with_signature_without_header(&self, signature: &Signature) -> usize {
+        let payload_length = self.fields_len() + signature.payload_len();
+        // 'transaction type byte length' + 'header length' + 'payload length'
+        1 + length_of_length(payload_length) + payload_length
+    }
+
+    /// Output the length of the RLP signed transaction encoding. This encodes with a RLP header.
+    pub fn payload_len_with_signature(&self, signature: &Signature) -> usize {
+        let len = self.payload_len_with_signature_without_header(signature);
+        length_of_length(len) + len
+    }
+
+    /// Get transaction type
+    pub fn tx_type(&self) -> TxType {
+        TxType::EIP1559
+    }
+
+    /// Calculates a heuristic for the in-memory size of the transaction.
+    #[inline]
+    pub fn size(&self) -> usize {
+        mem::size_of::<u64>() + // chain_id
+        mem::size_of::<u64>() + // nonce
+        mem::size_of::<u64>() + // gas_limit
+        mem::size_of::<u128>() + // max_fee_per_gas
+        mem::size_of::<u128>() + // max_priority_fee_per_gas
+        self.kind.size() + // to
+        mem::size_of::<U256>() + // value
+        self.access_list.size() + // access_list
+        self.input.len() // input
+    }
+
+    /// Encodes the legacy transaction in RLP for signing.
+    pub fn encode_for_signing(&self, out: &mut dyn bytes::BufMut) {
+        out.put_u8(self.tx_type() as u8);
+        Header { list: true, payload_length: self.fields_len() }.encode(out);
+        self.encode_fields(out);
+    }
+
+    /// Outputs the length of the signature RLP encoding for the transaction.
+    pub fn payload_len_for_signature(&self) -> usize {
+        let payload_length = self.fields_len();
+        // 'transaction type byte length' + 'header length' + 'payload length'
+        1 + length_of_length(payload_length) + payload_length
+    }
+
+    /// Outputs the signature hash of the transaction by first encoding without a signature, then
+    /// hashing.
+    pub fn signature_hash(&self) -> B256 {
+        let mut buf = bytes::BytesMut::with_capacity(self.payload_len_for_signature());
+        self.encode_for_signing(&mut buf);
+        keccak256(&buf)
+    }
+}
+
+/// Represents the `to` field of a transaction request
+///
+/// This determines what kind of transaction this is
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub enum TransactionKind {
+    /// Transaction will call this address or transfer funds to this address
+    Call(Address),
+    /// No `to` field set, this transaction will create a contract
+    Create,
+}
+
+// == impl TransactionKind ==
+
+impl TransactionKind {
+    /// If this transaction is a call this returns the address of the callee
+    pub fn as_call(&self) -> Option<&Address> {
+        match self {
+            TransactionKind::Call(to) => Some(to),
+            TransactionKind::Create => None,
+        }
+    }
+
+    /// Calculates a heuristic for the in-memory size of the [TransactionKind].
+    #[inline]
+    pub fn size(&self) -> usize {
+        mem::size_of::<Self>()
+    }
+}
+
+impl Encodable for TransactionKind {
+    fn encode(&self, out: &mut dyn BufMut) {
+        match self {
+            TransactionKind::Call(to) => to.encode(out),
+            TransactionKind::Create => ([]).encode(out),
+        }
+    }
+    fn length(&self) -> usize {
+        match self {
+            TransactionKind::Call(to) => to.length(),
+            TransactionKind::Create => ([]).length(),
+        }
+    }
+}
+
+impl Decodable for TransactionKind {
+    fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
+        if let Some(&first) = buf.first() {
+            if first == 0x80 {
+                *buf = &buf[1..];
+                Ok(TransactionKind::Create)
+            } else {
+                let addr = <Address as Decodable>::decode(buf)?;
+                Ok(TransactionKind::Call(addr))
+            }
+        } else {
+            Err(RlpError::InputTooShort)
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/txpool.rs.html b/src/alloy_rpc_types/eth/txpool.rs.html new file mode 100644 index 000000000000..e52dcbd0a951 --- /dev/null +++ b/src/alloy_rpc_types/eth/txpool.rs.html @@ -0,0 +1,1042 @@ +txpool.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+
//! Types for the `txpool` namespace: <https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool>
+
+use crate::Transaction;
+use alloy_primitives::{Address, U256, U64};
+use serde::{
+    de::{self, Deserializer, Visitor},
+    Deserialize, Serialize,
+};
+use std::{collections::BTreeMap, fmt, str::FromStr};
+
+/// Transaction summary as found in the Txpool Inspection property.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct TxpoolInspectSummary {
+    /// Recipient (None when contract creation)
+    pub to: Option<Address>,
+    /// Transferred value
+    pub value: U256,
+    /// Gas amount
+    pub gas: U256,
+    /// Gas Price
+    pub gas_price: U256,
+}
+
+/// Visitor struct for TxpoolInspectSummary.
+struct TxpoolInspectSummaryVisitor;
+
+/// Walk through the deserializer to parse a txpool inspection summary into the
+/// `TxpoolInspectSummary` struct.
+impl<'de> Visitor<'de> for TxpoolInspectSummaryVisitor {
+    type Value = TxpoolInspectSummary;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+        formatter.write_str("to: value wei + gasLimit gas × gas_price wei")
+    }
+
+    fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>
+    where
+        E: de::Error,
+    {
+        let addr_split: Vec<&str> = value.split(": ").collect();
+        if addr_split.len() != 2 {
+            return Err(de::Error::custom("invalid format for TxpoolInspectSummary: to"));
+        }
+        let value_split: Vec<&str> = addr_split[1].split(" wei + ").collect();
+        if value_split.len() != 2 {
+            return Err(de::Error::custom("invalid format for TxpoolInspectSummary: gasLimit"));
+        }
+        let gas_split: Vec<&str> = value_split[1].split(" gas × ").collect();
+        if gas_split.len() != 2 {
+            return Err(de::Error::custom("invalid format for TxpoolInspectSummary: gas"));
+        }
+        let gas_price_split: Vec<&str> = gas_split[1].split(" wei").collect();
+        if gas_price_split.len() != 2 {
+            return Err(de::Error::custom("invalid format for TxpoolInspectSummary: gas_price"));
+        }
+        let addr = match addr_split[0] {
+            "" => None,
+            "0x" => None,
+            "contract creation" => None,
+            addr => {
+                Some(Address::from_str(addr.trim_start_matches("0x")).map_err(de::Error::custom)?)
+            }
+        };
+        let value = U256::from_str(value_split[0]).map_err(de::Error::custom)?;
+        let gas = U256::from_str(gas_split[0]).map_err(de::Error::custom)?;
+        let gas_price = U256::from_str(gas_price_split[0]).map_err(de::Error::custom)?;
+
+        Ok(TxpoolInspectSummary { to: addr, value, gas, gas_price })
+    }
+
+    fn visit_string<E>(self, value: String) -> Result<Self::Value, E>
+    where
+        E: de::Error,
+    {
+        self.visit_str(&value)
+    }
+}
+
+/// Implement the `Deserialize` trait for `TxpoolInspectSummary` struct.
+impl<'de> Deserialize<'de> for TxpoolInspectSummary {
+    fn deserialize<D>(deserializer: D) -> Result<TxpoolInspectSummary, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        deserializer.deserialize_str(TxpoolInspectSummaryVisitor)
+    }
+}
+
+/// Implement the `Serialize` trait for `TxpoolInspectSummary` struct so that the
+/// format matches the one from geth.
+impl Serialize for TxpoolInspectSummary {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: serde::Serializer,
+    {
+        let formatted_to = if let Some(to) = self.to {
+            format!("{to:?}")
+        } else {
+            "contract creation".to_string()
+        };
+        let formatted = format!(
+            "{}: {} wei + {} gas × {} wei",
+            formatted_to, self.value, self.gas, self.gas_price
+        );
+        serializer.serialize_str(&formatted)
+    }
+}
+
+/// Transaction Pool Content
+///
+/// The content inspection property can be queried to list the exact details of all
+/// the transactions currently pending for inclusion in the next block(s), as well
+/// as the ones that are being scheduled for future execution only.
+///
+/// See [here](https://geth.ethereum.org/docs/rpc/ns-txpool#txpool_content) for more details
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
+pub struct TxpoolContent {
+    /// pending tx
+    pub pending: BTreeMap<Address, BTreeMap<String, Transaction>>,
+    /// queued tx
+    pub queued: BTreeMap<Address, BTreeMap<String, Transaction>>,
+}
+
+impl TxpoolContent {
+    /// Removes the transactions from the given sender
+    pub fn remove_from(&mut self, sender: &Address) -> TxpoolContentFrom {
+        TxpoolContentFrom {
+            pending: self.pending.remove(sender).unwrap_or_default(),
+            queued: self.queued.remove(sender).unwrap_or_default(),
+        }
+    }
+}
+
+/// Transaction Pool Content From
+///
+/// Same as [TxpoolContent] but for a specific address.
+///
+/// See [here](https://geth.ethereum.org/docs/rpc/ns-txpool#txpool_contentFrom) for more details
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
+pub struct TxpoolContentFrom {
+    /// pending tx
+    pub pending: BTreeMap<String, Transaction>,
+    /// queued tx
+    pub queued: BTreeMap<String, Transaction>,
+}
+
+/// Transaction Pool Inspect
+///
+/// The inspect inspection property can be queried to list a textual summary
+/// of all the transactions currently pending for inclusion in the next block(s),
+/// as well as the ones that are being scheduled for future execution only.
+/// This is a method specifically tailored to developers to quickly see the
+/// transactions in the pool and find any potential issues.
+///
+/// See [here](https://geth.ethereum.org/docs/rpc/ns-txpool#txpool_inspect) for more details
+#[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)]
+pub struct TxpoolInspect {
+    /// pending tx
+    pub pending: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+    /// queued tx
+    pub queued: BTreeMap<Address, BTreeMap<String, TxpoolInspectSummary>>,
+}
+
+/// Transaction Pool Status
+///
+/// The status inspection property can be queried for the number of transactions
+/// currently pending for inclusion in the next block(s), as well as the ones that
+/// are being scheduled for future execution only.
+///
+/// See [here](https://geth.ethereum.org/docs/rpc/ns-txpool#txpool_status) for more details
+#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)]
+pub struct TxpoolStatus {
+    /// number of pending tx
+    pub pending: U64,
+    /// number of queued tx
+    pub queued: U64,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn serde_txpool_content() {
+        // Gathered from geth v1.10.23-stable-d901d853/linux-amd64/go1.18.5
+        // Addresses used as keys in `pending` and `queued` have been manually lowercased to
+        // simplify the test.
+        let txpool_content_json = r#"
+{
+  "pending": {
+    "0x00000000863b56a3c1f0f1be8bc4f8b7bd78f57a": {
+      "29": {
+        "blockHash": null,
+        "blockNumber": null,
+        "from": "0x00000000863b56a3c1f0f1be8bc4f8b7bd78f57a",
+        "gas": "0x2af9e",
+        "gasPrice": "0x218711a00",
+        "maxFeePerGas": "0x218711a00",
+        "maxPriorityFeePerGas": "0x3b9aca00",
+        "hash": "0xfbc6fd04ba1c4114f06574263f04099b4fb2da72acc6f9709f0a3d2361308344",
+        "input": "0x5ae401dc00000000000000000000000000000000000000000000000000000000636c757700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000863b56a3c1f0f1be8bc4f8b7bd78f57a000000000000000000000000000000000000000000000000000000007781df4000000000000000000000000000000000000000000000006c240454bf9c87cd84000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+        "nonce": "0x1d",
+        "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
+        "transactionIndex": null,
+        "value": "0x0",
+        "type": "0x2",
+        "accessList": [],
+        "chainId": "0x1",
+        "v": "0x0",
+        "r": "0xbb809ae71b03319ba2811ebd581c85665169143ffade86e07d2eb4cd03b544dc",
+        "s": "0x65a2aa7e0e70356f765205a611d580de8e84fa79086f117fd9ab4765f5cf1339"
+      }
+    },
+    "0x000042429c09de5881f05a0c2a068222f4f5b091": {
+      "38": {
+        "blockHash": null,
+        "blockNumber": null,
+        "from": "0x000042429c09de5881f05a0c2a068222f4f5b091",
+        "gas": "0x61a80",
+        "gasPrice": "0x2540be400",
+        "hash": "0x054ad1ccf5917139a9b1952f62048f742255a7c11100f593c4f18c1ed49b8dfd",
+        "input": "0x27dc297e800332e506f28f49a13c1edf087bdd6482d6cb3abdf2a4c455642aef1e98fc240000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002d7b22444149223a313439332e37342c2254555344223a313438392e36362c2255534443223a313439322e34387d00000000000000000000000000000000000000",
+        "nonce": "0x26",
+        "to": "0xabd279febe00c93fb0c9e683c6919ec4f107241f",
+        "transactionIndex": null,
+        "value": "0x0",
+        "type": "0x0",
+        "chainId": "0x1",
+        "v": "0x26",
+        "r": "0xaf46b2c0f067f7d1d63ac19daa349c0e1eb83f019ee00542ffa7095e05352e92",
+        "s": "0x21d6d24d58ec361379ffffe4cc17bec8ce2b9f5f9759a91afc9a54dfdfa519c2"
+      }
+    },
+    "0x000fab888651fbceb55de230493562159ead0340": {
+      "12": {
+        "blockHash": null,
+        "blockNumber": null,
+        "from": "0x000fab888651fbceb55de230493562159ead0340",
+        "gas": "0x12fed",
+        "gasPrice": "0x1a13b8600",
+        "maxFeePerGas": "0x1a13b8600",
+        "maxPriorityFeePerGas": "0x59682f00",
+        "hash": "0xfae0cffdae6774abe11662a2cdbea019fce48fca87ba9ebf5e9e7c2454c01715",
+        "input": "0xa9059cbb00000000000000000000000050272a56ef9aff7238e8b40347da62e87c1f69e200000000000000000000000000000000000000000000000000000000428d3dfc",
+        "nonce": "0xc",
+        "to": "0x8e8d6ab093905c400d583efd37fbeeb1ee1c0c39",
+        "transactionIndex": null,
+        "value": "0x0",
+        "type": "0x2",
+        "accessList": [],
+        "chainId": "0x1",
+        "v": "0x0",
+        "r": "0x7b717e689d1bd045ee7afd79b97219f2e36bd22a6a14e07023902194bca96fbf",
+        "s": "0x7b0ba462c98e7b0f95a53f047cf568ee0443839628dfe4ab294bfab88fa8e251"
+      }
+    }
+  },
+  "queued": {
+    "0x00b846f07f5e7c61569437ca16f88a9dfa00f1bf": {
+      "143": {
+        "blockHash": null,
+        "blockNumber": null,
+        "from": "0x00b846f07f5e7c61569437ca16f88a9dfa00f1bf",
+        "gas": "0x33c3b",
+        "gasPrice": "0x218711a00",
+        "maxFeePerGas": "0x218711a00",
+        "maxPriorityFeePerGas": "0x77359400",
+        "hash": "0x68959706857f7a58d752ede0a5118a5f55f4ae40801f31377e1af201944720b2",
+        "input": "0x03a9ea6d00000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000f2ff840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000041d0c4694374d7893d63605625687be2f01028a5b49eca00f72901e773ad8ba7906e58d43e114a28353efaf8abd6a2675de83a3a07af579b8b268e6b714376610d1c00000000000000000000000000000000000000000000000000000000000000",
+        "nonce": "0x8f",
+        "to": "0xfbddadd80fe7bda00b901fbaf73803f2238ae655",
+        "transactionIndex": null,
+        "value": "0x1f58a57c1794eb",
+        "type": "0x2",
+        "accessList": [],
+        "chainId": "0x1",
+        "v": "0x0",
+        "r": "0x77d149add2b1b84af9408af55661b05b21e2a436f9bfcaa844584905a0f8f1ac",
+        "s": "0x358d79063d702f0c3fb46ad0f6ce5db61f5fdb0b20359c8da2e72a11988db283"
+      }
+    },
+    "0x025276ec2de8ee570cfd4c1010319f14a6d9f0dd": {
+      "1": {
+        "blockHash": null,
+        "blockNumber": null,
+        "from": "0x025276ec2de8ee570cfd4c1010319f14a6d9f0dd",
+        "gas": "0x7918",
+        "gasPrice": "0x12e531724e",
+        "maxFeePerGas": "0x12e531724e",
+        "maxPriorityFeePerGas": "0x59682f00",
+        "hash": "0x35109918ab6129a4d69480514ebec0ea08dc4a4de032fec59003ea66718828c4",
+        "input": "0x",
+        "nonce": "0x1",
+        "to": "0x025276ec2de8ee570cfd4c1010319f14a6d9f0dd",
+        "transactionIndex": null,
+        "value": "0x0",
+        "type": "0x2",
+        "accessList": [],
+        "chainId": "0x1",
+        "v": "0x0",
+        "r": "0x863ed0413a14f3f1695fd9728f1500a2b46e69d6f4c82408af15354cc5a667d6",
+        "s": "0x2d503050aa1c9ecbb6df9957459c296f2f6190bc07aa09047d541233100b1c7a"
+      },
+      "4": {
+        "blockHash": null,
+        "blockNumber": null,
+        "from": "0x025276ec2de8ee570cfd4c1010319f14a6d9f0dd",
+        "gas": "0x7530",
+        "gasPrice": "0x1919617600",
+        "maxFeePerGas": "0x1919617600",
+        "maxPriorityFeePerGas": "0x5c7261c0",
+        "hash": "0xa58e54464b2ca62a5e2d976604ed9a53b13f8823a170ee4c3ae0cd91cde2a6c5",
+        "input": "0x",
+        "nonce": "0x4",
+        "to": "0x025276ec2de8ee570cfd4c1010319f14a6d9f0dd",
+        "transactionIndex": null,
+        "value": "0x0",
+        "type": "0x2",
+        "accessList": [],
+        "chainId": "0x1",
+        "v": "0x1",
+        "r": "0xb6a571191c4b5b667876295571c42c9411bbb4569eea1a6ad149572e4efc55a9",
+        "s": "0x248a72dab9b24568dd9cbe289c205eaba1a6b58b32b5a96c48554945d3fd0d86"
+      }
+    },
+    "0x02666081cfb787de3562efbbca5f0fe890e927f1": {
+      "44": {
+        "blockHash": null,
+        "blockNumber": null,
+        "from": "0x02666081cfb787de3562efbbca5f0fe890e927f1",
+        "gas": "0x16404",
+        "gasPrice": "0x4bad00695",
+        "maxFeePerGas": "0x4bad00695",
+        "maxPriorityFeePerGas": "0xa3e9ab80",
+        "hash": "0xf627e59d7a59eb650f4c9df222858572601a566263809fdacbb755ac2277a4a7",
+        "input": "0x095ea7b300000000000000000000000029fbd00940df70cfc5dad3f2370686991e2bbf5cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
+        "nonce": "0x2c",
+        "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+        "transactionIndex": null,
+        "value": "0x0",
+        "type": "0x2",
+        "accessList": [],
+        "chainId": "0x1",
+        "v": "0x1",
+        "r": "0xcfc88f55fc0779d12705acba58719cd7d0ed5b0c1a7c3c3682b56397ca493dd5",
+        "s": "0x7e7dc008058c543ebfdae67154c797639447db5e8006f8fc0585352d857c1b6c"
+      }
+    }
+  }
+}"#;
+        let deserialized: TxpoolContent = serde_json::from_str(txpool_content_json).unwrap();
+        let serialized: String = serde_json::to_string_pretty(&deserialized).unwrap();
+
+        let origin: serde_json::Value = serde_json::from_str(txpool_content_json).unwrap();
+        let serialized_value = serde_json::to_value(deserialized.clone()).unwrap();
+        assert_eq!(origin, serialized_value);
+        assert_eq!(deserialized, serde_json::from_str::<TxpoolContent>(&serialized).unwrap());
+    }
+
+    #[test]
+    fn serde_txpool_inspect() {
+        let txpool_inspect_json = r#"
+{
+  "pending": {
+    "0x0512261a7486b1e29704ac49a5eb355b6fd86872": {
+      "124930": "0x000000000000000000000000000000000000007E: 0 wei + 100187 gas × 20000000000 wei"
+    },
+    "0x201354729f8d0f8b64e9a0c353c672c6a66b3857": {
+      "252350": "0xd10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF: 0 wei + 65792 gas × 2000000000 wei",
+      "252351": "0xd10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF: 0 wei + 65792 gas × 2000000000 wei",
+      "252352": "0xd10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF: 0 wei + 65780 gas × 2000000000 wei",
+      "252353": "0xd10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF: 0 wei + 65780 gas × 2000000000 wei"
+    },
+    "0x00000000863B56a3C1f0F1be8BC4F8b7BD78F57a": {
+      "40": "contract creation: 0 wei + 612412 gas × 6000000000 wei"
+    }
+  },
+  "queued": {
+    "0x0f87ffcd71859233eb259f42b236c8e9873444e3": {
+      "7": "0x3479BE69e07E838D9738a301Bb0c89e8EA2Bef4a: 1000000000000000 wei + 21000 gas × 10000000000 wei",
+      "8": "0x73Aaf691bc33fe38f86260338EF88f9897eCaa4F: 1000000000000000 wei + 21000 gas × 10000000000 wei"
+    },
+    "0x307e8f249bcccfa5b245449256c5d7e6e079943e": {
+      "3": "0x73Aaf691bc33fe38f86260338EF88f9897eCaa4F: 10000000000000000 wei + 21000 gas × 10000000000 wei"
+    }
+  }
+}"#;
+        let deserialized: TxpoolInspect = serde_json::from_str(txpool_inspect_json).unwrap();
+        assert_eq!(deserialized, expected_txpool_inspect());
+
+        let serialized = serde_json::to_string(&deserialized).unwrap();
+        let deserialized2: TxpoolInspect = serde_json::from_str(&serialized).unwrap();
+        assert_eq!(deserialized2, deserialized);
+    }
+
+    #[test]
+    fn serde_txpool_status() {
+        let txpool_status_json = r#"
+{
+  "pending": "0x23",
+  "queued": "0x20"
+}"#;
+        let deserialized: TxpoolStatus = serde_json::from_str(txpool_status_json).unwrap();
+        let serialized: String = serde_json::to_string_pretty(&deserialized).unwrap();
+        assert_eq!(txpool_status_json.trim(), serialized);
+    }
+
+    fn expected_txpool_inspect() -> TxpoolInspect {
+        let mut pending_map = BTreeMap::new();
+        let mut pending_map_inner = BTreeMap::new();
+        pending_map_inner.insert(
+            "124930".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("000000000000000000000000000000000000007E").unwrap()),
+                value: U256::from(0u128),
+                gas: U256::from(100187u128),
+                gas_price: U256::from(20000000000u128),
+            },
+        );
+        pending_map.insert(
+            Address::from_str("0512261a7486b1e29704ac49a5eb355b6fd86872").unwrap(),
+            pending_map_inner.clone(),
+        );
+        pending_map_inner.clear();
+        pending_map_inner.insert(
+            "252350".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("d10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF").unwrap()),
+                value: U256::from(0u128),
+                gas: U256::from(65792u128),
+                gas_price: U256::from(2000000000u128),
+            },
+        );
+        pending_map_inner.insert(
+            "252351".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("d10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF").unwrap()),
+                value: U256::from(0u128),
+                gas: U256::from(65792u128),
+                gas_price: U256::from(2000000000u128),
+            },
+        );
+        pending_map_inner.insert(
+            "252352".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("d10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF").unwrap()),
+                value: U256::from(0u128),
+                gas: U256::from(65780u128),
+                gas_price: U256::from(2000000000u128),
+            },
+        );
+        pending_map_inner.insert(
+            "252353".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("d10e3Be2bc8f959Bc8C41CF65F60dE721cF89ADF").unwrap()),
+                value: U256::from(0u128),
+                gas: U256::from(65780u128),
+                gas_price: U256::from(2000000000u128),
+            },
+        );
+        pending_map.insert(
+            Address::from_str("201354729f8d0f8b64e9a0c353c672c6a66b3857").unwrap(),
+            pending_map_inner.clone(),
+        );
+        pending_map_inner.clear();
+        pending_map_inner.insert(
+            "40".to_string(),
+            TxpoolInspectSummary {
+                to: None,
+                value: U256::from(0u128),
+                gas: U256::from(612412u128),
+                gas_price: U256::from(6000000000u128),
+            },
+        );
+        pending_map.insert(
+            Address::from_str("00000000863B56a3C1f0F1be8BC4F8b7BD78F57a").unwrap(),
+            pending_map_inner,
+        );
+        let mut queued_map = BTreeMap::new();
+        let mut queued_map_inner = BTreeMap::new();
+        queued_map_inner.insert(
+            "7".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("3479BE69e07E838D9738a301Bb0c89e8EA2Bef4a").unwrap()),
+                value: U256::from(1000000000000000u128),
+                gas: U256::from(21000u128),
+                gas_price: U256::from(10000000000u128),
+            },
+        );
+        queued_map_inner.insert(
+            "8".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("73Aaf691bc33fe38f86260338EF88f9897eCaa4F").unwrap()),
+                value: U256::from(1000000000000000u128),
+                gas: U256::from(21000u128),
+                gas_price: U256::from(10000000000u128),
+            },
+        );
+        queued_map.insert(
+            Address::from_str("0f87ffcd71859233eb259f42b236c8e9873444e3").unwrap(),
+            queued_map_inner.clone(),
+        );
+        queued_map_inner.clear();
+        queued_map_inner.insert(
+            "3".to_string(),
+            TxpoolInspectSummary {
+                to: Some(Address::from_str("73Aaf691bc33fe38f86260338EF88f9897eCaa4F").unwrap()),
+                value: U256::from(10000000000000000u128),
+                gas: U256::from(21000u128),
+                gas_price: U256::from(10000000000u128),
+            },
+        );
+        queued_map.insert(
+            Address::from_str("307e8f249bcccfa5b245449256c5d7e6e079943e").unwrap(),
+            queued_map_inner,
+        );
+
+        TxpoolInspect { pending: pending_map, queued: queued_map }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/eth/withdrawal.rs.html b/src/alloy_rpc_types/eth/withdrawal.rs.html new file mode 100644 index 000000000000..5dce59061076 --- /dev/null +++ b/src/alloy_rpc_types/eth/withdrawal.rs.html @@ -0,0 +1,250 @@ +withdrawal.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+
//! Withdrawal type and serde helpers.
+
+use crate::serde_helpers::u64_hex;
+use alloy_primitives::{Address, U256};
+use alloy_rlp::{RlpDecodable, RlpEncodable};
+use serde::{Deserialize, Deserializer, Serialize, Serializer};
+use serde_with::{serde_as, DeserializeAs, DisplayFromStr, SerializeAs};
+use std::mem;
+
+/// Multiplier for converting gwei to wei.
+pub const GWEI_TO_WEI: u64 = 1_000_000_000;
+
+/// Withdrawal represents a validator withdrawal from the consensus layer.
+#[derive(
+    Debug, Clone, PartialEq, Eq, Default, Hash, RlpEncodable, RlpDecodable, Serialize, Deserialize,
+)]
+pub struct Withdrawal {
+    /// Monotonically increasing identifier issued by consensus layer.
+    #[serde(with = "u64_hex")]
+    pub index: u64,
+    /// Index of validator associated with withdrawal.
+    #[serde(with = "u64_hex", rename = "validatorIndex")]
+    pub validator_index: u64,
+    /// Target address for withdrawn ether.
+    pub address: Address,
+    /// Value of the withdrawal in gwei.
+    #[serde(with = "u64_hex")]
+    pub amount: u64,
+}
+
+impl Withdrawal {
+    /// Return the withdrawal amount in wei.
+    pub fn amount_wei(&self) -> U256 {
+        U256::from(self.amount) * U256::from(GWEI_TO_WEI)
+    }
+
+    /// Calculate a heuristic for the in-memory size of the [Withdrawal].
+    #[inline]
+    pub fn size(&self) -> usize {
+        mem::size_of::<Self>()
+    }
+}
+
+/// Same as [Withdrawal] but respects the Beacon API format which uses snake-case and quoted
+/// decimals.
+#[serde_as]
+#[derive(Serialize, Deserialize)]
+pub(crate) struct BeaconAPIWithdrawal {
+    #[serde_as(as = "DisplayFromStr")]
+    index: u64,
+    #[serde_as(as = "DisplayFromStr")]
+    validator_index: u64,
+    address: Address,
+    #[serde_as(as = "DisplayFromStr")]
+    amount: u64,
+}
+
+impl SerializeAs<Withdrawal> for BeaconAPIWithdrawal {
+    fn serialize_as<S>(source: &Withdrawal, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        beacon_api_withdrawals::serialize(source, serializer)
+    }
+}
+
+impl<'de> DeserializeAs<'de, Withdrawal> for BeaconAPIWithdrawal {
+    fn deserialize_as<D>(deserializer: D) -> Result<Withdrawal, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        beacon_api_withdrawals::deserialize(deserializer)
+    }
+}
+
+/// A helper serde module to convert from/to the Beacon API which uses quoted decimals rather than
+/// big-endian hex.
+pub mod beacon_api_withdrawals {
+    use super::*;
+    use serde::{Deserialize, Deserializer, Serialize, Serializer};
+
+    /// Serialize the payload attributes for the beacon API.
+    pub fn serialize<S>(payload_attributes: &Withdrawal, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        let withdrawal = BeaconAPIWithdrawal {
+            index: payload_attributes.index,
+            validator_index: payload_attributes.validator_index,
+            address: payload_attributes.address,
+            amount: payload_attributes.amount,
+        };
+        withdrawal.serialize(serializer)
+    }
+
+    /// Deserialize the payload attributes for the beacon API.
+    pub fn deserialize<'de, D>(deserializer: D) -> Result<Withdrawal, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        let withdrawal = BeaconAPIWithdrawal::deserialize(deserializer)?;
+        Ok(Withdrawal {
+            index: withdrawal.index,
+            validator_index: withdrawal.validator_index,
+            address: withdrawal.address,
+            amount: withdrawal.amount,
+        })
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    // <https://github.com/paradigmxyz/reth/issues/1614>
+    #[test]
+    fn test_withdrawal_serde_roundtrip() {
+        let input = r#"[{"index":"0x0","validatorIndex":"0x0","address":"0x0000000000000000000000000000000000001000","amount":"0x1"},{"index":"0x1","validatorIndex":"0x1","address":"0x0000000000000000000000000000000000001001","amount":"0x1"},{"index":"0x2","validatorIndex":"0x2","address":"0x0000000000000000000000000000000000001002","amount":"0x1"},{"index":"0x3","validatorIndex":"0x3","address":"0x0000000000000000000000000000000000001003","amount":"0x1"},{"index":"0x4","validatorIndex":"0x4","address":"0x0000000000000000000000000000000000001004","amount":"0x1"},{"index":"0x5","validatorIndex":"0x5","address":"0x0000000000000000000000000000000000001005","amount":"0x1"},{"index":"0x6","validatorIndex":"0x6","address":"0x0000000000000000000000000000000000001006","amount":"0x1"},{"index":"0x7","validatorIndex":"0x7","address":"0x0000000000000000000000000000000000001007","amount":"0x1"},{"index":"0x8","validatorIndex":"0x8","address":"0x0000000000000000000000000000000000001008","amount":"0x1"},{"index":"0x9","validatorIndex":"0x9","address":"0x0000000000000000000000000000000000001009","amount":"0x1"},{"index":"0xa","validatorIndex":"0xa","address":"0x000000000000000000000000000000000000100a","amount":"0x1"},{"index":"0xb","validatorIndex":"0xb","address":"0x000000000000000000000000000000000000100b","amount":"0x1"},{"index":"0xc","validatorIndex":"0xc","address":"0x000000000000000000000000000000000000100c","amount":"0x1"},{"index":"0xd","validatorIndex":"0xd","address":"0x000000000000000000000000000000000000100d","amount":"0x1"},{"index":"0xe","validatorIndex":"0xe","address":"0x000000000000000000000000000000000000100e","amount":"0x1"},{"index":"0xf","validatorIndex":"0xf","address":"0x000000000000000000000000000000000000100f","amount":"0x1"}]"#;
+
+        let withdrawals: Vec<Withdrawal> = serde_json::from_str(input).unwrap();
+        let s = serde_json::to_string(&withdrawals).unwrap();
+        assert_eq!(input, s);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/lib.rs.html b/src/alloy_rpc_types/lib.rs.html new file mode 100644 index 000000000000..d0dacfd074e8 --- /dev/null +++ b/src/alloy_rpc_types/lib.rs.html @@ -0,0 +1,58 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
//! Alloy RPC type definitions.
+//!
+//! Provides all relevant types for the various RPC endpoints, grouped by namespace.
+
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    // TODO:
+    // missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    // clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+mod eth;
+mod rpc;
+mod serde_helpers;
+
+pub use eth::*;
+pub use rpc::*;
+pub use serde_helpers::*;
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/rpc.rs.html b/src/alloy_rpc_types/rpc.rs.html new file mode 100644 index 000000000000..07664f7e0b16 --- /dev/null +++ b/src/alloy_rpc_types/rpc.rs.html @@ -0,0 +1,84 @@ +rpc.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+
use serde::{Deserialize, Serialize};
+use std::collections::HashMap;
+
+/// Represents the `rpc_modules` response, which returns the
+/// list of all available modules on that transport and their version
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
+#[serde(transparent)]
+pub struct RpcModules {
+    module_map: HashMap<String, String>,
+}
+
+impl RpcModules {
+    /// Create a new instance of RPCModules
+    pub fn new(module_map: HashMap<String, String>) -> Self {
+        Self { module_map }
+    }
+
+    /// Consumes self and returns the inner hashmap mapping module names to their versions
+    pub fn into_modules(self) -> HashMap<String, String> {
+        self.module_map
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    #[test]
+    fn test_parse_module_versions_roundtrip() {
+        let s = r#"{"txpool":"1.0","trace":"1.0","eth":"1.0","web3":"1.0","net":"1.0"}"#;
+        let module_map = HashMap::from([
+            ("txpool".to_owned(), "1.0".to_owned()),
+            ("trace".to_owned(), "1.0".to_owned()),
+            ("eth".to_owned(), "1.0".to_owned()),
+            ("web3".to_owned(), "1.0".to_owned()),
+            ("net".to_owned(), "1.0".to_owned()),
+        ]);
+        let m = RpcModules::new(module_map);
+        let de_serialized: RpcModules = serde_json::from_str(s).unwrap();
+        assert_eq!(de_serialized, m);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/serde_helpers/json_u256.rs.html b/src/alloy_rpc_types/serde_helpers/json_u256.rs.html new file mode 100644 index 000000000000..8df11a1b8e7d --- /dev/null +++ b/src/alloy_rpc_types/serde_helpers/json_u256.rs.html @@ -0,0 +1,188 @@ +json_u256.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+
//! Json U256 serde helpers.
+
+use alloy_primitives::U256;
+use serde::{
+    de::{Error, Visitor},
+    Deserialize, Deserializer, Serialize, Serializer,
+};
+use std::{fmt, str::FromStr};
+
+/// Wrapper around primitive U256 type that also supports deserializing numbers
+#[derive(Default, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
+pub struct JsonU256(pub U256);
+
+impl From<JsonU256> for U256 {
+    fn from(value: JsonU256) -> Self {
+        value.0
+    }
+}
+
+impl From<U256> for JsonU256 {
+    fn from(value: U256) -> Self {
+        JsonU256(value)
+    }
+}
+
+impl Serialize for JsonU256 {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        self.0.serialize(serializer)
+    }
+}
+
+impl<'a> Deserialize<'a> for JsonU256 {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'a>,
+    {
+        deserializer.deserialize_any(JsonU256Visitor)
+    }
+}
+
+struct JsonU256Visitor;
+
+impl<'a> Visitor<'a> for JsonU256Visitor {
+    type Value = JsonU256;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(formatter, "a hex encoding or decimal number")
+    }
+
+    fn visit_u64<E>(self, value: u64) -> Result<Self::Value, E>
+    where
+        E: Error,
+    {
+        Ok(JsonU256(U256::from(value)))
+    }
+
+    fn visit_str<E>(self, value: &str) -> Result<Self::Value, E>
+    where
+        E: Error,
+    {
+        let value = match value.len() {
+            0 => U256::ZERO,
+            2 if value.starts_with("0x") => U256::ZERO,
+            _ if value.starts_with("0x") => U256::from_str(value).map_err(|e| {
+                Error::custom(format!("Parsing JsonU256 as hex failed {value}: {e}"))
+            })?,
+            _ => U256::from_str_radix(value, 10).map_err(|e| {
+                Error::custom(format!("Parsing JsonU256 as decimal failed {value}: {e:?}"))
+            })?,
+        };
+
+        Ok(JsonU256(value))
+    }
+
+    fn visit_string<E>(self, value: String) -> Result<Self::Value, E>
+    where
+        E: Error,
+    {
+        self.visit_str(value.as_ref())
+    }
+}
+
+/// Supports parsing `U256` numbers as strings via [JsonU256]
+pub fn deserialize_json_u256<'de, D>(deserializer: D) -> Result<U256, D::Error>
+where
+    D: Deserializer<'de>,
+{
+    let num = JsonU256::deserialize(deserializer)?;
+    Ok(num.into())
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/serde_helpers/mod.rs.html b/src/alloy_rpc_types/serde_helpers/mod.rs.html new file mode 100644 index 000000000000..04ddf50ec106 --- /dev/null +++ b/src/alloy_rpc_types/serde_helpers/mod.rs.html @@ -0,0 +1,60 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+
//! Serde helpers for primitive types.
+
+use alloy_primitives::U256;
+use serde::{Deserialize, Deserializer, Serializer};
+
+pub mod json_u256;
+pub mod num;
+pub mod storage;
+pub mod u64_hex;
+
+/// Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with
+/// arbitrary precision, defined by serde_json's [`Number`](serde_json::Number).
+pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result<U256, D::Error>
+where
+    D: Deserializer<'de>,
+{
+    num::NumberOrHexU256::deserialize(deserializer)?.try_into_u256()
+}
+
+/// Serialize a byte vec as a hex string _without_ the "0x" prefix.
+///
+/// This behaves the same as [`hex::encode`](alloy_primitives::hex::encode).
+pub fn serialize_hex_string_no_prefix<S, T>(x: T, s: S) -> Result<S::Ok, S::Error>
+where
+    S: Serializer,
+    T: AsRef<[u8]>,
+{
+    s.serialize_str(&alloy_primitives::hex::encode(x.as_ref()))
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/serde_helpers/num.rs.html b/src/alloy_rpc_types/serde_helpers/num.rs.html new file mode 100644 index 000000000000..d3b337841872 --- /dev/null +++ b/src/alloy_rpc_types/serde_helpers/num.rs.html @@ -0,0 +1,280 @@ +num.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+
//! Numeric serde helpers.
+
+use alloy_primitives::{U256, U64};
+use serde::{de, Deserialize, Deserializer, Serialize};
+use std::str::FromStr;
+
+/// A `u64` wrapper type that deserializes from hex or a u64 and serializes as hex.
+///
+///
+/// ```rust
+/// use alloy_rpc_types::num::U64HexOrNumber;
+/// let number_json = "100";
+/// let hex_json = "\"0x64\"";
+///
+/// let number: U64HexOrNumber = serde_json::from_str(number_json).unwrap();
+/// let hex: U64HexOrNumber = serde_json::from_str(hex_json).unwrap();
+/// assert_eq!(number, hex);
+/// assert_eq!(hex.to(), 100);
+/// ```
+#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize)]
+pub struct U64HexOrNumber(U64);
+
+impl U64HexOrNumber {
+    /// Returns the wrapped u64
+    pub fn to(self) -> u64 {
+        self.0.to()
+    }
+}
+
+impl From<u64> for U64HexOrNumber {
+    fn from(value: u64) -> Self {
+        Self(U64::from(value))
+    }
+}
+
+impl From<U64> for U64HexOrNumber {
+    fn from(value: U64) -> Self {
+        Self(value)
+    }
+}
+
+impl From<U64HexOrNumber> for u64 {
+    fn from(value: U64HexOrNumber) -> Self {
+        value.to()
+    }
+}
+
+impl From<U64HexOrNumber> for U64 {
+    fn from(value: U64HexOrNumber) -> Self {
+        value.0
+    }
+}
+
+impl<'de> Deserialize<'de> for U64HexOrNumber {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        #[derive(Deserialize)]
+        #[serde(untagged)]
+        enum NumberOrHexU64 {
+            Hex(U64),
+            Int(u64),
+        }
+        match NumberOrHexU64::deserialize(deserializer)? {
+            NumberOrHexU64::Int(val) => Ok(val.into()),
+            NumberOrHexU64::Hex(val) => Ok(val.into()),
+        }
+    }
+}
+
+/// serde functions for handling primitive optional `u64` as [U64]
+pub mod u64_hex_or_decimal_opt {
+    use crate::serde_helpers::num::U64HexOrNumber;
+    use serde::{Deserialize, Deserializer, Serialize, Serializer};
+
+    /// Deserializes an `u64` accepting a hex quantity string with optional 0x prefix or
+    /// a number
+    pub fn deserialize<'de, D>(deserializer: D) -> Result<Option<u64>, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        match Option::<U64HexOrNumber>::deserialize(deserializer)? {
+            Some(val) => Ok(Some(val.into())),
+            None => Ok(None),
+        }
+    }
+
+    /// Serializes u64 as hex string
+    pub fn serialize<S: Serializer>(value: &Option<u64>, s: S) -> Result<S::Ok, S::Error> {
+        match value {
+            Some(val) => U64HexOrNumber::from(*val).serialize(s),
+            None => s.serialize_none(),
+        }
+    }
+}
+
+/// Deserializes the input into an `Option<U256>`, using [`from_int_or_hex`] to deserialize the
+/// inner value.
+pub fn from_int_or_hex_opt<'de, D>(deserializer: D) -> Result<Option<U256>, D::Error>
+where
+    D: Deserializer<'de>,
+{
+    match Option::<NumberOrHexU256>::deserialize(deserializer)? {
+        Some(val) => val.try_into_u256().map(Some),
+        None => Ok(None),
+    }
+}
+
+/// An enum that represents either a [serde_json::Number] integer, or a hex [U256].
+#[derive(Debug, Deserialize)]
+#[serde(untagged)]
+pub enum NumberOrHexU256 {
+    /// An integer
+    Int(serde_json::Number),
+    /// A hex U256
+    Hex(U256),
+}
+
+impl NumberOrHexU256 {
+    /// Tries to convert this into a [U256]].
+    pub fn try_into_u256<E: de::Error>(self) -> Result<U256, E> {
+        match self {
+            NumberOrHexU256::Int(num) => {
+                U256::from_str(num.to_string().as_str()).map_err(E::custom)
+            }
+            NumberOrHexU256::Hex(val) => Ok(val),
+        }
+    }
+}
+
+/// Deserializes the input into a U256, accepting both 0x-prefixed hex and decimal strings with
+/// arbitrary precision, defined by serde_json's [`Number`](serde_json::Number).
+pub fn from_int_or_hex<'de, D>(deserializer: D) -> Result<U256, D::Error>
+where
+    D: Deserializer<'de>,
+{
+    NumberOrHexU256::deserialize(deserializer)?.try_into_u256()
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/serde_helpers/storage.rs.html b/src/alloy_rpc_types/serde_helpers/storage.rs.html new file mode 100644 index 000000000000..cbeaafe77471 --- /dev/null +++ b/src/alloy_rpc_types/serde_helpers/storage.rs.html @@ -0,0 +1,210 @@ +storage.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+
//! Storage related helpers.
+
+use alloy_primitives::{Bytes, B256, U256};
+use serde::{Deserialize, Deserializer, Serialize};
+use std::{collections::HashMap, fmt::Write};
+
+/// A storage key type that can be serialized to and from a hex string up to 32 bytes. Used for
+/// `eth_getStorageAt` and `eth_getProof` RPCs.
+///
+/// This is a wrapper type meant to mirror geth's serialization and deserialization behavior for
+/// storage keys.
+///
+/// In `eth_getStorageAt`, this is used for deserialization of the `index` field. Internally, the
+/// index is a [B256], but in `eth_getStorageAt` requests, its serialization can be _up to_ 32
+/// bytes. To support this, the storage key is deserialized first as a U256, and converted to a
+/// B256 for use internally.
+///
+/// `eth_getProof` also takes storage keys up to 32 bytes as input, so the `keys` field is
+/// similarly deserialized. However, geth populates the storage proof `key` fields in the response
+/// by mirroring the `key` field used in the input.
+///  * See how `storageKey`s (the input) are populated in the `StorageResult` (the output):
+///  <https://github.com/ethereum/go-ethereum/blob/00a73fbcce3250b87fc4160f3deddc44390848f4/internal/ethapi/api.go#L658-L690>
+///
+/// The contained [B256] and From implementation for String are used to preserve the input and
+/// implement this behavior from geth.
+#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
+#[serde(from = "U256", into = "String")]
+pub struct JsonStorageKey(pub B256);
+
+impl From<U256> for JsonStorageKey {
+    fn from(value: U256) -> Self {
+        // SAFETY: Address (B256) and U256 have the same number of bytes
+        JsonStorageKey(B256::from(value.to_be_bytes()))
+    }
+}
+
+impl From<JsonStorageKey> for String {
+    fn from(value: JsonStorageKey) -> Self {
+        // SAFETY: Address (B256) and U256 have the same number of bytes
+        let uint = U256::from_be_bytes(value.0 .0);
+
+        // serialize byte by byte
+        //
+        // this is mainly so we can return an output that hive testing expects, because the
+        // `eth_getProof` implementation in geth simply mirrors the input
+        //
+        // see the use of `hexKey` in the `eth_getProof` response:
+        // <https://github.com/ethereum/go-ethereum/blob/00a73fbcce3250b87fc4160f3deddc44390848f4/internal/ethapi/api.go#L658-L690>
+        let bytes = uint.to_be_bytes_trimmed_vec();
+        let mut hex = String::with_capacity(2 + bytes.len() * 2);
+        hex.push_str("0x");
+        for byte in bytes {
+            write!(hex, "{:02x}", byte).unwrap();
+        }
+        hex
+    }
+}
+
+/// Converts a Bytes value into a B256, accepting inputs that are less than 32 bytes long. These
+/// inputs will be left padded with zeros.
+pub fn from_bytes_to_b256<'de, D>(bytes: Bytes) -> Result<B256, D::Error>
+where
+    D: Deserializer<'de>,
+{
+    if bytes.0.len() > 32 {
+        return Err(serde::de::Error::custom("input too long to be a B256"));
+    }
+
+    // left pad with zeros to 32 bytes
+    let mut padded = [0u8; 32];
+    padded[32 - bytes.0.len()..].copy_from_slice(&bytes.0);
+
+    // then convert to B256 without a panic
+    Ok(B256::from_slice(&padded))
+}
+
+/// Deserializes the input into an Option<HashMap<B256, B256>>, using [from_bytes_to_b256] which
+/// allows cropped values:
+///
+/// ```json
+///  {
+///      "0x0000000000000000000000000000000000000000000000000000000000000001": "0x22"
+///   }
+/// ```
+pub fn deserialize_storage_map<'de, D>(
+    deserializer: D,
+) -> Result<Option<HashMap<B256, B256>>, D::Error>
+where
+    D: Deserializer<'de>,
+{
+    let map = Option::<HashMap<Bytes, Bytes>>::deserialize(deserializer)?;
+    match map {
+        Some(mut map) => {
+            let mut res_map = HashMap::with_capacity(map.len());
+            for (k, v) in map.drain() {
+                let k_deserialized = from_bytes_to_b256::<'de, D>(k)?;
+                let v_deserialized = from_bytes_to_b256::<'de, D>(v)?;
+                res_map.insert(k_deserialized, v_deserialized);
+            }
+            Ok(Some(res_map))
+        }
+        None => Ok(None),
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_rpc_types/serde_helpers/u64_hex.rs.html b/src/alloy_rpc_types/serde_helpers/u64_hex.rs.html new file mode 100644 index 000000000000..84bfc853483a --- /dev/null +++ b/src/alloy_rpc_types/serde_helpers/u64_hex.rs.html @@ -0,0 +1,38 @@ +u64_hex.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+
//! Helper to deserialize an `u64` from [U64] accepting a hex quantity string with optional 0x
+//! prefix
+
+use alloy_primitives::U64;
+use serde::{Deserialize, Deserializer, Serialize, Serializer};
+
+/// Deserializes an `u64` from [U64] accepting a hex quantity string with optional 0x prefix
+pub fn deserialize<'de, D>(deserializer: D) -> Result<u64, D::Error>
+where
+    D: Deserializer<'de>,
+{
+    U64::deserialize(deserializer).map(|val| val.to())
+}
+
+/// Serializes u64 as hex string
+pub fn serialize<S: Serializer>(value: &u64, s: S) -> Result<S::Ok, S::Error> {
+    U64::from(*value).serialize(s)
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/error.rs.html b/src/alloy_signer/error.rs.html new file mode 100644 index 000000000000..433227fac03c --- /dev/null +++ b/src/alloy_signer/error.rs.html @@ -0,0 +1,178 @@ +error.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+
use alloy_primitives::hex;
+use k256::ecdsa;
+use std::fmt;
+use thiserror::Error;
+
+/// Result type alias for [`Error`](enum@Error).
+pub type Result<T, E = Error> = std::result::Result<T, E>;
+
+/// Generic error type for [`Signer`](crate::Signer) implementations.
+#[derive(Debug, Error)]
+pub enum Error {
+    /// This operation is not supported by the signer.
+    #[error("operation `{0}` is not supported by the signer")]
+    UnsupportedOperation(UnsupportedSignerOperation),
+    /// Mismatch between provided transaction chain ID and signer chain ID.
+    #[error("transaction chain ID ({tx}) does not match the signer's ({signer})")]
+    TransactionChainIdMismatch {
+        /// The signer's chain ID.
+        signer: u64,
+        /// The chain ID provided by the transaction.
+        tx: u64,
+    },
+    /// [`ecdsa`] error.
+    #[error(transparent)]
+    Ecdsa(#[from] ecdsa::Error),
+    /// [`hex`](mod@hex) error.
+    #[error(transparent)]
+    HexError(#[from] hex::FromHexError),
+    /// Generic error.
+    #[error(transparent)]
+    Other(#[from] Box<dyn std::error::Error + Send + Sync + 'static>),
+}
+
+impl Error {
+    /// Constructs a new [`Other`](Self::Other) error.
+    #[cold]
+    pub fn other(error: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
+        Self::Other(error.into())
+    }
+
+    /// Returns `true` if the error is [`UnsupportedOperation`](Self::UnsupportedOperation).
+    #[inline]
+    pub const fn is_unsupported(&self) -> bool {
+        matches!(self, Self::UnsupportedOperation(_))
+    }
+
+    /// Returns the [`UnsupportedSignerOperation`] if the error is
+    /// [`UnsupportedOperation`](Self::UnsupportedOperation).
+    #[inline]
+    pub const fn unsupported(&self) -> Option<UnsupportedSignerOperation> {
+        match self {
+            Self::UnsupportedOperation(op) => Some(*op),
+            _ => None,
+        }
+    }
+}
+
+/// An unsupported signer operation.
+#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
+pub enum UnsupportedSignerOperation {
+    /// `sign_hash` is not supported by the signer.
+    SignHash,
+    /// `sign_message` is not supported by the signer.
+    SignMessage,
+    /// `sign_transaction` is not supported by the signer.
+    SignTransaction,
+    /// `sign_typed_data` is not supported by the signer.
+    SignTypedData,
+}
+
+impl fmt::Display for UnsupportedSignerOperation {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        self.as_str().fmt(f)
+    }
+}
+
+impl UnsupportedSignerOperation {
+    /// Returns the string representation of the operation.
+    #[inline]
+    pub const fn as_str(&self) -> &'static str {
+        match self {
+            Self::SignHash => "sign_hash",
+            Self::SignMessage => "sign_message",
+            Self::SignTransaction => "sign_transaction",
+            Self::SignTypedData => "sign_typed_data",
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/lib.rs.html b/src/alloy_signer/lib.rs.html new file mode 100644 index 000000000000..233f0b44a3cd --- /dev/null +++ b/src/alloy_signer/lib.rs.html @@ -0,0 +1,92 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+mod error;
+pub use error::{Error, Result, UnsupportedSignerOperation};
+
+mod signature;
+pub use signature::Signature;
+
+mod signer;
+pub use signer::{Signer, SignerSync};
+
+mod wallet;
+#[cfg(feature = "mnemonic")]
+pub use wallet::MnemonicBuilder;
+pub use wallet::{Wallet, WalletError};
+
+pub mod utils;
+
+#[cfg(feature = "yubihsm")]
+pub use yubihsm;
+
+#[cfg(feature = "mnemonic")]
+pub use coins_bip39;
+
+/// A wallet instantiated with a locally stored private key
+pub type LocalWallet = Wallet<k256::ecdsa::SigningKey>;
+
+/// A wallet instantiated with a YubiHSM
+#[cfg(feature = "yubihsm")]
+pub type YubiWallet = Wallet<yubihsm::ecdsa::Signer<k256::Secp256k1>>;
+
\ No newline at end of file diff --git a/src/alloy_signer/signature.rs.html b/src/alloy_signer/signature.rs.html new file mode 100644 index 000000000000..13da1a28bcf8 --- /dev/null +++ b/src/alloy_signer/signature.rs.html @@ -0,0 +1,652 @@ +signature.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+
use crate::utils::{public_key_to_address, to_eip155_v};
+use alloy_primitives::{eip191_hash_message, hex, Address, B256};
+use elliptic_curve::NonZeroScalar;
+use k256::{
+    ecdsa::{self, RecoveryId, VerifyingKey},
+    Secp256k1,
+};
+use std::str::FromStr;
+
+/// An Ethereum ECDSA signature.
+///
+/// This is a wrapper around [`ecdsa::Signature`] and a [`RecoveryId`] to provide public key
+/// recovery functionality.
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub struct Signature {
+    /// The inner ECDSA signature.
+    inner: ecdsa::Signature,
+    /// The recovery ID.
+    recid: RecoveryId,
+}
+
+impl<'a> TryFrom<&'a [u8]> for Signature {
+    type Error = ecdsa::Error;
+
+    /// Parses a raw signature which is expected to be 65 bytes long where
+    /// the first 32 bytes is the `r` value, the second 32 bytes the `s` value
+    /// and the final byte is the `v` value in 'Electrum' notation.
+    fn try_from(bytes: &'a [u8]) -> Result<Self, Self::Error> {
+        if bytes.len() != 65 {
+            return Err(ecdsa::Error::new());
+        }
+        Self::from_bytes(&bytes[..64], bytes[64] as u64)
+    }
+}
+
+impl FromStr for Signature {
+    type Err = ecdsa::Error;
+
+    fn from_str(s: &str) -> Result<Self, Self::Err> {
+        match hex::decode(s) {
+            Ok(bytes) => Self::try_from(&bytes[..]),
+            Err(e) => Err(ecdsa::Error::from_source(e)),
+        }
+    }
+}
+
+impl From<&Signature> for [u8; 65] {
+    #[inline]
+    fn from(value: &Signature) -> [u8; 65] {
+        value.as_bytes()
+    }
+}
+
+impl From<Signature> for [u8; 65] {
+    #[inline]
+    fn from(value: Signature) -> [u8; 65] {
+        value.as_bytes()
+    }
+}
+
+impl From<&Signature> for Vec<u8> {
+    #[inline]
+    fn from(value: &Signature) -> Vec<u8> {
+        value.as_bytes().to_vec()
+    }
+}
+
+impl From<Signature> for Vec<u8> {
+    #[inline]
+    fn from(value: Signature) -> Vec<u8> {
+        value.as_bytes().to_vec()
+    }
+}
+
+impl Signature {
+    /// Creates a new [`Signature`] from the given ECDSA signature and recovery ID.
+    ///
+    /// Normalizes the signature into "low S" form as described in
+    /// [BIP 0062: Dealing with Malleability][1].
+    ///
+    /// [1]: https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki
+    #[inline]
+    pub fn new(inner: ecdsa::Signature, recid: RecoveryId) -> Self {
+        let mut sig = Self::new_not_normalized(inner, recid);
+        sig.normalize_s();
+        sig
+    }
+
+    /// Creates a new signature from the given inner signature and recovery ID, without normalizing
+    /// it into "low S" form.
+    #[inline]
+    pub const fn new_not_normalized(inner: ecdsa::Signature, recid: RecoveryId) -> Self {
+        Self { inner, recid }
+    }
+
+    /// Normalizes the signature into "low S" form as described in
+    /// [BIP 0062: Dealing with Malleability][1].
+    ///
+    /// [1]: https://github.com/bitcoin/bips/blob/master/bip-0062.mediawiki
+    #[inline]
+    pub fn normalize_s(&mut self) {
+        // Normalize into "low S" form. See:
+        // - https://github.com/RustCrypto/elliptic-curves/issues/988
+        // - https://github.com/bluealloy/revm/pull/870
+        if let Some(normalized) = self.inner.normalize_s() {
+            self.inner = normalized;
+            self.recid = RecoveryId::from_byte(self.recid.to_byte() ^ 1).unwrap();
+        }
+    }
+
+    /// Parses a signature from a byte slice.
+    #[inline]
+    pub fn from_bytes(bytes: &[u8], v: u64) -> Result<Self, ecdsa::Error> {
+        let inner = ecdsa::Signature::from_slice(bytes)?;
+        let recid = normalize_v(v);
+        Ok(Self::new(inner, recid))
+    }
+
+    /// Creates a [`Signature`] from the serialized `r` and `s` scalar values, which comprise the
+    /// ECDSA signature, alongside a `v` value, used to determine the recovery ID.
+    ///
+    /// See [`ecdsa::Signature::from_scalars`] for more details.
+    #[inline]
+    pub fn from_scalars(r: B256, s: B256, v: u64) -> Result<Self, ecdsa::Error> {
+        let inner = ecdsa::Signature::from_scalars(r.0, s.0)?;
+        let recid = normalize_v(v);
+        Ok(Self::new(inner, recid))
+    }
+
+    /// Returns the inner ECDSA signature.
+    #[inline]
+    pub const fn inner(&self) -> &ecdsa::Signature {
+        &self.inner
+    }
+
+    /// Returns the inner ECDSA signature.
+    #[inline]
+    pub fn inner_mut(&mut self) -> &mut ecdsa::Signature {
+        &mut self.inner
+    }
+
+    /// Returns the inner ECDSA signature.
+    #[inline]
+    pub const fn into_inner(self) -> ecdsa::Signature {
+        self.inner
+    }
+
+    /// Returns the recovery ID.
+    #[inline]
+    pub const fn recid(&self) -> RecoveryId {
+        self.recid
+    }
+
+    #[doc(hidden)]
+    #[deprecated(note = "use `Signature::recid` instead")]
+    pub const fn recovery_id(&self) -> RecoveryId {
+        self.recid
+    }
+
+    /// Returns the `r` component of this signature.
+    #[inline]
+    pub fn r(&self) -> NonZeroScalar<Secp256k1> {
+        self.inner.r()
+    }
+
+    /// Returns the `s` component of this signature.
+    #[inline]
+    pub fn s(&self) -> NonZeroScalar<Secp256k1> {
+        self.inner.s()
+    }
+
+    /// Returns the recovery ID as a `u8`.
+    #[inline]
+    pub const fn v(&self) -> u8 {
+        self.recid.to_byte()
+    }
+
+    /// Returns the byte-array representation of this signature.
+    ///
+    /// The first 32 bytes are the `r` value, the second 32 bytes the `s` value
+    /// and the final byte is the `v` value in 'Electrum' notation.
+    #[inline]
+    pub fn as_bytes(&self) -> [u8; 65] {
+        let mut sig = [0u8; 65];
+        sig[..32].copy_from_slice(self.r().to_bytes().as_ref());
+        sig[32..64].copy_from_slice(self.s().to_bytes().as_ref());
+        sig[64] = self.recid.to_byte();
+        sig
+    }
+
+    /// Sets the recovery ID.
+    #[inline]
+    pub fn set_recid(&mut self, recid: RecoveryId) {
+        self.recid = recid;
+    }
+
+    /// Sets the recovery ID by normalizing a `v` value.
+    #[inline]
+    pub fn set_v(&mut self, v: u64) {
+        self.set_recid(normalize_v(v));
+    }
+
+    /// Modifies the recovery ID by applying [EIP-155] to a `v` value.
+    ///
+    /// [EIP-155]: https://eips.ethereum.org/EIPS/eip-155
+    #[inline]
+    pub fn apply_eip155(&mut self, chain_id: u64) {
+        self.set_v(to_eip155_v(self.recid.to_byte(), chain_id));
+    }
+
+    /// Recovers an [`Address`] from this signature and the given message by first prefixing and
+    /// hashing the message according to [EIP-191](eip191_hash_message).
+    #[inline]
+    pub fn recover_address_from_msg<T: AsRef<[u8]>>(
+        &self,
+        msg: T,
+    ) -> Result<Address, ecdsa::Error> {
+        self.recover_from_msg(msg).map(|pubkey| public_key_to_address(&pubkey))
+    }
+
+    /// Recovers an [`Address`] from this signature and the given prehashed message.
+    #[inline]
+    pub fn recover_address_from_prehash(&self, prehash: &B256) -> Result<Address, ecdsa::Error> {
+        self.recover_from_prehash(prehash).map(|pubkey| public_key_to_address(&pubkey))
+    }
+
+    /// Recovers a [`VerifyingKey`] from this signature and the given message by first prefixing and
+    /// hashing the message according to [EIP-191](eip191_hash_message).
+    #[inline]
+    pub fn recover_from_msg<T: AsRef<[u8]>>(&self, msg: T) -> Result<VerifyingKey, ecdsa::Error> {
+        self.recover_from_prehash(&eip191_hash_message(msg))
+    }
+
+    /// Recovers a [`VerifyingKey`] from this signature and the given prehashed message.
+    #[inline]
+    pub fn recover_from_prehash(&self, prehash: &B256) -> Result<VerifyingKey, ecdsa::Error> {
+        VerifyingKey::recover_from_prehash(prehash.as_slice(), &self.inner, self.recid)
+    }
+}
+
+/// Normalizes a `v` value, respecting raw, legacy, and EIP-155 values.
+///
+/// This function covers the entire u64 range, producing v-values as follows:
+/// - 0-26 - raw/bare. 0-3 are legal. In order to ensure that all values are covered, we also handle
+///   4-26 here by returning v % 4.
+/// - 27-34 - legacy. 27-30 are legal. By legacy bitcoin convention range 27-30 signals uncompressed
+///   pubkeys, while 31-34 signals compressed pubkeys. We do not respect the compression convention.
+///   All Ethereum keys are uncompressed.
+/// - 35+ - EIP-155. By EIP-155 convention, `v = 35 + CHAIN_ID * 2 + 0/1` We return (v-1 % 2) here.
+///
+/// NB: raw and legacy support values 2, and 3, while EIP-155 does not.
+/// Recovery values of 2 and 3 are unlikely to occur in practice. In the vanishingly unlikely event
+/// that you encounter an EIP-155 signature with a recovery value of 2 or 3, you should normalize
+/// out of band.
+#[inline]
+const fn normalize_v(v: u64) -> RecoveryId {
+    let byte = match v {
+        // Case 1: raw/bare
+        0..=26 => (v % 4) as u8,
+        // Case 2: non-EIP-155 v value
+        27..=34 => ((v - 27) % 4) as u8,
+        // Case 3: EIP-155 V value
+        35.. => ((v - 1) % 2) as u8,
+    };
+    debug_assert!(byte <= RecoveryId::MAX);
+    match RecoveryId::from_byte(byte) {
+        Some(recid) => recid,
+        None => unsafe { core::hint::unreachable_unchecked() },
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use alloy_primitives::{address, b256};
+    use std::str::FromStr;
+
+    #[test]
+    #[cfg(TODO)] // TODO: Transaction
+    fn can_recover_tx_sender() {
+        // random mainnet tx: https://etherscan.io/tx/0x86718885c4b4218c6af87d3d0b0d83e3cc465df2a05c048aa4db9f1a6f9de91f
+        let tx_rlp = hex::decode("02f872018307910d808507204d2cb1827d0094388c818ca8b9251b393131c08a736a67ccb19297880320d04823e2701c80c001a0cf024f4815304df2867a1a74e9d2707b6abda0337d2d54a4438d453f4160f190a07ac0e6b3bc9395b5b9c8b9e6d77204a236577a5b18467b9175c01de4faa208d9").unwrap();
+        let tx: Transaction = rlp::decode(&tx_rlp).unwrap();
+        assert_eq!(tx.rlp(), tx_rlp);
+        assert_eq!(
+            tx.hash,
+            "0x86718885c4b4218c6af87d3d0b0d83e3cc465df2a05c048aa4db9f1a6f9de91f".parse().unwrap()
+        );
+        assert_eq!(tx.transaction_type, Some(2.into()));
+        let expected = Address::from_str("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5").unwrap();
+        assert_eq!(tx.recover_from().unwrap(), expected);
+    }
+
+    #[test]
+    fn can_recover_tx_sender_not_normalized() {
+        let sig = Signature::from_str("48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c8041b").unwrap();
+        let hash = b256!("5eb4f5a33c621f32a8622d5f943b6b102994dfe4e5aebbefe69bb1b2aa0fc93e");
+        let expected = address!("0f65fe9276bc9a24ae7083ae28e2660ef72df99e");
+        assert_eq!(sig.recover_address_from_prehash(&hash).unwrap(), expected);
+    }
+
+    #[test]
+    fn recover_web3_signature() {
+        // test vector taken from:
+        // https://web3js.readthedocs.io/en/v1.2.2/web3-eth-accounts.html#sign
+        let signature = Signature::from_str(
+            "b91467e570a6466aa9e9876cbcd013baba02900b8979d43fe208a4a4f339f5fd6007e74cd82e037b800186422fc2da167c747ef045e5d18a5f5d4300f8e1a0291c"
+        ).expect("could not parse signature");
+        let expected = address!("2c7536E3605D9C16a7a3D7b1898e529396a65c23");
+        assert_eq!(signature.recover_address_from_msg("Some data").unwrap(), expected);
+    }
+
+    #[test]
+    fn signature_from_str() {
+        let s1 = Signature::from_str(
+            "0xaa231fbe0ed2b5418e6ba7c19bee2522852955ec50996c02a2fe3e71d30ddaf1645baf4823fea7cb4fcc7150842493847cfb6a6d63ab93e8ee928ee3f61f503500"
+        ).expect("could not parse 0x-prefixed signature");
+
+        let s2 = Signature::from_str(
+            "aa231fbe0ed2b5418e6ba7c19bee2522852955ec50996c02a2fe3e71d30ddaf1645baf4823fea7cb4fcc7150842493847cfb6a6d63ab93e8ee928ee3f61f503500"
+        ).expect("could not parse non-prefixed signature");
+
+        assert_eq!(s1, s2);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/signer.rs.html b/src/alloy_signer/signer.rs.html new file mode 100644 index 000000000000..d1536de06d6a --- /dev/null +++ b/src/alloy_signer/signer.rs.html @@ -0,0 +1,438 @@ +signer.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+
use crate::{Result, Signature};
+use alloy_primitives::{eip191_hash_message, Address, B256};
+use async_trait::async_trait;
+use auto_impl::auto_impl;
+
+#[cfg(feature = "eip712")]
+use alloy_sol_types::{Eip712Domain, SolStruct};
+
+/// Asynchronous Ethereum signer.
+///
+/// All provided implementations rely on [`sign_hash`](Signer::sign_hash). A signer may not always
+/// be able to implement this method, in which case it should return
+/// [`UnsupportedOperation`](crate::Error::UnsupportedOperation), and implement all the signing
+/// methods directly.
+///
+/// Synchronous signers should implement both this trait and [`SignerSync`].
+#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
+#[auto_impl(&mut, Box)]
+pub trait Signer: Send + Sync {
+    /// Signs the given hash.
+    async fn sign_hash(&self, hash: &B256) -> Result<Signature>;
+
+    /// Signs the hash of the provided message after prefixing it, as specified in [EIP-191].
+    ///
+    /// [EIP-191]: https://eips.ethereum.org/EIPS/eip-191
+    #[inline]
+    async fn sign_message(&self, message: &[u8]) -> Result<Signature> {
+        self.sign_hash(&eip191_hash_message(message)).await
+    }
+
+    /// Signs the transaction.
+    #[cfg(TODO)] // TODO: TypedTransaction
+    #[inline]
+    async fn sign_transaction(&self, message: &TypedTransaction) -> Result<Signature> {
+        self.sign_hash(&message.sighash()).await
+    }
+
+    /// Encodes and signs the typed data according to [EIP-712].
+    ///
+    /// [EIP-712]: https://eips.ethereum.org/EIPS/eip-712
+    #[cfg(feature = "eip712")]
+    #[inline]
+    async fn sign_typed_data<T: SolStruct + Send + Sync>(
+        &self,
+        payload: &T,
+        domain: &Eip712Domain,
+    ) -> Result<Signature>
+    where
+        Self: Sized,
+    {
+        self.sign_hash(&payload.eip712_signing_hash(domain)).await
+    }
+
+    /// Returns the signer's Ethereum Address.
+    fn address(&self) -> Address;
+
+    /// Returns the signer's chain ID.
+    fn chain_id(&self) -> u64;
+
+    /// Sets the signer's chain ID.
+    fn set_chain_id(&mut self, chain_id: u64);
+
+    /// Sets the signer's chain ID and returns `self`.
+    #[inline]
+    #[must_use]
+    #[auto_impl(keep_default_for(&mut, Box))]
+    fn with_chain_id(mut self, chain_id: u64) -> Self
+    where
+        Self: Sized,
+    {
+        self.set_chain_id(chain_id);
+        self
+    }
+}
+
+/// Synchronous Ethereum signer.
+///
+/// All provided implementations rely on [`sign_hash_sync`](SignerSync::sign_hash_sync). A signer
+/// may not always be able to implement this method, in which case it should return
+/// [`UnsupportedOperation`](crate::Error::UnsupportedOperation), and implement all the signing
+/// methods directly.
+///
+/// Synchronous signers should also implement [`Signer`], as they are always able to by delegating
+/// the asynchronous methods to the synchronous ones.
+#[auto_impl(&, &mut, Box, Rc, Arc)]
+pub trait SignerSync {
+    /// Signs the given hash.
+    fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>;
+
+    /// Signs the hash of the provided message after prefixing it, as specified in [EIP-191].
+    ///
+    /// [EIP-191]: https://eips.ethereum.org/EIPS/eip-191
+    #[inline]
+    fn sign_message_sync(&self, message: &[u8]) -> Result<Signature> {
+        self.sign_hash_sync(&eip191_hash_message(message))
+    }
+
+    /// Signs the transaction.
+    #[cfg(TODO)] // TODO: TypedTransaction
+    #[inline]
+    fn sign_transaction_sync(&self, message: &TypedTransaction) -> Result<Signature> {
+        self.sign_hash_sync(&message.sighash())
+    }
+
+    /// Encodes and signs the typed data according to [EIP-712].
+    ///
+    /// [EIP-712]: https://eips.ethereum.org/EIPS/eip-712
+    #[cfg(feature = "eip712")]
+    #[inline]
+    fn sign_typed_data_sync<T: SolStruct>(
+        &self,
+        payload: &T,
+        domain: &Eip712Domain,
+    ) -> Result<Signature>
+    where
+        Self: Sized,
+    {
+        self.sign_hash_sync(&payload.eip712_signing_hash(domain))
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{Error, UnsupportedSignerOperation};
+    use assert_matches::assert_matches;
+
+    struct _ObjectSafe(Box<dyn Signer>, Box<dyn SignerSync>);
+
+    #[tokio::test]
+    async fn unimplemented() {
+        #[cfg(feature = "eip712")]
+        alloy_sol_types::sol! {
+            #[derive(Default)]
+            struct Eip712Data {
+                uint64 a;
+            }
+        }
+
+        async fn test_unimplemented_signer<S: Signer + SignerSync>(s: &S) {
+            test_unsized_unimplemented_signer(s).await;
+            test_unsized_unimplemented_signer_sync(s);
+
+            #[cfg(feature = "eip712")]
+            assert!(s
+                .sign_typed_data_sync(&Eip712Data::default(), &Eip712Domain::default())
+                .is_err());
+            #[cfg(feature = "eip712")]
+            assert!(s
+                .sign_typed_data(&Eip712Data::default(), &Eip712Domain::default())
+                .await
+                .is_err());
+        }
+
+        async fn test_unsized_unimplemented_signer<S: Signer + ?Sized>(s: &S) {
+            assert_matches!(
+                s.sign_hash(&B256::ZERO).await,
+                Err(Error::UnsupportedOperation(UnsupportedSignerOperation::SignHash))
+            );
+
+            assert_matches!(
+                s.sign_message(&[]).await,
+                Err(Error::UnsupportedOperation(UnsupportedSignerOperation::SignHash))
+            );
+
+            #[cfg(TODO)] // TODO: TypedTransaction
+            assert!(s.sign_transaction(&Default::default()).await.is_err());
+        }
+
+        fn test_unsized_unimplemented_signer_sync<S: SignerSync + ?Sized>(s: &S) {
+            assert_matches!(
+                s.sign_hash_sync(&B256::ZERO),
+                Err(Error::UnsupportedOperation(UnsupportedSignerOperation::SignHash))
+            );
+
+            assert_matches!(
+                s.sign_message_sync(&[]),
+                Err(Error::UnsupportedOperation(UnsupportedSignerOperation::SignHash))
+            );
+
+            #[cfg(TODO)] // TODO: TypedTransaction
+            assert!(s.sign_transaction_sync(&Default::default()).is_err());
+        }
+
+        struct UnimplementedSigner;
+
+        #[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
+        #[cfg_attr(not(target_arch = "wasm32"), async_trait)]
+        impl Signer for UnimplementedSigner {
+            async fn sign_hash(&self, _hash: &B256) -> Result<Signature> {
+                Err(Error::UnsupportedOperation(UnsupportedSignerOperation::SignHash))
+            }
+
+            fn address(&self) -> Address {
+                unimplemented!()
+            }
+
+            fn chain_id(&self) -> u64 {
+                unimplemented!()
+            }
+
+            fn set_chain_id(&mut self, _chain_id: u64) {
+                unimplemented!()
+            }
+        }
+
+        impl SignerSync for UnimplementedSigner {
+            fn sign_hash_sync(&self, _hash: &B256) -> Result<Signature> {
+                Err(Error::UnsupportedOperation(UnsupportedSignerOperation::SignHash))
+            }
+        }
+
+        test_unimplemented_signer(&UnimplementedSigner).await;
+        test_unsized_unimplemented_signer(&UnimplementedSigner as &dyn Signer).await;
+        test_unsized_unimplemented_signer_sync(&UnimplementedSigner as &dyn SignerSync);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/utils.rs.html b/src/alloy_signer/utils.rs.html new file mode 100644 index 000000000000..14a64307dfc3 --- /dev/null +++ b/src/alloy_signer/utils.rs.html @@ -0,0 +1,174 @@ +utils.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+
//! Utility functions for working with Ethereum signatures.
+
+use alloy_primitives::{keccak256, Address};
+use elliptic_curve::sec1::ToEncodedPoint;
+use k256::{
+    ecdsa::{SigningKey, VerifyingKey},
+    AffinePoint,
+};
+
+/// Applies [EIP-155](https://eips.ethereum.org/EIPS/eip-155).
+#[inline]
+pub const fn to_eip155_v(v: u8, chain_id: u64) -> u64 {
+    (v as u64) + 35 + chain_id * 2
+}
+
+/// Converts an ECDSA private key to its corresponding Ethereum Address.
+#[inline]
+pub fn secret_key_to_address(secret_key: &SigningKey) -> Address {
+    public_key_to_address(secret_key.verifying_key())
+}
+
+/// Converts an ECDSA public key to its corresponding Ethereum address.
+#[inline]
+pub fn public_key_to_address(pubkey: &VerifyingKey) -> Address {
+    let affine: &AffinePoint = pubkey.as_ref();
+    let encoded = affine.to_encoded_point(false);
+    raw_public_key_to_address(&encoded.as_bytes()[1..])
+}
+
+/// Convert a raw, uncompressed public key to its corresponding Ethereum address.
+///
+/// ### Warning
+///
+/// This method **does not** verify that the public key is valid. It is the
+/// caller's responsibility to pass a valid public key. Passing an invalid
+/// public key will produce an unspendable output.
+///
+/// # Panics
+///
+/// This function panics if the input is not **exactly** 64 bytes.
+#[inline]
+#[track_caller]
+pub fn raw_public_key_to_address(pubkey: &[u8]) -> Address {
+    assert_eq!(pubkey.len(), 64, "raw public key must be 64 bytes");
+    let digest = keccak256(pubkey);
+    Address::from_slice(&digest[12..])
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use alloy_primitives::hex;
+
+    // Only tests for correctness, no edge cases. Uses examples from https://docs.ethers.org/v5/api/utils/address/#utils-computeAddress
+    #[test]
+    fn test_public_key_to_address() {
+        let addr = "0Ac1dF02185025F65202660F8167210A80dD5086".parse::<Address>().unwrap();
+
+        // Compressed
+        let pubkey = VerifyingKey::from_sec1_bytes(
+            &hex::decode("0376698beebe8ee5c74d8cc50ab84ac301ee8f10af6f28d0ffd6adf4d6d3b9b762")
+                .unwrap(),
+        )
+        .unwrap();
+        assert_eq!(public_key_to_address(&pubkey), addr);
+
+        // Uncompressed
+        let pubkey= VerifyingKey::from_sec1_bytes(&hex::decode("0476698beebe8ee5c74d8cc50ab84ac301ee8f10af6f28d0ffd6adf4d6d3b9b762d46ca56d3dad2ce13213a6f42278dabbb53259f2d92681ea6a0b98197a719be3").unwrap()).unwrap();
+        assert_eq!(public_key_to_address(&pubkey), addr);
+    }
+
+    #[test]
+    fn test_raw_public_key_to_address() {
+        let addr = "0Ac1dF02185025F65202660F8167210A80dD5086".parse::<Address>().unwrap();
+
+        let pubkey_bytes = hex::decode("76698beebe8ee5c74d8cc50ab84ac301ee8f10af6f28d0ffd6adf4d6d3b9b762d46ca56d3dad2ce13213a6f42278dabbb53259f2d92681ea6a0b98197a719be3").unwrap();
+
+        assert_eq!(raw_public_key_to_address(&pubkey_bytes), addr);
+    }
+
+    #[test]
+    #[should_panic]
+    fn test_raw_public_key_to_address_panics() {
+        raw_public_key_to_address(&[]);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/wallet/error.rs.html b/src/alloy_signer/wallet/error.rs.html new file mode 100644 index 000000000000..92a36d1cb5f2 --- /dev/null +++ b/src/alloy_signer/wallet/error.rs.html @@ -0,0 +1,72 @@ +error.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
use alloy_primitives::hex;
+use k256::ecdsa;
+use thiserror::Error;
+
+/// Error thrown by the Wallet module.
+#[derive(Debug, Error)]
+pub enum WalletError {
+    /// [`ecdsa`] error.
+    #[error(transparent)]
+    EcdsaError(#[from] ecdsa::Error),
+    /// [`hex`](mod@hex) error.
+    #[error(transparent)]
+    HexError(#[from] hex::FromHexError),
+    /// [`std::io`] error.
+    #[error(transparent)]
+    IoError(#[from] std::io::Error),
+
+    /// [`coins_bip32`] error.
+    #[error(transparent)]
+    #[cfg(feature = "mnemonic")]
+    Bip32Error(#[from] coins_bip32::Bip32Error),
+    /// [`coins_bip39`] error.
+    #[error(transparent)]
+    #[cfg(feature = "mnemonic")]
+    Bip39Error(#[from] coins_bip39::MnemonicError),
+    /// [`MnemonicBuilder`](super::mnemonic::MnemonicBuilder) error.
+    #[error(transparent)]
+    #[cfg(feature = "mnemonic")]
+    MnemonicBuilderError(#[from] super::mnemonic::MnemonicBuilderError),
+
+    /// [`eth_keystore`] error.
+    #[cfg(feature = "keystore")]
+    #[error(transparent)]
+    EthKeystoreError(#[from] eth_keystore::KeystoreError),
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/wallet/mnemonic.rs.html b/src/alloy_signer/wallet/mnemonic.rs.html new file mode 100644 index 000000000000..db3622e4f656 --- /dev/null +++ b/src/alloy_signer/wallet/mnemonic.rs.html @@ -0,0 +1,504 @@ +mnemonic.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+
//! Specific helper functions for creating/loading a mnemonic private key following BIP-39
+//! specifications.
+
+use crate::{utils::secret_key_to_address, Wallet, WalletError};
+use coins_bip32::path::DerivationPath;
+use coins_bip39::{Mnemonic, Wordlist};
+use k256::ecdsa::SigningKey;
+use rand::Rng;
+use std::{marker::PhantomData, path::PathBuf};
+use thiserror::Error;
+
+const DEFAULT_DERIVATION_PATH_PREFIX: &str = "m/44'/60'/0'/0/";
+const DEFAULT_DERIVATION_PATH: &str = "m/44'/60'/0'/0/0";
+
+/// Represents a structure that can resolve into a `Wallet<SigningKey>`.
+#[derive(Clone, Debug, PartialEq, Eq)]
+#[must_use = "builders do nothing unless `build` is called"]
+pub struct MnemonicBuilder<W: Wordlist> {
+    /// The mnemonic phrase can be supplied to the builder as a string. A builder that has a valid
+    /// phrase should `build` the wallet.
+    phrase: Option<String>,
+    /// The mnemonic builder can also be asked to generate a new random wallet by providing the
+    /// number of words in the phrase. By default this is set to 12.
+    word_count: usize,
+    /// The derivation path at which the extended private key child will be derived at. By default
+    /// the mnemonic builder uses the path: "m/44'/60'/0'/0/0".
+    derivation_path: DerivationPath,
+    /// Optional password for the mnemonic phrase.
+    password: Option<String>,
+    /// Optional field that if enabled, writes the mnemonic phrase to disk storage at the provided
+    /// path.
+    write_to: Option<PathBuf>,
+    /// PhantomData
+    _wordlist: PhantomData<W>,
+}
+
+/// Error produced by the mnemonic wallet module
+#[derive(Debug, Error)]
+#[allow(missing_copy_implementations)]
+pub enum MnemonicBuilderError {
+    /// Error suggests that a phrase (path or words) was expected but not found.
+    #[error("expected phrase not found")]
+    ExpectedPhraseNotFound,
+    /// Error suggests that a phrase (path or words) was not expected but found.
+    #[error("unexpected phrase found")]
+    UnexpectedPhraseFound,
+}
+
+impl<W: Wordlist> Default for MnemonicBuilder<W> {
+    fn default() -> Self {
+        Self {
+            phrase: None,
+            word_count: 12usize,
+            derivation_path: DEFAULT_DERIVATION_PATH.parse().unwrap(),
+            password: None,
+            write_to: None,
+            _wordlist: PhantomData,
+        }
+    }
+}
+
+impl<W: Wordlist> MnemonicBuilder<W> {
+    /// Sets the phrase in the mnemonic builder. The phrase can either be a string or a path to
+    /// the file that contains the phrase. Once a phrase is provided, the key will be generated
+    /// deterministically by calling the `build` method.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// use alloy_signer::{MnemonicBuilder, coins_bip39::English};
+    /// # async fn foo() -> Result<(), Box<dyn std::error::Error>> {
+    ///
+    /// let wallet = MnemonicBuilder::<English>::default()
+    ///     .phrase("abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about")
+    ///     .build()?;
+    ///
+    /// # Ok(())
+    /// # }
+    /// ```
+    pub fn phrase<P: Into<String>>(mut self, phrase: P) -> Self {
+        self.phrase = Some(phrase.into());
+        self
+    }
+
+    /// Sets the word count of a mnemonic phrase to be generated at random. If the `phrase` field
+    /// is set, then `word_count` will be ignored.
+    ///
+    /// # Examples
+    ///
+    /// ```no_run
+    /// use alloy_signer::{coins_bip39::English, MnemonicBuilder};
+    ///
+    /// # async fn foo() -> Result<(), Box<dyn std::error::Error>> {
+    /// let wallet = MnemonicBuilder::<English>::default().word_count(24).build()?;
+    ///
+    /// # Ok(())
+    /// # }
+    /// ```
+    pub const fn word_count(mut self, count: usize) -> Self {
+        self.word_count = count;
+        self
+    }
+
+    /// Sets the derivation path of the child key to be derived. The derivation path is calculated
+    /// using the default derivation path prefix used in Ethereum, i.e. "m/44'/60'/0'/0/{index}".
+    pub fn index(self, index: u32) -> Result<Self, WalletError> {
+        self.derivation_path(format!("{DEFAULT_DERIVATION_PATH_PREFIX}{index}"))
+    }
+
+    /// Sets the derivation path of the child key to be derived.
+    pub fn derivation_path<T: AsRef<str>>(mut self, path: T) -> Result<Self, WalletError> {
+        self.derivation_path = path.as_ref().parse()?;
+        Ok(self)
+    }
+
+    /// Sets the password used to construct the seed from the mnemonic phrase.
+    pub fn password<T: Into<String>>(mut self, password: T) -> Self {
+        self.password = Some(password.into());
+        self
+    }
+
+    /// Sets the path to which the randomly generated phrase will be written to. This field is
+    /// ignored when building a wallet from the provided mnemonic phrase.
+    pub fn write_to<P: Into<PathBuf>>(mut self, path: P) -> Self {
+        self.write_to = Some(path.into());
+        self
+    }
+
+    /// Builds a `LocalWallet` using the parameters set in mnemonic builder. This method expects
+    /// the phrase field to be set.
+    pub fn build(&self) -> Result<Wallet<SigningKey>, WalletError> {
+        let mnemonic = match &self.phrase {
+            Some(phrase) => Mnemonic::<W>::new_from_phrase(phrase)?,
+            None => return Err(MnemonicBuilderError::ExpectedPhraseNotFound.into()),
+        };
+        self.mnemonic_to_wallet(&mnemonic)
+    }
+
+    /// Builds a `LocalWallet` using the parameters set in the mnemonic builder and constructing
+    /// the phrase using the provided random number generator.
+    pub fn build_random<R: Rng>(&self, rng: &mut R) -> Result<Wallet<SigningKey>, WalletError> {
+        let mnemonic = match &self.phrase {
+            None => Mnemonic::<W>::new_with_count(rng, self.word_count)?,
+            _ => return Err(MnemonicBuilderError::UnexpectedPhraseFound.into()),
+        };
+        let wallet = self.mnemonic_to_wallet(&mnemonic)?;
+
+        // Write the mnemonic phrase to storage if a directory has been provided.
+        if let Some(dir) = &self.write_to {
+            std::fs::write(dir.join(wallet.address.to_string()), mnemonic.to_phrase().as_bytes())?;
+        }
+
+        Ok(wallet)
+    }
+
+    fn mnemonic_to_wallet(
+        &self,
+        mnemonic: &Mnemonic<W>,
+    ) -> Result<Wallet<SigningKey>, WalletError> {
+        let derived_priv_key =
+            mnemonic.derive_key(&self.derivation_path, self.password.as_deref())?;
+        let key: &coins_bip32::prelude::SigningKey = derived_priv_key.as_ref();
+        let signer = SigningKey::from_bytes(&key.to_bytes())?;
+        let address = secret_key_to_address(&signer);
+
+        Ok(Wallet::<SigningKey> { signer, address, chain_id: 1 })
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use coins_bip39::English;
+    use tempfile::tempdir;
+
+    const TEST_DERIVATION_PATH: &str = "m/44'/60'/0'/2/1";
+
+    #[test]
+    fn mnemonic_deterministic() {
+        // Testcases have been taken from MyCryptoWallet
+        let tests = [
+            (
+                "work man father plunge mystery proud hollow address reunion sauce theory bonus",
+                0u32,
+                Some("TREZOR123"),
+                "0x431a00DA1D54c281AeF638A73121B3D153e0b0F6",
+            ),
+            (
+                "inject danger program federal spice bitter term garbage coyote breeze thought funny",
+                1u32,
+                Some("LEDGER321"),
+                "0x231a3D0a05d13FAf93078C779FeeD3752ea1350C",
+            ),
+            (
+                "fire evolve buddy tenant talent favorite ankle stem regret myth dream fresh",
+                2u32,
+                None,
+                "0x1D86AD5eBb2380dAdEAF52f61f4F428C485460E9",
+            ),
+            (
+                "thumb soda tape crunch maple fresh imitate cancel order blind denial giraffe",
+                3u32,
+                None,
+                "0xFB78b25f69A8e941036fEE2A5EeAf349D81D4ccc",
+            ),
+        ];
+        for (phrase, index, password, expected_addr) in tests {
+            let mut builder =
+                MnemonicBuilder::<English>::default().phrase(phrase).index(index).unwrap();
+            if let Some(psswd) = password {
+                builder = builder.password(psswd);
+            }
+            let wallet = builder.build().unwrap();
+            assert_eq!(&wallet.address.to_string(), expected_addr);
+        }
+    }
+
+    #[test]
+    fn mnemonic_write_read() {
+        let dir = tempdir().unwrap();
+
+        // Construct a wallet from random mnemonic phrase and write it to the temp dir.
+        let mut rng = rand::thread_rng();
+        let wallet1 = MnemonicBuilder::<English>::default()
+            .word_count(24)
+            .derivation_path(TEST_DERIVATION_PATH)
+            .unwrap()
+            .write_to(dir.as_ref())
+            .build_random(&mut rng)
+            .unwrap();
+
+        // Ensure that only one file has been created.
+        let paths = std::fs::read_dir(dir.as_ref()).unwrap();
+        assert_eq!(paths.count(), 1);
+
+        // Use the newly created mnemonic to instantiate wallet.
+        let phrase_path = dir.as_ref().join(wallet1.address.to_string());
+        let phrase = std::fs::read_to_string(phrase_path).unwrap();
+        let wallet2 = MnemonicBuilder::<English>::default()
+            .phrase(phrase)
+            .derivation_path(TEST_DERIVATION_PATH)
+            .unwrap()
+            .build()
+            .unwrap();
+
+        // Ensure that both wallets belong to the same address.
+        assert_eq!(wallet1.address, wallet2.address);
+
+        dir.close().unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/wallet/mod.rs.html b/src/alloy_signer/wallet/mod.rs.html new file mode 100644 index 000000000000..cb9bc4009e62 --- /dev/null +++ b/src/alloy_signer/wallet/mod.rs.html @@ -0,0 +1,232 @@ +mod.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+
use crate::{Result, Signature, Signer, SignerSync};
+use alloy_primitives::{Address, B256};
+use async_trait::async_trait;
+use k256::ecdsa::{self, signature::hazmat::PrehashSigner, RecoveryId};
+use std::fmt;
+
+mod error;
+pub use error::WalletError;
+
+#[cfg(feature = "mnemonic")]
+mod mnemonic;
+#[cfg(feature = "mnemonic")]
+pub use mnemonic::MnemonicBuilder;
+
+mod private_key;
+
+#[cfg(feature = "yubihsm")]
+mod yubi;
+
+/// An Ethereum private-public key pair which can be used for signing messages.
+///
+/// # Examples
+///
+/// ## Signing and Verifying a message
+///
+/// The wallet can be used to produce ECDSA [`Signature`] objects, which can be
+/// then verified. Note that this uses
+/// [`eip191_hash_message`](alloy_primitives::eip191_hash_message) under the hood which will
+/// prefix the message being hashed with the `Ethereum Signed Message` domain separator.
+///
+/// ```
+/// use alloy_signer::{LocalWallet, Signer, SignerSync};
+///
+/// let wallet = LocalWallet::random();
+///
+/// // Optionally, the wallet's chain id can be set, in order to use EIP-155
+/// // replay protection with different chains
+/// let wallet = wallet.with_chain_id(1337u64);
+///
+/// // The wallet can be used to sign messages
+/// let message = b"hello";
+/// let signature = wallet.sign_message_sync(message)?;
+/// assert_eq!(signature.recover_address_from_msg(&message[..]).unwrap(), wallet.address());
+///
+/// // LocalWallet is clonable:
+/// let wallet_clone = wallet.clone();
+/// let signature2 = wallet_clone.sign_message_sync(message)?;
+/// assert_eq!(signature, signature2);
+/// # Ok::<_, Box<dyn std::error::Error>>(())
+/// ```
+#[derive(Clone)]
+pub struct Wallet<D> {
+    /// The wallet's private key.
+    pub(crate) signer: D,
+    /// The wallet's address.
+    pub(crate) address: Address,
+    /// The wallet's chain ID (for EIP-155).
+    pub(crate) chain_id: u64,
+}
+
+#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
+impl<D: PrehashSigner<(ecdsa::Signature, RecoveryId)> + Send + Sync> Signer for Wallet<D> {
+    #[inline]
+    async fn sign_hash(&self, hash: &B256) -> Result<Signature> {
+        self.sign_hash_sync(hash)
+    }
+
+    #[inline]
+    fn address(&self) -> Address {
+        self.address
+    }
+
+    #[inline]
+    fn chain_id(&self) -> u64 {
+        self.chain_id
+    }
+
+    #[inline]
+    fn set_chain_id(&mut self, chain_id: u64) {
+        self.chain_id = chain_id;
+    }
+}
+
+impl<D: PrehashSigner<(ecdsa::Signature, RecoveryId)>> SignerSync for Wallet<D> {
+    #[inline]
+    fn sign_hash_sync(&self, hash: &B256) -> Result<Signature> {
+        let (recoverable_sig, recovery_id) = self.signer.sign_prehash(hash.as_ref())?;
+        Ok(Signature::new(recoverable_sig, recovery_id))
+    }
+}
+
+impl<D: PrehashSigner<(ecdsa::Signature, RecoveryId)> + Send + Sync> Wallet<D> {
+    /// Construct a new wallet with an external [`PrehashSigner`].
+    #[inline]
+    pub const fn new_with_signer(signer: D, address: Address, chain_id: u64) -> Self {
+        Wallet { signer, address, chain_id }
+    }
+
+    /// Returns this wallet's signer.
+    #[inline]
+    pub const fn signer(&self) -> &D {
+        &self.signer
+    }
+}
+
+// do not log the signer
+impl<D: PrehashSigner<(ecdsa::Signature, RecoveryId)>> fmt::Debug for Wallet<D> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Wallet")
+            .field("address", &self.address)
+            .field("chain_id", &self.chain_id)
+            .finish()
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/wallet/private_key.rs.html b/src/alloy_signer/wallet/private_key.rs.html new file mode 100644 index 000000000000..9772ae40d261 --- /dev/null +++ b/src/alloy_signer/wallet/private_key.rs.html @@ -0,0 +1,814 @@ +private_key.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+
//! Specific helper functions for loading an offline K256 Private Key stored on disk
+
+use super::{Wallet, WalletError};
+use crate::utils::secret_key_to_address;
+use alloy_primitives::hex;
+use k256::{
+    ecdsa::{self, SigningKey},
+    FieldBytes, SecretKey as K256SecretKey,
+};
+use rand::{CryptoRng, Rng};
+use std::str::FromStr;
+
+#[cfg(feature = "keystore")]
+use {elliptic_curve::rand_core, std::path::Path};
+
+impl Wallet<SigningKey> {
+    /// Creates a new Wallet instance from a raw scalar serialized as a byte array.
+    #[inline]
+    pub fn from_bytes(bytes: &FieldBytes) -> Result<Self, ecdsa::Error> {
+        SigningKey::from_bytes(bytes).map(Self::new_pk)
+    }
+
+    /// Creates a new Wallet instance from a raw scalar serialized as a byte slice.
+    #[inline]
+    pub fn from_slice(bytes: &[u8]) -> Result<Self, ecdsa::Error> {
+        SigningKey::from_slice(bytes).map(Self::new_pk)
+    }
+
+    /// Creates a new random keypair seeded with [`rand::thread_rng()`].
+    #[inline]
+    pub fn random() -> Self {
+        Self::random_with(&mut rand::thread_rng())
+    }
+
+    /// Creates a new random keypair seeded with the provided RNG.
+    #[inline]
+    pub fn random_with<R: Rng + CryptoRng>(rng: &mut R) -> Self {
+        Self::new_pk(SigningKey::random(rng))
+    }
+
+    #[inline]
+    fn new_pk(signer: SigningKey) -> Self {
+        let address = secret_key_to_address(&signer);
+        Self { signer, address, chain_id: 1 }
+    }
+}
+
+#[cfg(feature = "keystore")]
+impl Wallet<SigningKey> {
+    /// Creates a new random encrypted JSON with the provided password and stores it in the
+    /// provided directory. Returns a tuple (Wallet, String) of the wallet instance for the
+    /// keystore with its random UUID. Accepts an optional name for the keystore file. If `None`,
+    /// the keystore is stored as the stringified UUID.
+    #[inline]
+    pub fn new_keystore<P, R, S>(
+        dir: P,
+        rng: &mut R,
+        password: S,
+        name: Option<&str>,
+    ) -> Result<(Self, String), WalletError>
+    where
+        P: AsRef<Path>,
+        R: Rng + CryptoRng + rand_core::CryptoRng,
+        S: AsRef<[u8]>,
+    {
+        let (secret, uuid) = eth_keystore::new(dir, rng, password, name)?;
+        Ok((Self::from_slice(&secret)?, uuid))
+    }
+
+    /// Decrypts an encrypted JSON from the provided path to construct a Wallet instance
+    #[inline]
+    pub fn decrypt_keystore<P, S>(keypath: P, password: S) -> Result<Self, WalletError>
+    where
+        P: AsRef<Path>,
+        S: AsRef<[u8]>,
+    {
+        let secret = eth_keystore::decrypt_key(keypath, password)?;
+        Ok(Self::from_slice(&secret)?)
+    }
+
+    /// Creates a new encrypted JSON with the provided private key and password and stores it in the
+    /// provided directory. Returns a tuple (Wallet, String) of the wallet instance for the
+    /// keystore with its random UUID. Accepts an optional name for the keystore file. If `None`,
+    /// the keystore is stored as the stringified UUID.
+    #[inline]
+    pub fn encrypt_keystore<P, R, B, S>(
+        keypath: P,
+        rng: &mut R,
+        pk: B,
+        password: S,
+        name: Option<&str>,
+    ) -> Result<(Self, String), WalletError>
+    where
+        P: AsRef<Path>,
+        R: Rng + CryptoRng,
+        B: AsRef<[u8]>,
+        S: AsRef<[u8]>,
+    {
+        let pk = pk.as_ref();
+        let uuid = eth_keystore::encrypt_key(keypath, rng, pk, password, name)?;
+        Ok((Self::from_slice(pk)?, uuid))
+    }
+}
+
+impl PartialEq for Wallet<SigningKey> {
+    fn eq(&self, other: &Self) -> bool {
+        self.signer.to_bytes().eq(&other.signer.to_bytes())
+            && self.address == other.address
+            && self.chain_id == other.chain_id
+    }
+}
+
+impl From<SigningKey> for Wallet<SigningKey> {
+    fn from(value: SigningKey) -> Self {
+        Self::new_pk(value)
+    }
+}
+
+impl From<K256SecretKey> for Wallet<SigningKey> {
+    fn from(value: K256SecretKey) -> Self {
+        Self::new_pk(value.into())
+    }
+}
+
+impl FromStr for Wallet<SigningKey> {
+    type Err = WalletError;
+
+    fn from_str(src: &str) -> Result<Self, Self::Err> {
+        let array = hex::decode_to_array::<_, 32>(src)?;
+        Ok(Self::from_slice(&array)?)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{LocalWallet, SignerSync};
+    use alloy_primitives::address;
+
+    #[cfg(feature = "keystore")]
+    use {std::path::Path, tempfile::tempdir};
+
+    #[test]
+    fn parse_pk() {
+        let s = "6f142508b4eea641e33cb2a0161221105086a84584c74245ca463a49effea30b";
+        let _pk: Wallet<SigningKey> = s.parse().unwrap();
+    }
+
+    #[test]
+    fn parse_short_key() {
+        let s = "6f142508b4eea641e33cb2a0161221105086a84584c74245ca463a49effea3";
+        assert!(s.len() < 64);
+        let pk = s.parse::<LocalWallet>().unwrap_err();
+        match pk {
+            WalletError::HexError(hex::FromHexError::InvalidStringLength) => {}
+            _ => panic!("Unexpected error"),
+        }
+    }
+
+    #[cfg(feature = "keystore")]
+    fn test_encrypted_json_keystore(key: Wallet<SigningKey>, uuid: &str, dir: &Path) {
+        // sign a message using the given key
+        let message = "Some data";
+        let signature = key.sign_message_sync(message.as_bytes()).unwrap();
+
+        // read from the encrypted JSON keystore and decrypt it, while validating that the
+        // signatures produced by both the keys should match
+        let path = Path::new(dir).join(uuid);
+        let key2 = Wallet::<SigningKey>::decrypt_keystore(path.clone(), "randpsswd").unwrap();
+
+        let signature2 = key2.sign_message_sync(message.as_bytes()).unwrap();
+        assert_eq!(signature, signature2);
+
+        std::fs::remove_file(&path).unwrap();
+    }
+
+    #[test]
+    #[cfg(feature = "keystore")]
+    fn encrypted_json_keystore_new() {
+        // create and store an encrypted JSON keystore in this directory
+        let dir = tempdir().unwrap();
+        let mut rng = rand::thread_rng();
+        let (key, uuid) =
+            Wallet::<SigningKey>::new_keystore(&dir, &mut rng, "randpsswd", None).unwrap();
+
+        test_encrypted_json_keystore(key, &uuid, dir.path());
+    }
+
+    #[test]
+    #[cfg(feature = "keystore")]
+    fn encrypted_json_keystore_from_pk() {
+        // create and store an encrypted JSON keystore in this directory
+        let dir = tempdir().unwrap();
+        let mut rng = rand::thread_rng();
+
+        let private_key =
+            hex::decode("6f142508b4eea641e33cb2a0161221105086a84584c74245ca463a49effea30b")
+                .unwrap();
+
+        let (key, uuid) =
+            Wallet::<SigningKey>::encrypt_keystore(&dir, &mut rng, private_key, "randpsswd", None)
+                .unwrap();
+
+        test_encrypted_json_keystore(key, &uuid, dir.path());
+    }
+
+    #[test]
+    fn signs_msg() {
+        let message = "Some data";
+        let hash = alloy_primitives::utils::eip191_hash_message(message);
+        let key = Wallet::<SigningKey>::random_with(&mut rand::thread_rng());
+        let address = key.address;
+
+        // sign a message
+        let signature = key.sign_message_sync(message.as_bytes()).unwrap();
+
+        // ecrecover via the message will hash internally
+        let recovered = signature.recover_address_from_msg(message).unwrap();
+        assert_eq!(recovered, address);
+
+        // if provided with a hash, it will skip hashing
+        let recovered2 = signature.recover_address_from_prehash(&hash).unwrap();
+        assert_eq!(recovered2, address);
+    }
+
+    #[tokio::test]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    async fn signs_tx() {
+        // retrieved test vector from:
+        // https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html#eth-accounts-signtransaction
+        let tx: TypedTransaction = TransactionRequest {
+            from: None,
+            to: Some("F0109fC8DF283027b6285cc889F5aA624EaC1F55".parse::<Address>().unwrap().into()),
+            value: Some(1_000_000_000.into()),
+            gas: Some(2_000_000.into()),
+            nonce: Some(0.into()),
+            gas_price: Some(21_000_000_000u128.into()),
+            data: None,
+            chain_id: Some(U64::one()),
+        }
+        .into();
+        let wallet: Wallet<SigningKey> =
+            "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318".parse().unwrap();
+        let wallet = wallet.with_chain_id(tx.chain_id().unwrap().as_u64());
+
+        let sig = wallet.sign_transaction(&tx).await.unwrap();
+        let sighash = tx.sighash();
+        sig.verify(sighash, wallet.address).unwrap();
+    }
+
+    #[tokio::test]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    async fn signs_tx_empty_chain_id() {
+        // retrieved test vector from:
+        // https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html#eth-accounts-signtransaction
+        let tx: TypedTransaction = TransactionRequest {
+            from: None,
+            to: Some("F0109fC8DF283027b6285cc889F5aA624EaC1F55".parse::<Address>().unwrap().into()),
+            value: Some(1_000_000_000.into()),
+            gas: Some(2_000_000.into()),
+            nonce: Some(0.into()),
+            gas_price: Some(21_000_000_000u128.into()),
+            data: None,
+            chain_id: None,
+        }
+        .into();
+        let wallet: Wallet<SigningKey> =
+            "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318".parse().unwrap();
+        let wallet = wallet.with_chain_id(1u64);
+
+        // this should populate the tx chain_id as the signer's chain_id (1) before signing
+        let sig = wallet.sign_transaction(&tx).await.unwrap();
+
+        // since we initialize with None we need to re-set the chain_id for the sighash to be
+        // correct
+        let mut tx = tx;
+        tx.set_chain_id(1);
+        let sighash = tx.sighash();
+        sig.verify(sighash, wallet.address).unwrap();
+    }
+
+    #[test]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    fn signs_tx_empty_chain_id_sync() {
+        let chain_id = 1337u64;
+        // retrieved test vector from:
+        // https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html#eth-accounts-signtransaction
+        let tx: TypedTransaction = TransactionRequest {
+            from: None,
+            to: Some("F0109fC8DF283027b6285cc889F5aA624EaC1F55".parse::<Address>().unwrap().into()),
+            value: Some(1_000_000_000u64.into()),
+            gas: Some(2_000_000u64.into()),
+            nonce: Some(0u64.into()),
+            gas_price: Some(21_000_000_000u128.into()),
+            data: None,
+            chain_id: None,
+        }
+        .into();
+        let wallet: Wallet<SigningKey> =
+            "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318".parse().unwrap();
+        let wallet = wallet.with_chain_id(chain_id);
+
+        // this should populate the tx chain_id as the signer's chain_id (1337) before signing and
+        // normalize the v
+        let sig = wallet.sign_transaction_sync(&tx).unwrap();
+
+        // ensure correct v given the chain - first extract recid
+        let recid = (sig.v - 35) % 2;
+        // eip155 check
+        assert_eq!(sig.v, chain_id * 2 + 35 + recid);
+
+        // since we initialize with None we need to re-set the chain_id for the sighash to be
+        // correct
+        let mut tx = tx;
+        tx.set_chain_id(chain_id);
+        let sighash = tx.sighash();
+        sig.verify(sighash, wallet.address).unwrap();
+    }
+
+    #[test]
+    #[cfg(feature = "eip712")]
+    fn typed_data() {
+        use crate::Signer;
+        use alloy_primitives::{keccak256, Address, I256, U256};
+        use alloy_sol_types::{eip712_domain, sol, SolStruct};
+
+        sol! {
+            #[derive(Debug)]
+            struct FooBar {
+                int256 foo;
+                uint256 bar;
+                bytes fizz;
+                bytes32 buzz;
+                string far;
+                address out;
+            }
+        }
+
+        let domain = eip712_domain! {
+            name: "Eip712Test",
+            version: "1",
+            chain_id: 1,
+            verifying_contract: address!("0000000000000000000000000000000000000001"),
+            salt: keccak256("eip712-test-75F0CCte"),
+        };
+        let foo_bar = FooBar {
+            foo: I256::try_from(10u64).unwrap(),
+            bar: U256::from(20u64),
+            fizz: b"fizz".into(),
+            buzz: keccak256("buzz"),
+            far: String::from("space"),
+            out: Address::ZERO,
+        };
+        let wallet = Wallet::random();
+        let hash = foo_bar.eip712_signing_hash(&domain);
+        let sig = wallet.sign_typed_data_sync(&foo_bar, &domain).unwrap();
+        assert_eq!(sig.recover_address_from_prehash(&hash).unwrap(), wallet.address());
+        assert_eq!(wallet.sign_hash_sync(&hash).unwrap(), sig);
+    }
+
+    #[test]
+    fn key_to_address() {
+        let wallet: Wallet<SigningKey> =
+            "0000000000000000000000000000000000000000000000000000000000000001".parse().unwrap();
+        assert_eq!(wallet.address, address!("7E5F4552091A69125d5DfCb7b8C2659029395Bdf"));
+
+        let wallet: Wallet<SigningKey> =
+            "0000000000000000000000000000000000000000000000000000000000000002".parse().unwrap();
+        assert_eq!(wallet.address, address!("2B5AD5c4795c026514f8317c7a215E218DcCD6cF"));
+
+        let wallet: Wallet<SigningKey> =
+            "0000000000000000000000000000000000000000000000000000000000000003".parse().unwrap();
+        assert_eq!(wallet.address, address!("6813Eb9362372EEF6200f3b1dbC3f819671cBA69"));
+    }
+
+    #[test]
+    fn key_from_bytes() {
+        let wallet: Wallet<SigningKey> =
+            "0000000000000000000000000000000000000000000000000000000000000001".parse().unwrap();
+
+        let key_as_bytes = wallet.signer.to_bytes();
+        let wallet_from_bytes = Wallet::from_bytes(&key_as_bytes).unwrap();
+
+        assert_eq!(wallet.address, wallet_from_bytes.address);
+        assert_eq!(wallet.chain_id, wallet_from_bytes.chain_id);
+        assert_eq!(wallet.signer, wallet_from_bytes.signer);
+    }
+
+    #[test]
+    fn key_from_str() {
+        let wallet: Wallet<SigningKey> =
+            "0000000000000000000000000000000000000000000000000000000000000001".parse().unwrap();
+
+        // Check FromStr and `0x`
+        let wallet_0x: Wallet<SigningKey> =
+            "0x0000000000000000000000000000000000000000000000000000000000000001".parse().unwrap();
+        assert_eq!(wallet.address, wallet_0x.address);
+        assert_eq!(wallet.chain_id, wallet_0x.chain_id);
+        assert_eq!(wallet.signer, wallet_0x.signer);
+
+        // Must fail because of `0z`
+        "0z0000000000000000000000000000000000000000000000000000000000000001"
+            .parse::<Wallet<SigningKey>>()
+            .unwrap_err();
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer/wallet/yubi.rs.html b/src/alloy_signer/wallet/yubi.rs.html new file mode 100644 index 000000000000..3bc77c94c1a3 --- /dev/null +++ b/src/alloy_signer/wallet/yubi.rs.html @@ -0,0 +1,218 @@ +yubi.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+
//! Helpers for creating wallets for YubiHSM2.
+
+use super::Wallet;
+use crate::utils::raw_public_key_to_address;
+use elliptic_curve::sec1::{FromEncodedPoint, ToEncodedPoint};
+use k256::{PublicKey, Secp256k1};
+use yubihsm::{
+    asymmetric::Algorithm::EcK256, ecdsa::Signer as YubiSigner, object, object::Label, Capability,
+    Client, Connector, Credentials, Domain,
+};
+
+impl Wallet<YubiSigner<Secp256k1>> {
+    /// Connects to a yubi key's ECDSA account at the provided id
+    pub fn connect(connector: Connector, credentials: Credentials, id: object::Id) -> Self {
+        let client = Client::open(connector, credentials, true).unwrap();
+        let signer = YubiSigner::create(client, id).unwrap();
+        signer.into()
+    }
+
+    /// Creates a new random ECDSA keypair on the yubi at the provided id
+    pub fn new(
+        connector: Connector,
+        credentials: Credentials,
+        id: object::Id,
+        label: Label,
+        domain: Domain,
+    ) -> Self {
+        let client = Client::open(connector, credentials, true).unwrap();
+        let id = client
+            .generate_asymmetric_key(id, label, domain, Capability::SIGN_ECDSA, EcK256)
+            .unwrap();
+        let signer = YubiSigner::create(client, id).unwrap();
+        signer.into()
+    }
+
+    /// Uploads the provided keypair on the yubi at the provided id
+    pub fn from_key(
+        connector: Connector,
+        credentials: Credentials,
+        id: object::Id,
+        label: Label,
+        domain: Domain,
+        key: impl Into<Vec<u8>>,
+    ) -> Self {
+        let client = Client::open(connector, credentials, true).unwrap();
+        let id = client
+            .put_asymmetric_key(id, label, domain, Capability::SIGN_ECDSA, EcK256, key)
+            .unwrap();
+        let signer = YubiSigner::create(client, id).unwrap();
+        signer.into()
+    }
+}
+
+impl From<YubiSigner<Secp256k1>> for Wallet<YubiSigner<Secp256k1>> {
+    fn from(signer: YubiSigner<Secp256k1>) -> Self {
+        // Uncompress the public key.
+        let pubkey = PublicKey::from_encoded_point(signer.public_key()).unwrap();
+        let pubkey = pubkey.to_encoded_point(false);
+        let bytes = pubkey.as_bytes();
+        debug_assert_eq!(bytes[0], 0x04);
+        let address = raw_public_key_to_address(&bytes[1..]);
+        Self::new_with_signer(signer, address, 1)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{Signer, SignerSync};
+    use alloy_primitives::{address, hex};
+
+    #[test]
+    fn from_key() {
+        let key = hex::decode("2d8c44dc2dd2f0bea410e342885379192381e82d855b1b112f9b55544f1e0900")
+            .unwrap();
+
+        let connector = yubihsm::Connector::mockhsm();
+        let wallet = Wallet::from_key(
+            connector,
+            Credentials::default(),
+            0,
+            Label::from_bytes(&[]).unwrap(),
+            Domain::at(1).unwrap(),
+            key,
+        );
+
+        let msg = "Some data";
+        let sig = wallet.sign_message_sync(msg.as_bytes()).unwrap();
+        assert_eq!(sig.recover_address_from_msg(msg).unwrap(), wallet.address());
+        assert_eq!(wallet.address(), address!("2DE2C386082Cff9b28D62E60983856CE1139eC49"));
+    }
+
+    #[test]
+    fn new_key() {
+        let connector = yubihsm::Connector::mockhsm();
+        let wallet = Wallet::<YubiSigner<Secp256k1>>::new(
+            connector,
+            Credentials::default(),
+            0,
+            Label::from_bytes(&[]).unwrap(),
+            Domain::at(1).unwrap(),
+        );
+
+        let msg = "Some data";
+        let sig = wallet.sign_message_sync(msg.as_bytes()).unwrap();
+        assert_eq!(sig.recover_address_from_msg(msg).unwrap(), wallet.address());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer_aws/lib.rs.html b/src/alloy_signer_aws/lib.rs.html new file mode 100644 index 000000000000..151e28f232f0 --- /dev/null +++ b/src/alloy_signer_aws/lib.rs.html @@ -0,0 +1,46 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+#[macro_use]
+extern crate tracing;
+
+mod signer;
+pub use signer::{AwsSigner, AwsSignerError};
+
\ No newline at end of file diff --git a/src/alloy_signer_aws/signer.rs.html b/src/alloy_signer_aws/signer.rs.html new file mode 100644 index 000000000000..13c27c0683f8 --- /dev/null +++ b/src/alloy_signer_aws/signer.rs.html @@ -0,0 +1,540 @@ +signer.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+
use alloy_primitives::{hex, Address, B256};
+use alloy_signer::{Result, Signature, Signer};
+use async_trait::async_trait;
+use aws_sdk_kms::{
+    error::SdkError,
+    operation::{
+        get_public_key::{GetPublicKeyError, GetPublicKeyOutput},
+        sign::{SignError, SignOutput},
+    },
+    primitives::Blob,
+    types::{MessageType, SigningAlgorithmSpec},
+    Client,
+};
+use k256::ecdsa::{self, RecoveryId, VerifyingKey};
+use std::fmt;
+
+/// Amazon Web Services Key Management Service (AWS KMS) Ethereum signer.
+///
+/// The AWS Signer passes signing requests to the cloud service. AWS KMS keys are identified by a
+/// UUID, the `key_id`.
+///
+/// Because the public key is unknown, we retrieve it on instantiation of the signer. This means
+/// that the new function is `async` and must be called within some runtime.
+///
+/// Note that this signer only supports asynchronous operations. Calling a non-asynchronous method
+/// will always return an error.
+///
+/// # Examples
+///
+/// ```no_run
+/// use alloy_signer::Signer;
+/// use alloy_signer_aws::AwsSigner;
+/// use aws_config::BehaviorVersion;
+///
+/// # async fn test() {
+/// let config = aws_config::load_defaults(BehaviorVersion::latest()).await;
+/// let client = aws_sdk_kms::Client::new(&config);
+///
+/// let key_id = "...".to_string();
+/// let chain_id = 1;
+/// let signer = AwsSigner::new(client, key_id, chain_id).await.unwrap();
+///
+/// let message = vec![0, 1, 2, 3];
+///
+/// let sig = signer.sign_message(&message).await.unwrap();
+/// assert_eq!(sig.recover_address_from_msg(message).unwrap(), signer.address());
+/// # }
+/// ```
+#[derive(Clone)]
+pub struct AwsSigner {
+    kms: Client,
+    chain_id: u64,
+    key_id: String,
+    pubkey: VerifyingKey,
+    address: Address,
+}
+
+impl fmt::Debug for AwsSigner {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("AwsSigner")
+            .field("key_id", &self.key_id)
+            .field("chain_id", &self.chain_id)
+            .field("pubkey", &hex::encode(self.pubkey.to_sec1_bytes()))
+            .field("address", &self.address)
+            .finish()
+    }
+}
+
+/// Errors thrown by [`AwsSigner`].
+#[derive(thiserror::Error, Debug)]
+pub enum AwsSignerError {
+    /// Thrown when the AWS KMS API returns a signing error.
+    #[error(transparent)]
+    Sign(#[from] SdkError<SignError>),
+    /// Thrown when the AWS KMS API returns an error.
+    #[error(transparent)]
+    GetPublicKey(#[from] SdkError<GetPublicKeyError>),
+    /// [`ecdsa`] error.
+    #[error(transparent)]
+    K256(#[from] ecdsa::Error),
+    /// [`spki`] error.
+    #[error(transparent)]
+    Spki(#[from] spki::Error),
+    /// [`hex`](mod@hex) error.
+    #[error(transparent)]
+    Hex(#[from] hex::FromHexError),
+    /// Thrown when the AWS KMS API returns a response without a signature.
+    #[error("signature not found in response")]
+    SignatureNotFound,
+    /// Thrown when the AWS KMS API returns a response without a public key.
+    #[error("public key not found in response")]
+    PublicKeyNotFound,
+}
+
+#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
+impl Signer for AwsSigner {
+    #[instrument(err)]
+    #[allow(clippy::blocks_in_conditions)]
+    async fn sign_hash(&self, hash: &B256) -> Result<Signature> {
+        self.sign_digest_with_eip155(hash, self.chain_id).await.map_err(alloy_signer::Error::other)
+    }
+
+    #[cfg(TODO)] // TODO: TypedTransaction
+    #[instrument(err)]
+    async fn sign_transaction(&self, tx: &TypedTransaction) -> Result<Signature> {
+        let mut tx_with_chain = tx.clone();
+        let chain_id = tx_with_chain.chain_id().map(|id| id.as_u64()).unwrap_or(self.chain_id);
+        tx_with_chain.set_chain_id(chain_id);
+
+        let sighash = tx_with_chain.sighash();
+        self.sign_digest_with_eip155(sighash, chain_id).await
+    }
+
+    #[inline]
+    fn address(&self) -> Address {
+        self.address
+    }
+
+    #[inline]
+    fn chain_id(&self) -> u64 {
+        self.chain_id
+    }
+
+    #[inline]
+    fn set_chain_id(&mut self, chain_id: u64) {
+        self.chain_id = chain_id;
+    }
+}
+
+impl AwsSigner {
+    /// Instantiate a new signer from an existing `Client` and key ID.
+    ///
+    /// Retrieves the public key from AWS and calculates the Ethereum address.
+    #[instrument(skip(kms), err)]
+    pub async fn new(
+        kms: Client,
+        key_id: String,
+        chain_id: u64,
+    ) -> Result<AwsSigner, AwsSignerError> {
+        let resp = request_get_pubkey(&kms, key_id.clone()).await?;
+        let pubkey = decode_pubkey(resp)?;
+        let address = alloy_signer::utils::public_key_to_address(&pubkey);
+        debug!(?pubkey, %address, "instantiated AWS signer");
+        Ok(Self { kms, chain_id, key_id, pubkey, address })
+    }
+
+    /// Fetch the pubkey associated with a key ID.
+    pub async fn get_pubkey_for_key(&self, key_id: String) -> Result<VerifyingKey, AwsSignerError> {
+        request_get_pubkey(&self.kms, key_id).await.and_then(decode_pubkey)
+    }
+
+    /// Fetch the pubkey associated with this signer's key ID.
+    pub async fn get_pubkey(&self) -> Result<VerifyingKey, AwsSignerError> {
+        self.get_pubkey_for_key(self.key_id.clone()).await
+    }
+
+    /// Sign a digest with the key associated with a key ID.
+    pub async fn sign_digest_with_key(
+        &self,
+        key_id: String,
+        digest: &B256,
+    ) -> Result<ecdsa::Signature, AwsSignerError> {
+        request_sign_digest(&self.kms, key_id, digest).await.and_then(decode_signature)
+    }
+
+    /// Sign a digest with this signer's key
+    pub async fn sign_digest(&self, digest: &B256) -> Result<ecdsa::Signature, AwsSignerError> {
+        self.sign_digest_with_key(self.key_id.clone(), digest).await
+    }
+
+    /// Sign a digest with this signer's key and add the eip155 `v` value
+    /// corresponding to the input chain_id
+    #[instrument(err, skip(digest), fields(digest = %hex::encode(digest)))]
+    async fn sign_digest_with_eip155(
+        &self,
+        digest: &B256,
+        chain_id: u64,
+    ) -> Result<Signature, AwsSignerError> {
+        let sig = self.sign_digest(digest).await?;
+        let mut sig = sig_from_digest_bytes_trial_recovery(sig, digest, &self.pubkey);
+        sig.apply_eip155(chain_id);
+        Ok(sig)
+    }
+}
+
+#[instrument(skip(kms), err)]
+async fn request_get_pubkey(
+    kms: &Client,
+    key_id: String,
+) -> Result<GetPublicKeyOutput, AwsSignerError> {
+    kms.get_public_key().key_id(key_id).send().await.map_err(Into::into)
+}
+
+#[instrument(skip(kms, digest), fields(digest = %hex::encode(digest)), err)]
+async fn request_sign_digest(
+    kms: &Client,
+    key_id: String,
+    digest: &B256,
+) -> Result<SignOutput, AwsSignerError> {
+    kms.sign()
+        .key_id(key_id)
+        .message(Blob::new(digest.as_slice()))
+        .message_type(MessageType::Digest)
+        .signing_algorithm(SigningAlgorithmSpec::EcdsaSha256)
+        .send()
+        .await
+        .map_err(Into::into)
+}
+
+/// Decode an AWS KMS Pubkey response.
+fn decode_pubkey(resp: GetPublicKeyOutput) -> Result<VerifyingKey, AwsSignerError> {
+    let raw = resp.public_key.as_ref().ok_or(AwsSignerError::PublicKeyNotFound)?;
+    let spki = spki::SubjectPublicKeyInfoRef::try_from(raw.as_ref())?;
+    let key = VerifyingKey::from_sec1_bytes(spki.subject_public_key.raw_bytes())?;
+    Ok(key)
+}
+
+/// Decode an AWS KMS Signature response.
+fn decode_signature(resp: SignOutput) -> Result<ecdsa::Signature, AwsSignerError> {
+    let raw = resp.signature.as_ref().ok_or(AwsSignerError::SignatureNotFound)?;
+    let sig = ecdsa::Signature::from_der(raw.as_ref())?;
+    Ok(sig.normalize_s().unwrap_or(sig))
+}
+
+/// Recover an rsig from a signature under a known key by trial/error.
+fn sig_from_digest_bytes_trial_recovery(
+    sig: ecdsa::Signature,
+    hash: &B256,
+    pubkey: &VerifyingKey,
+) -> Signature {
+    let mut signature = Signature::new(sig, RecoveryId::from_byte(0).unwrap());
+    if check_candidate(&signature, hash, pubkey) {
+        return signature;
+    }
+
+    signature.set_v(1);
+    if check_candidate(&signature, hash, pubkey) {
+        return signature;
+    }
+
+    panic!("bad sig");
+}
+
+/// Makes a trial recovery to check whether an RSig corresponds to a known `VerifyingKey`.
+fn check_candidate(signature: &Signature, hash: &B256, pubkey: &VerifyingKey) -> bool {
+    signature.recover_from_prehash(hash).map(|key| key == *pubkey).unwrap_or(false)
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use aws_config::BehaviorVersion;
+
+    #[tokio::test]
+    async fn sign_message() {
+        let Ok(key_id) = std::env::var("AWS_KEY_ID") else { return };
+        let config = aws_config::load_defaults(BehaviorVersion::latest()).await;
+        let client = aws_sdk_kms::Client::new(&config);
+
+        let chain_id = 1;
+        let signer = AwsSigner::new(client, key_id, chain_id).await.unwrap();
+
+        let message = vec![0, 1, 2, 3];
+
+        let sig = signer.sign_message(&message).await.unwrap();
+        assert_eq!(sig.recover_address_from_msg(message).unwrap(), signer.address());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer_ledger/lib.rs.html b/src/alloy_signer_ledger/lib.rs.html new file mode 100644 index 000000000000..5a1aed3898cc --- /dev/null +++ b/src/alloy_signer_ledger/lib.rs.html @@ -0,0 +1,60 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+#[macro_use]
+extern crate tracing;
+
+mod signer;
+pub use signer::LedgerSigner;
+
+mod types;
+pub use types::{DerivationType as HDPath, LedgerError};
+
+#[doc(hidden)]
+#[deprecated(note = "use `LedgerSigner` instead")]
+pub type Ledger = LedgerSigner;
+
\ No newline at end of file diff --git a/src/alloy_signer_ledger/signer.rs.html b/src/alloy_signer_ledger/signer.rs.html new file mode 100644 index 000000000000..c1ff1b0613e6 --- /dev/null +++ b/src/alloy_signer_ledger/signer.rs.html @@ -0,0 +1,756 @@ +signer.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+
//! Ledger Ethereum app wrapper.
+
+use crate::types::{DerivationType, LedgerError, INS, P1, P1_FIRST, P2};
+use alloy_primitives::{hex, Address, B256};
+use alloy_signer::{Result, Signature, Signer};
+use async_trait::async_trait;
+use coins_ledger::{
+    common::{APDUCommand, APDUData},
+    transports::{Ledger, LedgerAsync},
+};
+use futures_util::lock::Mutex;
+
+#[cfg(feature = "eip712")]
+use alloy_sol_types::{Eip712Domain, SolStruct};
+
+/// A Ledger Ethereum signer.
+///
+/// This is a simple wrapper around the [Ledger transport](Ledger).
+///
+/// Note that this signer only supports asynchronous operations. Calling a non-asynchronous method
+/// will always return an error.
+#[derive(Debug)]
+pub struct LedgerSigner {
+    transport: Mutex<Ledger>,
+    derivation: DerivationType,
+    pub(crate) chain_id: u64,
+    pub(crate) address: Address,
+}
+
+impl std::fmt::Display for LedgerSigner {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(
+            f,
+            "LedgerApp. Key at index {} with address {:?} on chain_id {}",
+            self.derivation, self.address, self.chain_id
+        )
+    }
+}
+
+#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
+impl Signer for LedgerSigner {
+    async fn sign_hash(&self, _hash: &B256) -> Result<Signature> {
+        Err(alloy_signer::Error::UnsupportedOperation(
+            alloy_signer::UnsupportedSignerOperation::SignHash,
+        ))
+    }
+
+    #[inline]
+    async fn sign_message(&self, message: &[u8]) -> Result<Signature> {
+        let mut payload = Self::path_to_bytes(&self.derivation);
+        payload.extend_from_slice(&(message.len() as u32).to_be_bytes());
+        payload.extend_from_slice(message);
+
+        self.sign_payload(INS::SIGN_PERSONAL_MESSAGE, &payload)
+            .await
+            .map_err(alloy_signer::Error::other)
+    }
+
+    #[cfg(TODO)] // TODO: TypedTransaction
+    #[inline]
+    async fn sign_transaction(&self, tx: &TypedTransaction) -> Result<Signature> {
+        self.sign_tx(&tx).await.map_err(alloy_signer::Error::other)
+    }
+
+    #[cfg(feature = "eip712")]
+    #[inline]
+    async fn sign_typed_data<T: SolStruct + Send + Sync>(
+        &self,
+        payload: &T,
+        domain: &Eip712Domain,
+    ) -> Result<Signature> {
+        self.sign_typed_data_(payload, domain).await.map_err(alloy_signer::Error::other)
+    }
+
+    #[inline]
+    fn address(&self) -> Address {
+        self.address
+    }
+
+    #[inline]
+    fn chain_id(&self) -> u64 {
+        self.chain_id
+    }
+
+    #[inline]
+    fn set_chain_id(&mut self, chain_id: u64) {
+        self.chain_id = chain_id;
+    }
+}
+
+impl LedgerSigner {
+    /// Instantiate the application by acquiring a lock on the ledger device.
+    ///
+    /// # Examples
+    ///
+    /// ```
+    /// # async fn foo() -> Result<(), Box<dyn std::error::Error>> {
+    /// use alloy_signer_ledger::{HDPath, Ledger};
+    ///
+    /// let ledger = Ledger::new(HDPath::LedgerLive(0), 1).await?;
+    /// # Ok(())
+    /// # }
+    /// ```
+    pub async fn new(derivation: DerivationType, chain_id: u64) -> Result<Self, LedgerError> {
+        let transport = Ledger::init().await?;
+        let address = Self::get_address_with_path_transport(&transport, &derivation).await?;
+
+        Ok(Self { transport: Mutex::new(transport), derivation, chain_id, address })
+    }
+
+    /// Get the account which corresponds to our derivation path
+    pub async fn get_address(&self) -> Result<Address, LedgerError> {
+        self.get_address_with_path(&self.derivation).await
+    }
+
+    /// Gets the account which corresponds to the provided derivation path
+    pub async fn get_address_with_path(
+        &self,
+        derivation: &DerivationType,
+    ) -> Result<Address, LedgerError> {
+        let transport = self.transport.lock().await;
+        Self::get_address_with_path_transport(&transport, derivation).await
+    }
+
+    #[instrument(skip(transport))]
+    async fn get_address_with_path_transport(
+        transport: &Ledger,
+        derivation: &DerivationType,
+    ) -> Result<Address, LedgerError> {
+        let data = APDUData::new(&Self::path_to_bytes(derivation));
+
+        let command = APDUCommand {
+            ins: INS::GET_PUBLIC_KEY as u8,
+            p1: P1::NON_CONFIRM as u8,
+            p2: P2::NO_CHAINCODE as u8,
+            data,
+            response_len: None,
+        };
+
+        debug!("Dispatching get_address request to ethereum app");
+        let answer = transport.exchange(&command).await?;
+        let result = answer.data().ok_or(LedgerError::UnexpectedNullResponse)?;
+
+        let address = {
+            // extract the address from the response
+            let offset = 1 + result[0] as usize;
+            let address_str = &result[offset + 1..offset + 1 + result[offset] as usize];
+            let mut address = [0; 20];
+            address.copy_from_slice(&hex::decode(address_str)?);
+            Address::from(address)
+        };
+        debug!(?address, "Received address from device");
+        Ok(address)
+    }
+
+    /// Returns the semver of the Ethereum ledger app
+    pub async fn version(&self) -> Result<semver::Version, LedgerError> {
+        let transport = self.transport.lock().await;
+
+        let command = APDUCommand {
+            ins: INS::GET_APP_CONFIGURATION as u8,
+            p1: P1::NON_CONFIRM as u8,
+            p2: P2::NO_CHAINCODE as u8,
+            data: APDUData::new(&[]),
+            response_len: None,
+        };
+
+        debug!("Dispatching get_version");
+        let answer = transport.exchange(&command).await?;
+        let data = answer.data().ok_or(LedgerError::UnexpectedNullResponse)?;
+        let &[_flags, major, minor, patch] = data else {
+            return Err(LedgerError::ShortResponse { got: data.len(), expected: 4 });
+        };
+        let version = semver::Version::new(major as u64, minor as u64, patch as u64);
+        debug!(%version, "Retrieved version from device");
+        Ok(version)
+    }
+
+    /// Signs an Ethereum transaction (requires confirmation on the ledger)
+    #[cfg(TODO)] // TODO: TypedTransaction
+    pub async fn sign_tx(&self, tx: &TypedTransaction) -> Result<Signature, LedgerError> {
+        let mut tx_with_chain = tx.clone();
+        if tx_with_chain.chain_id().is_none() {
+            // in the case we don't have a chain_id, let's use the signer chain id instead
+            tx_with_chain.set_chain_id(self.chain_id);
+        }
+        let mut payload = Self::path_to_bytes(&self.derivation);
+        payload.extend_from_slice(tx_with_chain.rlp().as_ref());
+
+        let mut signature = self.sign_payload(INS::SIGN, &payload).await?;
+
+        // modify `v` value of signature to match EIP-155 for chains with large chain ID
+        // The logic is derived from Ledger's library
+        // https://github.com/LedgerHQ/ledgerjs/blob/e78aac4327e78301b82ba58d63a72476ecb842fc/packages/hw-app-eth/src/Eth.ts#L300
+        let eip155_chain_id = self.chain_id * 2 + 35;
+        if eip155_chain_id + 1 > 255 {
+            let one_byte_chain_id = eip155_chain_id % 256;
+            let ecc_parity = if signature.v > one_byte_chain_id {
+                signature.v - one_byte_chain_id
+            } else {
+                one_byte_chain_id - signature.v
+            };
+
+            signature.v = match tx {
+                TypedTransaction::Eip2930(_) | TypedTransaction::Eip1559(_) => {
+                    (ecc_parity % 2 != 1) as u64
+                }
+                TypedTransaction::Legacy(_) => eip155_chain_id + ecc_parity,
+                #[cfg(feature = "optimism")]
+                TypedTransaction::DepositTransaction(_) => 0,
+            };
+        }
+
+        Ok(signature)
+    }
+
+    #[cfg(feature = "eip712")]
+    async fn sign_typed_data_<T: SolStruct>(
+        &self,
+        payload: &T,
+        domain: &Eip712Domain,
+    ) -> Result<Signature, LedgerError> {
+        // See comment for v1.6.0 requirement
+        // https://github.com/LedgerHQ/app-ethereum/issues/105#issuecomment-765316999
+        const EIP712_MIN_VERSION: &str = ">=1.6.0";
+        let req = semver::VersionReq::parse(EIP712_MIN_VERSION).unwrap();
+        let version = self.version().await?;
+
+        // Enforce app version is greater than EIP712_MIN_VERSION
+        if !req.matches(&version) {
+            return Err(LedgerError::UnsupportedAppVersion(EIP712_MIN_VERSION));
+        }
+
+        let mut data = Self::path_to_bytes(&self.derivation);
+        data.extend_from_slice(domain.separator().as_slice());
+        data.extend_from_slice(payload.eip712_hash_struct().as_slice());
+
+        self.sign_payload(INS::SIGN_ETH_EIP_712, &data).await
+    }
+
+    /// Helper function for signing either transaction data, personal messages or EIP712 derived
+    /// structs.
+    #[instrument(err, skip_all, fields(command = %command, payload = hex::encode(payload)))]
+    async fn sign_payload(&self, command: INS, payload: &[u8]) -> Result<Signature, LedgerError> {
+        let transport = self.transport.lock().await;
+        let mut command = APDUCommand {
+            ins: command as u8,
+            p1: P1_FIRST,
+            p2: P2::NO_CHAINCODE as u8,
+            data: APDUData::new(&[]),
+            response_len: None,
+        };
+
+        let mut answer = None;
+        // workaround for https://github.com/LedgerHQ/app-ethereum/issues/409
+        // TODO: remove in future version
+        let chunk_size =
+            (0..=255).rev().find(|i| payload.len() % i != 3).expect("true for any length");
+
+        // Iterate in 255 byte chunks
+        for chunk in payload.chunks(chunk_size) {
+            command.data = APDUData::new(chunk);
+
+            debug!("Dispatching packet to device");
+
+            let ans = transport.exchange(&command).await?;
+            let data = ans.data().ok_or(LedgerError::UnexpectedNullResponse)?;
+            debug!(response = hex::encode(data), "Received response from device");
+            answer = Some(ans);
+
+            // We need more data
+            command.p1 = P1::MORE as u8;
+        }
+        drop(transport);
+
+        let answer = answer.unwrap();
+        let data = answer.data().unwrap();
+        if data.len() != 65 {
+            return Err(LedgerError::ShortResponse { got: data.len(), expected: 65 });
+        }
+
+        let sig = Signature::from_bytes(&data[1..], data[0] as u64)?;
+        debug!(?sig, "Received signature from device");
+        Ok(sig)
+    }
+
+    // helper which converts a derivation path to bytes
+    fn path_to_bytes(derivation: &DerivationType) -> Vec<u8> {
+        let derivation = derivation.to_string();
+        let elements = derivation.split('/').skip(1).collect::<Vec<_>>();
+        let depth = elements.len();
+
+        let mut bytes = vec![depth as u8];
+        for derivation_index in elements {
+            let hardened = derivation_index.contains('\'');
+            let mut index = derivation_index.replace('\'', "").parse::<u32>().unwrap();
+            if hardened {
+                index |= 0x80000000;
+            }
+
+            bytes.extend(index.to_be_bytes());
+        }
+
+        bytes
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    const DTYPE: DerivationType = DerivationType::LedgerLive(0);
+
+    fn my_address() -> Address {
+        std::env::var("LEDGER_ADDRESS").unwrap().parse().unwrap()
+    }
+
+    async fn init_ledger() -> LedgerSigner {
+        match LedgerSigner::new(DTYPE, 1).await {
+            Ok(ledger) => ledger,
+            Err(e) => panic!("{e:?}\n{e}"),
+        }
+    }
+
+    #[tokio::test]
+    #[serial_test::serial]
+    #[ignore]
+    async fn test_get_address() {
+        let ledger = init_ledger().await;
+        assert_eq!(ledger.get_address().await.unwrap(), my_address());
+        assert_eq!(ledger.get_address_with_path(&DTYPE).await.unwrap(), my_address(),);
+    }
+
+    #[tokio::test]
+    #[serial_test::serial]
+    #[ignore]
+    async fn test_version() {
+        let ledger = init_ledger().await;
+        let version = ledger.version().await.unwrap();
+        eprintln!("{version}");
+        assert!(version.major >= 1);
+    }
+
+    #[tokio::test]
+    #[serial_test::serial]
+    #[ignore]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    async fn test_sign_tx() {
+        let ledger = init_ledger().await;
+
+        // approve uni v2 router 0xff
+        let data = hex::decode("095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap();
+
+        let tx_req = TransactionRequest::new()
+            .to("2ed7afa17473e17ac59908f088b4371d28585476".parse::<Address>().unwrap())
+            .gas(1000000)
+            .gas_price(400e9 as u64)
+            .nonce(5)
+            .data(data)
+            .value(alloy_primitives::utils::parse_ether(100).unwrap())
+            .into();
+        let tx = ledger.sign_transaction(&tx_req).await.unwrap();
+    }
+
+    #[tokio::test]
+    #[serial_test::serial]
+    #[ignore]
+    async fn test_sign_message() {
+        let ledger = init_ledger().await;
+        let message = "hello world";
+        let sig = ledger.sign_message(message.as_bytes()).await.unwrap();
+        let addr = ledger.get_address().await.unwrap();
+        assert_eq!(addr, my_address());
+        assert_eq!(sig.recover_address_from_msg(message.as_bytes()).unwrap(), my_address());
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer_ledger/types.rs.html b/src/alloy_signer_ledger/types.rs.html new file mode 100644 index 000000000000..a0081b495f5d --- /dev/null +++ b/src/alloy_signer_ledger/types.rs.html @@ -0,0 +1,206 @@ +types.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+
//! Helpers for interacting with the Ethereum Ledger App.
+//!
+//! [Official Docs](https://github.com/LedgerHQ/app-ethereum/blob/master/doc/ethapp.adoc)
+
+#![allow(clippy::upper_case_acronyms)]
+
+use alloy_primitives::hex;
+use k256::ecdsa;
+use std::fmt;
+use thiserror::Error;
+
+#[derive(Clone, Debug)]
+/// Ledger wallet type
+pub enum DerivationType {
+    /// Ledger Live-generated HD path
+    LedgerLive(usize),
+    /// Legacy generated HD Path
+    Legacy(usize),
+    /// Any other path
+    Other(String),
+}
+
+impl fmt::Display for DerivationType {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
+        match self {
+            DerivationType::Legacy(index) => write!(f, "m/44'/60'/0'/{index}"),
+            DerivationType::LedgerLive(index) => write!(f, "m/44'/60'/{index}'/0/0"),
+            DerivationType::Other(inner) => f.write_str(inner),
+        }
+    }
+}
+
+/// Error when using the Ledger transport.
+#[derive(Error, Debug)]
+pub enum LedgerError {
+    /// Underlying Ledger transport error.
+    #[error(transparent)]
+    LedgerError(#[from] coins_ledger::errors::LedgerError),
+    /// Device response was unexpectedly empty.
+    #[error("received an unexpected empty response")]
+    UnexpectedNullResponse,
+    /// [`hex`](mod@hex) error.
+    #[error(transparent)]
+    HexError(#[from] hex::FromHexError),
+    /// [`semver`] error.
+    #[error(transparent)]
+    SemVerError(#[from] semver::Error),
+    /// [`ecdsa`] error.
+    #[error(transparent)]
+    Ecdsa(#[from] ecdsa::Error),
+    /// Thrown when trying to sign using EIP-712 with an incompatible Ledger Ethereum app.
+    #[error("Ledger Ethereum app requires at least version {0}")]
+    UnsupportedAppVersion(&'static str),
+    /// Got a response, but it didn't contain as much data as expected
+    #[error("bad response; got {got} bytes, expected {expected}")]
+    ShortResponse {
+        /// Number of bytes received.
+        got: usize,
+        /// Number of bytes expected.
+        expected: usize,
+    },
+}
+
+pub(crate) const P1_FIRST: u8 = 0x00;
+
+#[repr(u8)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+#[allow(non_camel_case_types, dead_code)]
+pub(crate) enum INS {
+    GET_PUBLIC_KEY = 0x02,
+    SIGN = 0x04,
+    GET_APP_CONFIGURATION = 0x06,
+    SIGN_PERSONAL_MESSAGE = 0x08,
+    SIGN_ETH_EIP_712 = 0x0C,
+}
+
+impl std::fmt::Display for INS {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            INS::GET_PUBLIC_KEY => write!(f, "GET_PUBLIC_KEY"),
+            INS::SIGN => write!(f, "SIGN"),
+            INS::GET_APP_CONFIGURATION => write!(f, "GET_APP_CONFIGURATION"),
+            INS::SIGN_PERSONAL_MESSAGE => write!(f, "SIGN_PERSONAL_MESSAGE"),
+            INS::SIGN_ETH_EIP_712 => write!(f, "SIGN_ETH_EIP_712"),
+        }
+    }
+}
+
+#[repr(u8)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+#[allow(non_camel_case_types)]
+pub(crate) enum P1 {
+    NON_CONFIRM = 0x00,
+    MORE = 0x80,
+}
+
+#[repr(u8)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+#[allow(non_camel_case_types)]
+pub(crate) enum P2 {
+    NO_CHAINCODE = 0x00,
+}
+
\ No newline at end of file diff --git a/src/alloy_signer_trezor/lib.rs.html b/src/alloy_signer_trezor/lib.rs.html new file mode 100644 index 000000000000..57a92a9d73a7 --- /dev/null +++ b/src/alloy_signer_trezor/lib.rs.html @@ -0,0 +1,66 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+#[macro_use]
+extern crate tracing;
+
+// TODO: Needed to pin version.
+use protobuf as _;
+
+mod signer;
+pub use signer::TrezorSigner;
+
+mod types;
+pub use types::{DerivationType as TrezorHDPath, TrezorError};
+
+#[doc(hidden)]
+#[deprecated(note = "use `TrezorSigner` instead")]
+pub type Trezor = TrezorSigner;
+
\ No newline at end of file diff --git a/src/alloy_signer_trezor/signer.rs.html b/src/alloy_signer_trezor/signer.rs.html new file mode 100644 index 000000000000..d9d843afb70d --- /dev/null +++ b/src/alloy_signer_trezor/signer.rs.html @@ -0,0 +1,742 @@ +signer.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+
use super::types::{DerivationType, TrezorError};
+use alloy_primitives::{hex, Address, B256, U256};
+use alloy_signer::{Result, Signature, Signer};
+use async_trait::async_trait;
+use std::fmt;
+use trezor_client::client::Trezor;
+
+// we need firmware that supports EIP-1559 and EIP-712
+const FIRMWARE_1_MIN_VERSION: &str = ">=1.11.1";
+const FIRMWARE_2_MIN_VERSION: &str = ">=2.5.1";
+
+/// A Trezor Ethereum signer.
+///
+/// This is a simple wrapper around the [Trezor transport](Trezor).
+///
+/// Note that this signer only supports asynchronous operations. Calling a non-asynchronous method
+/// will always return an error.
+pub struct TrezorSigner {
+    derivation: DerivationType,
+    session_id: Vec<u8>,
+    pub(crate) chain_id: u64,
+    pub(crate) address: Address,
+}
+
+impl fmt::Debug for TrezorSigner {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("TrezorSigner")
+            .field("derivation", &self.derivation)
+            .field("session_id", &hex::encode(&self.session_id))
+            .field("address", &self.address)
+            .finish()
+    }
+}
+
+#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
+#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
+impl Signer for TrezorSigner {
+    async fn sign_hash(&self, _hash: &B256) -> Result<Signature> {
+        Err(alloy_signer::Error::UnsupportedOperation(
+            alloy_signer::UnsupportedSignerOperation::SignHash,
+        ))
+    }
+
+    #[inline]
+    async fn sign_message(&self, message: &[u8]) -> Result<Signature> {
+        self.sign_message_(message).await.map_err(alloy_signer::Error::other)
+    }
+
+    #[cfg(TODO)] // TODO: TypedTransaction
+    #[inline]
+    async fn sign_transaction(&self, tx: &TypedTransaction) -> Result<Signature> {
+        self.sign_tx(tx).await
+    }
+
+    #[inline]
+    fn address(&self) -> Address {
+        self.address
+    }
+
+    #[inline]
+    fn chain_id(&self) -> u64 {
+        self.chain_id
+    }
+
+    #[inline]
+    fn set_chain_id(&mut self, chain_id: u64) {
+        self.chain_id = chain_id;
+    }
+}
+
+impl TrezorSigner {
+    /// Instantiates a new Trezor signer.
+    #[instrument(ret)]
+    pub async fn new(derivation: DerivationType, chain_id: u64) -> Result<Self, TrezorError> {
+        let mut signer = Self {
+            derivation: derivation.clone(),
+            chain_id,
+            address: Address::ZERO,
+            session_id: vec![],
+        };
+        signer.initate_session()?;
+        signer.address = signer.get_address_with_path(&derivation).await?;
+        Ok(signer)
+    }
+
+    fn check_version(version: semver::Version) -> Result<(), TrezorError> {
+        let min_version = match version.major {
+            1 => FIRMWARE_1_MIN_VERSION,
+            2 => FIRMWARE_2_MIN_VERSION,
+            // unknown major version, possibly newer models that we don't know about yet
+            // it's probably safe to assume they support EIP-1559 and EIP-712
+            _ => return Ok(()),
+        };
+
+        let req = semver::VersionReq::parse(min_version).unwrap();
+        // Enforce firmware version is greater than "min_version"
+        if !req.matches(&version) {
+            return Err(TrezorError::UnsupportedFirmwareVersion(min_version.to_string()));
+        }
+
+        Ok(())
+    }
+
+    fn initate_session(&mut self) -> Result<(), TrezorError> {
+        let mut client = trezor_client::unique(false)?;
+        client.init_device(None)?;
+
+        let features = client.features().ok_or(TrezorError::FeaturesError)?;
+        let version = semver::Version::new(
+            features.major_version() as u64,
+            features.minor_version() as u64,
+            features.patch_version() as u64,
+        );
+        Self::check_version(version)?;
+
+        self.session_id = features.session_id().to_vec();
+
+        Ok(())
+    }
+
+    fn get_client(&self) -> Result<Trezor, TrezorError> {
+        let mut client = trezor_client::unique(false)?;
+        client.init_device(Some(self.session_id.clone()))?;
+        Ok(client)
+    }
+
+    /// Get the account which corresponds to our derivation path
+    pub async fn get_address(&self) -> Result<Address, TrezorError> {
+        self.get_address_with_path(&self.derivation).await
+    }
+
+    /// Gets the account which corresponds to the provided derivation path
+    #[instrument(ret)]
+    pub async fn get_address_with_path(
+        &self,
+        derivation: &DerivationType,
+    ) -> Result<Address, TrezorError> {
+        let mut client = self.get_client()?;
+        let address_str = client.ethereum_get_address(Self::convert_path(derivation))?;
+        Ok(address_str.parse()?)
+    }
+
+    /// Signs an Ethereum transaction (requires confirmation on the Trezor)
+    #[cfg(TODO)] // TODO: TypedTransaction
+    pub async fn sign_tx(&self, tx: &TypedTransaction) -> Result<Signature, TrezorError> {
+        let mut client = self.get_client()?;
+
+        let arr_path = Self::convert_path(&self.derivation);
+
+        let transaction = TrezorTransaction::load(tx)?;
+
+        let chain_id = tx.chain_id().map(|id| id.as_u64()).unwrap_or(self.chain_id);
+
+        let signature = match tx {
+            TypedTransaction::Eip2930(_) | TypedTransaction::Legacy(_) => client.ethereum_sign_tx(
+                arr_path,
+                transaction.nonce,
+                transaction.gas_price,
+                transaction.gas,
+                transaction.to,
+                transaction.value,
+                transaction.data,
+                chain_id,
+            )?,
+            TypedTransaction::Eip1559(eip1559_tx) => client.ethereum_sign_eip1559_tx(
+                arr_path,
+                transaction.nonce,
+                transaction.gas,
+                transaction.to,
+                transaction.value,
+                transaction.data,
+                chain_id,
+                transaction.max_fee_per_gas,
+                transaction.max_priority_fee_per_gas,
+                transaction.access_list,
+            )?,
+            #[cfg(feature = "optimism")]
+            TypedTransaction::DepositTransaction(tx) => {
+                trezor_client::client::Signature { r: 0.into(), s: 0.into(), v: 0 }
+            }
+        };
+
+        Ok(Signature { r: signature.r, s: signature.s, v: signature.v })
+    }
+
+    #[instrument(skip(message), fields(message=hex::encode(message)), ret)]
+    async fn sign_message_(&self, message: &[u8]) -> Result<Signature, TrezorError> {
+        let mut client = self.get_client()?;
+        let apath = Self::convert_path(&self.derivation);
+
+        let signature = client.ethereum_sign_message(message.into(), apath)?;
+
+        let r = U256::from_limbs(signature.r.0);
+        let s = U256::from_limbs(signature.s.0);
+        Signature::from_scalars(r.into(), s.into(), signature.v).map_err(Into::into)
+    }
+
+    // helper which converts a derivation path to [u32]
+    fn convert_path(derivation: &DerivationType) -> Vec<u32> {
+        let derivation = derivation.to_string();
+        let elements = derivation.split('/').skip(1).collect::<Vec<_>>();
+
+        let mut path = vec![];
+        for derivation_index in elements {
+            let hardened = derivation_index.contains('\'');
+            let mut index = derivation_index.replace('\'', "").parse::<u32>().unwrap();
+            if hardened {
+                index |= 0x80000000;
+            }
+            path.push(index);
+        }
+
+        path
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use alloy_primitives::address;
+
+    #[tokio::test]
+    #[ignore]
+    // Replace this with your ETH addresses.
+    async fn test_get_address() {
+        // Instantiate it with the default trezor derivation path
+        let trezor = TrezorSigner::new(DerivationType::TrezorLive(1), 1).await.unwrap();
+        assert_eq!(
+            trezor.get_address().await.unwrap(),
+            address!("eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"),
+        );
+        assert_eq!(
+            trezor.get_address_with_path(&DerivationType::TrezorLive(0)).await.unwrap(),
+            address!("eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"),
+        );
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn test_sign_message() {
+        let trezor = TrezorSigner::new(DerivationType::TrezorLive(0), 1).await.unwrap();
+        let message = "hello world";
+        let sig = trezor.sign_message(message.as_bytes()).await.unwrap();
+        let addr = trezor.get_address().await.unwrap();
+        assert_eq!(sig.recover_address_from_msg(message).unwrap(), addr);
+    }
+
+    #[tokio::test]
+    #[ignore]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    async fn test_sign_tx() {
+        let trezor = TrezorSigner::new(DerivationType::TrezorLive(0), 1).await.unwrap();
+
+        // approve uni v2 router 0xff
+        let data = hex::decode("095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap();
+
+        let tx_req = TransactionRequest::new()
+            .to("2ed7afa17473e17ac59908f088b4371d28585476".parse::<Address>().unwrap())
+            .gas(1000000)
+            .gas_price(400e9 as u64)
+            .nonce(5)
+            .data(data)
+            .value(ethers_core::utils::parse_ether(100).unwrap())
+            .into();
+        let tx = trezor.sign_transaction(&tx_req).await.unwrap();
+    }
+
+    #[tokio::test]
+    #[ignore]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    async fn test_sign_big_data_tx() {
+        let trezor = TrezorSigner::new(DerivationType::TrezorLive(0), 1).await.unwrap();
+
+        // invalid data
+        let big_data = hex::decode("095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff".to_string()+ &"ff".repeat(1032*2) + "aa").unwrap();
+        let tx_req = TransactionRequest::new()
+            .to("2ed7afa17473e17ac59908f088b4371d28585476".parse::<Address>().unwrap())
+            .gas(1000000)
+            .gas_price(400e9 as u64)
+            .nonce(5)
+            .data(big_data)
+            .value(ethers_core::utils::parse_ether(100).unwrap())
+            .into();
+        let tx = trezor.sign_transaction(&tx_req).await.unwrap();
+    }
+
+    #[tokio::test]
+    #[ignore]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    async fn test_sign_empty_txes() {
+        // Contract creation (empty `to`), requires data.
+        // To test without the data field, we need to specify a `to` address.
+        let trezor = TrezorSigner::new(DerivationType::TrezorLive(0), 1, None).await.unwrap();
+        {
+            let tx_req = Eip1559TransactionRequest::new()
+                .to("2ed7afa17473e17ac59908f088b4371d28585476".parse::<Address>().unwrap())
+                .into();
+            let tx = trezor.sign_transaction(&tx_req).await.unwrap();
+        }
+        {
+            let tx_req = TransactionRequest::new()
+                .to("2ed7afa17473e17ac59908f088b4371d28585476".parse::<Address>().unwrap())
+                .into();
+            let tx = trezor.sign_transaction(&tx_req).await.unwrap();
+        }
+
+        let data = hex::decode("095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap();
+
+        // Contract creation (empty `to`, with data) should show on the trezor device as:
+        //  ` "0 Wei ETH
+        //  ` new contract?"
+        let trezor = TrezorSigner::new(DerivationType::TrezorLive(0), 1).await.unwrap();
+        {
+            let tx_req = Eip1559TransactionRequest::new().data(data.clone()).into();
+            let tx = trezor.sign_transaction(&tx_req).await.unwrap();
+        }
+        {
+            let tx_req = TransactionRequest::new().data(data.clone()).into();
+            let tx = trezor.sign_transaction(&tx_req).await.unwrap();
+        }
+    }
+
+    #[tokio::test]
+    #[ignore]
+    #[cfg(TODO)] // TODO: TypedTransaction
+    async fn test_sign_eip1559_tx() {
+        let trezor = TrezorSigner::new(DerivationType::TrezorLive(0), 1).await.unwrap();
+
+        // approve uni v2 router 0xff
+        let data = hex::decode("095ea7b30000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff").unwrap();
+
+        let lst = AccessList(vec![
+            AccessListItem {
+                address: "0x8ba1f109551bd432803012645ac136ddd64dba72".parse().unwrap(),
+                storage_keys: vec![
+                    "0x0000000000000000000000000000000000000000000000000000000000000000"
+                        .parse()
+                        .unwrap(),
+                    "0x0000000000000000000000000000000000000000000000000000000000000042"
+                        .parse()
+                        .unwrap(),
+                ],
+            },
+            AccessListItem {
+                address: "0x2ed7afa17473e17ac59908f088b4371d28585476".parse().unwrap(),
+                storage_keys: vec![
+                    "0x0000000000000000000000000000000000000000000000000000000000000000"
+                        .parse()
+                        .unwrap(),
+                    "0x0000000000000000000000000000000000000000000000000000000000000042"
+                        .parse()
+                        .unwrap(),
+                ],
+            },
+        ]);
+
+        let tx_req = Eip1559TransactionRequest::new()
+            .to("2ed7afa17473e17ac59908f088b4371d28585476".parse::<Address>().unwrap())
+            .gas(1000000)
+            .max_fee_per_gas(400e9 as u64)
+            .max_priority_fee_per_gas(400e9 as u64)
+            .nonce(5)
+            .data(data)
+            .access_list(lst)
+            .value(ethers_core::utils::parse_ether(100).unwrap())
+            .into();
+
+        let tx = trezor.sign_transaction(&tx_req).await.unwrap();
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_signer_trezor/types.rs.html b/src/alloy_signer_trezor/types.rs.html new file mode 100644 index 000000000000..869ef60dfeea --- /dev/null +++ b/src/alloy_signer_trezor/types.rs.html @@ -0,0 +1,310 @@ +types.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+
//! Helpers for interacting with the Ethereum Trezor App.
+//!
+//! [Official Docs](https://docs.trezor.io/trezor-firmware/index.html)
+
+use alloy_primitives::{hex, B256, U256};
+use std::fmt;
+use thiserror::Error;
+use trezor_client::client::AccessListItem as Trezor_AccessListItem;
+
+/// Trezor wallet type.
+#[derive(Clone, Debug)]
+pub enum DerivationType {
+    /// Trezor Live-generated HD path
+    TrezorLive(usize),
+    /// Any other path.
+    ///
+    /// **Warning**: Trezor by default forbids custom derivation paths;
+    /// run `trezorctl set safety-checks prompt` to enable them.
+    Other(String),
+}
+
+impl fmt::Display for DerivationType {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
+        match self {
+            DerivationType::TrezorLive(index) => write!(f, "m/44'/60'/{index}'/0/0"),
+            DerivationType::Other(inner) => f.write_str(inner),
+        }
+    }
+}
+
+#[derive(Error, Debug)]
+/// Error when using the Trezor transport
+pub enum TrezorError {
+    /// Underlying Trezor transport error.
+    #[error(transparent)]
+    Client(#[from] trezor_client::error::Error),
+    /// Thrown when converting from a hex string.
+    #[error(transparent)]
+    Hex(#[from] hex::FromHexError),
+    /// Thrown when converting a semver requirement.
+    #[error(transparent)]
+    Semver(#[from] semver::Error),
+    /// [`ecdsa`](k256::ecdsa) error.
+    #[error(transparent)]
+    Ecdsa(#[from] k256::ecdsa::Error),
+    /// Thrown when trying to sign an EIP-712 struct with an incompatible Trezor Ethereum app
+    /// version.
+    #[error("Trezor Ethereum app requires at least version {0:?}")]
+    UnsupportedFirmwareVersion(String),
+    /// No ENS support.
+    #[error("Trezor does not support ENS")]
+    NoEnsSupport,
+    /// Could not retrieve device features.
+    #[error("could not retrieve device features")]
+    FeaturesError,
+}
+
+/// Trezor transaction.
+#[allow(dead_code)]
+pub(crate) struct TrezorTransaction {
+    pub(crate) nonce: Vec<u8>,
+    pub(crate) gas: Vec<u8>,
+    pub(crate) gas_price: Vec<u8>,
+    pub(crate) value: Vec<u8>,
+    pub(crate) to: String,
+    pub(crate) data: Vec<u8>,
+    pub(crate) max_fee_per_gas: Vec<u8>,
+    pub(crate) max_priority_fee_per_gas: Vec<u8>,
+    pub(crate) access_list: Vec<Trezor_AccessListItem>,
+}
+
+impl TrezorTransaction {
+    #[allow(dead_code)]
+    fn to_trimmed_big_endian(value: &U256) -> Vec<u8> {
+        let trimmed_value = B256::from(*value);
+        trimmed_value[value.leading_zeros() / 8..].to_vec()
+    }
+
+    #[cfg(TODO)] // TODO: TypedTransaction
+    pub fn load(tx: &TypedTransaction) -> Result<Self, TrezorError> {
+        let to: String = match tx.to() {
+            Some(v) => match v {
+                NameOrAddress::Name(_) => return Err(TrezorError::NoEnsSupport),
+                NameOrAddress::Address(value) => hex::encode_prefixed(value),
+            },
+            // Contract Creation
+            None => "".to_string(),
+        };
+
+        let nonce = tx.nonce().map_or(vec![], Self::to_trimmed_big_endian);
+        let gas = tx.gas().map_or(vec![], Self::to_trimmed_big_endian);
+        let gas_price = tx.gas_price().map_or(vec![], |v| Self::to_trimmed_big_endian(&v));
+        let value = tx.value().map_or(vec![], Self::to_trimmed_big_endian);
+        let data = tx.data().map_or(vec![], |v| v.to_vec());
+
+        match tx {
+            TypedTransaction::Eip2930(_) | TypedTransaction::Legacy(_) => Ok(Self {
+                nonce,
+                gas,
+                gas_price,
+                value,
+                to,
+                data,
+                max_fee_per_gas: vec![],
+                max_priority_fee_per_gas: vec![],
+                access_list: vec![],
+            }),
+            TypedTransaction::Eip1559(eip1559_tx) => {
+                let max_fee_per_gas =
+                    eip1559_tx.max_fee_per_gas.map_or(vec![], |v| Self::to_trimmed_big_endian(&v));
+
+                let max_priority_fee_per_gas = eip1559_tx
+                    .max_priority_fee_per_gas
+                    .map_or(vec![], |v| Self::to_trimmed_big_endian(&v));
+
+                let mut access_list: Vec<Trezor_AccessListItem> = Vec::new();
+                for item in &eip1559_tx.access_list.0 {
+                    let address: String = hex::encode_prefixed(item.address);
+                    let mut storage_keys: Vec<Vec<u8>> = Vec::new();
+
+                    for key in &item.storage_keys {
+                        storage_keys.push(key.as_bytes().to_vec())
+                    }
+
+                    access_list.push(Trezor_AccessListItem { address, storage_keys })
+                }
+
+                Ok(Self {
+                    nonce,
+                    gas,
+                    gas_price,
+                    value,
+                    to,
+                    data,
+                    max_fee_per_gas,
+                    max_priority_fee_per_gas,
+                    access_list,
+                })
+            }
+            #[cfg(feature = "optimism")]
+            TypedTransaction::DepositTransaction(_) => Ok(Self {
+                nonce,
+                gas,
+                gas_price,
+                value,
+                to,
+                data,
+                max_fee_per_gas: vec![],
+                max_priority_fee_per_gas: vec![],
+                access_list: vec![],
+            }),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport/boxed.rs.html b/src/alloy_transport/boxed.rs.html new file mode 100644 index 000000000000..4b659b7f2ffd --- /dev/null +++ b/src/alloy_transport/boxed.rs.html @@ -0,0 +1,180 @@ +boxed.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+
use crate::{Transport, TransportError, TransportFut};
+use alloy_json_rpc::{RequestPacket, ResponsePacket};
+use std::fmt;
+use tower::Service;
+
+/// A boxed, Clone-able [`Transport`] trait object.
+///
+/// This type allows RPC clients to use a type-erased transport. It is
+/// [`Clone`] and [`Send`] + [`Sync`], and implementes [`Transport`]. This
+/// allows for complex behavior abstracting across several different clients
+/// with different transport types.
+///
+/// Most higher-level types will be generic over `T: Transport = BoxTransport`.
+/// This allows paramterization with a concrete type, while hiding this
+/// complexity from the library consumer.
+///
+/// [`RpcClient`]: crate::client::RpcClient
+#[repr(transparent)]
+pub struct BoxTransport {
+    inner: Box<dyn CloneTransport + Send + Sync>,
+}
+
+impl BoxTransport {
+    /// Instantiate a new box transport from a suitable transport.
+    pub fn new<T: Transport + Clone + Send + Sync>(inner: T) -> Self {
+        Self { inner: Box::new(inner) }
+    }
+}
+
+impl fmt::Debug for BoxTransport {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("BoxTransport").finish_non_exhaustive()
+    }
+}
+
+impl Clone for BoxTransport {
+    fn clone(&self) -> Self {
+        Self { inner: self.inner.clone_box() }
+    }
+}
+
+/// Helper trait for constructing [`BoxTransport`].
+trait CloneTransport: Transport {
+    fn clone_box(&self) -> Box<dyn CloneTransport + Send + Sync>;
+}
+
+impl<T> CloneTransport for T
+where
+    T: Transport + Clone + Send + Sync,
+{
+    fn clone_box(&self) -> Box<dyn CloneTransport + Send + Sync> {
+        Box::new(self.clone())
+    }
+}
+
+impl Service<RequestPacket> for BoxTransport {
+    type Response = ResponsePacket;
+
+    type Error = TransportError;
+
+    type Future = TransportFut<'static>;
+
+    fn poll_ready(
+        &mut self,
+        cx: &mut std::task::Context<'_>,
+    ) -> std::task::Poll<Result<(), Self::Error>> {
+        self.inner.poll_ready(cx)
+    }
+
+    fn call(&mut self, req: RequestPacket) -> Self::Future {
+        self.inner.call(req)
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+    /// checks trait + send + sync + 'static
+    fn __compile_check() {
+        fn inner<T: CloneTransport>(_: Option<T>) {
+            todo!()
+        }
+        fn inner_2<T: Transport>(_: Option<T>) {
+            todo!()
+        }
+        inner::<BoxTransport>(None);
+        inner::<BoxTransport>(None);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport/common.rs.html b/src/alloy_transport/common.rs.html new file mode 100644 index 000000000000..12852d7697f0 --- /dev/null +++ b/src/alloy_transport/common.rs.html @@ -0,0 +1,76 @@ +common.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
use base64::{engine::general_purpose, Engine};
+use std::fmt;
+
+/// Basic or bearer authentication in http or websocket transport
+///
+/// Use to inject username and password or an auth token into requests
+#[derive(Clone, Debug)]
+pub enum Authorization {
+    /// HTTP Basic Auth
+    Basic(String),
+    /// Bearer Auth
+    Bearer(String),
+}
+
+impl Authorization {
+    /// Instantiate a new basic auth.
+    pub fn basic(username: impl AsRef<str>, password: impl AsRef<str>) -> Self {
+        let username = username.as_ref();
+        let password = password.as_ref();
+        let auth_secret = general_purpose::STANDARD.encode(format!("{username}:{password}"));
+        Self::Basic(auth_secret)
+    }
+
+    /// Instantiate a new bearer auth.
+    pub fn bearer(token: impl Into<String>) -> Self {
+        Self::Bearer(token.into())
+    }
+}
+
+impl fmt::Display for Authorization {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            Authorization::Basic(_) => write!(f, "Basic"),
+            Authorization::Bearer(_) => write!(f, "Bearer"),
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport/connect.rs.html b/src/alloy_transport/connect.rs.html new file mode 100644 index 000000000000..0bbc61eedee9 --- /dev/null +++ b/src/alloy_transport/connect.rs.html @@ -0,0 +1,128 @@ +connect.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+
use crate::{BoxTransport, Pbf, Transport, TransportError};
+
+/// Connection details for a transport.
+///
+/// This object captures the information necessary to establish a transport,
+/// and may encapsulate reconnection logic.
+///
+/// ## Why implement `TransportConnect`?
+///
+/// Users may want to implement transport-connect for the following reasons:
+/// - You want to customize a `reqwest::Client` before using it.
+/// - You need to provide special authentication information to a remote provider.
+/// - You have implemented a custom [`Transport`].
+/// - You require a specific websocket reconnection strategy.
+pub trait TransportConnect: Sized + Send + Sync + 'static {
+    /// The transport type that is returned by `connect`.
+    type Transport: Transport + Clone;
+
+    /// Returns `true` if the transport connects to a local resource.
+    fn is_local(&self) -> bool;
+
+    /// Connect to the transport, returning a `Transport` instance.
+    fn get_transport<'a: 'b, 'b>(&'a self) -> Pbf<'b, Self::Transport, TransportError>;
+}
+
+/// Connection details for a transport that can be boxed.
+///
+/// This trait is implemented for [`TransportConnect`] implementors that
+/// produce a boxable transport. It can be used to create a boxed transport
+/// without knowing the exact type of the transport.
+///
+/// This trait is separate from `TransportConnect`` to hide the associated type
+/// in when this trait is a trai object. It is intended to allow creation of
+/// several unlike transports or clients at once. E.g.
+/// in something like `Vec<&dyn BoxTransportConnect>.
+pub trait BoxTransportConnect {
+    /// Returns `true` if the transport is a local transport.
+    fn is_local(&self) -> bool;
+
+    /// Connect to a transport, and box it.
+    fn get_boxed_transport<'a: 'b, 'b>(&'a self) -> Pbf<'b, BoxTransport, TransportError>;
+}
+
+impl<T> BoxTransportConnect for T
+where
+    T: TransportConnect,
+{
+    fn is_local(&self) -> bool {
+        TransportConnect::is_local(self)
+    }
+
+    fn get_boxed_transport<'a: 'b, 'b>(&'a self) -> Pbf<'b, BoxTransport, TransportError> {
+        Box::pin(async move { self.get_transport().await.map(Transport::boxed) })
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+    fn __compile_check(_: Box<dyn BoxTransportConnect>) {
+        todo!()
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport/error.rs.html b/src/alloy_transport/error.rs.html new file mode 100644 index 000000000000..130996856aee --- /dev/null +++ b/src/alloy_transport/error.rs.html @@ -0,0 +1,110 @@ +error.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
use alloy_json_rpc::{Id, RpcError, RpcResult};
+use serde_json::value::RawValue;
+use std::{error::Error as StdError, fmt::Debug};
+use thiserror::Error;
+
+/// A transport error is an [`RpcError`] containing a [`TransportErrorKind`].
+pub type TransportError<ErrResp = Box<RawValue>> = RpcError<TransportErrorKind, ErrResp>;
+
+/// A transport result is a [`Result`] containing a [`TransportError`].
+pub type TransportResult<T, ErrResp = Box<RawValue>> = RpcResult<T, TransportErrorKind, ErrResp>;
+
+/// Transport error.
+///
+/// All transport errors are wrapped in this enum.
+#[derive(Error, Debug)]
+pub enum TransportErrorKind {
+    /// Missing batch response.
+    ///
+    /// This error is returned when a batch request is sent and the response
+    /// does not contain a response for a request. For convenience the ID is
+    /// specified.
+    #[error("Missing response for request with ID {0}.")]
+    MissingBatchResponse(Id),
+
+    /// PubSub backend connection task has stopped.
+    #[error("PubSub backend connection task has stopped.")]
+    BackendGone,
+
+    /// Custom error
+    #[error("{0}")]
+    Custom(#[source] Box<dyn StdError + Send + Sync + 'static>),
+}
+
+impl TransportErrorKind {
+    /// Instantiate a new `TransportError` from a custom error.
+    pub fn custom_str(err: &str) -> TransportError {
+        RpcError::Transport(Self::Custom(err.into()))
+    }
+
+    /// Instantiate a new `TransportError` from a custom error.
+    pub fn custom(err: impl StdError + Send + Sync + 'static) -> TransportError {
+        RpcError::Transport(Self::Custom(Box::new(err)))
+    }
+
+    /// Instantiate a new `TransportError` from a missing ID.
+    pub const fn missing_batch_response(id: Id) -> TransportError {
+        RpcError::Transport(Self::MissingBatchResponse(id))
+    }
+
+    /// Instantiate a new `TransportError::BackendGone`.
+    pub const fn backend_gone() -> TransportError {
+        RpcError::Transport(Self::BackendGone)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport/lib.rs.html b/src/alloy_transport/lib.rs.html new file mode 100644 index 000000000000..218555f5f4ea --- /dev/null +++ b/src/alloy_transport/lib.rs.html @@ -0,0 +1,158 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+mod boxed;
+pub use boxed::BoxTransport;
+
+mod connect;
+pub use connect::{BoxTransportConnect, TransportConnect};
+
+mod common;
+pub use common::Authorization;
+
+mod error;
+#[doc(hidden)]
+pub use error::TransportErrorKind;
+pub use error::{TransportError, TransportResult};
+
+mod r#trait;
+pub use r#trait::Transport;
+
+pub use alloy_json_rpc::RpcResult;
+
+/// Misc. utilities for building transports.
+pub mod utils;
+
+pub use type_aliases::*;
+
+#[cfg(not(target_arch = "wasm32"))]
+mod type_aliases {
+    use alloy_json_rpc::ResponsePacket;
+
+    use crate::{TransportError, TransportResult};
+
+    /// Pin-boxed future.
+    pub type Pbf<'a, T, E> =
+        std::pin::Pin<Box<dyn std::future::Future<Output = Result<T, E>> + Send + 'a>>;
+
+    /// Future for Transport-level requests.
+    pub type TransportFut<'a, T = ResponsePacket, E = TransportError> =
+        std::pin::Pin<Box<dyn std::future::Future<Output = Result<T, E>> + Send + 'a>>;
+
+    /// Future for RPC-level requests.
+    pub type RpcFut<'a, T> =
+        std::pin::Pin<Box<dyn std::future::Future<Output = TransportResult<T>> + Send + 'a>>;
+}
+
+#[cfg(target_arch = "wasm32")]
+mod type_aliases {
+    use alloy_json_rpc::ResponsePacket;
+
+    use crate::{TransportError, TransportResult};
+
+    /// Pin-boxed future.
+    pub type Pbf<'a, T, E> =
+        std::pin::Pin<Box<dyn std::future::Future<Output = Result<T, E>> + 'a>>;
+
+    /// Future for Transport-level requests.
+    pub type TransportFut<'a, T = ResponsePacket, E = TransportError> =
+        std::pin::Pin<Box<dyn std::future::Future<Output = Result<T, E>> + 'a>>;
+
+    /// Future for RPC-level requests.
+    pub type RpcFut<'a, T> =
+        std::pin::Pin<Box<dyn std::future::Future<Output = TransportResult<T>> + 'a>>;
+}
+
\ No newline at end of file diff --git a/src/alloy_transport/trait.rs.html b/src/alloy_transport/trait.rs.html new file mode 100644 index 000000000000..b9c48bf199e8 --- /dev/null +++ b/src/alloy_transport/trait.rs.html @@ -0,0 +1,170 @@ +trait.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+
use crate::{BoxTransport, TransportError, TransportFut};
+use alloy_json_rpc::{RequestPacket, ResponsePacket};
+use tower::Service;
+
+/// A `Transport` manages the JSON-RPC request/response lifecycle.
+///
+/// `Transports` should be instantiated via the [`TransportConnect`] trait.
+///
+/// Transports are reponsible for the following:
+///
+/// - Communicating with the RPC server.
+/// - Managing any ongoing connection or communication resource.
+/// - Associating responses with requests.
+/// - Associating notifications with subscriptions.
+///
+/// As a result, a `Transport` may be a simple HTTP client, or a collection of
+/// long-lived tasks.
+///
+/// ## Implementing `Transport`
+///
+/// This trait is blanket implemented for all appropriate types. To implement
+/// this trait, you must implement the [`tower::Service`] trait with the
+/// appropriate associated types. It cannot be implemented directly.
+///
+/// ### ⚠️ Always implement `Clone` ⚠️
+///
+/// [`Clone`] is not a bound on `Transport`, however, transports generally may
+/// not be used as expected unless they implement `Clone`. For example, only
+/// cloneable transports may be used by the `RpcClient` in `alloy-rpc-client`
+/// to send RPC requests, and [`BoxTransport`] may only be used to type-erase
+/// Cloneable transports.
+///
+/// If you are implementing a transport, make sure it is [`Clone`].
+///
+/// [`TransportConnect`]: crate::TransportConnect
+pub trait Transport:
+    private::Sealed
+    + Service<
+        RequestPacket,
+        Response = ResponsePacket,
+        Error = TransportError,
+        Future = TransportFut<'static>,
+    > + Send
+    + Sync
+    + 'static
+{
+    /// Convert this transport into a boxed trait object.
+    fn boxed(self) -> BoxTransport
+    where
+        Self: Sized + Clone + Send + Sync + 'static,
+    {
+        BoxTransport::new(self)
+    }
+}
+
+impl<T> Transport for T where
+    T: private::Sealed
+        + Service<
+            RequestPacket,
+            Response = ResponsePacket,
+            Error = TransportError,
+            Future = TransportFut<'static>,
+        > + Send
+        + Sync
+        + 'static
+{
+}
+
+mod private {
+    use super::*;
+
+    pub trait Sealed {}
+    impl<T> Sealed for T where
+        T: Service<
+                RequestPacket,
+                Response = ResponsePacket,
+                Error = TransportError,
+                Future = TransportFut<'static>,
+            > + Send
+            + Sync
+            + 'static
+    {
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport/utils.rs.html b/src/alloy_transport/utils.rs.html new file mode 100644 index 000000000000..3385f47028d6 --- /dev/null +++ b/src/alloy_transport/utils.rs.html @@ -0,0 +1,128 @@ +utils.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+
use serde::Serialize;
+use serde_json::{
+    self,
+    value::{to_raw_value, RawValue},
+};
+use std::future::Future;
+use url::Url;
+
+use crate::{TransportError, TransportResult};
+
+/// Convert to a `Box<RawValue>` from a `Serialize` type, mapping the error
+/// to a `TransportError`.
+pub fn to_json_raw_value<S>(s: &S) -> TransportResult<Box<RawValue>>
+where
+    S: Serialize,
+{
+    to_raw_value(s).map_err(TransportError::ser_err)
+}
+
+/// Guess whether the URL is local, based on the hostname.
+///
+/// The ouput of this function is best-efforts, and should be checked if
+/// possible. It simply returns `true` if the connection has no hostname,
+/// or the hostname is `localhost` or `127.0.0.1`.
+pub fn guess_local_url(s: impl AsRef<str>) -> bool {
+    fn _guess_local_url(url: &str) -> bool {
+        if let Ok(url) = url.parse::<Url>() {
+            url.host_str().map_or(true, |host| host == "localhost" || host == "127.0.0.1")
+        } else {
+            false
+        }
+    }
+    _guess_local_url(s.as_ref())
+}
+
+#[doc(hidden)]
+pub trait Spawnable {
+    /// Spawn the future as a task.
+    ///
+    /// In WASM this will be a `wasm-bindgen-futures::spawn_local` call, while
+    /// in native it will be a `tokio::spawn` call.
+    fn spawn_task(self);
+}
+
+#[cfg(not(target_arch = "wasm32"))]
+impl<T> Spawnable for T
+where
+    T: Future<Output = ()> + Send + 'static,
+{
+    fn spawn_task(self) {
+        tokio::spawn(self);
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+impl<T> Spawnable for T
+where
+    T: Future<Output = ()> + 'static,
+{
+    fn spawn_task(self) {
+        wasm_bindgen_futures::spawn_local(self);
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport_http/hyper.rs.html b/src/alloy_transport_http/hyper.rs.html new file mode 100644 index 000000000000..087a42a71263 --- /dev/null +++ b/src/alloy_transport_http/hyper.rs.html @@ -0,0 +1,174 @@ +hyper.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+
use crate::Http;
+use alloy_json_rpc::{RequestPacket, ResponsePacket};
+use alloy_transport::{TransportError, TransportErrorKind, TransportFut};
+use hyper::{
+    body::Bytes,
+    client::{connect::Connect, Client},
+};
+use std::task;
+use tower::Service;
+
+impl<C> Http<Client<C>>
+where
+    C: Connect + Clone + Send + Sync + 'static,
+{
+    /// Make a request.
+    fn request(&self, req: RequestPacket) -> TransportFut<'static> {
+        let this = self.clone();
+        Box::pin(async move {
+            let ser = req.serialize().map_err(TransportError::ser_err)?;
+
+            // convert the Box<RawValue> into a hyper request<B>
+            let body: Box<str> = ser.into();
+            let body: Box<[u8]> = body.into();
+            let req = hyper::Request::builder()
+                .method(hyper::Method::POST)
+                .uri(this.url.as_str())
+                .header("content-type", "application/json")
+                .body(hyper::Body::from(Bytes::from(body)))
+                .expect("request parts are valid");
+
+            let resp = this.client.request(req).await.map_err(TransportErrorKind::custom)?;
+
+            // unpack json from the response body
+            let body = hyper::body::to_bytes(resp.into_body())
+                .await
+                .map_err(TransportErrorKind::custom)?;
+
+            // Deser a Box<RawValue> from the body. If deser fails, return the
+            // body as a string in the error. If the body is not UTF8, this will
+            // fail and give the empty string in the error.
+            serde_json::from_slice(body.as_ref()).map_err(|err| {
+                TransportError::deser_err(err, std::str::from_utf8(body.as_ref()).unwrap_or(""))
+            })
+        })
+    }
+}
+
+impl<C> Service<RequestPacket> for &Http<Client<C>>
+where
+    C: Connect + Clone + Send + Sync + 'static,
+{
+    type Response = ResponsePacket;
+    type Error = TransportError;
+    type Future = TransportFut<'static>;
+
+    #[inline]
+    fn poll_ready(&mut self, _cx: &mut task::Context<'_>) -> task::Poll<Result<(), Self::Error>> {
+        // hyper always returns ok
+        task::Poll::Ready(Ok(()))
+    }
+
+    #[inline]
+    fn call(&mut self, req: RequestPacket) -> Self::Future {
+        self.request(req)
+    }
+}
+
+impl<C> Service<RequestPacket> for Http<Client<C>>
+where
+    C: Connect + Clone + Send + Sync + 'static,
+{
+    type Response = ResponsePacket;
+    type Error = TransportError;
+    type Future = TransportFut<'static>;
+
+    #[inline]
+    fn poll_ready(&mut self, _cx: &mut task::Context<'_>) -> task::Poll<Result<(), Self::Error>> {
+        // hyper always returns ok
+        task::Poll::Ready(Ok(()))
+    }
+
+    #[inline]
+    fn call(&mut self, req: RequestPacket) -> Self::Future {
+        self.request(req)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport_http/lib.rs.html b/src/alloy_transport_http/lib.rs.html new file mode 100644 index 000000000000..61b5ba332e3f --- /dev/null +++ b/src/alloy_transport_http/lib.rs.html @@ -0,0 +1,174 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+use alloy_transport::utils::guess_local_url;
+use url::Url;
+
+#[cfg(all(not(target_arch = "wasm32"), feature = "hyper"))]
+mod hyper;
+
+#[cfg(feature = "reqwest")]
+mod reqwest;
+
+/// An Http transport.
+///
+/// The user must provide an internal http client and a URL to which to
+/// connect. It implements `Service<Box<RawValue>>`, and therefore
+/// [`Transport`].
+///
+/// [`Transport`]: alloy_transport::Transport
+///
+/// Currently supported clients are:
+#[cfg_attr(feature = "reqwest", doc = " - [`::reqwest::Client`]")]
+#[cfg_attr(feature = "hyper", doc = " - [`::hyper::client::Client`]")]
+#[derive(Debug, Clone)]
+pub struct Http<T> {
+    client: T,
+    url: Url,
+}
+
+impl<T> Http<T> {
+    /// Create a new [`Http`] transport.
+    pub fn new(url: Url) -> Self
+    where
+        T: Default,
+    {
+        Self { client: Default::default(), url }
+    }
+
+    /// Create a new [`Http`] transport with a custom client.
+    pub const fn with_client(client: T, url: Url) -> Self {
+        Self { client, url }
+    }
+
+    /// Set the URL.
+    pub fn set_url(&mut self, url: Url) {
+        self.url = url;
+    }
+
+    /// Set the client.
+    pub fn set_client(&mut self, client: T) {
+        self.client = client;
+    }
+
+    /// Guess whether the URL is local, based on the hostname.
+    ///
+    /// The ouput of this function is best-efforts, and should be checked if
+    /// possible. It simply returns `true` if the connection has no hostname,
+    /// or the hostname is `localhost` or `127.0.0.1`.
+    pub fn guess_local(&self) -> bool {
+        guess_local_url(&self.url)
+    }
+
+    /// Get a reference to the client.
+    pub const fn client(&self) -> &T {
+        &self.client
+    }
+
+    /// Get a reference to the URL.
+    pub fn url(&self) -> &str {
+        self.url.as_ref()
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport_http/reqwest.rs.html b/src/alloy_transport_http/reqwest.rs.html new file mode 100644 index 000000000000..914d7bcb605a --- /dev/null +++ b/src/alloy_transport_http/reqwest.rs.html @@ -0,0 +1,118 @@ +reqwest.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+
use crate::Http;
+use alloy_json_rpc::{RequestPacket, ResponsePacket};
+use alloy_transport::{TransportError, TransportErrorKind, TransportFut};
+use std::task;
+use tower::Service;
+
+impl Http<reqwest::Client> {
+    /// Make a request.
+    fn request(&self, req: RequestPacket) -> TransportFut<'static> {
+        let this = self.clone();
+        Box::pin(async move {
+            let resp = this
+                .client
+                .post(this.url)
+                .json(&req)
+                .send()
+                .await
+                .map_err(TransportErrorKind::custom)?;
+            let json = resp.text().await.map_err(TransportErrorKind::custom)?;
+
+            serde_json::from_str(&json).map_err(|err| TransportError::deser_err(err, &json))
+        })
+    }
+}
+
+impl Service<RequestPacket> for Http<reqwest::Client> {
+    type Response = ResponsePacket;
+    type Error = TransportError;
+    type Future = TransportFut<'static>;
+
+    #[inline]
+    fn poll_ready(&mut self, _cx: &mut task::Context<'_>) -> task::Poll<Result<(), Self::Error>> {
+        // reqwest always returns ok
+        task::Poll::Ready(Ok(()))
+    }
+
+    #[inline]
+    fn call(&mut self, req: RequestPacket) -> Self::Future {
+        self.request(req)
+    }
+}
+
+impl Service<RequestPacket> for &Http<reqwest::Client> {
+    type Response = ResponsePacket;
+    type Error = TransportError;
+    type Future = TransportFut<'static>;
+
+    #[inline]
+    fn poll_ready(&mut self, _cx: &mut task::Context<'_>) -> task::Poll<Result<(), Self::Error>> {
+        // reqwest always returns ok
+        task::Poll::Ready(Ok(()))
+    }
+
+    #[inline]
+    fn call(&mut self, req: RequestPacket) -> Self::Future {
+        self.request(req)
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport_ipc/connect.rs.html b/src/alloy_transport_ipc/connect.rs.html new file mode 100644 index 000000000000..8cd3fb62e1d2 --- /dev/null +++ b/src/alloy_transport_ipc/connect.rs.html @@ -0,0 +1,106 @@ +connect.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+
use std::{
+    ffi::{CString, OsString},
+    path::PathBuf,
+};
+
+#[derive(Debug, Clone)]
+/// An IPC Connection object.
+pub struct IpcConnect<T> {
+    ///
+    inner: T,
+}
+
+macro_rules! impl_connect {
+    ($target:ty) => {
+        impl From<$target> for IpcConnect<$target> {
+            fn from(inner: $target) -> Self {
+                Self { inner }
+            }
+        }
+
+        impl From<IpcConnect<$target>> for $target {
+            fn from(this: IpcConnect<$target>) -> $target {
+                this.inner
+            }
+        }
+
+        impl alloy_pubsub::PubSubConnect for IpcConnect<$target> {
+            fn is_local(&self) -> bool {
+                true
+            }
+
+            fn connect<'a: 'b, 'b>(
+                &'a self,
+            ) -> alloy_transport::Pbf<
+                'b,
+                alloy_pubsub::ConnectionHandle,
+                alloy_transport::TransportError,
+            > {
+                Box::pin(async move {
+                    crate::IpcBackend::connect(&self.inner)
+                        .await
+                        .map_err(alloy_transport::TransportErrorKind::custom)
+                })
+            }
+        }
+    };
+}
+
+impl_connect!(OsString);
+impl_connect!(CString);
+impl_connect!(PathBuf);
+impl_connect!(String);
+
\ No newline at end of file diff --git a/src/alloy_transport_ipc/lib.rs.html b/src/alloy_transport_ipc/lib.rs.html new file mode 100644 index 000000000000..ae29a342ec87 --- /dev/null +++ b/src/alloy_transport_ipc/lib.rs.html @@ -0,0 +1,402 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+mod connect;
+pub use connect::IpcConnect;
+
+#[cfg(feature = "mock")]
+pub mod mock;
+#[cfg(feature = "mock")]
+pub use mock::MockIpcServer;
+
+use bytes::{Buf, BytesMut};
+use futures::{ready, AsyncRead, AsyncWriteExt, StreamExt};
+use interprocess::local_socket::{tokio::LocalSocketStream, ToLocalSocketName};
+use std::task::Poll::Ready;
+use tokio::select;
+use tokio_util::compat::FuturesAsyncReadCompatExt;
+
+type Result<T> = std::result::Result<T, std::io::Error>;
+
+/// An IPC backend task.
+struct IpcBackend {
+    pub(crate) socket: LocalSocketStream,
+
+    pub(crate) interface: alloy_pubsub::ConnectionInterface,
+}
+
+impl IpcBackend {
+    /// Connect to a local socket. Either a unix socket or a windows named pipe.
+    async fn connect<'a, I>(name: &I) -> Result<alloy_pubsub::ConnectionHandle>
+    where
+        // TODO: remove bound on next interprocess crate release
+        I: ToLocalSocketName<'a> + Clone,
+    {
+        let socket = LocalSocketStream::connect(name.clone()).await?;
+        let (handle, interface) = alloy_pubsub::ConnectionHandle::new();
+
+        let backend = IpcBackend { socket, interface };
+
+        backend.spawn();
+
+        Ok(handle)
+    }
+
+    fn spawn(mut self) {
+        let fut = async move {
+            let (read, mut writer) = self.socket.into_split();
+            let mut read = ReadJsonStream::new(read).fuse();
+
+            let err = loop {
+                select! {
+                    biased;
+                    item = self.interface.recv_from_frontend() => {
+                        match item {
+                            Some(msg) => {
+                                let bytes = msg.get();
+                                if let Err(e) = writer.write_all(bytes.as_bytes()).await {
+                                    tracing::error!(%e, "Failed to write to IPC socket");
+                                    break true;
+                                }
+                            },
+                            // dispatcher has gone away, or shutdown was received
+                            None => {
+                                tracing::debug!("Frontend has gone away");
+                                break false;
+                            },
+                        }
+                    }
+                    // Read from the socket.
+                    item = read.next() => {
+                        match item {
+                            Some(item) => {
+                                if self.interface.send_to_frontend(item).is_err() {
+                                    tracing::debug!("Frontend has gone away");
+                                    break false;
+                                }
+                            }
+                            None => {
+                                tracing::error!("Read stream has failed.");
+                                break true;
+                            }
+                        }
+                    }
+                }
+            };
+            if err {
+                self.interface.close_with_error();
+            }
+        };
+
+        tokio::spawn(fut);
+    }
+}
+
+/// A stream of JSON-RPC items, read from an [`AsyncRead`] stream.
+#[derive(Debug)]
+#[pin_project::pin_project]
+pub struct ReadJsonStream<T> {
+    /// The underlying reader.
+    #[pin]
+    reader: tokio_util::compat::Compat<T>,
+    /// A buffer for reading data from the reader.
+    buf: BytesMut,
+    /// Whether the buffer has been drained.
+    drained: bool,
+}
+
+impl<T> ReadJsonStream<T>
+where
+    T: AsyncRead,
+{
+    fn new(reader: T) -> Self {
+        Self { reader: reader.compat(), buf: BytesMut::with_capacity(4096), drained: true }
+    }
+}
+
+impl<T> From<T> for ReadJsonStream<T>
+where
+    T: AsyncRead,
+{
+    fn from(reader: T) -> Self {
+        Self::new(reader)
+    }
+}
+
+impl<T> futures::stream::Stream for ReadJsonStream<T>
+where
+    T: AsyncRead,
+{
+    type Item = alloy_json_rpc::PubSubItem;
+
+    fn poll_next(
+        self: std::pin::Pin<&mut Self>,
+        cx: &mut std::task::Context<'_>,
+    ) -> std::task::Poll<Option<Self::Item>> {
+        use tokio_util::io::poll_read_buf;
+
+        let mut this = self.project();
+
+        loop {
+            // try decoding from the buffer, but only if we have new data
+            if !*this.drained {
+                tracing::debug!(buf_len = this.buf.len(), "Deserializing buffered IPC data");
+                let mut de = serde_json::Deserializer::from_slice(this.buf.as_ref()).into_iter();
+
+                let item = de.next();
+
+                // advance the buffer
+                this.buf.advance(de.byte_offset());
+
+                match item {
+                    Some(Ok(response)) => {
+                        return Ready(Some(response));
+                    }
+                    Some(Err(e)) => {
+                        tracing::error!(%e, "IPC response contained invalid JSON. Buffer contents will be logged at trace level");
+                        tracing::trace!(
+                            buffer = %String::from_utf8_lossy(this.buf.as_ref()),
+                            "IPC response contained invalid JSON. NOTE: Buffer contents do not include invalid utf8.",
+                        );
+
+                        return Ready(None);
+                    }
+                    None => {
+                        // nothing decoded
+                        *this.drained = true;
+                    }
+                }
+            }
+
+            // read more data into the buffer
+            match ready!(poll_read_buf(this.reader.as_mut(), cx, &mut this.buf)) {
+                Ok(data_len) => {
+                    tracing::debug!(%data_len, "Read data from IPC socket");
+
+                    // can try decoding again
+                    *this.drained = false;
+                }
+                Err(e) => {
+                    tracing::error!(%e, "Failed to read from IPC socket, shutting down");
+                    return Ready(None);
+                }
+            }
+        }
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport_ipc/mock.rs.html b/src/alloy_transport_ipc/mock.rs.html new file mode 100644 index 000000000000..dfadd3c37e24 --- /dev/null +++ b/src/alloy_transport_ipc/mock.rs.html @@ -0,0 +1,182 @@ +mock.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+
//! Mock IPC server.
+
+use alloy_json_rpc::Response;
+use futures::{AsyncReadExt, AsyncWriteExt};
+use serde::Serialize;
+use std::{collections::VecDeque, path::PathBuf};
+use tempfile::NamedTempFile;
+
+/// Mock IPC server.
+///
+/// Currently unix socket only, due to use of namedtempfile.
+///
+/// ## Example:
+///
+/// ```
+/// use alloy_transport_ipc::MockIpcServer;
+/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
+/// // Instantiate a new mock server.
+/// let mut server = MockIpcServer::new();
+/// // Get the path to the socket.
+/// let path = server.path();
+/// // Add a reply to the server. Can also use `add_raw_reply` to add a raw
+/// // byte vector, or `add_response` to add a json-rpc response.
+/// server.add_reply("hello");
+/// // Run the server. The first request will get "hello" as a response.
+/// MockIpcServer::new().spawn();
+/// # Ok(())
+/// # }
+/// ```
+#[derive(Debug)]
+pub struct MockIpcServer {
+    /// Replies to send, in order
+    replies: VecDeque<Vec<u8>>,
+    /// Path to the socket
+    path: NamedTempFile,
+}
+
+impl Default for MockIpcServer {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+impl MockIpcServer {
+    /// Create a new mock IPC server.
+    pub fn new() -> Self {
+        Self { replies: VecDeque::new(), path: NamedTempFile::new().unwrap() }
+    }
+
+    /// Add a raw reply to the server.
+    pub fn add_raw_reply(&mut self, reply: Vec<u8>) {
+        self.replies.push_back(reply);
+    }
+
+    /// Add a reply to the server.
+    pub fn add_reply<S: Serialize>(&mut self, s: S) {
+        let reply = serde_json::to_vec(&s).unwrap();
+        self.add_raw_reply(reply);
+    }
+
+    /// Add a json-rpc response to the server.
+    pub fn add_response<S: Serialize>(&mut self, response: Response<S>) {
+        self.add_reply(response);
+    }
+
+    /// Get the path to the socket.
+    pub fn path(&self) -> PathBuf {
+        self.path.path().to_owned()
+    }
+
+    /// Run the server.
+    pub async fn spawn(mut self) {
+        tokio::spawn(async move {
+            let socket = interprocess::local_socket::tokio::LocalSocketStream::connect(
+                self.path.into_temp_path().to_path_buf(),
+            )
+            .await
+            .unwrap();
+
+            let (mut reader, mut writer) = socket.into_split();
+
+            let mut buf = [0u8; 4096];
+            loop {
+                let _ = reader.read(&mut buf).await.unwrap();
+                let reply = self.replies.pop_front().unwrap_or_default();
+                writer.write_all(&reply).await.unwrap();
+            }
+        });
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport_ws/lib.rs.html b/src/alloy_transport_ws/lib.rs.html new file mode 100644 index 000000000000..9a1c16aced67 --- /dev/null +++ b/src/alloy_transport_ws/lib.rs.html @@ -0,0 +1,142 @@ +lib.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+
#![doc = include_str!("../README.md")]
+#![doc(
+    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
+    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
+)]
+#![warn(
+    missing_copy_implementations,
+    missing_debug_implementations,
+    missing_docs,
+    unreachable_pub,
+    clippy::missing_const_for_fn,
+    rustdoc::all
+)]
+#![cfg_attr(not(test), warn(unused_crate_dependencies))]
+#![deny(unused_must_use, rust_2018_idioms)]
+#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
+
+#[macro_use]
+extern crate tracing;
+
+use alloy_pubsub::ConnectionInterface;
+
+#[cfg(not(target_arch = "wasm32"))]
+mod native;
+#[cfg(not(target_arch = "wasm32"))]
+pub use native::WsConnect;
+
+#[cfg(target_arch = "wasm32")]
+mod wasm;
+#[cfg(target_arch = "wasm32")]
+pub use wasm::WsConnect;
+
+/// An ongoing connection to a backend.
+///
+/// Users should NEVER instantiate a backend directly. Instead, they should use
+/// [`PubSubConnect`] to get a running service with a running backend.
+///
+/// [`PubSubConnect`]: alloy_pubsub::PubSubConnect
+#[derive(Debug)]
+pub struct WsBackend<T> {
+    /// The websocket connection.
+    pub(crate) socket: T,
+
+    /// The interface to the connection.
+    pub(crate) interface: ConnectionInterface,
+}
+
+impl<T> WsBackend<T> {
+    /// Handle inbound text from the websocket.
+    #[tracing::instrument(skip(self))]
+    pub async fn handle_text(&mut self, t: String) -> Result<(), ()> {
+        debug!(text = t, "Received message from websocket");
+
+        match serde_json::from_str(&t) {
+            Ok(item) => {
+                trace!(?item, "Deserialized message");
+                let res = self.interface.send_to_frontend(item);
+                if res.is_err() {
+                    error!("Failed to send message to handler");
+                    return Err(());
+                }
+            }
+            Err(e) => {
+                error!(e = %e, "Failed to deserialize message");
+                return Err(());
+            }
+        }
+        Ok(())
+    }
+}
+
\ No newline at end of file diff --git a/src/alloy_transport_ws/native.rs.html b/src/alloy_transport_ws/native.rs.html new file mode 100644 index 000000000000..7ecee411c786 --- /dev/null +++ b/src/alloy_transport_ws/native.rs.html @@ -0,0 +1,334 @@ +native.rs - source +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+
use crate::WsBackend;
+use alloy_pubsub::PubSubConnect;
+use alloy_transport::{utils::Spawnable, Authorization, Pbf, TransportError, TransportErrorKind};
+use futures::{SinkExt, StreamExt};
+use serde_json::value::RawValue;
+use std::time::Duration;
+use tokio::time::sleep;
+use tokio_tungstenite::{
+    tungstenite::{self, client::IntoClientRequest, Message},
+    MaybeTlsStream, WebSocketStream,
+};
+
+type TungsteniteStream = WebSocketStream<MaybeTlsStream<tokio::net::TcpStream>>;
+
+const KEEPALIVE: u64 = 10;
+
+/// Simple connection details for a websocket connection.
+#[derive(Debug, Clone)]
+pub struct WsConnect {
+    /// The URL to connect to.
+    pub url: String,
+    /// The authorization header to use.
+    pub auth: Option<Authorization>,
+}
+
+impl IntoClientRequest for WsConnect {
+    fn into_client_request(self) -> tungstenite::Result<tungstenite::handshake::client::Request> {
+        let mut request: http::Request<()> = self.url.into_client_request()?;
+        if let Some(auth) = self.auth {
+            let mut auth_value = http::HeaderValue::from_str(&auth.to_string())?;
+            auth_value.set_sensitive(true);
+
+            request.headers_mut().insert(http::header::AUTHORIZATION, auth_value);
+        }
+
+        request.into_client_request()
+    }
+}
+
+impl PubSubConnect for WsConnect {
+    fn is_local(&self) -> bool {
+        alloy_transport::utils::guess_local_url(&self.url)
+    }
+
+    fn connect<'a: 'b, 'b>(&'a self) -> Pbf<'b, alloy_pubsub::ConnectionHandle, TransportError> {
+        let request = self.clone().into_client_request();
+
+        Box::pin(async move {
+            let req = request.map_err(TransportErrorKind::custom)?;
+            let (socket, _) =
+                tokio_tungstenite::connect_async(req).await.map_err(TransportErrorKind::custom)?;
+
+            let (handle, interface) = alloy_pubsub::ConnectionHandle::new();
+            let backend = WsBackend { socket, interface };
+
+            backend.spawn();
+
+            Ok(handle)
+        })
+    }
+}
+
+impl WsBackend<TungsteniteStream> {
+    /// Handle a message from the server.
+    pub async fn handle(&mut self, msg: Message) -> Result<(), ()> {
+        match msg {
+            Message::Text(text) => self.handle_text(text).await,
+            Message::Close(frame) => {
+                if frame.is_some() {
+                    error!(?frame, "Received close frame with data");
+                } else {
+                    error!("WS server has gone away");
+                }
+                Err(())
+            }
+            Message::Binary(_) => {
+                error!("Received binary message, expected text");
+                Err(())
+            }
+            Message::Ping(_) => Ok(()),
+            Message::Pong(_) => Ok(()),
+            Message::Frame(_) => Ok(()),
+        }
+    }
+
+    /// Send a message to the server.
+    pub async fn send(&mut self, msg: Box<RawValue>) -> Result<(), tungstenite::Error> {
+        self.socket.send(Message::Text(msg.get().to_owned())).await
+    }
+
+    /// Spawn a new backend task.
+    pub fn spawn(mut self) {
+        let fut = async move {
+            let mut err = false;
+            let keepalive = sleep(Duration::from_secs(KEEPALIVE));
+            tokio::pin!(keepalive);
+            loop {
+                // We bias the loop as follows
+                // 1. New dispatch to server.
+                // 2. Keepalive.
+                // 3. Response or notification from server.
+                // This ensures that keepalive is sent only if no other messages
+                // have been sent in the last 10 seconds. And prioritizes new
+                // dispatches over responses from the server. This will fail if
+                // the client saturates the task with dispatches, but that's
+                // probably not a big deal.
+                tokio::select! {
+                    biased;
+                    // we've received a new dispatch, so we send it via
+                    // websocket. We handle new work before processing any
+                    // responses from the server.
+                    inst = self.interface.recv_from_frontend() => {
+                        match inst {
+                            Some(msg) => {
+                                // Reset the keepalive timer.
+                                keepalive.set(sleep(Duration::from_secs(KEEPALIVE)));
+                                if let Err(e) = self.send(msg).await {
+                                    error!(err = %e, "WS connection error");
+                                    err = true;
+                                    break
+                                }
+                            },
+                            // dispatcher has gone away, or shutdown was received
+                            None => {
+                                break
+                            },
+                        }
+                    },
+                    // Send a ping to the server, if no other messages have been
+                    // sent in the last 10 seconds.
+                    _ = &mut keepalive => {
+                        // Reset the keepalive timer.
+                        keepalive.set(sleep(Duration::from_secs(KEEPALIVE)));
+                        if let Err(e) = self.socket.send(Message::Ping(vec![])).await {
+                            error!(err = %e, "WS connection error");
+                            err = true;
+                            break
+                        }
+                    }
+                    resp = self.socket.next() => {
+                        match resp {
+                            Some(Ok(item)) => {
+                                err = self.handle(item).await.is_err();
+                                if err { break }
+                            },
+                            Some(Err(e)) => {
+                                error!(err = %e, "WS connection error");
+                                err = true;
+                                break
+                            }
+                            None => {
+                                error!("WS server has gone away");
+                                err = true;
+                                break
+                            },
+                        }
+                    }
+                }
+            }
+            if err {
+                self.interface.close_with_error();
+            }
+        };
+        fut.spawn_task()
+    }
+}
+
\ No newline at end of file diff --git a/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/static.files/COPYRIGHT-23e9bde6c69aea69.txt new file mode 100644 index 000000000000..1447df792f68 --- /dev/null +++ b/static.files/COPYRIGHT-23e9bde6c69aea69.txt @@ -0,0 +1,50 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt new file mode 100644 index 000000000000..d7e9c149b7ea --- /dev/null +++ b/static.files/FiraSans-LICENSE-db4b642586e02d97.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 new file mode 100644 index 000000000000..7a1e5fc548ef Binary files /dev/null and b/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 differ diff --git a/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 new file mode 100644 index 000000000000..e766e06ccb0d Binary files /dev/null and b/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 differ diff --git a/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt new file mode 100644 index 000000000000..16fe87b06e80 --- /dev/null +++ b/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/static.files/LICENSE-MIT-65090b722b3f6c56.txt new file mode 100644 index 000000000000..31aa79387f27 --- /dev/null +++ b/static.files/LICENSE-MIT-65090b722b3f6c56.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 new file mode 100644 index 000000000000..1866ad4bcea6 Binary files /dev/null and b/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 differ diff --git a/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt new file mode 100644 index 000000000000..4b3edc29eb90 --- /dev/null +++ b/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 new file mode 100644 index 000000000000..462c34efcd9d Binary files /dev/null and b/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 differ diff --git a/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt new file mode 100644 index 000000000000..0d2941e148df --- /dev/null +++ b/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 new file mode 100644 index 000000000000..10b558e0b69a Binary files /dev/null and b/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 differ diff --git a/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 new file mode 100644 index 000000000000..5ec64eef0ec9 Binary files /dev/null and b/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 differ diff --git a/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 new file mode 100644 index 000000000000..181a07f63bef Binary files /dev/null and b/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 differ diff --git a/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 new file mode 100644 index 000000000000..2ae08a7bedfe Binary files /dev/null and b/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 differ diff --git a/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md new file mode 100644 index 000000000000..175fa4f47aec --- /dev/null +++ b/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md @@ -0,0 +1,98 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 new file mode 100644 index 000000000000..0263fc304226 Binary files /dev/null and b/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 differ diff --git a/static.files/clipboard-7571035ce49a181d.svg b/static.files/clipboard-7571035ce49a181d.svg new file mode 100644 index 000000000000..8adbd9963048 --- /dev/null +++ b/static.files/clipboard-7571035ce49a181d.svg @@ -0,0 +1 @@ + diff --git a/static.files/favicon-16x16-8b506e7a72182f1c.png b/static.files/favicon-16x16-8b506e7a72182f1c.png new file mode 100644 index 000000000000..ea4b45cae161 Binary files /dev/null and b/static.files/favicon-16x16-8b506e7a72182f1c.png differ diff --git a/static.files/favicon-2c020d218678b618.svg b/static.files/favicon-2c020d218678b618.svg new file mode 100644 index 000000000000..8b34b511989e --- /dev/null +++ b/static.files/favicon-2c020d218678b618.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/static.files/favicon-32x32-422f7d1d52889060.png b/static.files/favicon-32x32-422f7d1d52889060.png new file mode 100644 index 000000000000..69b8613ce150 Binary files /dev/null and b/static.files/favicon-32x32-422f7d1d52889060.png differ diff --git a/static.files/main-305769736d49e732.js b/static.files/main-305769736d49e732.js new file mode 100644 index 000000000000..b8b91afa0347 --- /dev/null +++ b/static.files/main-305769736d49e732.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerText=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}})}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-sidebar.offsetLeft-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px")},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/normalize-76eba96aa4d2e634.css b/static.files/normalize-76eba96aa4d2e634.css new file mode 100644 index 000000000000..469959f13729 --- /dev/null +++ b/static.files/normalize-76eba96aa4d2e634.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/static.files/noscript-feafe1bb7466e4bd.css b/static.files/noscript-feafe1bb7466e4bd.css new file mode 100644 index 000000000000..7bbe07f1c93a --- /dev/null +++ b/static.files/noscript-feafe1bb7466e4bd.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/static.files/rust-logo-151179464ae7ed46.svg b/static.files/rust-logo-151179464ae7ed46.svg new file mode 100644 index 000000000000..62424d8ffd76 --- /dev/null +++ b/static.files/rust-logo-151179464ae7ed46.svg @@ -0,0 +1,61 @@ + + + diff --git a/static.files/rustdoc-804b98a1284a310a.css b/static.files/rustdoc-804b98a1284a310a.css new file mode 100644 index 000000000000..7270f76d714b --- /dev/null +++ b/static.files/rustdoc-804b98a1284a310a.css @@ -0,0 +1,18 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:100;}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:200;position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .rustdoc.src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;z-index:100;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.5rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.5rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;margin-top:calc((-16px + 0.57rem ) / 2 );}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;}.hide-sidebar #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.hide-sidebar #sidebar-button{position:static;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a,:root[data-theme="ayu"] #source-sidebar>.title{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static.files/scrape-examples-ef1e698c1d417c0c.js b/static.files/scrape-examples-ef1e698c1d417c0c.js new file mode 100644 index 000000000000..ba830e3744a4 --- /dev/null +++ b/static.files/scrape-examples-ef1e698c1d417c0c.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/static.files/search-2b6ce74ff89ae146.js b/static.files/search-2b6ce74ff89ae146.js new file mode 100644 index 000000000000..0545970307ad --- /dev/null +++ b/static.files/search-2b6ce74ff89ae146.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let functionTypeFingerprint;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-]".indexOf(c)!==-1}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",normalizedPathLast:"never",generics:[],bindings:new Map(),typeFilter:"primitive",bindingName,}}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){bindings.set(gen.bindingName.name,[gen,...gen.bindingName.generics]);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb);if(passesUnification){return true}}return false});if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false});return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens){if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens)}return false}function checkIfInList(list,elem,whereClause,mgens){for(const entry of list){if(checkType(entry,elem,whereClause,mgens)){return true}}return false}function checkType(row,elem,whereClause,mgens){if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens)}}return unifyFunctionTypes([row],[elem],whereClause,mgens)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxEditDistance){continue pathiter}dist_total+=dist}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}))}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.map(type=>buildItemSearchType(type,lowercasePaths))}function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=[];bindings=new Map()}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths);if(type.length>BINDINGS_DATA){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=new Map()}}if(pathIndex<0){return{id:pathIndex,ty:TY_GENERIC,path:null,generics,bindings,}}if(pathIndex===0){return{id:null,ty:null,path:null,generics,bindings,}}const item=lowercasePaths[pathIndex-1];return{id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,generics,bindings,}}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:[],bindings:new Map(),};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}function buildIndex(rawSearchIndex){searchIndex=[];typeNameIdMap=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;typeNameIdOfArray=buildTypeMapIndex("array");typeNameIdOfSlice=buildTypeMapIndex("slice");typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const crateRow={crate:crate,ty:3,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const deprecatedItems=new Set(crateCorpus.c);const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type,id:id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length}}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static.files/settings-4313503d2e1961c2.js b/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 000000000000..ab425fe49d50 --- /dev/null +++ b/static.files/settings-4313503d2e1961c2.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-39ed315d46fb705f.js b/static.files/src-script-39ed315d46fb705f.js new file mode 100644 index 000000000000..ef74f361ea6b --- /dev/null +++ b/static.files/src-script-39ed315d46fb705f.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");getToggleLabel().innerText=">";updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");getToggleLabel().innerText="<";updateLocalStorage("source-sidebar-show","true")};function toggleSidebar(){const child=this.parentNode.children[0];if(child.innerText===">"){window.rustdocShowSourceSidebar()}else{window.rustdocCloseSourceSidebar()}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-f2adc0d6ca4d09fb.js b/static.files/storage-f2adc0d6ca4d09fb.js new file mode 100644 index 000000000000..17233608a787 --- /dev/null +++ b/static.files/storage-f2adc0d6ca4d09fb.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px")}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px")}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}}) \ No newline at end of file diff --git a/static.files/wheel-7b819b6101059cd0.svg b/static.files/wheel-7b819b6101059cd0.svg new file mode 100644 index 000000000000..83c07f63d10a --- /dev/null +++ b/static.files/wheel-7b819b6101059cd0.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/trait.impl/alloy_json_rpc/trait.RpcObject.js b/trait.impl/alloy_json_rpc/trait.RpcObject.js new file mode 100644 index 000000000000..0c67868f3f52 --- /dev/null +++ b/trait.impl/alloy_json_rpc/trait.RpcObject.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_json_rpc":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_json_rpc/trait.RpcParam.js b/trait.impl/alloy_json_rpc/trait.RpcParam.js new file mode 100644 index 000000000000..0c67868f3f52 --- /dev/null +++ b/trait.impl/alloy_json_rpc/trait.RpcParam.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_json_rpc":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_json_rpc/trait.RpcReturn.js b/trait.impl/alloy_json_rpc/trait.RpcReturn.js new file mode 100644 index 000000000000..0c67868f3f52 --- /dev/null +++ b/trait.impl/alloy_json_rpc/trait.RpcReturn.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_json_rpc":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_providers/builder/trait.ProviderLayer.js b/trait.impl/alloy_providers/builder/trait.ProviderLayer.js new file mode 100644 index 000000000000..6fbe0b17fda2 --- /dev/null +++ b/trait.impl/alloy_providers/builder/trait.ProviderLayer.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_providers":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_providers/provider/trait.TempProvider.js b/trait.impl/alloy_providers/provider/trait.TempProvider.js new file mode 100644 index 000000000000..6fbe0b17fda2 --- /dev/null +++ b/trait.impl/alloy_providers/provider/trait.TempProvider.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_providers":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_providers/trait.Provider.js b/trait.impl/alloy_providers/trait.Provider.js new file mode 100644 index 000000000000..6fbe0b17fda2 --- /dev/null +++ b/trait.impl/alloy_providers/trait.Provider.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_providers":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_pubsub/connect/trait.PubSubConnect.js b/trait.impl/alloy_pubsub/connect/trait.PubSubConnect.js new file mode 100644 index 000000000000..b6868a1de7cd --- /dev/null +++ b/trait.impl/alloy_pubsub/connect/trait.PubSubConnect.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"alloy_transport_ipc":[["impl PubSubConnect for IpcConnect<OsString>"],["impl PubSubConnect for IpcConnect<PathBuf>"],["impl PubSubConnect for IpcConnect<String>"],["impl PubSubConnect for IpcConnect<CString>"]], +"alloy_transport_ws":[["impl PubSubConnect for WsConnect"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_rlp/decode/trait.Decodable.js b/trait.impl/alloy_rlp/decode/trait.Decodable.js new file mode 100644 index 000000000000..c589136770c2 --- /dev/null +++ b/trait.impl/alloy_rlp/decode/trait.Decodable.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl Decodable for AccessList"],["impl Decodable for Withdrawal"],["impl Decodable for AccessListItem"],["impl Decodable for Log"],["impl Decodable for EIP2930TransactionRequest"],["impl Decodable for BlockHashOrNumber"],["impl Decodable for TypedTransactionRequest"],["impl Decodable for EIP1559TransactionRequest"],["impl Decodable for TransactionKind"],["impl Decodable for Parity"],["impl Decodable for LegacyTransactionRequest"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_rlp/encode/trait.Encodable.js b/trait.impl/alloy_rlp/encode/trait.Encodable.js new file mode 100644 index 000000000000..b597b0c39ac6 --- /dev/null +++ b/trait.impl/alloy_rlp/encode/trait.Encodable.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl Encodable for TransactionKind"],["impl Encodable for TypedTransactionRequest"],["impl Encodable for EIP2930TransactionRequest"],["impl Encodable for Parity"],["impl Encodable for EIP1559TransactionRequest"],["impl Encodable for LegacyTransactionRequest"],["impl Encodable for Log"],["impl Encodable for AccessListItem"],["impl Encodable for AccessList"],["impl Encodable for BlockHashOrNumber"],["impl Encodable for Withdrawal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_signer/signer/trait.Signer.js b/trait.impl/alloy_signer/signer/trait.Signer.js new file mode 100644 index 000000000000..85941503b877 --- /dev/null +++ b/trait.impl/alloy_signer/signer/trait.Signer.js @@ -0,0 +1,6 @@ +(function() {var implementors = { +"alloy_signer":[], +"alloy_signer_aws":[["impl Signer for AwsSigner"]], +"alloy_signer_ledger":[["impl Signer for LedgerSigner"]], +"alloy_signer_trezor":[["impl Signer for TrezorSigner"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_signer/signer/trait.SignerSync.js b/trait.impl/alloy_signer/signer/trait.SignerSync.js new file mode 100644 index 000000000000..e06a7105130c --- /dev/null +++ b/trait.impl/alloy_signer/signer/trait.SignerSync.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_signer":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_transport/boxed/trait.CloneTransport.js b/trait.impl/alloy_transport/boxed/trait.CloneTransport.js new file mode 100644 index 000000000000..023fc6e9abd3 --- /dev/null +++ b/trait.impl/alloy_transport/boxed/trait.CloneTransport.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_transport":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_transport/connect/trait.BoxTransportConnect.js b/trait.impl/alloy_transport/connect/trait.BoxTransportConnect.js new file mode 100644 index 000000000000..023fc6e9abd3 --- /dev/null +++ b/trait.impl/alloy_transport/connect/trait.BoxTransportConnect.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_transport":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_transport/trait/private/trait.Sealed.js b/trait.impl/alloy_transport/trait/private/trait.Sealed.js new file mode 100644 index 000000000000..023fc6e9abd3 --- /dev/null +++ b/trait.impl/alloy_transport/trait/private/trait.Sealed.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_transport":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/alloy_transport/trait/trait.Transport.js b/trait.impl/alloy_transport/trait/trait.Transport.js new file mode 100644 index 000000000000..023fc6e9abd3 --- /dev/null +++ b/trait.impl/alloy_transport/trait/trait.Transport.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_transport":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/arbitrary/trait.Arbitrary.js b/trait.impl/arbitrary/trait.Arbitrary.js new file mode 100644 index 000000000000..adbcafb22051 --- /dev/null +++ b/trait.impl/arbitrary/trait.Arbitrary.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl<'arbitrary> Arbitrary<'arbitrary> for BlockHashOrNumber"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js new file mode 100644 index 000000000000..c2cd8fb646b1 --- /dev/null +++ b/trait.impl/core/clone/trait.Clone.js @@ -0,0 +1,13 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Clone for Id"],["impl Clone for PubSubItem"],["impl<Payload: Clone, ErrData: Clone> Clone for ResponsePacket<Payload, ErrData>"],["impl Clone for RequestMeta"],["impl<Payload: Clone, ErrData: Clone> Clone for ResponsePayload<Payload, ErrData>"],["impl Clone for SerializedRequest"],["impl<ErrData: Clone> Clone for ErrorPayload<ErrData>"],["impl Clone for RequestPacket"],["impl<Params: Clone> Clone for Request<Params>"],["impl<T: Clone> Clone for EthNotification<T>"],["impl<Payload: Clone, ErrData: Clone> Clone for Response<Payload, ErrData>"]], +"alloy_pubsub":[["impl Clone for PubSubFrontend"],["impl Clone for ActiveSubscription"]], +"alloy_rpc_types":[["impl Clone for TransactionTrace"],["impl Clone for TransactionIndex"],["impl Clone for TraceOutput"],["impl Clone for FilterChanges"],["impl Clone for U64HexOrNumber"],["impl Clone for CallLogFrame"],["impl Clone for PeerCount"],["impl Clone for TransactionStats"],["impl<T: Clone + Eq + Hash> Clone for FilterSet<T>"],["impl Clone for AccessListWithGasUsed"],["impl Clone for RewardType"],["impl Clone for TxType"],["impl Clone for StateDiff"],["impl Clone for Signature"],["impl Clone for Bundle"],["impl Clone for OtherFields"],["impl Clone for CallConfig"],["impl Clone for MemoryDelta"],["impl Clone for Filter"],["impl Clone for FeeHistory"],["impl Clone for BlockId"],["impl<T: Clone> Clone for Delta<T>"],["impl Clone for GethDefaultTracingOptions"],["impl Clone for GethDebugTracerType"],["impl Clone for BlockOverrides"],["impl Clone for CallRequest"],["impl Clone for PreStateConfig"],["impl Clone for CallAction"],["impl Clone for StateContext"],["impl Clone for AccessListItem"],["impl Clone for TraceFilterMatcher"],["impl Clone for PreStateFrame"],["impl Clone for GethDebugBuiltInTracerType"],["impl Clone for Parity"],["impl Clone for NoopFrame"],["impl<T: Clone> Clone for ValueOrArray<T>"],["impl Clone for EthCallResponse"],["impl Clone for ChainStatus"],["impl Clone for BlockTransactions"],["impl Clone for VmExecutedOperation"],["impl Clone for EIP1559TransactionRequest"],["impl Clone for AccountInfo"],["impl Clone for Log"],["impl Clone for TraceType"],["impl Clone for TxpoolContent"],["impl Clone for AccountState"],["impl Clone for RpcBlockHash"],["impl<'a> Clone for BlockTransactionHashes<'a>"],["impl<'a> Clone for BlockTransactionHashesInner<'a>"],["impl Clone for EIP2930TransactionRequest"],["impl Clone for LocalizedTransactionTrace"],["impl Clone for Block"],["impl Clone for StorageDelta"],["impl Clone for EIP1186AccountProofResponse"],["impl Clone for BlockNumHash"],["impl Clone for JsonStorageKey"],["impl Clone for AccountOverride"],["impl Clone for Header"],["impl Clone for PubSubSyncStatus"],["impl Clone for RpcModules"],["impl Clone for GethDebugTracingOptions"],["impl Clone for BlockTraceResult"],["impl<Ok: Clone, Err: Clone> Clone for TraceResult<Ok, Err>"],["impl<T: Clone> Clone for Rich<T>"],["impl Clone for ActionType"],["impl Clone for DiffStateKind"],["impl Clone for PeerNetworkInfo"],["impl Clone for BlockTransactionsKind"],["impl Clone for PipProtocolInfo"],["impl Clone for Log"],["impl<T: Clone> Clone for ChangedType<T>"],["impl Clone for TraceResultsWithTransactionHash"],["impl Clone for Params"],["impl Clone for TraceFilterMode"],["impl Clone for TypedTransactionRequest"],["impl Clone for FourByteFrame"],["impl Clone for CallType"],["impl Clone for SubscriptionResult"],["impl Clone for FilterId"],["impl Clone for JsonU256"],["impl Clone for TxpoolContentFrom"],["impl Clone for CallInput"],["impl Clone for Withdrawal"],["impl Clone for PeerInfo"],["impl Clone for AccessList"],["impl Clone for AccountDiff"],["impl Clone for SyncStatusMetadata"],["impl Clone for StructLog"],["impl Clone for TraceFilter"],["impl Clone for HexStringMissingPrefixError"],["impl Clone for TxpoolStatus"],["impl Clone for TxGasAndReward"],["impl Clone for CreateOutput"],["impl Clone for TraceResults"],["impl Clone for PeerEthProtocolInfo"],["impl Clone for AccountChangeKind"],["impl Clone for TxpoolInspectSummary"],["impl Clone for ExtAccountInfo"],["impl Clone for RewardAction"],["impl Clone for DiffMode"],["impl Clone for VmInstruction"],["impl Clone for GethTrace"],["impl Clone for CallOutput"],["impl Clone for SelfdestructAction"],["impl Clone for DefaultFrame"],["impl Clone for Null"],["impl Clone for LegacyTransactionRequest"],["impl Clone for Transaction"],["impl Clone for TransactionReceipt"],["impl Clone for BlockNumberOrTag"],["impl Clone for Peers"],["impl Clone for TxpoolInspect"],["impl Clone for RecoveredAccount"],["impl Clone for SyncInfo"],["impl Clone for PendingTransactionFilterKind"],["impl Clone for BlockHashOrNumber"],["impl Clone for TransactionKind"],["impl Clone for SyncStatus"],["impl Clone for Action"],["impl Clone for PreStateMode"],["impl Clone for TransactionInfo"],["impl Clone for GethDebugTracingCallOptions"],["impl Clone for CreateAction"],["impl Clone for EIP1186StorageProof"],["impl Clone for TransactionRequest"],["impl Clone for PeerProtocolsInfo"],["impl Clone for CallFrame"],["impl Clone for GethDebugTracerConfig"],["impl Clone for VmTrace"],["impl Clone for SubscriptionKind"],["impl Clone for FilterBlockOption"]], +"alloy_signer":[["impl<D: Clone> Clone for Wallet<D>"],["impl<W: Clone + Wordlist> Clone for MnemonicBuilder<W>"],["impl Clone for UnsupportedSignerOperation"],["impl Clone for Signature"]], +"alloy_signer_aws":[["impl Clone for AwsSigner"]], +"alloy_signer_ledger":[["impl Clone for DerivationType"],["impl Clone for P1"],["impl Clone for INS"],["impl Clone for P2"]], +"alloy_signer_trezor":[["impl Clone for DerivationType"]], +"alloy_transport":[["impl Clone for BoxTransport"],["impl Clone for Authorization"]], +"alloy_transport_http":[["impl<T: Clone> Clone for Http<T>"]], +"alloy_transport_ipc":[["impl<T: Clone> Clone for IpcConnect<T>"]], +"alloy_transport_ws":[["impl Clone for WsConnect"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Eq.js b/trait.impl/core/cmp/trait.Eq.js new file mode 100644 index 000000000000..510a5a428828 --- /dev/null +++ b/trait.impl/core/cmp/trait.Eq.js @@ -0,0 +1,7 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Eq for Id"]], +"alloy_pubsub":[["impl Eq for ActiveSubscription"]], +"alloy_rpc_types":[["impl Eq for BlockNumHash"],["impl Eq for GethDebugTracerConfig"],["impl Eq for U64HexOrNumber"],["impl Eq for TransactionKind"],["impl Eq for EIP1186StorageProof"],["impl Eq for Params"],["impl Eq for TraceOutput"],["impl Eq for TxType"],["impl Eq for SubscriptionKind"],["impl Eq for PreStateConfig"],["impl Eq for BlockTransactionsKind"],["impl Eq for TxpoolContentFrom"],["impl Eq for AccountDiff"],["impl Eq for RpcBlockHash"],["impl Eq for TransactionReceipt"],["impl Eq for TransactionInfo"],["impl Eq for VmTrace"],["impl Eq for LegacyTransactionRequest"],["impl Eq for VmInstruction"],["impl Eq for PubSubSyncStatus"],["impl Eq for AccountChangeKind"],["impl Eq for Signature"],["impl Eq for SelfdestructAction"],["impl Eq for PreStateMode"],["impl Eq for GethDebugTracingOptions"],["impl Eq for Null"],["impl Eq for DiffStateKind"],["impl Eq for TransactionRequest"],["impl Eq for TraceFilterMode"],["impl Eq for CreateAction"],["impl Eq for StorageDelta"],["impl Eq for EIP1559TransactionRequest"],["impl Eq for CallOutput"],["impl Eq for Bundle"],["impl Eq for TraceFilter"],["impl Eq for FilterId"],["impl Eq for TypedTransactionRequest"],["impl Eq for GethTrace"],["impl Eq for TxpoolInspectSummary"],["impl Eq for Parity"],["impl Eq for CallFrame"],["impl Eq for PreStateFrame"],["impl<Ok: Eq, Err: Eq> Eq for TraceResult<Ok, Err>"],["impl Eq for TxpoolContent"],["impl Eq for Withdrawal"],["impl Eq for TxpoolInspect"],["impl Eq for AccountState"],["impl Eq for Block"],["impl Eq for EIP2930TransactionRequest"],["impl Eq for DefaultFrame"],["impl Eq for AccountInfo"],["impl Eq for EIP1186AccountProofResponse"],["impl Eq for GethDebugBuiltInTracerType"],["impl Eq for MemoryDelta"],["impl Eq for Transaction"],["impl Eq for VmExecutedOperation"],["impl Eq for RpcModules"],["impl Eq for FilterChanges"],["impl Eq for TxpoolStatus"],["impl Eq for RewardType"],["impl Eq for BlockOverrides"],["impl<T: Eq> Eq for Rich<T>"],["impl Eq for FourByteFrame"],["impl Eq for Action"],["impl Eq for SyncStatus"],["impl Eq for SyncStatusMetadata"],["impl Eq for StateContext"],["impl Eq for SubscriptionResult"],["impl<T: Eq> Eq for ValueOrArray<T>"],["impl Eq for BlockTraceResult"],["impl Eq for TxGasAndReward"],["impl Eq for Log"],["impl Eq for TransactionTrace"],["impl Eq for DiffMode"],["impl Eq for GethDebugTracingCallOptions"],["impl Eq for GethDebugTracerType"],["impl Eq for OtherFields"],["impl Eq for TraceFilterMatcher"],["impl Eq for PendingTransactionFilterKind"],["impl Eq for CallConfig"],["impl<T: Eq + Eq + Hash> Eq for FilterSet<T>"],["impl Eq for Filter"],["impl Eq for ExtAccountInfo"],["impl Eq for CallLogFrame"],["impl Eq for BlockTransactions"],["impl Eq for CallRequest"],["impl Eq for AccountOverride"],["impl Eq for Header"],["impl Eq for StructLog"],["impl<T: Eq> Eq for Delta<T>"],["impl Eq for CallType"],["impl Eq for TransactionIndex"],["impl Eq for TraceResults"],["impl Eq for BlockNumberOrTag"],["impl Eq for CallInput"],["impl Eq for RewardAction"],["impl Eq for CallAction"],["impl Eq for BlockId"],["impl Eq for FilterBlockOption"],["impl Eq for ActionType"],["impl Eq for JsonStorageKey"],["impl Eq for SyncInfo"],["impl Eq for LocalizedTransactionTrace"],["impl Eq for StateDiff"],["impl Eq for TraceResultsWithTransactionHash"],["impl Eq for GethDefaultTracingOptions"],["impl Eq for JsonU256"],["impl Eq for BlockHashOrNumber"],["impl Eq for AccessListWithGasUsed"],["impl Eq for TraceType"],["impl Eq for AccessListItem"],["impl Eq for NoopFrame"],["impl Eq for Log"],["impl Eq for AccessList"],["impl Eq for EthCallResponse"],["impl<T: Eq> Eq for ChangedType<T>"],["impl Eq for CreateOutput"]], +"alloy_signer":[["impl Eq for UnsupportedSignerOperation"],["impl Eq for Signature"],["impl<W: Eq + Wordlist> Eq for MnemonicBuilder<W>"]], +"alloy_signer_ledger":[["impl Eq for P1"],["impl Eq for P2"],["impl Eq for INS"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Ord.js b/trait.impl/core/cmp/trait.Ord.js new file mode 100644 index 000000000000..f44bccc65ff8 --- /dev/null +++ b/trait.impl/core/cmp/trait.Ord.js @@ -0,0 +1,6 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Ord for Id"]], +"alloy_pubsub":[["impl Ord for ActiveSubscription"]], +"alloy_rpc_types":[["impl Ord for TxGasAndReward"],["impl Ord for JsonU256"],["impl Ord for TxType"],["impl Ord for U64HexOrNumber"],["impl Ord for Null"]], +"alloy_signer":[["impl Ord for UnsupportedSignerOperation"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js new file mode 100644 index 000000000000..3d6414cb615d --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -0,0 +1,7 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl PartialEq for Id"]], +"alloy_pubsub":[["impl PartialEq for ActiveSubscription"]], +"alloy_rpc_types":[["impl<T: PartialEq + Eq + Hash> PartialEq for FilterSet<T>"],["impl PartialEq for TraceType"],["impl PartialEq for TransactionRequest"],["impl PartialEq for StructLog"],["impl PartialEq for GethDebugTracingCallOptions"],["impl PartialEq for StateDiff"],["impl PartialEq for Action"],["impl PartialEq for Filter"],["impl PartialEq for Params"],["impl PartialEq for AccountInfo"],["impl PartialEq for CallOutput"],["impl<T: PartialEq> PartialEq for Rich<T>"],["impl PartialEq for BlockOverrides"],["impl PartialEq for Parity"],["impl PartialEq for TraceFilterMode"],["impl PartialEq for TxpoolInspect"],["impl PartialEq for JsonU256"],["impl PartialEq for TransactionReceipt"],["impl PartialEq for CreateAction"],["impl PartialEq for Null"],["impl PartialEq for TypedTransactionRequest"],["impl PartialEq for BlockTransactionsKind"],["impl<T: PartialEq> PartialEq for ChangedType<T>"],["impl PartialEq for DefaultFrame"],["impl PartialEq for AccessListItem"],["impl PartialEq for FourByteFrame"],["impl PartialEq for U64HexOrNumber"],["impl PartialEq for SubscriptionResult"],["impl PartialEq for TxGasAndReward"],["impl PartialEq for TxpoolContentFrom"],["impl PartialEq for RewardAction"],["impl PartialEq for EthCallResponse"],["impl PartialEq for TraceOutput"],["impl PartialEq for TraceResults"],["impl PartialEq for StorageDelta"],["impl PartialEq for BlockTransactions"],["impl PartialEq for CallInput"],["impl PartialEq for SubscriptionKind"],["impl PartialEq for Bundle"],["impl PartialEq for Log"],["impl PartialEq for VmTrace"],["impl PartialEq for AccountOverride"],["impl PartialEq for RpcModules"],["impl PartialEq for AccessListWithGasUsed"],["impl PartialEq for SyncInfo"],["impl PartialEq for EIP1559TransactionRequest"],["impl PartialEq for LegacyTransactionRequest"],["impl PartialEq for AccountChangeKind"],["impl PartialEq for JsonStorageKey"],["impl PartialEq for TransactionKind"],["impl PartialEq for AccountState"],["impl PartialEq for AccountDiff"],["impl PartialEq for TxpoolStatus"],["impl PartialEq for PreStateFrame"],["impl PartialEq for TraceFilterMatcher"],["impl PartialEq for MemoryDelta"],["impl PartialEq for CallAction"],["impl PartialEq for TransactionIndex"],["impl PartialEq for GethDebugTracingOptions"],["impl PartialEq for RpcBlockHash"],["impl PartialEq for PubSubSyncStatus"],["impl PartialEq for GethDebugTracerConfig"],["impl PartialEq for TransactionInfo"],["impl PartialEq for Header"],["impl PartialEq for CallLogFrame"],["impl PartialEq for BlockHashOrNumber"],["impl PartialEq for BlockNumberOrTag"],["impl PartialEq for GethDefaultTracingOptions"],["impl PartialEq for SyncStatus"],["impl<T: PartialEq> PartialEq for Delta<T>"],["impl PartialEq for VmInstruction"],["impl<Ok: PartialEq, Err: PartialEq> PartialEq for TraceResult<Ok, Err>"],["impl PartialEq for PendingTransactionFilterKind"],["impl PartialEq for EIP1186AccountProofResponse"],["impl<T: PartialEq> PartialEq for ValueOrArray<T>"],["impl PartialEq for NoopFrame"],["impl PartialEq for GethDebugTracerType"],["impl PartialEq for BlockTraceResult"],["impl PartialEq for DiffMode"],["impl PartialEq for Block"],["impl PartialEq for TransactionTrace"],["impl PartialEq for TxType"],["impl PartialEq for PreStateMode"],["impl PartialEq for SelfdestructAction"],["impl PartialEq for VmExecutedOperation"],["impl PartialEq for ActionType"],["impl PartialEq for Transaction"],["impl PartialEq for Signature"],["impl PartialEq for Withdrawal"],["impl PartialEq for DiffStateKind"],["impl PartialEq for BlockNumHash"],["impl PartialEq for AccessList"],["impl PartialEq for EIP2930TransactionRequest"],["impl PartialEq for EIP1186StorageProof"],["impl PartialEq for PreStateConfig"],["impl PartialEq for CallType"],["impl PartialEq for FeeHistory"],["impl PartialEq for StateContext"],["impl PartialEq for FilterBlockOption"],["impl PartialEq for TxpoolInspectSummary"],["impl PartialEq for FilterId"],["impl PartialEq for Log"],["impl PartialEq for ExtAccountInfo"],["impl PartialEq for GethTrace"],["impl PartialEq for GethDebugBuiltInTracerType"],["impl PartialEq for CallFrame"],["impl PartialEq for OtherFields"],["impl PartialEq for LocalizedTransactionTrace"],["impl PartialEq for CallConfig"],["impl PartialEq for TraceResultsWithTransactionHash"],["impl PartialEq for CreateOutput"],["impl PartialEq for TraceFilter"],["impl PartialEq for CallRequest"],["impl PartialEq for BlockId"],["impl PartialEq for FilterChanges"],["impl PartialEq for SyncStatusMetadata"],["impl PartialEq for RewardType"],["impl PartialEq for TxpoolContent"]], +"alloy_signer":[["impl<W: PartialEq + Wordlist> PartialEq for MnemonicBuilder<W>"],["impl PartialEq for UnsupportedSignerOperation"],["impl PartialEq for Signature"],["impl PartialEq for Wallet<SigningKey>"]], +"alloy_signer_ledger":[["impl PartialEq for P1"],["impl PartialEq for INS"],["impl PartialEq for P2"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialOrd.js b/trait.impl/core/cmp/trait.PartialOrd.js new file mode 100644 index 000000000000..2f146b862fb3 --- /dev/null +++ b/trait.impl/core/cmp/trait.PartialOrd.js @@ -0,0 +1,6 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl PartialOrd for Id"]], +"alloy_pubsub":[["impl PartialOrd for ActiveSubscription"]], +"alloy_rpc_types":[["impl PartialOrd for U64HexOrNumber"],["impl PartialOrd for TxGasAndReward"],["impl PartialOrd for JsonU256"],["impl PartialOrd for Null"],["impl PartialOrd for TxType"]], +"alloy_signer":[["impl PartialOrd for UnsupportedSignerOperation"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.AsRef.js b/trait.impl/core/convert/trait.AsRef.js new file mode 100644 index 000000000000..0c5dff985339 --- /dev/null +++ b/trait.impl/core/convert/trait.AsRef.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl AsRef<BTreeMap<String, Value>> for OtherFields"],["impl AsRef<FixedBytes<32>> for RpcBlockHash"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js new file mode 100644 index 000000000000..61bd3c8541ba --- /dev/null +++ b/trait.impl/core/convert/trait.From.js @@ -0,0 +1,11 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl<Payload, ErrData> From<Vec<Response<Payload, ErrData>>> for ResponsePacket<Payload, ErrData>"],["impl<E, ErrResp> From<E> for RpcError<E, ErrResp>"],["impl From<SerializedRequest> for RequestPacket"]], +"alloy_providers":[["impl<N, T> From<NetworkRpcClient<N, T>> for RpcClient<T>
where\n N: Network,\n T: Transport,
"],["impl<N, T> From<RpcClient<T>> for NetworkRpcClient<N, T>
where\n N: Network,\n T: Transport,
"]], +"alloy_rpc_client":[["impl<Resp> From<Receiver<Result<Box<RawValue>, RpcError<TransportErrorKind>>>> for Waiter<Resp>"]], +"alloy_rpc_types":[["impl<T: Eq + Hash> From<Vec<T>> for FilterSet<T>"],["impl From<Address> for ValueOrArray<Address>"],["impl From<FilterId> for SubscriptionId<'_>"],["impl From<Uint<256, 4>> for JsonU256"],["impl From<u64> for BlockNumberOrTag"],["impl From<Uint<64, 1>> for FilterBlockOption"],["impl From<u64> for BlockHashOrNumber"],["impl From<FixedBytes<32>> for RpcBlockHash"],["impl From<Vec<Bloom>> for BloomFilter"],["impl From<Uint<64, 1>> for BlockId"],["impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>"],["impl From<ParseError> for ParseBlockNumberError"],["impl From<Header> for RichHeader"],["impl From<GethDebugBuiltInTracerType> for GethDebugTracerType"],["impl From<TxType> for u8"],["impl From<bool> for Parity"],["impl From<CallFrame> for GethTrace"],["impl From<Parity> for u64"],["impl From<Uint<64, 1>> for U64HexOrNumber"],["impl From<(u64, FixedBytes<32>)> for BlockNumHash"],["impl From<u64> for U64HexOrNumber"],["impl From<U64HexOrNumber> for U64"],["impl From<ParseIntError> for ParseBlockNumberError"],["impl From<(FixedBytes<32>, Option<bool>)> for BlockId"],["impl From<FixedBytes<32>> for BlockHashOrNumber"],["impl<T: Into<BlockNumberOrTag>> From<RangeFrom<T>> for FilterBlockOption"],["impl From<JsonU256> for U256"],["impl From<Uint<256, 4>> for JsonStorageKey"],["impl<T: Into<BlockNumberOrTag>> From<RangeTo<T>> for FilterBlockOption"],["impl From<Parity> for U256"],["impl From<Block> for RichBlock"],["impl From<Vec<Address>> for ValueOrArray<Address>"],["impl From<Option<Bytes>> for CallInput"],["impl From<SubscriptionId<'_>> for FilterId"],["impl From<U64HexOrNumber> for u64"],["impl<T: Into<BlockNumberOrTag>> From<Range<T>> for FilterBlockOption"],["impl From<FixedBytes<32>> for FilterBlockOption"],["impl From<Uint<256, 4>> for Topic"],["impl From<FourByteFrame> for GethTrace"],["impl From<BlockNumberOrTag> for BlockId"],["impl From<JsonStorageKey> for String"],["impl From<u64> for BlockId"],["impl From<RpcBlockHash> for B256"],["impl From<PreStateFrame> for GethTrace"],["impl From<TxType> for U8"],["impl<T: Eq + Hash> From<T> for FilterSet<T>"],["impl From<FixedBytes<32>> for BlockId"],["impl From<Uint<256, 4>> for Parity"],["impl From<Vec<FixedBytes<32>>> for ValueOrArray<B256>"],["impl From<HexStringMissingPrefixError> for ParseBlockNumberError"],["impl From<BlockNumberOrTag> for FilterBlockOption"],["impl From<(FixedBytes<32>, u64)> for BlockNumHash"],["impl From<DefaultFrame> for GethTrace"],["impl From<bool> for BlockTransactionsKind"],["impl From<Bytes> for CallInput"],["impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>"],["impl From<Parity> for u8"],["impl From<Uint<64, 1>> for BlockNumberOrTag"],["impl From<Value> for GethDebugTracerConfig"],["impl From<u64> for FilterBlockOption"],["impl From<NoopFrame> for GethTrace"]], +"alloy_signer":[["impl From<Signature> for Vec<u8>"],["impl From<Error> for WalletError"],["impl From<Box<dyn Error + Sync + Send>> for Error"],["impl From<FromHexError> for Error"],["impl From<KeystoreError> for WalletError"],["impl From<&Signature> for [u8; 65]"],["impl From<&Signature> for Vec<u8>"],["impl From<MnemonicError> for WalletError"],["impl From<Signature> for [u8; 65]"],["impl From<MnemonicBuilderError> for WalletError"],["impl From<Error> for WalletError"],["impl From<SecretKey<Secp256k1>> for Wallet<SigningKey>"],["impl From<Error> for Error"],["impl From<Signer<Secp256k1>> for Wallet<Signer<Secp256k1>>"],["impl From<SigningKey<Secp256k1>> for Wallet<SigningKey>"],["impl From<Bip32Error> for WalletError"],["impl From<FromHexError> for WalletError"]], +"alloy_signer_aws":[["impl From<SdkError<GetPublicKeyError, Response>> for AwsSignerError"],["impl From<SdkError<SignError, Response>> for AwsSignerError"],["impl From<FromHexError> for AwsSignerError"],["impl From<Error> for AwsSignerError"],["impl From<Error> for AwsSignerError"]], +"alloy_signer_ledger":[["impl From<Error> for LedgerError"],["impl From<FromHexError> for LedgerError"],["impl From<Error> for LedgerError"],["impl From<LedgerError> for LedgerError"]], +"alloy_signer_trezor":[["impl From<Error> for TrezorError"],["impl From<Error> for TrezorError"],["impl From<FromHexError> for TrezorError"],["impl From<Error> for TrezorError"]], +"alloy_transport_ipc":[["impl From<CString> for IpcConnect<CString>"],["impl From<IpcConnect<CString>> for CString"],["impl From<String> for IpcConnect<String>"],["impl From<IpcConnect<PathBuf>> for PathBuf"],["impl From<PathBuf> for IpcConnect<PathBuf>"],["impl<T> From<T> for ReadJsonStream<T>
where\n T: AsyncRead,
"],["impl From<OsString> for IpcConnect<OsString>"],["impl From<IpcConnect<String>> for String"],["impl From<IpcConnect<OsString>> for OsString"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.TryFrom.js b/trait.impl/core/convert/trait.TryFrom.js new file mode 100644 index 000000000000..4b281ce1e428 --- /dev/null +++ b/trait.impl/core/convert/trait.TryFrom.js @@ -0,0 +1,6 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl<Params> TryFrom<Request<Params>> for SerializedRequest
where\n Params: RpcParam,
"]], +"alloy_providers":[["impl TryFrom<String> for Provider<Http<Client>>"],["impl TryFrom<&str> for Provider<Http<Client>>"],["impl<'a> TryFrom<&'a String> for Provider<Http<Client>>"]], +"alloy_rpc_types":[["impl TryFrom<Log> for Log"]], +"alloy_signer":[["impl<'a> TryFrom<&'a [u8]> for Signature"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js new file mode 100644 index 000000000000..5e4a19b6bb4d --- /dev/null +++ b/trait.impl/core/default/trait.Default.js @@ -0,0 +1,7 @@ +(function() {var implementors = { +"alloy_pubsub":[["impl Default for SubscriptionManager"],["impl Default for RequestManager"]], +"alloy_rpc_client":[["impl Default for ClientBuilder<Identity>"]], +"alloy_rpc_types":[["impl Default for GethDebugTracingOptions"],["impl Default for Null"],["impl Default for Withdrawal"],["impl Default for EthCallResponse"],["impl Default for TxpoolInspect"],["impl Default for PeerEthProtocolInfo"],["impl Default for AccessListItem"],["impl Default for CallFrame"],["impl Default for Peers"],["impl Default for StateContext"],["impl Default for PeerNetworkInfo"],["impl Default for PeerProtocolsInfo"],["impl Default for PendingTransactionFilterKind"],["impl Default for BlockNumHash"],["impl Default for GethDefaultTracingOptions"],["impl Default for EIP1186AccountProofResponse"],["impl Default for TransactionStats"],["impl Default for JsonStorageKey"],["impl Default for Params"],["impl Default for TxpoolContentFrom"],["impl Default for PipProtocolInfo"],["impl Default for BlockTraceResult"],["impl Default for BlockOverrides"],["impl Default for SyncInfo"],["impl Default for VmTrace"],["impl Default for Bundle"],["impl Default for Transaction"],["impl Default for ExtAccountInfo"],["impl Default for CallInput"],["impl Default for DefaultFrame"],["impl Default for FeeHistory"],["impl Default for JsonU256"],["impl Default for CallLogFrame"],["impl Default for FourByteFrame"],["impl Default for TxpoolContent"],["impl Default for TransactionRequest"],["impl Default for TraceCallRequest"],["impl Default for PeerInfo"],["impl Default for FilteredParams"],["impl Default for AccountState"],["impl<T> Default for Delta<T>"],["impl Default for PreStateMode"],["impl Default for TxType"],["impl Default for CallRequest"],["impl Default for TxpoolStatus"],["impl<T: Default + Eq + Hash> Default for FilterSet<T>"],["impl Default for BlockNumberOrTag"],["impl Default for AccessListWithGasUsed"],["impl Default for DiffMode"],["impl Default for PreStateConfig"],["impl Default for Filter"],["impl Default for StructLog"],["impl Default for CallInputError"],["impl Default for HexStringMissingPrefixError"],["impl Default for ChainStatus"],["impl Default for AccountDiff"],["impl Default for TraceFilter"],["impl Default for BloomFilter"],["impl Default for GethDebugTracerConfig"],["impl Default for AccountOverride"],["impl Default for AccountInfo"],["impl Default for FilterBlockOption"],["impl Default for EIP1186StorageProof"],["impl Default for TraceFilterMode"],["impl Default for Log"],["impl Default for BlockId"],["impl Default for RpcModules"],["impl Default for OtherFields"],["impl Default for AccountChangeKind"],["impl Default for GethDebugTracingCallOptions"],["impl Default for Signature"],["impl Default for CallConfig"],["impl Default for TransactionInfo"],["impl Default for AccessList"],["impl Default for CallType"],["impl Default for NoopFrame"],["impl Default for StateDiff"],["impl Default for TransactionIndex"]], +"alloy_signer":[["impl<W: Wordlist> Default for MnemonicBuilder<W>"]], +"alloy_transport_ipc":[["impl Default for MockIpcServer"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/error/trait.Error.js b/trait.impl/core/error/trait.Error.js new file mode 100644 index 000000000000..e4ae8d4f4d89 --- /dev/null +++ b/trait.impl/core/error/trait.Error.js @@ -0,0 +1,10 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl<E, ErrResp> Error for RpcError<E, ErrResp>
where\n E: Error + 'static,\n Self: Debug + Display,
"]], +"alloy_providers":[["impl Error for ClientError"]], +"alloy_rpc_types":[["impl Error for LogError"],["impl Error for CallInputError"],["impl Error for ParseBlockHashOrNumberError"],["impl Error for HexStringMissingPrefixError"],["impl Error for BlockError"],["impl Error for ParseBlockNumberError"]], +"alloy_signer":[["impl Error for WalletError"],["impl Error for Error"],["impl Error for MnemonicBuilderError"]], +"alloy_signer_aws":[["impl Error for AwsSignerError"]], +"alloy_signer_ledger":[["impl Error for LedgerError"]], +"alloy_signer_trezor":[["impl Error for TrezorError"]], +"alloy_transport":[["impl Error for TransportErrorKind"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js new file mode 100644 index 000000000000..ed7bad1e7781 --- /dev/null +++ b/trait.impl/core/fmt/trait.Debug.js @@ -0,0 +1,15 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl<Params: Debug> Debug for Request<Params>"],["impl<ErrData: Debug> Debug for ErrorPayload<ErrData>"],["impl<Payload: Debug, ErrData: Debug> Debug for ResponsePayload<Payload, ErrData>"],["impl<E: Debug, ErrResp: Debug> Debug for RpcError<E, ErrResp>"],["impl Debug for PubSubItem"],["impl<Payload: Debug, ErrData: Debug> Debug for ResponsePacket<Payload, ErrData>"],["impl<Payload: Debug, ErrData: Debug> Debug for Response<Payload, ErrData>"],["impl Debug for RequestMeta"],["impl Debug for SerializedRequest"],["impl<T: Debug> Debug for EthNotification<T>"],["impl Debug for RequestPacket"],["impl Debug for Id"]], +"alloy_providers":[["impl Debug for ClientError"],["impl<N: Debug + Network, T: Debug + Transport> Debug for NetworkRpcClient<N, T>"],["impl<T: Debug + Transport> Debug for Provider<T>"]], +"alloy_pubsub":[["impl Debug for ConnectionInterface"],["impl Debug for PubSubFrontend"],["impl Debug for RequestManager"],["impl Debug for ConnectionHandle"],["impl Debug for ActiveSubscription"],["impl Debug for InFlight"],["impl<T: Debug> Debug for PubSubService<T>"],["impl Debug for PubSubInstruction"],["impl Debug for SubscriptionManager"]], +"alloy_rpc_client":[["impl<Conn, Params, Resp: Debug> Debug for RpcCall<Conn, Params, Resp>
where\n Conn: Transport + Clone + Debug,\n Params: RpcParam + Debug,
"],["impl<Params, Conn> Debug for CallState<Params, Conn>
where\n Params: RpcParam,\n Conn: Transport + Clone,
"],["impl<L: Debug> Debug for ClientBuilder<L>"],["impl<Resp: Debug> Debug for Waiter<Resp>"],["impl<'a, T: Debug> Debug for BatchRequest<'a, T>"],["impl<Conn> Debug for BatchFuture<Conn>
where\n Conn: Transport + Debug,\n Conn::Future: Debug,
"],["impl<T: Debug> Debug for RpcClient<T>"]], +"alloy_rpc_types":[["impl Debug for BlockId"],["impl Debug for TransactionRequest"],["impl Debug for StorageDelta"],["impl Debug for RpcBlockHash"],["impl Debug for CallOutput"],["impl Debug for GethDebugTracingCallOptions"],["impl Debug for LegacyTransactionRequest"],["impl Debug for FourByteFrame"],["impl<Ok: Debug, Err: Debug> Debug for TraceResult<Ok, Err>"],["impl Debug for TransactionInfo"],["impl Debug for SubscriptionResult"],["impl Debug for PreStateMode"],["impl Debug for AccountInfo"],["impl Debug for BlockError"],["impl Debug for BlockOverrides"],["impl Debug for VmExecutedOperation"],["impl Debug for FeeHistory"],["impl Debug for VmInstruction"],["impl Debug for Null"],["impl Debug for PeerCount"],["impl Debug for TransactionIndex"],["impl Debug for RecoveredAccount"],["impl Debug for MemoryDelta"],["impl Debug for BlockHashOrNumber"],["impl Debug for PeerProtocolsInfo"],["impl<T: Debug> Debug for Rich<T>"],["impl Debug for BlockTransactionsKind"],["impl Debug for AccountDiff"],["impl Debug for CallType"],["impl Debug for AccessListItem"],["impl Debug for TraceOutput"],["impl Debug for PeerNetworkInfo"],["impl Debug for GethDebugTracerType"],["impl Debug for ActionType"],["impl Debug for TraceFilterMode"],["impl Debug for Block"],["impl Debug for CreateOutput"],["impl<'a> Debug for BlockTransactionHashesInner<'a>"],["impl Debug for TxGasAndReward"],["impl<T: Debug> Debug for ChangedType<T>"],["impl Debug for BlockTraceResult"],["impl Debug for TransactionReceipt"],["impl Debug for StateContext"],["impl<T: Debug> Debug for Delta<T>"],["impl Debug for GethTrace"],["impl Debug for Peers"],["impl Debug for AccessListWithGasUsed"],["impl Debug for ParseBlockHashOrNumberError"],["impl Debug for EIP1186StorageProof"],["impl Debug for PendingTransactionFilterKind"],["impl Debug for Params"],["impl Debug for OtherFields"],["impl Debug for FilteredParams"],["impl Debug for TransactionStats"],["impl Debug for DiffStateKind"],["impl Debug for LogError"],["impl Debug for TypedTransactionRequest"],["impl Debug for RewardType"],["impl Debug for EIP2930TransactionRequest"],["impl Debug for TxType"],["impl Debug for AccountChangeKind"],["impl Debug for CallLogFrame"],["impl Debug for FilterChanges"],["impl Debug for HexStringMissingPrefixError"],["impl Debug for TraceType"],["impl Debug for TraceResultsWithTransactionHash"],["impl Debug for SyncStatusMetadata"],["impl Debug for StructLog"],["impl Debug for PreStateFrame"],["impl Debug for RpcModules"],["impl Debug for TraceFilter"],["impl Debug for SubscriptionKind"],["impl Debug for NumberOrHexU256"],["impl Debug for Bundle"],["impl Debug for AccountState"],["impl Debug for PubSubSyncStatus"],["impl Debug for CallFrame"],["impl Debug for ParseBlockNumberError"],["impl Debug for RewardAction"],["impl Debug for PeerEthProtocolInfo"],["impl Debug for TraceFilterMatcher"],["impl Debug for Transaction"],["impl Debug for BlockNumberOrTag"],["impl Debug for TraceCallRequest"],["impl Debug for Log"],["impl Debug for EIP1559TransactionRequest"],["impl Debug for BlockTransactions"],["impl Debug for Signature"],["impl Debug for VmTrace"],["impl Debug for GethDebugTracingOptions"],["impl Debug for TxpoolInspectSummary"],["impl Debug for GethDebugBuiltInTracerType"],["impl<'a> Debug for BlockTransactionHashesInnerMut<'a>"],["impl Debug for TxpoolStatus"],["impl Debug for ChainStatus"],["impl Debug for GethDebugTracerConfig"],["impl Debug for CallRequest"],["impl Debug for Action"],["impl Debug for TraceResults"],["impl<T: Debug> Debug for ValueOrArray<T>"],["impl Debug for JsonStorageKey"],["impl Debug for EIP1186AccountProofResponse"],["impl Debug for TxpoolContentFrom"],["impl<'a> Debug for BlockTransactionHashesMut<'a>"],["impl Debug for AccountOverride"],["impl<'a> Debug for BlockTransactionHashes<'a>"],["impl Debug for CallAction"],["impl Debug for PeerInfo"],["impl Debug for TransactionKind"],["impl Debug for TxpoolContent"],["impl Debug for SelfdestructAction"],["impl Debug for GethDefaultTracingOptions"],["impl Debug for CreateAction"],["impl Debug for Parity"],["impl Debug for StateDiff"],["impl Debug for SyncStatus"],["impl Debug for DefaultFrame"],["impl Debug for BloomFilter"],["impl Debug for NoopFrame"],["impl Debug for TxpoolInspect"],["impl Debug for FilterId"],["impl Debug for Header"],["impl Debug for SyncInfo"],["impl Debug for FilterBlockOption"],["impl Debug for U64HexOrNumber"],["impl<T: Debug + Eq + Hash> Debug for FilterSet<T>"],["impl Debug for AccessList"],["impl Debug for ExtAccountInfo"],["impl Debug for EthCallResponse"],["impl Debug for LocalizedTransactionTrace"],["impl Debug for CallInputError"],["impl Debug for BlockNumHash"],["impl Debug for Filter"],["impl Debug for CallConfig"],["impl Debug for Log"],["impl Debug for PipProtocolInfo"],["impl Debug for Withdrawal"],["impl Debug for PreStateConfig"],["impl Debug for DiffMode"],["impl Debug for CallInput"],["impl Debug for TransactionTrace"],["impl Debug for JsonU256"]], +"alloy_signer":[["impl<W: Debug + Wordlist> Debug for MnemonicBuilder<W>"],["impl Debug for Signature"],["impl Debug for UnsupportedSignerOperation"],["impl<D: PrehashSigner<(Signature, RecoveryId)>> Debug for Wallet<D>"],["impl Debug for Error"],["impl Debug for MnemonicBuilderError"],["impl Debug for WalletError"]], +"alloy_signer_aws":[["impl Debug for AwsSigner"],["impl Debug for AwsSignerError"]], +"alloy_signer_ledger":[["impl Debug for P1"],["impl Debug for LedgerSigner"],["impl Debug for DerivationType"],["impl Debug for P2"],["impl Debug for LedgerError"],["impl Debug for INS"]], +"alloy_signer_trezor":[["impl Debug for TrezorSigner"],["impl Debug for DerivationType"],["impl Debug for TrezorError"]], +"alloy_transport":[["impl Debug for TransportErrorKind"],["impl Debug for BoxTransport"],["impl Debug for Authorization"]], +"alloy_transport_http":[["impl<T: Debug> Debug for Http<T>"]], +"alloy_transport_ipc":[["impl<T: Debug> Debug for ReadJsonStream<T>"],["impl Debug for MockIpcServer"],["impl<T: Debug> Debug for IpcConnect<T>"]], +"alloy_transport_ws":[["impl<T: Debug> Debug for WsBackend<T>"],["impl Debug for WsConnect"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Display.js b/trait.impl/core/fmt/trait.Display.js new file mode 100644 index 000000000000..9762ac4e75f9 --- /dev/null +++ b/trait.impl/core/fmt/trait.Display.js @@ -0,0 +1,10 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl<ErrData> Display for ErrorPayload<ErrData>"],["impl Display for Id"],["impl<E, ErrResp> Display for RpcError<E, ErrResp>
where\n ErrorPayload<ErrResp>: Display,\n E: Display,
"]], +"alloy_providers":[["impl Display for ClientError"]], +"alloy_rpc_types":[["impl Display for HexStringMissingPrefixError"],["impl Display for BlockError"],["impl Display for LogError"],["impl Display for ParseBlockNumberError"],["impl Display for ParseBlockHashOrNumberError"],["impl Display for BlockNumberOrTag"],["impl Display for CallInputError"]], +"alloy_signer":[["impl Display for WalletError"],["impl Display for UnsupportedSignerOperation"],["impl Display for Error"],["impl Display for MnemonicBuilderError"]], +"alloy_signer_aws":[["impl Display for AwsSignerError"]], +"alloy_signer_ledger":[["impl Display for LedgerError"],["impl Display for LedgerSigner"],["impl Display for DerivationType"],["impl Display for INS"]], +"alloy_signer_trezor":[["impl Display for TrezorError"],["impl Display for DerivationType"]], +"alloy_transport":[["impl Display for Authorization"],["impl Display for TransportErrorKind"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/future/future/trait.Future.js b/trait.impl/core/future/future/trait.Future.js new file mode 100644 index 000000000000..c8d49329bf54 --- /dev/null +++ b/trait.impl/core/future/future/trait.Future.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_client":[["impl<Params, Conn> Future for CallState<Params, Conn>
where\n Conn: Transport + Clone,\n Params: RpcParam,
"],["impl<T> Future for BatchFuture<T>
where\n T: Transport + Clone,
"],["impl<Conn, Params, Resp> Future for RpcCall<Conn, Params, Resp>
where\n Conn: Transport + Clone,\n Params: RpcParam,\n Resp: RpcReturn,
"],["impl<Resp> Future for Waiter<Resp>
where\n Resp: RpcReturn,
"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/future/into_future/trait.IntoFuture.js b/trait.impl/core/future/into_future/trait.IntoFuture.js new file mode 100644 index 000000000000..7150a660fc85 --- /dev/null +++ b/trait.impl/core/future/into_future/trait.IntoFuture.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_client":[["impl<'a, T> IntoFuture for BatchRequest<'a, T>
where\n T: Transport + Clone,
"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/hash/trait.Hash.js b/trait.impl/core/hash/trait.Hash.js new file mode 100644 index 000000000000..1e1de0fbffcb --- /dev/null +++ b/trait.impl/core/hash/trait.Hash.js @@ -0,0 +1,5 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Hash for Id"]], +"alloy_pubsub":[["impl Hash for ActiveSubscription"]], +"alloy_rpc_types":[["impl Hash for BlockHashOrNumber"],["impl Hash for U64HexOrNumber"],["impl Hash for AccessListItem"],["impl Hash for BlockNumHash"],["impl Hash for Filter"],["impl Hash for Signature"],["impl<T: Eq + Hash> Hash for FilterSet<T>"],["impl Hash for AccessList"],["impl Hash for CallInput"],["impl Hash for Header"],["impl Hash for SubscriptionKind"],["impl Hash for Withdrawal"],["impl Hash for AccountState"],["impl Hash for Log"],["impl Hash for AccountChangeKind"],["impl Hash for FilterBlockOption"],["impl Hash for CallRequest"],["impl Hash for BlockNumberOrTag"],["impl Hash for Parity"],["impl Hash for TransactionKind"],["impl Hash for TraceType"],["impl Hash for JsonU256"],["impl<T: Hash> Hash for ValueOrArray<T>"],["impl Hash for FilterId"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/trait.impl/core/iter/traits/collect/trait.FromIterator.js new file mode 100644 index 000000000000..5bd1e567394b --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl<Payload, ErrData> FromIterator<Response<Payload, ErrData>> for ResponsePacket<Payload, ErrData>"],["impl FromIterator<SerializedRequest> for RequestPacket"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.IntoIterator.js b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js new file mode 100644 index 000000000000..cd85969e73c6 --- /dev/null +++ b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl IntoIterator for OtherFields"],["impl<'a> IntoIterator for &'a OtherFields"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js b/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js new file mode 100644 index 000000000000..98db6382d391 --- /dev/null +++ b/trait.impl/core/iter/traits/double_ended/trait.DoubleEndedIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl DoubleEndedIterator for BlockTransactionHashes<'_>"],["impl DoubleEndedIterator for BlockTransactionHashesMut<'_>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js b/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js new file mode 100644 index 000000000000..5fd49e72438e --- /dev/null +++ b/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl ExactSizeIterator for BlockTransactionHashesMut<'_>"],["impl ExactSizeIterator for BlockTransactionHashes<'_>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/iterator/trait.Iterator.js b/trait.impl/core/iter/traits/iterator/trait.Iterator.js new file mode 100644 index 000000000000..41c70243e582 --- /dev/null +++ b/trait.impl/core/iter/traits/iterator/trait.Iterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl<'a> Iterator for BlockTransactionHashes<'a>"],["impl<'a> Iterator for BlockTransactionHashesMut<'a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/marker/trait.FusedIterator.js b/trait.impl/core/iter/traits/marker/trait.FusedIterator.js new file mode 100644 index 000000000000..49bba6a0f8cd --- /dev/null +++ b/trait.impl/core/iter/traits/marker/trait.FusedIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl<'a> FusedIterator for BlockTransactionHashesMut<'a>"],["impl<'a> FusedIterator for BlockTransactionHashes<'a>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Copy.js b/trait.impl/core/marker/trait.Copy.js new file mode 100644 index 000000000000..0fe0702c7a60 --- /dev/null +++ b/trait.impl/core/marker/trait.Copy.js @@ -0,0 +1,5 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl Copy for BlockNumHash"],["impl Copy for FilterBlockOption"],["impl Copy for TransactionKind"],["impl Copy for RpcBlockHash"],["impl Copy for JsonStorageKey"],["impl Copy for DiffStateKind"],["impl Copy for U64HexOrNumber"],["impl Copy for TraceFilterMode"],["impl Copy for TxType"],["impl Copy for JsonU256"],["impl Copy for BlockNumberOrTag"],["impl Copy for BlockId"],["impl Copy for TransactionIndex"],["impl Copy for HexStringMissingPrefixError"],["impl Copy for Parity"],["impl Copy for PendingTransactionFilterKind"],["impl Copy for BlockHashOrNumber"],["impl Copy for TransactionInfo"]], +"alloy_signer":[["impl Copy for Signature"],["impl Copy for UnsupportedSignerOperation"]], +"alloy_signer_ledger":[["impl Copy for INS"],["impl Copy for P1"],["impl Copy for P2"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js new file mode 100644 index 000000000000..c33fe45696b9 --- /dev/null +++ b/trait.impl/core/marker/trait.Freeze.js @@ -0,0 +1,15 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Freeze for Id",1,["alloy_json_rpc::common::Id"]],["impl<E, ErrResp> Freeze for RpcError<E, ErrResp>
where\n E: Freeze,\n ErrResp: Freeze,
",1,["alloy_json_rpc::error::RpcError"]],["impl<T> Freeze for EthNotification<T>
where\n T: Freeze,
",1,["alloy_json_rpc::notification::EthNotification"]],["impl Freeze for PubSubItem",1,["alloy_json_rpc::notification::PubSubItem"]],["impl Freeze for RequestPacket",1,["alloy_json_rpc::packet::RequestPacket"]],["impl<Payload, ErrData> Freeze for ResponsePacket<Payload, ErrData>
where\n ErrData: Freeze,\n Payload: Freeze,
",1,["alloy_json_rpc::packet::ResponsePacket"]],["impl Freeze for RequestMeta",1,["alloy_json_rpc::request::RequestMeta"]],["impl<Params> Freeze for Request<Params>
where\n Params: Freeze,
",1,["alloy_json_rpc::request::Request"]],["impl Freeze for SerializedRequest",1,["alloy_json_rpc::request::SerializedRequest"]],["impl<ErrData> Freeze for ErrorPayload<ErrData>
where\n ErrData: Freeze,
",1,["alloy_json_rpc::response::error::ErrorPayload"]],["impl<Payload, ErrData> Freeze for ResponsePayload<Payload, ErrData>
where\n ErrData: Freeze,\n Payload: Freeze,
",1,["alloy_json_rpc::response::payload::ResponsePayload"]],["impl<Payload, ErrData> Freeze for Response<Payload, ErrData>
where\n ErrData: Freeze,\n Payload: Freeze,
",1,["alloy_json_rpc::response::Response"]]], +"alloy_providers":[["impl<T, Inner, Outer> Freeze for Stack<T, Inner, Outer>
where\n Inner: Freeze,\n Outer: Freeze,
",1,["alloy_providers::builder::Stack"]],["impl<L, N, T> Freeze for ProviderBuilder<L, N, T>
where\n L: Freeze,
",1,["alloy_providers::builder::ProviderBuilder"]],["impl Freeze for ClientError",1,["alloy_providers::provider::ClientError"]],["impl<T = BoxTransport> !Freeze for Provider<T>",1,["alloy_providers::provider::Provider"]],["impl<N, T = BoxTransport> !Freeze for NetworkRpcClient<N, T>",1,["alloy_providers::NetworkRpcClient"]]], +"alloy_pubsub":[["impl Freeze for PubSubFrontend",1,["alloy_pubsub::frontend::PubSubFrontend"]],["impl Freeze for PubSubInstruction",1,["alloy_pubsub::ix::PubSubInstruction"]],["impl Freeze for ConnectionHandle",1,["alloy_pubsub::handle::ConnectionHandle"]],["impl Freeze for ConnectionInterface",1,["alloy_pubsub::handle::ConnectionInterface"]],["impl Freeze for ActiveSubscription",1,["alloy_pubsub::managers::active_sub::ActiveSubscription"]],["impl Freeze for InFlight",1,["alloy_pubsub::managers::in_flight::InFlight"]],["impl Freeze for RequestManager",1,["alloy_pubsub::managers::req::RequestManager"]],["impl Freeze for SubscriptionManager",1,["alloy_pubsub::managers::sub::SubscriptionManager"]],["impl<T> Freeze for PubSubService<T>
where\n T: Freeze,
",1,["alloy_pubsub::service::PubSubService"]]], +"alloy_rpc_client":[["impl<'a, T> Freeze for BatchRequest<'a, T>",1,["alloy_rpc_client::batch::BatchRequest"]],["impl<Resp> Freeze for Waiter<Resp>",1,["alloy_rpc_client::batch::Waiter"]],["impl<Conn> Freeze for BatchFuture<Conn>
where\n Conn: Freeze,
",1,["alloy_rpc_client::batch::BatchFuture"]],["impl<'pin, Conn> Freeze for CallStateProj<'pin, Conn>",1,["alloy_rpc_client::batch::CallStateProj"]],["impl<L> Freeze for ClientBuilder<L>
where\n L: Freeze,
",1,["alloy_rpc_client::builder::ClientBuilder"]],["impl<Params, Conn> Freeze for CallState<Params, Conn>
where\n Conn: Freeze,\n Params: Freeze,
",1,["alloy_rpc_client::call::CallState"]],["impl<'pin, Params, Conn> Freeze for CallStateProj<'pin, Params, Conn>",1,["alloy_rpc_client::call::CallStateProj"]],["impl<Conn, Params, Resp> Freeze for RpcCall<Conn, Params, Resp>
where\n Conn: Freeze,\n Params: Freeze,
",1,["alloy_rpc_client::call::RpcCall"]],["impl<T> !Freeze for RpcClient<T>",1,["alloy_rpc_client::client::RpcClient"]]], +"alloy_rpc_types":[["impl Freeze for AccountInfo",1,["alloy_rpc_types::eth::account::AccountInfo"]],["impl Freeze for EIP1186StorageProof",1,["alloy_rpc_types::eth::account::EIP1186StorageProof"]],["impl Freeze for EIP1186AccountProofResponse",1,["alloy_rpc_types::eth::account::EIP1186AccountProofResponse"]],["impl Freeze for ExtAccountInfo",1,["alloy_rpc_types::eth::account::ExtAccountInfo"]],["impl Freeze for RecoveredAccount",1,["alloy_rpc_types::eth::account::RecoveredAccount"]],["impl Freeze for BlockTransactions",1,["alloy_rpc_types::eth::block::BlockTransactions"]],["impl<'a> Freeze for BlockTransactionHashes<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashes"]],["impl<'a> Freeze for BlockTransactionHashesInner<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInner"]],["impl<'a> Freeze for BlockTransactionHashesMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesMut"]],["impl<'a> Freeze for BlockTransactionHashesInnerMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInnerMut"]],["impl Freeze for BlockTransactionsKind",1,["alloy_rpc_types::eth::block::BlockTransactionsKind"]],["impl Freeze for BlockError",1,["alloy_rpc_types::eth::block::BlockError"]],["impl !Freeze for Block",1,["alloy_rpc_types::eth::block::Block"]],["impl !Freeze for Header",1,["alloy_rpc_types::eth::block::Header"]],["impl Freeze for RpcBlockHash",1,["alloy_rpc_types::eth::block::RpcBlockHash"]],["impl Freeze for BlockNumberOrTag",1,["alloy_rpc_types::eth::block::BlockNumberOrTag"]],["impl Freeze for ParseBlockNumberError",1,["alloy_rpc_types::eth::block::ParseBlockNumberError"]],["impl Freeze for HexStringMissingPrefixError",1,["alloy_rpc_types::eth::block::HexStringMissingPrefixError"]],["impl Freeze for BlockId",1,["alloy_rpc_types::eth::block::BlockId"]],["impl Freeze for BlockNumHash",1,["alloy_rpc_types::eth::block::BlockNumHash"]],["impl Freeze for BlockHashOrNumber",1,["alloy_rpc_types::eth::block::BlockHashOrNumber"]],["impl Freeze for ParseBlockHashOrNumberError",1,["alloy_rpc_types::eth::block::ParseBlockHashOrNumberError"]],["impl<T> Freeze for Rich<T>
where\n T: Freeze,
",1,["alloy_rpc_types::eth::block::Rich"]],["impl Freeze for BlockOverrides",1,["alloy_rpc_types::eth::block::BlockOverrides"]],["impl Freeze for Bundle",1,["alloy_rpc_types::eth::call::Bundle"]],["impl Freeze for StateContext",1,["alloy_rpc_types::eth::call::StateContext"]],["impl !Freeze for EthCallResponse",1,["alloy_rpc_types::eth::call::EthCallResponse"]],["impl Freeze for TransactionIndex",1,["alloy_rpc_types::eth::call::TransactionIndex"]],["impl !Freeze for CallRequest",1,["alloy_rpc_types::eth::call::CallRequest"]],["impl !Freeze for CallInput",1,["alloy_rpc_types::eth::call::CallInput"]],["impl Freeze for CallInputError",1,["alloy_rpc_types::eth::call::CallInputError"]],["impl Freeze for TxGasAndReward",1,["alloy_rpc_types::eth::fee::TxGasAndReward"]],["impl Freeze for FeeHistory",1,["alloy_rpc_types::eth::fee::FeeHistory"]],["impl Freeze for BloomFilter",1,["alloy_rpc_types::eth::filter::BloomFilter"]],["impl<T> Freeze for FilterSet<T>",1,["alloy_rpc_types::eth::filter::FilterSet"]],["impl Freeze for FilterBlockOption",1,["alloy_rpc_types::eth::filter::FilterBlockOption"]],["impl Freeze for Filter",1,["alloy_rpc_types::eth::filter::Filter"]],["impl<T> Freeze for ValueOrArray<T>
where\n T: Freeze,
",1,["alloy_rpc_types::eth::filter::ValueOrArray"]],["impl Freeze for FilteredParams",1,["alloy_rpc_types::eth::filter::FilteredParams"]],["impl Freeze for FilterChanges",1,["alloy_rpc_types::eth::filter::FilterChanges"]],["impl Freeze for FilterId",1,["alloy_rpc_types::eth::filter::FilterId"]],["impl Freeze for PendingTransactionFilterKind",1,["alloy_rpc_types::eth::filter::PendingTransactionFilterKind"]],["impl !Freeze for Log",1,["alloy_rpc_types::eth::log::Log"]],["impl Freeze for LogError",1,["alloy_rpc_types::eth::log::LogError"]],["impl Freeze for OtherFields",1,["alloy_rpc_types::eth::other::OtherFields"]],["impl Freeze for SubscriptionResult",1,["alloy_rpc_types::eth::pubsub::SubscriptionResult"]],["impl Freeze for PubSubSyncStatus",1,["alloy_rpc_types::eth::pubsub::PubSubSyncStatus"]],["impl Freeze for SyncStatusMetadata",1,["alloy_rpc_types::eth::pubsub::SyncStatusMetadata"]],["impl Freeze for SubscriptionKind",1,["alloy_rpc_types::eth::pubsub::SubscriptionKind"]],["impl Freeze for Params",1,["alloy_rpc_types::eth::pubsub::Params"]],["impl !Freeze for Log",1,["alloy_rpc_types::eth::raw_log::Log"]],["impl !Freeze for AccountOverride",1,["alloy_rpc_types::eth::state::AccountOverride"]],["impl Freeze for SyncInfo",1,["alloy_rpc_types::eth::syncing::SyncInfo"]],["impl Freeze for Peers",1,["alloy_rpc_types::eth::syncing::Peers"]],["impl Freeze for PeerCount",1,["alloy_rpc_types::eth::syncing::PeerCount"]],["impl Freeze for PeerInfo",1,["alloy_rpc_types::eth::syncing::PeerInfo"]],["impl Freeze for PeerNetworkInfo",1,["alloy_rpc_types::eth::syncing::PeerNetworkInfo"]],["impl Freeze for PeerProtocolsInfo",1,["alloy_rpc_types::eth::syncing::PeerProtocolsInfo"]],["impl Freeze for PeerEthProtocolInfo",1,["alloy_rpc_types::eth::syncing::PeerEthProtocolInfo"]],["impl Freeze for PipProtocolInfo",1,["alloy_rpc_types::eth::syncing::PipProtocolInfo"]],["impl Freeze for SyncStatus",1,["alloy_rpc_types::eth::syncing::SyncStatus"]],["impl Freeze for TransactionStats",1,["alloy_rpc_types::eth::syncing::TransactionStats"]],["impl Freeze for ChainStatus",1,["alloy_rpc_types::eth::syncing::ChainStatus"]],["impl<Ok, Err> Freeze for TraceResult<Ok, Err>
where\n Err: Freeze,\n Ok: Freeze,
",1,["alloy_rpc_types::eth::trace::common::TraceResult"]],["impl Freeze for TraceFilter",1,["alloy_rpc_types::eth::trace::filter::TraceFilter"]],["impl Freeze for TraceFilterMode",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMode"]],["impl Freeze for TraceFilterMatcher",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMatcher"]],["impl !Freeze for CallFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallFrame"]],["impl !Freeze for CallLogFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallLogFrame"]],["impl Freeze for CallConfig",1,["alloy_rpc_types::eth::trace::geth::call::CallConfig"]],["impl Freeze for FourByteFrame",1,["alloy_rpc_types::eth::trace::geth::four_byte::FourByteFrame"]],["impl Freeze for NoopFrame",1,["alloy_rpc_types::eth::trace::geth::noop::NoopFrame"]],["impl Freeze for Null",1,["alloy_rpc_types::eth::trace::geth::noop::Null"]],["impl Freeze for PreStateFrame",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateFrame"]],["impl Freeze for PreStateMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateMode"]],["impl Freeze for DiffMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffMode"]],["impl Freeze for DiffStateKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffStateKind"]],["impl !Freeze for AccountState",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountState"]],["impl Freeze for AccountChangeKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountChangeKind"]],["impl Freeze for PreStateConfig",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateConfig"]],["impl Freeze for BlockTraceResult",1,["alloy_rpc_types::eth::trace::geth::BlockTraceResult"]],["impl !Freeze for DefaultFrame",1,["alloy_rpc_types::eth::trace::geth::DefaultFrame"]],["impl !Freeze for StructLog",1,["alloy_rpc_types::eth::trace::geth::StructLog"]],["impl !Freeze for GethTrace",1,["alloy_rpc_types::eth::trace::geth::GethTrace"]],["impl Freeze for GethDebugBuiltInTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugBuiltInTracerType"]],["impl Freeze for GethDebugTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerType"]],["impl Freeze for GethDebugTracerConfig",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerConfig"]],["impl Freeze for GethDebugTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingOptions"]],["impl Freeze for GethDefaultTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDefaultTracingOptions"]],["impl Freeze for GethDebugTracingCallOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingCallOptions"]],["impl Freeze for TraceType",1,["alloy_rpc_types::eth::trace::parity::TraceType"]],["impl !Freeze for TraceResults",1,["alloy_rpc_types::eth::trace::parity::TraceResults"]],["impl !Freeze for TraceResultsWithTransactionHash",1,["alloy_rpc_types::eth::trace::parity::TraceResultsWithTransactionHash"]],["impl<T> Freeze for ChangedType<T>
where\n T: Freeze,
",1,["alloy_rpc_types::eth::trace::parity::ChangedType"]],["impl<T> Freeze for Delta<T>
where\n T: Freeze,
",1,["alloy_rpc_types::eth::trace::parity::Delta"]],["impl !Freeze for AccountDiff",1,["alloy_rpc_types::eth::trace::parity::AccountDiff"]],["impl Freeze for StateDiff",1,["alloy_rpc_types::eth::trace::parity::StateDiff"]],["impl !Freeze for Action",1,["alloy_rpc_types::eth::trace::parity::Action"]],["impl Freeze for ActionType",1,["alloy_rpc_types::eth::trace::parity::ActionType"]],["impl Freeze for CallType",1,["alloy_rpc_types::eth::trace::parity::CallType"]],["impl !Freeze for CallAction",1,["alloy_rpc_types::eth::trace::parity::CallAction"]],["impl !Freeze for CreateAction",1,["alloy_rpc_types::eth::trace::parity::CreateAction"]],["impl Freeze for RewardType",1,["alloy_rpc_types::eth::trace::parity::RewardType"]],["impl Freeze for RewardAction",1,["alloy_rpc_types::eth::trace::parity::RewardAction"]],["impl Freeze for SelfdestructAction",1,["alloy_rpc_types::eth::trace::parity::SelfdestructAction"]],["impl !Freeze for CallOutput",1,["alloy_rpc_types::eth::trace::parity::CallOutput"]],["impl !Freeze for CreateOutput",1,["alloy_rpc_types::eth::trace::parity::CreateOutput"]],["impl !Freeze for TraceOutput",1,["alloy_rpc_types::eth::trace::parity::TraceOutput"]],["impl !Freeze for TransactionTrace",1,["alloy_rpc_types::eth::trace::parity::TransactionTrace"]],["impl !Freeze for LocalizedTransactionTrace",1,["alloy_rpc_types::eth::trace::parity::LocalizedTransactionTrace"]],["impl !Freeze for VmTrace",1,["alloy_rpc_types::eth::trace::parity::VmTrace"]],["impl !Freeze for VmInstruction",1,["alloy_rpc_types::eth::trace::parity::VmInstruction"]],["impl !Freeze for VmExecutedOperation",1,["alloy_rpc_types::eth::trace::parity::VmExecutedOperation"]],["impl !Freeze for MemoryDelta",1,["alloy_rpc_types::eth::trace::parity::MemoryDelta"]],["impl Freeze for StorageDelta",1,["alloy_rpc_types::eth::trace::parity::StorageDelta"]],["impl !Freeze for TraceCallRequest",1,["alloy_rpc_types::eth::trace::tracerequest::TraceCallRequest"]],["impl Freeze for AccessListItem",1,["alloy_rpc_types::eth::transaction::access_list::AccessListItem"]],["impl Freeze for AccessList",1,["alloy_rpc_types::eth::transaction::access_list::AccessList"]],["impl Freeze for AccessListWithGasUsed",1,["alloy_rpc_types::eth::transaction::access_list::AccessListWithGasUsed"]],["impl Freeze for TransactionInfo",1,["alloy_rpc_types::eth::transaction::common::TransactionInfo"]],["impl Freeze for TransactionReceipt",1,["alloy_rpc_types::eth::transaction::receipt::TransactionReceipt"]],["impl !Freeze for TransactionRequest",1,["alloy_rpc_types::eth::transaction::request::TransactionRequest"]],["impl Freeze for Signature",1,["alloy_rpc_types::eth::transaction::signature::Signature"]],["impl Freeze for Parity",1,["alloy_rpc_types::eth::transaction::signature::Parity"]],["impl Freeze for TxType",1,["alloy_rpc_types::eth::transaction::tx_type::TxType"]],["impl !Freeze for TypedTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::TypedTransactionRequest"]],["impl !Freeze for LegacyTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::LegacyTransactionRequest"]],["impl !Freeze for EIP2930TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP2930TransactionRequest"]],["impl !Freeze for EIP1559TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP1559TransactionRequest"]],["impl Freeze for TransactionKind",1,["alloy_rpc_types::eth::transaction::typed::TransactionKind"]],["impl !Freeze for Transaction",1,["alloy_rpc_types::eth::transaction::Transaction"]],["impl Freeze for TxpoolInspectSummary",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummary"]],["impl Freeze for TxpoolInspectSummaryVisitor",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummaryVisitor"]],["impl Freeze for TxpoolContent",1,["alloy_rpc_types::eth::txpool::TxpoolContent"]],["impl Freeze for TxpoolContentFrom",1,["alloy_rpc_types::eth::txpool::TxpoolContentFrom"]],["impl Freeze for TxpoolInspect",1,["alloy_rpc_types::eth::txpool::TxpoolInspect"]],["impl Freeze for TxpoolStatus",1,["alloy_rpc_types::eth::txpool::TxpoolStatus"]],["impl Freeze for Withdrawal",1,["alloy_rpc_types::eth::withdrawal::Withdrawal"]],["impl Freeze for BeaconAPIWithdrawal",1,["alloy_rpc_types::eth::withdrawal::BeaconAPIWithdrawal"]],["impl Freeze for RpcModules",1,["alloy_rpc_types::rpc::RpcModules"]],["impl Freeze for JsonU256",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256"]],["impl Freeze for JsonU256Visitor",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256Visitor"]],["impl Freeze for U64HexOrNumber",1,["alloy_rpc_types::serde_helpers::num::U64HexOrNumber"]],["impl Freeze for NumberOrHexU256",1,["alloy_rpc_types::serde_helpers::num::NumberOrHexU256"]],["impl Freeze for JsonStorageKey",1,["alloy_rpc_types::serde_helpers::storage::JsonStorageKey"]]], +"alloy_signer":[["impl Freeze for Error",1,["alloy_signer::error::Error"]],["impl Freeze for UnsupportedSignerOperation",1,["alloy_signer::error::UnsupportedSignerOperation"]],["impl Freeze for Signature",1,["alloy_signer::signature::Signature"]],["impl Freeze for WalletError",1,["alloy_signer::wallet::error::WalletError"]],["impl<W> Freeze for MnemonicBuilder<W>",1,["alloy_signer::wallet::mnemonic::MnemonicBuilder"]],["impl Freeze for MnemonicBuilderError",1,["alloy_signer::wallet::mnemonic::MnemonicBuilderError"]],["impl<D> Freeze for Wallet<D>
where\n D: Freeze,
",1,["alloy_signer::wallet::Wallet"]]], +"alloy_signer_aws":[["impl Freeze for AwsSigner",1,["alloy_signer_aws::signer::AwsSigner"]],["impl !Freeze for AwsSignerError",1,["alloy_signer_aws::signer::AwsSignerError"]]], +"alloy_signer_ledger":[["impl !Freeze for LedgerSigner",1,["alloy_signer_ledger::signer::LedgerSigner"]],["impl Freeze for DerivationType",1,["alloy_signer_ledger::types::DerivationType"]],["impl Freeze for LedgerError",1,["alloy_signer_ledger::types::LedgerError"]],["impl Freeze for INS",1,["alloy_signer_ledger::types::INS"]],["impl Freeze for P1",1,["alloy_signer_ledger::types::P1"]],["impl Freeze for P2",1,["alloy_signer_ledger::types::P2"]]], +"alloy_signer_trezor":[["impl Freeze for TrezorSigner",1,["alloy_signer_trezor::signer::TrezorSigner"]],["impl Freeze for DerivationType",1,["alloy_signer_trezor::types::DerivationType"]],["impl !Freeze for TrezorError",1,["alloy_signer_trezor::types::TrezorError"]],["impl Freeze for TrezorTransaction",1,["alloy_signer_trezor::types::TrezorTransaction"]]], +"alloy_transport":[["impl Freeze for BoxTransport",1,["alloy_transport::boxed::BoxTransport"]],["impl Freeze for Authorization",1,["alloy_transport::common::Authorization"]],["impl Freeze for TransportErrorKind",1,["alloy_transport::error::TransportErrorKind"]]], +"alloy_transport_http":[["impl<T> Freeze for Http<T>
where\n T: Freeze,
",1,["alloy_transport_http::Http"]]], +"alloy_transport_ipc":[["impl<T> Freeze for IpcConnect<T>
where\n T: Freeze,
",1,["alloy_transport_ipc::connect::IpcConnect"]],["impl Freeze for MockIpcServer",1,["alloy_transport_ipc::mock::MockIpcServer"]],["impl !Freeze for IpcBackend",1,["alloy_transport_ipc::IpcBackend"]],["impl<T> Freeze for ReadJsonStream<T>
where\n T: Freeze,
",1,["alloy_transport_ipc::ReadJsonStream"]]], +"alloy_transport_ws":[["impl Freeze for WsConnect",1,["alloy_transport_ws::native::WsConnect"]],["impl<T> Freeze for WsBackend<T>
where\n T: Freeze,
",1,["alloy_transport_ws::WsBackend"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js new file mode 100644 index 000000000000..f1156f5476c1 --- /dev/null +++ b/trait.impl/core/marker/trait.Send.js @@ -0,0 +1,15 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Send for Id",1,["alloy_json_rpc::common::Id"]],["impl<E, ErrResp> Send for RpcError<E, ErrResp>
where\n E: Send,\n ErrResp: Send,
",1,["alloy_json_rpc::error::RpcError"]],["impl<T> Send for EthNotification<T>
where\n T: Send,
",1,["alloy_json_rpc::notification::EthNotification"]],["impl Send for PubSubItem",1,["alloy_json_rpc::notification::PubSubItem"]],["impl Send for RequestPacket",1,["alloy_json_rpc::packet::RequestPacket"]],["impl<Payload, ErrData> Send for ResponsePacket<Payload, ErrData>
where\n ErrData: Send,\n Payload: Send,
",1,["alloy_json_rpc::packet::ResponsePacket"]],["impl Send for RequestMeta",1,["alloy_json_rpc::request::RequestMeta"]],["impl<Params> Send for Request<Params>
where\n Params: Send,
",1,["alloy_json_rpc::request::Request"]],["impl Send for SerializedRequest",1,["alloy_json_rpc::request::SerializedRequest"]],["impl<ErrData> Send for ErrorPayload<ErrData>
where\n ErrData: Send,
",1,["alloy_json_rpc::response::error::ErrorPayload"]],["impl<Payload, ErrData> Send for ResponsePayload<Payload, ErrData>
where\n ErrData: Send,\n Payload: Send,
",1,["alloy_json_rpc::response::payload::ResponsePayload"]],["impl<Payload, ErrData> Send for Response<Payload, ErrData>
where\n ErrData: Send,\n Payload: Send,
",1,["alloy_json_rpc::response::Response"]]], +"alloy_providers":[["impl<T, Inner, Outer> Send for Stack<T, Inner, Outer>
where\n Inner: Send,\n Outer: Send,
",1,["alloy_providers::builder::Stack"]],["impl<L, N, T> Send for ProviderBuilder<L, N, T>
where\n L: Send,\n N: Send,\n T: Send,
",1,["alloy_providers::builder::ProviderBuilder"]],["impl Send for ClientError",1,["alloy_providers::provider::ClientError"]],["impl<T> Send for Provider<T>",1,["alloy_providers::provider::Provider"]],["impl<N, T> Send for NetworkRpcClient<N, T>",1,["alloy_providers::NetworkRpcClient"]]], +"alloy_pubsub":[["impl Send for PubSubFrontend",1,["alloy_pubsub::frontend::PubSubFrontend"]],["impl Send for PubSubInstruction",1,["alloy_pubsub::ix::PubSubInstruction"]],["impl Send for ConnectionHandle",1,["alloy_pubsub::handle::ConnectionHandle"]],["impl Send for ConnectionInterface",1,["alloy_pubsub::handle::ConnectionInterface"]],["impl Send for ActiveSubscription",1,["alloy_pubsub::managers::active_sub::ActiveSubscription"]],["impl Send for InFlight",1,["alloy_pubsub::managers::in_flight::InFlight"]],["impl Send for RequestManager",1,["alloy_pubsub::managers::req::RequestManager"]],["impl Send for SubscriptionManager",1,["alloy_pubsub::managers::sub::SubscriptionManager"]],["impl<T> Send for PubSubService<T>
where\n T: Send,
",1,["alloy_pubsub::service::PubSubService"]]], +"alloy_rpc_client":[["impl<'a, T> Send for BatchRequest<'a, T>
where\n T: Sync,
",1,["alloy_rpc_client::batch::BatchRequest"]],["impl<Resp> Send for Waiter<Resp>",1,["alloy_rpc_client::batch::Waiter"]],["impl<Conn> Send for BatchFuture<Conn>",1,["alloy_rpc_client::batch::BatchFuture"]],["impl<'pin, Conn> Send for CallStateProj<'pin, Conn>",1,["alloy_rpc_client::batch::CallStateProj"]],["impl<L> Send for ClientBuilder<L>
where\n L: Send,
",1,["alloy_rpc_client::builder::ClientBuilder"]],["impl<Params, Conn> Send for CallState<Params, Conn>",1,["alloy_rpc_client::call::CallState"]],["impl<'pin, Params, Conn> Send for CallStateProj<'pin, Params, Conn>",1,["alloy_rpc_client::call::CallStateProj"]],["impl<Conn, Params, Resp> Send for RpcCall<Conn, Params, Resp>",1,["alloy_rpc_client::call::RpcCall"]],["impl<T> Send for RpcClient<T>
where\n T: Send,
",1,["alloy_rpc_client::client::RpcClient"]]], +"alloy_rpc_types":[["impl Send for AccountInfo",1,["alloy_rpc_types::eth::account::AccountInfo"]],["impl Send for EIP1186StorageProof",1,["alloy_rpc_types::eth::account::EIP1186StorageProof"]],["impl Send for EIP1186AccountProofResponse",1,["alloy_rpc_types::eth::account::EIP1186AccountProofResponse"]],["impl Send for ExtAccountInfo",1,["alloy_rpc_types::eth::account::ExtAccountInfo"]],["impl Send for RecoveredAccount",1,["alloy_rpc_types::eth::account::RecoveredAccount"]],["impl Send for BlockTransactions",1,["alloy_rpc_types::eth::block::BlockTransactions"]],["impl<'a> Send for BlockTransactionHashes<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashes"]],["impl<'a> Send for BlockTransactionHashesInner<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInner"]],["impl<'a> Send for BlockTransactionHashesMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesMut"]],["impl<'a> Send for BlockTransactionHashesInnerMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInnerMut"]],["impl Send for BlockTransactionsKind",1,["alloy_rpc_types::eth::block::BlockTransactionsKind"]],["impl Send for BlockError",1,["alloy_rpc_types::eth::block::BlockError"]],["impl Send for Block",1,["alloy_rpc_types::eth::block::Block"]],["impl Send for Header",1,["alloy_rpc_types::eth::block::Header"]],["impl Send for RpcBlockHash",1,["alloy_rpc_types::eth::block::RpcBlockHash"]],["impl Send for BlockNumberOrTag",1,["alloy_rpc_types::eth::block::BlockNumberOrTag"]],["impl Send for ParseBlockNumberError",1,["alloy_rpc_types::eth::block::ParseBlockNumberError"]],["impl Send for HexStringMissingPrefixError",1,["alloy_rpc_types::eth::block::HexStringMissingPrefixError"]],["impl Send for BlockId",1,["alloy_rpc_types::eth::block::BlockId"]],["impl Send for BlockNumHash",1,["alloy_rpc_types::eth::block::BlockNumHash"]],["impl Send for BlockHashOrNumber",1,["alloy_rpc_types::eth::block::BlockHashOrNumber"]],["impl Send for ParseBlockHashOrNumberError",1,["alloy_rpc_types::eth::block::ParseBlockHashOrNumberError"]],["impl<T> Send for Rich<T>
where\n T: Send,
",1,["alloy_rpc_types::eth::block::Rich"]],["impl Send for BlockOverrides",1,["alloy_rpc_types::eth::block::BlockOverrides"]],["impl Send for Bundle",1,["alloy_rpc_types::eth::call::Bundle"]],["impl Send for StateContext",1,["alloy_rpc_types::eth::call::StateContext"]],["impl Send for EthCallResponse",1,["alloy_rpc_types::eth::call::EthCallResponse"]],["impl Send for TransactionIndex",1,["alloy_rpc_types::eth::call::TransactionIndex"]],["impl Send for CallRequest",1,["alloy_rpc_types::eth::call::CallRequest"]],["impl Send for CallInput",1,["alloy_rpc_types::eth::call::CallInput"]],["impl Send for CallInputError",1,["alloy_rpc_types::eth::call::CallInputError"]],["impl Send for TxGasAndReward",1,["alloy_rpc_types::eth::fee::TxGasAndReward"]],["impl Send for FeeHistory",1,["alloy_rpc_types::eth::fee::FeeHistory"]],["impl Send for BloomFilter",1,["alloy_rpc_types::eth::filter::BloomFilter"]],["impl<T> Send for FilterSet<T>
where\n T: Send,
",1,["alloy_rpc_types::eth::filter::FilterSet"]],["impl Send for FilterBlockOption",1,["alloy_rpc_types::eth::filter::FilterBlockOption"]],["impl Send for Filter",1,["alloy_rpc_types::eth::filter::Filter"]],["impl<T> Send for ValueOrArray<T>
where\n T: Send,
",1,["alloy_rpc_types::eth::filter::ValueOrArray"]],["impl Send for FilteredParams",1,["alloy_rpc_types::eth::filter::FilteredParams"]],["impl Send for FilterChanges",1,["alloy_rpc_types::eth::filter::FilterChanges"]],["impl Send for FilterId",1,["alloy_rpc_types::eth::filter::FilterId"]],["impl Send for PendingTransactionFilterKind",1,["alloy_rpc_types::eth::filter::PendingTransactionFilterKind"]],["impl Send for Log",1,["alloy_rpc_types::eth::log::Log"]],["impl Send for LogError",1,["alloy_rpc_types::eth::log::LogError"]],["impl Send for OtherFields",1,["alloy_rpc_types::eth::other::OtherFields"]],["impl Send for SubscriptionResult",1,["alloy_rpc_types::eth::pubsub::SubscriptionResult"]],["impl Send for PubSubSyncStatus",1,["alloy_rpc_types::eth::pubsub::PubSubSyncStatus"]],["impl Send for SyncStatusMetadata",1,["alloy_rpc_types::eth::pubsub::SyncStatusMetadata"]],["impl Send for SubscriptionKind",1,["alloy_rpc_types::eth::pubsub::SubscriptionKind"]],["impl Send for Params",1,["alloy_rpc_types::eth::pubsub::Params"]],["impl Send for Log",1,["alloy_rpc_types::eth::raw_log::Log"]],["impl Send for AccountOverride",1,["alloy_rpc_types::eth::state::AccountOverride"]],["impl Send for SyncInfo",1,["alloy_rpc_types::eth::syncing::SyncInfo"]],["impl Send for Peers",1,["alloy_rpc_types::eth::syncing::Peers"]],["impl Send for PeerCount",1,["alloy_rpc_types::eth::syncing::PeerCount"]],["impl Send for PeerInfo",1,["alloy_rpc_types::eth::syncing::PeerInfo"]],["impl Send for PeerNetworkInfo",1,["alloy_rpc_types::eth::syncing::PeerNetworkInfo"]],["impl Send for PeerProtocolsInfo",1,["alloy_rpc_types::eth::syncing::PeerProtocolsInfo"]],["impl Send for PeerEthProtocolInfo",1,["alloy_rpc_types::eth::syncing::PeerEthProtocolInfo"]],["impl Send for PipProtocolInfo",1,["alloy_rpc_types::eth::syncing::PipProtocolInfo"]],["impl Send for SyncStatus",1,["alloy_rpc_types::eth::syncing::SyncStatus"]],["impl Send for TransactionStats",1,["alloy_rpc_types::eth::syncing::TransactionStats"]],["impl Send for ChainStatus",1,["alloy_rpc_types::eth::syncing::ChainStatus"]],["impl<Ok, Err> Send for TraceResult<Ok, Err>
where\n Err: Send,\n Ok: Send,
",1,["alloy_rpc_types::eth::trace::common::TraceResult"]],["impl Send for TraceFilter",1,["alloy_rpc_types::eth::trace::filter::TraceFilter"]],["impl Send for TraceFilterMode",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMode"]],["impl Send for TraceFilterMatcher",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMatcher"]],["impl Send for CallFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallFrame"]],["impl Send for CallLogFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallLogFrame"]],["impl Send for CallConfig",1,["alloy_rpc_types::eth::trace::geth::call::CallConfig"]],["impl Send for FourByteFrame",1,["alloy_rpc_types::eth::trace::geth::four_byte::FourByteFrame"]],["impl Send for NoopFrame",1,["alloy_rpc_types::eth::trace::geth::noop::NoopFrame"]],["impl Send for Null",1,["alloy_rpc_types::eth::trace::geth::noop::Null"]],["impl Send for PreStateFrame",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateFrame"]],["impl Send for PreStateMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateMode"]],["impl Send for DiffMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffMode"]],["impl Send for DiffStateKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffStateKind"]],["impl Send for AccountState",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountState"]],["impl Send for AccountChangeKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountChangeKind"]],["impl Send for PreStateConfig",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateConfig"]],["impl Send for BlockTraceResult",1,["alloy_rpc_types::eth::trace::geth::BlockTraceResult"]],["impl Send for DefaultFrame",1,["alloy_rpc_types::eth::trace::geth::DefaultFrame"]],["impl Send for StructLog",1,["alloy_rpc_types::eth::trace::geth::StructLog"]],["impl Send for GethTrace",1,["alloy_rpc_types::eth::trace::geth::GethTrace"]],["impl Send for GethDebugBuiltInTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugBuiltInTracerType"]],["impl Send for GethDebugTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerType"]],["impl Send for GethDebugTracerConfig",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerConfig"]],["impl Send for GethDebugTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingOptions"]],["impl Send for GethDefaultTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDefaultTracingOptions"]],["impl Send for GethDebugTracingCallOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingCallOptions"]],["impl Send for TraceType",1,["alloy_rpc_types::eth::trace::parity::TraceType"]],["impl Send for TraceResults",1,["alloy_rpc_types::eth::trace::parity::TraceResults"]],["impl Send for TraceResultsWithTransactionHash",1,["alloy_rpc_types::eth::trace::parity::TraceResultsWithTransactionHash"]],["impl<T> Send for ChangedType<T>
where\n T: Send,
",1,["alloy_rpc_types::eth::trace::parity::ChangedType"]],["impl<T> Send for Delta<T>
where\n T: Send,
",1,["alloy_rpc_types::eth::trace::parity::Delta"]],["impl Send for AccountDiff",1,["alloy_rpc_types::eth::trace::parity::AccountDiff"]],["impl Send for StateDiff",1,["alloy_rpc_types::eth::trace::parity::StateDiff"]],["impl Send for Action",1,["alloy_rpc_types::eth::trace::parity::Action"]],["impl Send for ActionType",1,["alloy_rpc_types::eth::trace::parity::ActionType"]],["impl Send for CallType",1,["alloy_rpc_types::eth::trace::parity::CallType"]],["impl Send for CallAction",1,["alloy_rpc_types::eth::trace::parity::CallAction"]],["impl Send for CreateAction",1,["alloy_rpc_types::eth::trace::parity::CreateAction"]],["impl Send for RewardType",1,["alloy_rpc_types::eth::trace::parity::RewardType"]],["impl Send for RewardAction",1,["alloy_rpc_types::eth::trace::parity::RewardAction"]],["impl Send for SelfdestructAction",1,["alloy_rpc_types::eth::trace::parity::SelfdestructAction"]],["impl Send for CallOutput",1,["alloy_rpc_types::eth::trace::parity::CallOutput"]],["impl Send for CreateOutput",1,["alloy_rpc_types::eth::trace::parity::CreateOutput"]],["impl Send for TraceOutput",1,["alloy_rpc_types::eth::trace::parity::TraceOutput"]],["impl Send for TransactionTrace",1,["alloy_rpc_types::eth::trace::parity::TransactionTrace"]],["impl Send for LocalizedTransactionTrace",1,["alloy_rpc_types::eth::trace::parity::LocalizedTransactionTrace"]],["impl Send for VmTrace",1,["alloy_rpc_types::eth::trace::parity::VmTrace"]],["impl Send for VmInstruction",1,["alloy_rpc_types::eth::trace::parity::VmInstruction"]],["impl Send for VmExecutedOperation",1,["alloy_rpc_types::eth::trace::parity::VmExecutedOperation"]],["impl Send for MemoryDelta",1,["alloy_rpc_types::eth::trace::parity::MemoryDelta"]],["impl Send for StorageDelta",1,["alloy_rpc_types::eth::trace::parity::StorageDelta"]],["impl Send for TraceCallRequest",1,["alloy_rpc_types::eth::trace::tracerequest::TraceCallRequest"]],["impl Send for AccessListItem",1,["alloy_rpc_types::eth::transaction::access_list::AccessListItem"]],["impl Send for AccessList",1,["alloy_rpc_types::eth::transaction::access_list::AccessList"]],["impl Send for AccessListWithGasUsed",1,["alloy_rpc_types::eth::transaction::access_list::AccessListWithGasUsed"]],["impl Send for TransactionInfo",1,["alloy_rpc_types::eth::transaction::common::TransactionInfo"]],["impl Send for TransactionReceipt",1,["alloy_rpc_types::eth::transaction::receipt::TransactionReceipt"]],["impl Send for TransactionRequest",1,["alloy_rpc_types::eth::transaction::request::TransactionRequest"]],["impl Send for Signature",1,["alloy_rpc_types::eth::transaction::signature::Signature"]],["impl Send for Parity",1,["alloy_rpc_types::eth::transaction::signature::Parity"]],["impl Send for TxType",1,["alloy_rpc_types::eth::transaction::tx_type::TxType"]],["impl Send for TypedTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::TypedTransactionRequest"]],["impl Send for LegacyTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::LegacyTransactionRequest"]],["impl Send for EIP2930TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP2930TransactionRequest"]],["impl Send for EIP1559TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP1559TransactionRequest"]],["impl Send for TransactionKind",1,["alloy_rpc_types::eth::transaction::typed::TransactionKind"]],["impl Send for Transaction",1,["alloy_rpc_types::eth::transaction::Transaction"]],["impl Send for TxpoolInspectSummary",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummary"]],["impl Send for TxpoolInspectSummaryVisitor",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummaryVisitor"]],["impl Send for TxpoolContent",1,["alloy_rpc_types::eth::txpool::TxpoolContent"]],["impl Send for TxpoolContentFrom",1,["alloy_rpc_types::eth::txpool::TxpoolContentFrom"]],["impl Send for TxpoolInspect",1,["alloy_rpc_types::eth::txpool::TxpoolInspect"]],["impl Send for TxpoolStatus",1,["alloy_rpc_types::eth::txpool::TxpoolStatus"]],["impl Send for Withdrawal",1,["alloy_rpc_types::eth::withdrawal::Withdrawal"]],["impl Send for BeaconAPIWithdrawal",1,["alloy_rpc_types::eth::withdrawal::BeaconAPIWithdrawal"]],["impl Send for RpcModules",1,["alloy_rpc_types::rpc::RpcModules"]],["impl Send for JsonU256",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256"]],["impl Send for JsonU256Visitor",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256Visitor"]],["impl Send for U64HexOrNumber",1,["alloy_rpc_types::serde_helpers::num::U64HexOrNumber"]],["impl Send for NumberOrHexU256",1,["alloy_rpc_types::serde_helpers::num::NumberOrHexU256"]],["impl Send for JsonStorageKey",1,["alloy_rpc_types::serde_helpers::storage::JsonStorageKey"]]], +"alloy_signer":[["impl Send for Error",1,["alloy_signer::error::Error"]],["impl Send for UnsupportedSignerOperation",1,["alloy_signer::error::UnsupportedSignerOperation"]],["impl Send for Signature",1,["alloy_signer::signature::Signature"]],["impl Send for WalletError",1,["alloy_signer::wallet::error::WalletError"]],["impl<W> Send for MnemonicBuilder<W>
where\n W: Send,
",1,["alloy_signer::wallet::mnemonic::MnemonicBuilder"]],["impl Send for MnemonicBuilderError",1,["alloy_signer::wallet::mnemonic::MnemonicBuilderError"]],["impl<D> Send for Wallet<D>
where\n D: Send,
",1,["alloy_signer::wallet::Wallet"]]], +"alloy_signer_aws":[["impl Send for AwsSigner",1,["alloy_signer_aws::signer::AwsSigner"]],["impl Send for AwsSignerError",1,["alloy_signer_aws::signer::AwsSignerError"]]], +"alloy_signer_ledger":[["impl Send for LedgerSigner",1,["alloy_signer_ledger::signer::LedgerSigner"]],["impl Send for DerivationType",1,["alloy_signer_ledger::types::DerivationType"]],["impl Send for LedgerError",1,["alloy_signer_ledger::types::LedgerError"]],["impl Send for INS",1,["alloy_signer_ledger::types::INS"]],["impl Send for P1",1,["alloy_signer_ledger::types::P1"]],["impl Send for P2",1,["alloy_signer_ledger::types::P2"]]], +"alloy_signer_trezor":[["impl Send for TrezorSigner",1,["alloy_signer_trezor::signer::TrezorSigner"]],["impl Send for DerivationType",1,["alloy_signer_trezor::types::DerivationType"]],["impl Send for TrezorError",1,["alloy_signer_trezor::types::TrezorError"]],["impl Send for TrezorTransaction",1,["alloy_signer_trezor::types::TrezorTransaction"]]], +"alloy_transport":[["impl Send for BoxTransport",1,["alloy_transport::boxed::BoxTransport"]],["impl Send for Authorization",1,["alloy_transport::common::Authorization"]],["impl Send for TransportErrorKind",1,["alloy_transport::error::TransportErrorKind"]]], +"alloy_transport_http":[["impl<T> Send for Http<T>
where\n T: Send,
",1,["alloy_transport_http::Http"]]], +"alloy_transport_ipc":[["impl<T> Send for IpcConnect<T>
where\n T: Send,
",1,["alloy_transport_ipc::connect::IpcConnect"]],["impl Send for MockIpcServer",1,["alloy_transport_ipc::mock::MockIpcServer"]],["impl Send for IpcBackend",1,["alloy_transport_ipc::IpcBackend"]],["impl<T> Send for ReadJsonStream<T>
where\n T: Send,
",1,["alloy_transport_ipc::ReadJsonStream"]]], +"alloy_transport_ws":[["impl Send for WsConnect",1,["alloy_transport_ws::native::WsConnect"]],["impl<T> Send for WsBackend<T>
where\n T: Send,
",1,["alloy_transport_ws::WsBackend"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralEq.js b/trait.impl/core/marker/trait.StructuralEq.js new file mode 100644 index 000000000000..4e3843c65955 --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralEq.js @@ -0,0 +1,6 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl StructuralEq for Id"]], +"alloy_rpc_types":[["impl StructuralEq for TxpoolInspect"],["impl StructuralEq for EIP1186AccountProofResponse"],["impl StructuralEq for TxGasAndReward"],["impl StructuralEq for TxpoolStatus"],["impl StructuralEq for BlockNumberOrTag"],["impl StructuralEq for CreateOutput"],["impl StructuralEq for PendingTransactionFilterKind"],["impl StructuralEq for RewardType"],["impl StructuralEq for CallOutput"],["impl StructuralEq for AccountChangeKind"],["impl StructuralEq for CallType"],["impl StructuralEq for Params"],["impl StructuralEq for FilterId"],["impl StructuralEq for BlockOverrides"],["impl StructuralEq for CallLogFrame"],["impl StructuralEq for Parity"],["impl StructuralEq for DiffStateKind"],["impl StructuralEq for TraceFilterMatcher"],["impl StructuralEq for StorageDelta"],["impl StructuralEq for DefaultFrame"],["impl StructuralEq for AccessListItem"],["impl StructuralEq for GethDebugTracerConfig"],["impl StructuralEq for MemoryDelta"],["impl StructuralEq for VmExecutedOperation"],["impl StructuralEq for Log"],["impl StructuralEq for EIP2930TransactionRequest"],["impl StructuralEq for SubscriptionResult"],["impl StructuralEq for RewardAction"],["impl StructuralEq for Bundle"],["impl StructuralEq for PreStateMode"],["impl StructuralEq for Filter"],["impl StructuralEq for TraceResults"],["impl StructuralEq for JsonStorageKey"],["impl StructuralEq for AccountInfo"],["impl<T> StructuralEq for ValueOrArray<T>"],["impl<Ok, Err> StructuralEq for TraceResult<Ok, Err>"],["impl StructuralEq for NoopFrame"],["impl StructuralEq for AccountDiff"],["impl StructuralEq for OtherFields"],["impl StructuralEq for CallFrame"],["impl StructuralEq for Transaction"],["impl StructuralEq for TxpoolContent"],["impl StructuralEq for U64HexOrNumber"],["impl StructuralEq for BlockTransactions"],["impl StructuralEq for EthCallResponse"],["impl StructuralEq for AccessList"],["impl<T: Eq + Hash> StructuralEq for FilterSet<T>"],["impl StructuralEq for PreStateConfig"],["impl StructuralEq for SyncStatus"],["impl StructuralEq for GethTrace"],["impl StructuralEq for FilterChanges"],["impl StructuralEq for Null"],["impl StructuralEq for SyncStatusMetadata"],["impl StructuralEq for CallRequest"],["impl StructuralEq for CallInput"],["impl StructuralEq for SelfdestructAction"],["impl StructuralEq for Action"],["impl StructuralEq for CreateAction"],["impl StructuralEq for SubscriptionKind"],["impl StructuralEq for TraceOutput"],["impl StructuralEq for AccessListWithGasUsed"],["impl StructuralEq for AccountOverride"],["impl StructuralEq for EIP1186StorageProof"],["impl StructuralEq for Signature"],["impl StructuralEq for BlockTraceResult"],["impl StructuralEq for BlockId"],["impl StructuralEq for GethDefaultTracingOptions"],["impl StructuralEq for TransactionKind"],["impl StructuralEq for TransactionReceipt"],["impl StructuralEq for RpcBlockHash"],["impl StructuralEq for BlockNumHash"],["impl StructuralEq for GethDebugBuiltInTracerType"],["impl StructuralEq for TxpoolInspectSummary"],["impl StructuralEq for TraceFilter"],["impl StructuralEq for TransactionRequest"],["impl StructuralEq for ExtAccountInfo"],["impl StructuralEq for BlockTransactionsKind"],["impl<T> StructuralEq for ChangedType<T>"],["impl StructuralEq for CallConfig"],["impl StructuralEq for StateDiff"],["impl StructuralEq for ActionType"],["impl StructuralEq for Header"],["impl StructuralEq for SyncInfo"],["impl StructuralEq for Block"],["impl StructuralEq for VmTrace"],["impl StructuralEq for LocalizedTransactionTrace"],["impl StructuralEq for AccountState"],["impl StructuralEq for DiffMode"],["impl StructuralEq for TransactionIndex"],["impl StructuralEq for VmInstruction"],["impl StructuralEq for LegacyTransactionRequest"],["impl StructuralEq for Log"],["impl StructuralEq for GethDebugTracingCallOptions"],["impl StructuralEq for TraceType"],["impl StructuralEq for TxpoolContentFrom"],["impl StructuralEq for TraceResultsWithTransactionHash"],["impl StructuralEq for TransactionTrace"],["impl StructuralEq for BlockHashOrNumber"],["impl StructuralEq for Withdrawal"],["impl StructuralEq for TransactionInfo"],["impl StructuralEq for GethDebugTracingOptions"],["impl StructuralEq for FilterBlockOption"],["impl StructuralEq for TypedTransactionRequest"],["impl StructuralEq for CallAction"],["impl<T> StructuralEq for Delta<T>"],["impl StructuralEq for TraceFilterMode"],["impl StructuralEq for PubSubSyncStatus"],["impl StructuralEq for JsonU256"],["impl StructuralEq for EIP1559TransactionRequest"],["impl StructuralEq for PreStateFrame"],["impl StructuralEq for StructLog"],["impl StructuralEq for StateContext"],["impl StructuralEq for GethDebugTracerType"],["impl StructuralEq for TxType"],["impl StructuralEq for RpcModules"],["impl StructuralEq for FourByteFrame"],["impl<T> StructuralEq for Rich<T>"]], +"alloy_signer":[["impl StructuralEq for UnsupportedSignerOperation"],["impl StructuralEq for Signature"],["impl<W: Wordlist> StructuralEq for MnemonicBuilder<W>"]], +"alloy_signer_ledger":[["impl StructuralEq for P2"],["impl StructuralEq for INS"],["impl StructuralEq for P1"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 000000000000..d341b06eb7ac --- /dev/null +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,6 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl StructuralPartialEq for Id"]], +"alloy_rpc_types":[["impl StructuralPartialEq for FilterId"],["impl StructuralPartialEq for Null"],["impl StructuralPartialEq for AccessListItem"],["impl<T: Eq + Hash> StructuralPartialEq for FilterSet<T>"],["impl StructuralPartialEq for SelfdestructAction"],["impl StructuralPartialEq for SubscriptionKind"],["impl StructuralPartialEq for GethDebugBuiltInTracerType"],["impl StructuralPartialEq for TransactionTrace"],["impl StructuralPartialEq for NoopFrame"],["impl StructuralPartialEq for PendingTransactionFilterKind"],["impl StructuralPartialEq for AccountOverride"],["impl StructuralPartialEq for BlockHashOrNumber"],["impl StructuralPartialEq for AccessListWithGasUsed"],["impl StructuralPartialEq for CreateAction"],["impl StructuralPartialEq for StorageDelta"],["impl StructuralPartialEq for BlockNumHash"],["impl StructuralPartialEq for Parity"],["impl StructuralPartialEq for LegacyTransactionRequest"],["impl StructuralPartialEq for GethDebugTracerType"],["impl StructuralPartialEq for EIP1559TransactionRequest"],["impl StructuralPartialEq for GethDebugTracerConfig"],["impl StructuralPartialEq for SyncStatusMetadata"],["impl StructuralPartialEq for TraceFilterMode"],["impl StructuralPartialEq for Params"],["impl StructuralPartialEq for AccessList"],["impl StructuralPartialEq for Log"],["impl StructuralPartialEq for Transaction"],["impl StructuralPartialEq for FourByteFrame"],["impl StructuralPartialEq for DiffMode"],["impl StructuralPartialEq for FeeHistory"],["impl StructuralPartialEq for CallFrame"],["impl StructuralPartialEq for JsonU256"],["impl StructuralPartialEq for BlockTransactions"],["impl StructuralPartialEq for TransactionRequest"],["impl StructuralPartialEq for VmTrace"],["impl StructuralPartialEq for TraceResultsWithTransactionHash"],["impl StructuralPartialEq for RewardType"],["impl StructuralPartialEq for Bundle"],["impl StructuralPartialEq for GethDebugTracingCallOptions"],["impl StructuralPartialEq for JsonStorageKey"],["impl<T> StructuralPartialEq for ValueOrArray<T>"],["impl StructuralPartialEq for CallType"],["impl StructuralPartialEq for TxpoolContentFrom"],["impl StructuralPartialEq for TransactionKind"],["impl StructuralPartialEq for GethTrace"],["impl StructuralPartialEq for RpcBlockHash"],["impl StructuralPartialEq for CallRequest"],["impl StructuralPartialEq for Filter"],["impl StructuralPartialEq for TraceResults"],["impl StructuralPartialEq for PreStateConfig"],["impl StructuralPartialEq for SubscriptionResult"],["impl StructuralPartialEq for TxpoolStatus"],["impl StructuralPartialEq for TraceFilterMatcher"],["impl StructuralPartialEq for Header"],["impl StructuralPartialEq for CreateOutput"],["impl StructuralPartialEq for GethDebugTracingOptions"],["impl StructuralPartialEq for AccountState"],["impl StructuralPartialEq for U64HexOrNumber"],["impl StructuralPartialEq for DiffStateKind"],["impl StructuralPartialEq for AccountInfo"],["impl StructuralPartialEq for EIP1186StorageProof"],["impl<Ok, Err> StructuralPartialEq for TraceResult<Ok, Err>"],["impl StructuralPartialEq for AccountChangeKind"],["impl StructuralPartialEq for Action"],["impl StructuralPartialEq for BlockId"],["impl StructuralPartialEq for TransactionReceipt"],["impl<T> StructuralPartialEq for Rich<T>"],["impl StructuralPartialEq for ActionType"],["impl StructuralPartialEq for OtherFields"],["impl StructuralPartialEq for StateDiff"],["impl StructuralPartialEq for TxGasAndReward"],["impl StructuralPartialEq for Signature"],["impl StructuralPartialEq for TraceFilter"],["impl StructuralPartialEq for TransactionInfo"],["impl StructuralPartialEq for CallConfig"],["impl StructuralPartialEq for SyncInfo"],["impl StructuralPartialEq for MemoryDelta"],["impl StructuralPartialEq for GethDefaultTracingOptions"],["impl StructuralPartialEq for DefaultFrame"],["impl StructuralPartialEq for Withdrawal"],["impl StructuralPartialEq for EIP2930TransactionRequest"],["impl StructuralPartialEq for FilterBlockOption"],["impl StructuralPartialEq for AccountDiff"],["impl StructuralPartialEq for CallOutput"],["impl StructuralPartialEq for BlockTransactionsKind"],["impl StructuralPartialEq for VmInstruction"],["impl StructuralPartialEq for TransactionIndex"],["impl StructuralPartialEq for EthCallResponse"],["impl StructuralPartialEq for RewardAction"],["impl StructuralPartialEq for PreStateFrame"],["impl StructuralPartialEq for PubSubSyncStatus"],["impl StructuralPartialEq for EIP1186AccountProofResponse"],["impl StructuralPartialEq for BlockTraceResult"],["impl StructuralPartialEq for TraceType"],["impl StructuralPartialEq for TxType"],["impl StructuralPartialEq for CallLogFrame"],["impl<T> StructuralPartialEq for ChangedType<T>"],["impl StructuralPartialEq for StructLog"],["impl StructuralPartialEq for Log"],["impl<T> StructuralPartialEq for Delta<T>"],["impl StructuralPartialEq for SyncStatus"],["impl StructuralPartialEq for BlockNumberOrTag"],["impl StructuralPartialEq for Block"],["impl StructuralPartialEq for TxpoolInspect"],["impl StructuralPartialEq for TxpoolInspectSummary"],["impl StructuralPartialEq for VmExecutedOperation"],["impl StructuralPartialEq for PreStateMode"],["impl StructuralPartialEq for TxpoolContent"],["impl StructuralPartialEq for CallInput"],["impl StructuralPartialEq for BlockOverrides"],["impl StructuralPartialEq for TypedTransactionRequest"],["impl StructuralPartialEq for FilterChanges"],["impl StructuralPartialEq for ExtAccountInfo"],["impl StructuralPartialEq for RpcModules"],["impl StructuralPartialEq for CallAction"],["impl StructuralPartialEq for StateContext"],["impl StructuralPartialEq for TraceOutput"],["impl StructuralPartialEq for LocalizedTransactionTrace"]], +"alloy_signer":[["impl<W: Wordlist> StructuralPartialEq for MnemonicBuilder<W>"],["impl StructuralPartialEq for Signature"],["impl StructuralPartialEq for UnsupportedSignerOperation"]], +"alloy_signer_ledger":[["impl StructuralPartialEq for INS"],["impl StructuralPartialEq for P1"],["impl StructuralPartialEq for P2"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js new file mode 100644 index 000000000000..cee17a59f576 --- /dev/null +++ b/trait.impl/core/marker/trait.Sync.js @@ -0,0 +1,15 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Sync for Id",1,["alloy_json_rpc::common::Id"]],["impl<E, ErrResp> Sync for RpcError<E, ErrResp>
where\n E: Sync,\n ErrResp: Sync,
",1,["alloy_json_rpc::error::RpcError"]],["impl<T> Sync for EthNotification<T>
where\n T: Sync,
",1,["alloy_json_rpc::notification::EthNotification"]],["impl Sync for PubSubItem",1,["alloy_json_rpc::notification::PubSubItem"]],["impl Sync for RequestPacket",1,["alloy_json_rpc::packet::RequestPacket"]],["impl<Payload, ErrData> Sync for ResponsePacket<Payload, ErrData>
where\n ErrData: Sync,\n Payload: Sync,
",1,["alloy_json_rpc::packet::ResponsePacket"]],["impl Sync for RequestMeta",1,["alloy_json_rpc::request::RequestMeta"]],["impl<Params> Sync for Request<Params>
where\n Params: Sync,
",1,["alloy_json_rpc::request::Request"]],["impl Sync for SerializedRequest",1,["alloy_json_rpc::request::SerializedRequest"]],["impl<ErrData> Sync for ErrorPayload<ErrData>
where\n ErrData: Sync,
",1,["alloy_json_rpc::response::error::ErrorPayload"]],["impl<Payload, ErrData> Sync for ResponsePayload<Payload, ErrData>
where\n ErrData: Sync,\n Payload: Sync,
",1,["alloy_json_rpc::response::payload::ResponsePayload"]],["impl<Payload, ErrData> Sync for Response<Payload, ErrData>
where\n ErrData: Sync,\n Payload: Sync,
",1,["alloy_json_rpc::response::Response"]]], +"alloy_providers":[["impl<T, Inner, Outer> Sync for Stack<T, Inner, Outer>
where\n Inner: Sync,\n Outer: Sync,
",1,["alloy_providers::builder::Stack"]],["impl<L, N, T> Sync for ProviderBuilder<L, N, T>
where\n L: Sync,\n N: Sync,\n T: Sync,
",1,["alloy_providers::builder::ProviderBuilder"]],["impl Sync for ClientError",1,["alloy_providers::provider::ClientError"]],["impl<T> Sync for Provider<T>",1,["alloy_providers::provider::Provider"]],["impl<N, T> Sync for NetworkRpcClient<N, T>",1,["alloy_providers::NetworkRpcClient"]]], +"alloy_pubsub":[["impl Sync for PubSubFrontend",1,["alloy_pubsub::frontend::PubSubFrontend"]],["impl Sync for PubSubInstruction",1,["alloy_pubsub::ix::PubSubInstruction"]],["impl Sync for ConnectionHandle",1,["alloy_pubsub::handle::ConnectionHandle"]],["impl Sync for ConnectionInterface",1,["alloy_pubsub::handle::ConnectionInterface"]],["impl Sync for ActiveSubscription",1,["alloy_pubsub::managers::active_sub::ActiveSubscription"]],["impl Sync for InFlight",1,["alloy_pubsub::managers::in_flight::InFlight"]],["impl Sync for RequestManager",1,["alloy_pubsub::managers::req::RequestManager"]],["impl Sync for SubscriptionManager",1,["alloy_pubsub::managers::sub::SubscriptionManager"]],["impl<T> Sync for PubSubService<T>
where\n T: Sync,
",1,["alloy_pubsub::service::PubSubService"]]], +"alloy_rpc_client":[["impl<'a, T> Sync for BatchRequest<'a, T>
where\n T: Sync,
",1,["alloy_rpc_client::batch::BatchRequest"]],["impl<Resp> Sync for Waiter<Resp>",1,["alloy_rpc_client::batch::Waiter"]],["impl<Conn> !Sync for BatchFuture<Conn>",1,["alloy_rpc_client::batch::BatchFuture"]],["impl<'pin, Conn> !Sync for CallStateProj<'pin, Conn>",1,["alloy_rpc_client::batch::CallStateProj"]],["impl<L> Sync for ClientBuilder<L>
where\n L: Sync,
",1,["alloy_rpc_client::builder::ClientBuilder"]],["impl<Params, Conn> !Sync for CallState<Params, Conn>",1,["alloy_rpc_client::call::CallState"]],["impl<'pin, Params, Conn> !Sync for CallStateProj<'pin, Params, Conn>",1,["alloy_rpc_client::call::CallStateProj"]],["impl<Conn, Params, Resp> !Sync for RpcCall<Conn, Params, Resp>",1,["alloy_rpc_client::call::RpcCall"]],["impl<T> Sync for RpcClient<T>
where\n T: Sync,
",1,["alloy_rpc_client::client::RpcClient"]]], +"alloy_rpc_types":[["impl Sync for AccountInfo",1,["alloy_rpc_types::eth::account::AccountInfo"]],["impl Sync for EIP1186StorageProof",1,["alloy_rpc_types::eth::account::EIP1186StorageProof"]],["impl Sync for EIP1186AccountProofResponse",1,["alloy_rpc_types::eth::account::EIP1186AccountProofResponse"]],["impl Sync for ExtAccountInfo",1,["alloy_rpc_types::eth::account::ExtAccountInfo"]],["impl Sync for RecoveredAccount",1,["alloy_rpc_types::eth::account::RecoveredAccount"]],["impl Sync for BlockTransactions",1,["alloy_rpc_types::eth::block::BlockTransactions"]],["impl<'a> Sync for BlockTransactionHashes<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashes"]],["impl<'a> Sync for BlockTransactionHashesInner<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInner"]],["impl<'a> Sync for BlockTransactionHashesMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesMut"]],["impl<'a> Sync for BlockTransactionHashesInnerMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInnerMut"]],["impl Sync for BlockTransactionsKind",1,["alloy_rpc_types::eth::block::BlockTransactionsKind"]],["impl Sync for BlockError",1,["alloy_rpc_types::eth::block::BlockError"]],["impl Sync for Block",1,["alloy_rpc_types::eth::block::Block"]],["impl Sync for Header",1,["alloy_rpc_types::eth::block::Header"]],["impl Sync for RpcBlockHash",1,["alloy_rpc_types::eth::block::RpcBlockHash"]],["impl Sync for BlockNumberOrTag",1,["alloy_rpc_types::eth::block::BlockNumberOrTag"]],["impl Sync for ParseBlockNumberError",1,["alloy_rpc_types::eth::block::ParseBlockNumberError"]],["impl Sync for HexStringMissingPrefixError",1,["alloy_rpc_types::eth::block::HexStringMissingPrefixError"]],["impl Sync for BlockId",1,["alloy_rpc_types::eth::block::BlockId"]],["impl Sync for BlockNumHash",1,["alloy_rpc_types::eth::block::BlockNumHash"]],["impl Sync for BlockHashOrNumber",1,["alloy_rpc_types::eth::block::BlockHashOrNumber"]],["impl Sync for ParseBlockHashOrNumberError",1,["alloy_rpc_types::eth::block::ParseBlockHashOrNumberError"]],["impl<T> Sync for Rich<T>
where\n T: Sync,
",1,["alloy_rpc_types::eth::block::Rich"]],["impl Sync for BlockOverrides",1,["alloy_rpc_types::eth::block::BlockOverrides"]],["impl Sync for Bundle",1,["alloy_rpc_types::eth::call::Bundle"]],["impl Sync for StateContext",1,["alloy_rpc_types::eth::call::StateContext"]],["impl Sync for EthCallResponse",1,["alloy_rpc_types::eth::call::EthCallResponse"]],["impl Sync for TransactionIndex",1,["alloy_rpc_types::eth::call::TransactionIndex"]],["impl Sync for CallRequest",1,["alloy_rpc_types::eth::call::CallRequest"]],["impl Sync for CallInput",1,["alloy_rpc_types::eth::call::CallInput"]],["impl Sync for CallInputError",1,["alloy_rpc_types::eth::call::CallInputError"]],["impl Sync for TxGasAndReward",1,["alloy_rpc_types::eth::fee::TxGasAndReward"]],["impl Sync for FeeHistory",1,["alloy_rpc_types::eth::fee::FeeHistory"]],["impl Sync for BloomFilter",1,["alloy_rpc_types::eth::filter::BloomFilter"]],["impl<T> Sync for FilterSet<T>
where\n T: Sync,
",1,["alloy_rpc_types::eth::filter::FilterSet"]],["impl Sync for FilterBlockOption",1,["alloy_rpc_types::eth::filter::FilterBlockOption"]],["impl Sync for Filter",1,["alloy_rpc_types::eth::filter::Filter"]],["impl<T> Sync for ValueOrArray<T>
where\n T: Sync,
",1,["alloy_rpc_types::eth::filter::ValueOrArray"]],["impl Sync for FilteredParams",1,["alloy_rpc_types::eth::filter::FilteredParams"]],["impl Sync for FilterChanges",1,["alloy_rpc_types::eth::filter::FilterChanges"]],["impl Sync for FilterId",1,["alloy_rpc_types::eth::filter::FilterId"]],["impl Sync for PendingTransactionFilterKind",1,["alloy_rpc_types::eth::filter::PendingTransactionFilterKind"]],["impl Sync for Log",1,["alloy_rpc_types::eth::log::Log"]],["impl Sync for LogError",1,["alloy_rpc_types::eth::log::LogError"]],["impl Sync for OtherFields",1,["alloy_rpc_types::eth::other::OtherFields"]],["impl Sync for SubscriptionResult",1,["alloy_rpc_types::eth::pubsub::SubscriptionResult"]],["impl Sync for PubSubSyncStatus",1,["alloy_rpc_types::eth::pubsub::PubSubSyncStatus"]],["impl Sync for SyncStatusMetadata",1,["alloy_rpc_types::eth::pubsub::SyncStatusMetadata"]],["impl Sync for SubscriptionKind",1,["alloy_rpc_types::eth::pubsub::SubscriptionKind"]],["impl Sync for Params",1,["alloy_rpc_types::eth::pubsub::Params"]],["impl Sync for Log",1,["alloy_rpc_types::eth::raw_log::Log"]],["impl Sync for AccountOverride",1,["alloy_rpc_types::eth::state::AccountOverride"]],["impl Sync for SyncInfo",1,["alloy_rpc_types::eth::syncing::SyncInfo"]],["impl Sync for Peers",1,["alloy_rpc_types::eth::syncing::Peers"]],["impl Sync for PeerCount",1,["alloy_rpc_types::eth::syncing::PeerCount"]],["impl Sync for PeerInfo",1,["alloy_rpc_types::eth::syncing::PeerInfo"]],["impl Sync for PeerNetworkInfo",1,["alloy_rpc_types::eth::syncing::PeerNetworkInfo"]],["impl Sync for PeerProtocolsInfo",1,["alloy_rpc_types::eth::syncing::PeerProtocolsInfo"]],["impl Sync for PeerEthProtocolInfo",1,["alloy_rpc_types::eth::syncing::PeerEthProtocolInfo"]],["impl Sync for PipProtocolInfo",1,["alloy_rpc_types::eth::syncing::PipProtocolInfo"]],["impl Sync for SyncStatus",1,["alloy_rpc_types::eth::syncing::SyncStatus"]],["impl Sync for TransactionStats",1,["alloy_rpc_types::eth::syncing::TransactionStats"]],["impl Sync for ChainStatus",1,["alloy_rpc_types::eth::syncing::ChainStatus"]],["impl<Ok, Err> Sync for TraceResult<Ok, Err>
where\n Err: Sync,\n Ok: Sync,
",1,["alloy_rpc_types::eth::trace::common::TraceResult"]],["impl Sync for TraceFilter",1,["alloy_rpc_types::eth::trace::filter::TraceFilter"]],["impl Sync for TraceFilterMode",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMode"]],["impl Sync for TraceFilterMatcher",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMatcher"]],["impl Sync for CallFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallFrame"]],["impl Sync for CallLogFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallLogFrame"]],["impl Sync for CallConfig",1,["alloy_rpc_types::eth::trace::geth::call::CallConfig"]],["impl Sync for FourByteFrame",1,["alloy_rpc_types::eth::trace::geth::four_byte::FourByteFrame"]],["impl Sync for NoopFrame",1,["alloy_rpc_types::eth::trace::geth::noop::NoopFrame"]],["impl Sync for Null",1,["alloy_rpc_types::eth::trace::geth::noop::Null"]],["impl Sync for PreStateFrame",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateFrame"]],["impl Sync for PreStateMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateMode"]],["impl Sync for DiffMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffMode"]],["impl Sync for DiffStateKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffStateKind"]],["impl Sync for AccountState",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountState"]],["impl Sync for AccountChangeKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountChangeKind"]],["impl Sync for PreStateConfig",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateConfig"]],["impl Sync for BlockTraceResult",1,["alloy_rpc_types::eth::trace::geth::BlockTraceResult"]],["impl Sync for DefaultFrame",1,["alloy_rpc_types::eth::trace::geth::DefaultFrame"]],["impl Sync for StructLog",1,["alloy_rpc_types::eth::trace::geth::StructLog"]],["impl Sync for GethTrace",1,["alloy_rpc_types::eth::trace::geth::GethTrace"]],["impl Sync for GethDebugBuiltInTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugBuiltInTracerType"]],["impl Sync for GethDebugTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerType"]],["impl Sync for GethDebugTracerConfig",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerConfig"]],["impl Sync for GethDebugTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingOptions"]],["impl Sync for GethDefaultTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDefaultTracingOptions"]],["impl Sync for GethDebugTracingCallOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingCallOptions"]],["impl Sync for TraceType",1,["alloy_rpc_types::eth::trace::parity::TraceType"]],["impl Sync for TraceResults",1,["alloy_rpc_types::eth::trace::parity::TraceResults"]],["impl Sync for TraceResultsWithTransactionHash",1,["alloy_rpc_types::eth::trace::parity::TraceResultsWithTransactionHash"]],["impl<T> Sync for ChangedType<T>
where\n T: Sync,
",1,["alloy_rpc_types::eth::trace::parity::ChangedType"]],["impl<T> Sync for Delta<T>
where\n T: Sync,
",1,["alloy_rpc_types::eth::trace::parity::Delta"]],["impl Sync for AccountDiff",1,["alloy_rpc_types::eth::trace::parity::AccountDiff"]],["impl Sync for StateDiff",1,["alloy_rpc_types::eth::trace::parity::StateDiff"]],["impl Sync for Action",1,["alloy_rpc_types::eth::trace::parity::Action"]],["impl Sync for ActionType",1,["alloy_rpc_types::eth::trace::parity::ActionType"]],["impl Sync for CallType",1,["alloy_rpc_types::eth::trace::parity::CallType"]],["impl Sync for CallAction",1,["alloy_rpc_types::eth::trace::parity::CallAction"]],["impl Sync for CreateAction",1,["alloy_rpc_types::eth::trace::parity::CreateAction"]],["impl Sync for RewardType",1,["alloy_rpc_types::eth::trace::parity::RewardType"]],["impl Sync for RewardAction",1,["alloy_rpc_types::eth::trace::parity::RewardAction"]],["impl Sync for SelfdestructAction",1,["alloy_rpc_types::eth::trace::parity::SelfdestructAction"]],["impl Sync for CallOutput",1,["alloy_rpc_types::eth::trace::parity::CallOutput"]],["impl Sync for CreateOutput",1,["alloy_rpc_types::eth::trace::parity::CreateOutput"]],["impl Sync for TraceOutput",1,["alloy_rpc_types::eth::trace::parity::TraceOutput"]],["impl Sync for TransactionTrace",1,["alloy_rpc_types::eth::trace::parity::TransactionTrace"]],["impl Sync for LocalizedTransactionTrace",1,["alloy_rpc_types::eth::trace::parity::LocalizedTransactionTrace"]],["impl Sync for VmTrace",1,["alloy_rpc_types::eth::trace::parity::VmTrace"]],["impl Sync for VmInstruction",1,["alloy_rpc_types::eth::trace::parity::VmInstruction"]],["impl Sync for VmExecutedOperation",1,["alloy_rpc_types::eth::trace::parity::VmExecutedOperation"]],["impl Sync for MemoryDelta",1,["alloy_rpc_types::eth::trace::parity::MemoryDelta"]],["impl Sync for StorageDelta",1,["alloy_rpc_types::eth::trace::parity::StorageDelta"]],["impl Sync for TraceCallRequest",1,["alloy_rpc_types::eth::trace::tracerequest::TraceCallRequest"]],["impl Sync for AccessListItem",1,["alloy_rpc_types::eth::transaction::access_list::AccessListItem"]],["impl Sync for AccessList",1,["alloy_rpc_types::eth::transaction::access_list::AccessList"]],["impl Sync for AccessListWithGasUsed",1,["alloy_rpc_types::eth::transaction::access_list::AccessListWithGasUsed"]],["impl Sync for TransactionInfo",1,["alloy_rpc_types::eth::transaction::common::TransactionInfo"]],["impl Sync for TransactionReceipt",1,["alloy_rpc_types::eth::transaction::receipt::TransactionReceipt"]],["impl Sync for TransactionRequest",1,["alloy_rpc_types::eth::transaction::request::TransactionRequest"]],["impl Sync for Signature",1,["alloy_rpc_types::eth::transaction::signature::Signature"]],["impl Sync for Parity",1,["alloy_rpc_types::eth::transaction::signature::Parity"]],["impl Sync for TxType",1,["alloy_rpc_types::eth::transaction::tx_type::TxType"]],["impl Sync for TypedTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::TypedTransactionRequest"]],["impl Sync for LegacyTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::LegacyTransactionRequest"]],["impl Sync for EIP2930TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP2930TransactionRequest"]],["impl Sync for EIP1559TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP1559TransactionRequest"]],["impl Sync for TransactionKind",1,["alloy_rpc_types::eth::transaction::typed::TransactionKind"]],["impl Sync for Transaction",1,["alloy_rpc_types::eth::transaction::Transaction"]],["impl Sync for TxpoolInspectSummary",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummary"]],["impl Sync for TxpoolInspectSummaryVisitor",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummaryVisitor"]],["impl Sync for TxpoolContent",1,["alloy_rpc_types::eth::txpool::TxpoolContent"]],["impl Sync for TxpoolContentFrom",1,["alloy_rpc_types::eth::txpool::TxpoolContentFrom"]],["impl Sync for TxpoolInspect",1,["alloy_rpc_types::eth::txpool::TxpoolInspect"]],["impl Sync for TxpoolStatus",1,["alloy_rpc_types::eth::txpool::TxpoolStatus"]],["impl Sync for Withdrawal",1,["alloy_rpc_types::eth::withdrawal::Withdrawal"]],["impl Sync for BeaconAPIWithdrawal",1,["alloy_rpc_types::eth::withdrawal::BeaconAPIWithdrawal"]],["impl Sync for RpcModules",1,["alloy_rpc_types::rpc::RpcModules"]],["impl Sync for JsonU256",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256"]],["impl Sync for JsonU256Visitor",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256Visitor"]],["impl Sync for U64HexOrNumber",1,["alloy_rpc_types::serde_helpers::num::U64HexOrNumber"]],["impl Sync for NumberOrHexU256",1,["alloy_rpc_types::serde_helpers::num::NumberOrHexU256"]],["impl Sync for JsonStorageKey",1,["alloy_rpc_types::serde_helpers::storage::JsonStorageKey"]]], +"alloy_signer":[["impl Sync for Error",1,["alloy_signer::error::Error"]],["impl Sync for UnsupportedSignerOperation",1,["alloy_signer::error::UnsupportedSignerOperation"]],["impl Sync for Signature",1,["alloy_signer::signature::Signature"]],["impl Sync for WalletError",1,["alloy_signer::wallet::error::WalletError"]],["impl<W> Sync for MnemonicBuilder<W>
where\n W: Sync,
",1,["alloy_signer::wallet::mnemonic::MnemonicBuilder"]],["impl Sync for MnemonicBuilderError",1,["alloy_signer::wallet::mnemonic::MnemonicBuilderError"]],["impl<D> Sync for Wallet<D>
where\n D: Sync,
",1,["alloy_signer::wallet::Wallet"]]], +"alloy_signer_aws":[["impl Sync for AwsSigner",1,["alloy_signer_aws::signer::AwsSigner"]],["impl Sync for AwsSignerError",1,["alloy_signer_aws::signer::AwsSignerError"]]], +"alloy_signer_ledger":[["impl Sync for LedgerSigner",1,["alloy_signer_ledger::signer::LedgerSigner"]],["impl Sync for DerivationType",1,["alloy_signer_ledger::types::DerivationType"]],["impl Sync for LedgerError",1,["alloy_signer_ledger::types::LedgerError"]],["impl Sync for INS",1,["alloy_signer_ledger::types::INS"]],["impl Sync for P1",1,["alloy_signer_ledger::types::P1"]],["impl Sync for P2",1,["alloy_signer_ledger::types::P2"]]], +"alloy_signer_trezor":[["impl Sync for TrezorSigner",1,["alloy_signer_trezor::signer::TrezorSigner"]],["impl Sync for DerivationType",1,["alloy_signer_trezor::types::DerivationType"]],["impl Sync for TrezorError",1,["alloy_signer_trezor::types::TrezorError"]],["impl Sync for TrezorTransaction",1,["alloy_signer_trezor::types::TrezorTransaction"]]], +"alloy_transport":[["impl Sync for BoxTransport",1,["alloy_transport::boxed::BoxTransport"]],["impl Sync for Authorization",1,["alloy_transport::common::Authorization"]],["impl Sync for TransportErrorKind",1,["alloy_transport::error::TransportErrorKind"]]], +"alloy_transport_http":[["impl<T> Sync for Http<T>
where\n T: Sync,
",1,["alloy_transport_http::Http"]]], +"alloy_transport_ipc":[["impl<T> Sync for IpcConnect<T>
where\n T: Sync,
",1,["alloy_transport_ipc::connect::IpcConnect"]],["impl Sync for MockIpcServer",1,["alloy_transport_ipc::mock::MockIpcServer"]],["impl Sync for IpcBackend",1,["alloy_transport_ipc::IpcBackend"]],["impl<T> Sync for ReadJsonStream<T>
where\n T: Sync,
",1,["alloy_transport_ipc::ReadJsonStream"]]], +"alloy_transport_ws":[["impl Sync for WsConnect",1,["alloy_transport_ws::native::WsConnect"]],["impl<T> Sync for WsBackend<T>
where\n T: Sync,
",1,["alloy_transport_ws::WsBackend"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js new file mode 100644 index 000000000000..9144edb96d81 --- /dev/null +++ b/trait.impl/core/marker/trait.Unpin.js @@ -0,0 +1,15 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Unpin for Id",1,["alloy_json_rpc::common::Id"]],["impl<E, ErrResp> Unpin for RpcError<E, ErrResp>
where\n E: Unpin,\n ErrResp: Unpin,
",1,["alloy_json_rpc::error::RpcError"]],["impl<T> Unpin for EthNotification<T>
where\n T: Unpin,
",1,["alloy_json_rpc::notification::EthNotification"]],["impl Unpin for PubSubItem",1,["alloy_json_rpc::notification::PubSubItem"]],["impl Unpin for RequestPacket",1,["alloy_json_rpc::packet::RequestPacket"]],["impl<Payload, ErrData> Unpin for ResponsePacket<Payload, ErrData>
where\n ErrData: Unpin,\n Payload: Unpin,
",1,["alloy_json_rpc::packet::ResponsePacket"]],["impl Unpin for RequestMeta",1,["alloy_json_rpc::request::RequestMeta"]],["impl<Params> Unpin for Request<Params>
where\n Params: Unpin,
",1,["alloy_json_rpc::request::Request"]],["impl Unpin for SerializedRequest",1,["alloy_json_rpc::request::SerializedRequest"]],["impl<ErrData> Unpin for ErrorPayload<ErrData>
where\n ErrData: Unpin,
",1,["alloy_json_rpc::response::error::ErrorPayload"]],["impl<Payload, ErrData> Unpin for ResponsePayload<Payload, ErrData>
where\n ErrData: Unpin,\n Payload: Unpin,
",1,["alloy_json_rpc::response::payload::ResponsePayload"]],["impl<Payload, ErrData> Unpin for Response<Payload, ErrData>
where\n ErrData: Unpin,\n Payload: Unpin,
",1,["alloy_json_rpc::response::Response"]]], +"alloy_providers":[["impl<T, Inner, Outer> Unpin for Stack<T, Inner, Outer>
where\n Inner: Unpin,\n Outer: Unpin,
",1,["alloy_providers::builder::Stack"]],["impl<L, N, T> Unpin for ProviderBuilder<L, N, T>
where\n L: Unpin,\n N: Unpin,\n T: Unpin,
",1,["alloy_providers::builder::ProviderBuilder"]],["impl Unpin for ClientError",1,["alloy_providers::provider::ClientError"]],["impl<T> Unpin for Provider<T>
where\n T: Unpin,
",1,["alloy_providers::provider::Provider"]],["impl<N, T> Unpin for NetworkRpcClient<N, T>
where\n T: Unpin,
",1,["alloy_providers::NetworkRpcClient"]]], +"alloy_pubsub":[["impl Unpin for PubSubFrontend",1,["alloy_pubsub::frontend::PubSubFrontend"]],["impl Unpin for PubSubInstruction",1,["alloy_pubsub::ix::PubSubInstruction"]],["impl Unpin for ConnectionHandle",1,["alloy_pubsub::handle::ConnectionHandle"]],["impl Unpin for ConnectionInterface",1,["alloy_pubsub::handle::ConnectionInterface"]],["impl Unpin for ActiveSubscription",1,["alloy_pubsub::managers::active_sub::ActiveSubscription"]],["impl Unpin for InFlight",1,["alloy_pubsub::managers::in_flight::InFlight"]],["impl Unpin for RequestManager",1,["alloy_pubsub::managers::req::RequestManager"]],["impl Unpin for SubscriptionManager",1,["alloy_pubsub::managers::sub::SubscriptionManager"]],["impl<T> Unpin for PubSubService<T>
where\n T: Unpin,
",1,["alloy_pubsub::service::PubSubService"]]], +"alloy_rpc_client":[["impl<'a, T> Unpin for BatchRequest<'a, T>",1,["alloy_rpc_client::batch::BatchRequest"]],["impl<Resp> Unpin for Waiter<Resp>",1,["alloy_rpc_client::batch::Waiter"]],["impl<'pin, Conn> Unpin for CallStateProj<'pin, Conn>",1,["alloy_rpc_client::batch::CallStateProj"]],["impl<L> Unpin for ClientBuilder<L>
where\n L: Unpin,
",1,["alloy_rpc_client::builder::ClientBuilder"]],["impl<'pin, Params, Conn> Unpin for CallStateProj<'pin, Params, Conn>",1,["alloy_rpc_client::call::CallStateProj"]],["impl<T> Unpin for RpcClient<T>
where\n T: Unpin,
",1,["alloy_rpc_client::client::RpcClient"]],["impl<'pin, Params, Conn> Unpin for CallState<Params, Conn>
where\n Params: RpcParam,\n Conn: Transport + Clone,\n __CallState<'pin, Params, Conn>: Unpin,
"],["impl<'pin, Conn> Unpin for BatchFuture<Conn>
where\n Conn: Transport,\n __BatchFuture<'pin, Conn>: Unpin,
"],["impl<'pin, Conn, Params, Resp> Unpin for RpcCall<Conn, Params, Resp>
where\n Conn: Transport + Clone,\n Params: RpcParam,\n __RpcCall<'pin, Conn, Params, Resp>: Unpin,
"]], +"alloy_rpc_types":[["impl Unpin for AccountInfo",1,["alloy_rpc_types::eth::account::AccountInfo"]],["impl Unpin for EIP1186StorageProof",1,["alloy_rpc_types::eth::account::EIP1186StorageProof"]],["impl Unpin for EIP1186AccountProofResponse",1,["alloy_rpc_types::eth::account::EIP1186AccountProofResponse"]],["impl Unpin for ExtAccountInfo",1,["alloy_rpc_types::eth::account::ExtAccountInfo"]],["impl Unpin for RecoveredAccount",1,["alloy_rpc_types::eth::account::RecoveredAccount"]],["impl Unpin for BlockTransactions",1,["alloy_rpc_types::eth::block::BlockTransactions"]],["impl<'a> Unpin for BlockTransactionHashes<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashes"]],["impl<'a> Unpin for BlockTransactionHashesInner<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInner"]],["impl<'a> Unpin for BlockTransactionHashesMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesMut"]],["impl<'a> Unpin for BlockTransactionHashesInnerMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInnerMut"]],["impl Unpin for BlockTransactionsKind",1,["alloy_rpc_types::eth::block::BlockTransactionsKind"]],["impl Unpin for BlockError",1,["alloy_rpc_types::eth::block::BlockError"]],["impl Unpin for Block",1,["alloy_rpc_types::eth::block::Block"]],["impl Unpin for Header",1,["alloy_rpc_types::eth::block::Header"]],["impl Unpin for RpcBlockHash",1,["alloy_rpc_types::eth::block::RpcBlockHash"]],["impl Unpin for BlockNumberOrTag",1,["alloy_rpc_types::eth::block::BlockNumberOrTag"]],["impl Unpin for ParseBlockNumberError",1,["alloy_rpc_types::eth::block::ParseBlockNumberError"]],["impl Unpin for HexStringMissingPrefixError",1,["alloy_rpc_types::eth::block::HexStringMissingPrefixError"]],["impl Unpin for BlockId",1,["alloy_rpc_types::eth::block::BlockId"]],["impl Unpin for BlockNumHash",1,["alloy_rpc_types::eth::block::BlockNumHash"]],["impl Unpin for BlockHashOrNumber",1,["alloy_rpc_types::eth::block::BlockHashOrNumber"]],["impl Unpin for ParseBlockHashOrNumberError",1,["alloy_rpc_types::eth::block::ParseBlockHashOrNumberError"]],["impl<T> Unpin for Rich<T>
where\n T: Unpin,
",1,["alloy_rpc_types::eth::block::Rich"]],["impl Unpin for BlockOverrides",1,["alloy_rpc_types::eth::block::BlockOverrides"]],["impl Unpin for Bundle",1,["alloy_rpc_types::eth::call::Bundle"]],["impl Unpin for StateContext",1,["alloy_rpc_types::eth::call::StateContext"]],["impl Unpin for EthCallResponse",1,["alloy_rpc_types::eth::call::EthCallResponse"]],["impl Unpin for TransactionIndex",1,["alloy_rpc_types::eth::call::TransactionIndex"]],["impl Unpin for CallRequest",1,["alloy_rpc_types::eth::call::CallRequest"]],["impl Unpin for CallInput",1,["alloy_rpc_types::eth::call::CallInput"]],["impl Unpin for CallInputError",1,["alloy_rpc_types::eth::call::CallInputError"]],["impl Unpin for TxGasAndReward",1,["alloy_rpc_types::eth::fee::TxGasAndReward"]],["impl Unpin for FeeHistory",1,["alloy_rpc_types::eth::fee::FeeHistory"]],["impl Unpin for BloomFilter",1,["alloy_rpc_types::eth::filter::BloomFilter"]],["impl<T> Unpin for FilterSet<T>
where\n T: Unpin,
",1,["alloy_rpc_types::eth::filter::FilterSet"]],["impl Unpin for FilterBlockOption",1,["alloy_rpc_types::eth::filter::FilterBlockOption"]],["impl Unpin for Filter",1,["alloy_rpc_types::eth::filter::Filter"]],["impl<T> Unpin for ValueOrArray<T>
where\n T: Unpin,
",1,["alloy_rpc_types::eth::filter::ValueOrArray"]],["impl Unpin for FilteredParams",1,["alloy_rpc_types::eth::filter::FilteredParams"]],["impl Unpin for FilterChanges",1,["alloy_rpc_types::eth::filter::FilterChanges"]],["impl Unpin for FilterId",1,["alloy_rpc_types::eth::filter::FilterId"]],["impl Unpin for PendingTransactionFilterKind",1,["alloy_rpc_types::eth::filter::PendingTransactionFilterKind"]],["impl Unpin for Log",1,["alloy_rpc_types::eth::log::Log"]],["impl Unpin for LogError",1,["alloy_rpc_types::eth::log::LogError"]],["impl Unpin for OtherFields",1,["alloy_rpc_types::eth::other::OtherFields"]],["impl Unpin for SubscriptionResult",1,["alloy_rpc_types::eth::pubsub::SubscriptionResult"]],["impl Unpin for PubSubSyncStatus",1,["alloy_rpc_types::eth::pubsub::PubSubSyncStatus"]],["impl Unpin for SyncStatusMetadata",1,["alloy_rpc_types::eth::pubsub::SyncStatusMetadata"]],["impl Unpin for SubscriptionKind",1,["alloy_rpc_types::eth::pubsub::SubscriptionKind"]],["impl Unpin for Params",1,["alloy_rpc_types::eth::pubsub::Params"]],["impl Unpin for Log",1,["alloy_rpc_types::eth::raw_log::Log"]],["impl Unpin for AccountOverride",1,["alloy_rpc_types::eth::state::AccountOverride"]],["impl Unpin for SyncInfo",1,["alloy_rpc_types::eth::syncing::SyncInfo"]],["impl Unpin for Peers",1,["alloy_rpc_types::eth::syncing::Peers"]],["impl Unpin for PeerCount",1,["alloy_rpc_types::eth::syncing::PeerCount"]],["impl Unpin for PeerInfo",1,["alloy_rpc_types::eth::syncing::PeerInfo"]],["impl Unpin for PeerNetworkInfo",1,["alloy_rpc_types::eth::syncing::PeerNetworkInfo"]],["impl Unpin for PeerProtocolsInfo",1,["alloy_rpc_types::eth::syncing::PeerProtocolsInfo"]],["impl Unpin for PeerEthProtocolInfo",1,["alloy_rpc_types::eth::syncing::PeerEthProtocolInfo"]],["impl Unpin for PipProtocolInfo",1,["alloy_rpc_types::eth::syncing::PipProtocolInfo"]],["impl Unpin for SyncStatus",1,["alloy_rpc_types::eth::syncing::SyncStatus"]],["impl Unpin for TransactionStats",1,["alloy_rpc_types::eth::syncing::TransactionStats"]],["impl Unpin for ChainStatus",1,["alloy_rpc_types::eth::syncing::ChainStatus"]],["impl<Ok, Err> Unpin for TraceResult<Ok, Err>
where\n Err: Unpin,\n Ok: Unpin,
",1,["alloy_rpc_types::eth::trace::common::TraceResult"]],["impl Unpin for TraceFilter",1,["alloy_rpc_types::eth::trace::filter::TraceFilter"]],["impl Unpin for TraceFilterMode",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMode"]],["impl Unpin for TraceFilterMatcher",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMatcher"]],["impl Unpin for CallFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallFrame"]],["impl Unpin for CallLogFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallLogFrame"]],["impl Unpin for CallConfig",1,["alloy_rpc_types::eth::trace::geth::call::CallConfig"]],["impl Unpin for FourByteFrame",1,["alloy_rpc_types::eth::trace::geth::four_byte::FourByteFrame"]],["impl Unpin for NoopFrame",1,["alloy_rpc_types::eth::trace::geth::noop::NoopFrame"]],["impl Unpin for Null",1,["alloy_rpc_types::eth::trace::geth::noop::Null"]],["impl Unpin for PreStateFrame",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateFrame"]],["impl Unpin for PreStateMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateMode"]],["impl Unpin for DiffMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffMode"]],["impl Unpin for DiffStateKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffStateKind"]],["impl Unpin for AccountState",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountState"]],["impl Unpin for AccountChangeKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountChangeKind"]],["impl Unpin for PreStateConfig",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateConfig"]],["impl Unpin for BlockTraceResult",1,["alloy_rpc_types::eth::trace::geth::BlockTraceResult"]],["impl Unpin for DefaultFrame",1,["alloy_rpc_types::eth::trace::geth::DefaultFrame"]],["impl Unpin for StructLog",1,["alloy_rpc_types::eth::trace::geth::StructLog"]],["impl Unpin for GethTrace",1,["alloy_rpc_types::eth::trace::geth::GethTrace"]],["impl Unpin for GethDebugBuiltInTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugBuiltInTracerType"]],["impl Unpin for GethDebugTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerType"]],["impl Unpin for GethDebugTracerConfig",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerConfig"]],["impl Unpin for GethDebugTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingOptions"]],["impl Unpin for GethDefaultTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDefaultTracingOptions"]],["impl Unpin for GethDebugTracingCallOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingCallOptions"]],["impl Unpin for TraceType",1,["alloy_rpc_types::eth::trace::parity::TraceType"]],["impl Unpin for TraceResults",1,["alloy_rpc_types::eth::trace::parity::TraceResults"]],["impl Unpin for TraceResultsWithTransactionHash",1,["alloy_rpc_types::eth::trace::parity::TraceResultsWithTransactionHash"]],["impl<T> Unpin for ChangedType<T>
where\n T: Unpin,
",1,["alloy_rpc_types::eth::trace::parity::ChangedType"]],["impl<T> Unpin for Delta<T>
where\n T: Unpin,
",1,["alloy_rpc_types::eth::trace::parity::Delta"]],["impl Unpin for AccountDiff",1,["alloy_rpc_types::eth::trace::parity::AccountDiff"]],["impl Unpin for StateDiff",1,["alloy_rpc_types::eth::trace::parity::StateDiff"]],["impl Unpin for Action",1,["alloy_rpc_types::eth::trace::parity::Action"]],["impl Unpin for ActionType",1,["alloy_rpc_types::eth::trace::parity::ActionType"]],["impl Unpin for CallType",1,["alloy_rpc_types::eth::trace::parity::CallType"]],["impl Unpin for CallAction",1,["alloy_rpc_types::eth::trace::parity::CallAction"]],["impl Unpin for CreateAction",1,["alloy_rpc_types::eth::trace::parity::CreateAction"]],["impl Unpin for RewardType",1,["alloy_rpc_types::eth::trace::parity::RewardType"]],["impl Unpin for RewardAction",1,["alloy_rpc_types::eth::trace::parity::RewardAction"]],["impl Unpin for SelfdestructAction",1,["alloy_rpc_types::eth::trace::parity::SelfdestructAction"]],["impl Unpin for CallOutput",1,["alloy_rpc_types::eth::trace::parity::CallOutput"]],["impl Unpin for CreateOutput",1,["alloy_rpc_types::eth::trace::parity::CreateOutput"]],["impl Unpin for TraceOutput",1,["alloy_rpc_types::eth::trace::parity::TraceOutput"]],["impl Unpin for TransactionTrace",1,["alloy_rpc_types::eth::trace::parity::TransactionTrace"]],["impl Unpin for LocalizedTransactionTrace",1,["alloy_rpc_types::eth::trace::parity::LocalizedTransactionTrace"]],["impl Unpin for VmTrace",1,["alloy_rpc_types::eth::trace::parity::VmTrace"]],["impl Unpin for VmInstruction",1,["alloy_rpc_types::eth::trace::parity::VmInstruction"]],["impl Unpin for VmExecutedOperation",1,["alloy_rpc_types::eth::trace::parity::VmExecutedOperation"]],["impl Unpin for MemoryDelta",1,["alloy_rpc_types::eth::trace::parity::MemoryDelta"]],["impl Unpin for StorageDelta",1,["alloy_rpc_types::eth::trace::parity::StorageDelta"]],["impl Unpin for TraceCallRequest",1,["alloy_rpc_types::eth::trace::tracerequest::TraceCallRequest"]],["impl Unpin for AccessListItem",1,["alloy_rpc_types::eth::transaction::access_list::AccessListItem"]],["impl Unpin for AccessList",1,["alloy_rpc_types::eth::transaction::access_list::AccessList"]],["impl Unpin for AccessListWithGasUsed",1,["alloy_rpc_types::eth::transaction::access_list::AccessListWithGasUsed"]],["impl Unpin for TransactionInfo",1,["alloy_rpc_types::eth::transaction::common::TransactionInfo"]],["impl Unpin for TransactionReceipt",1,["alloy_rpc_types::eth::transaction::receipt::TransactionReceipt"]],["impl Unpin for TransactionRequest",1,["alloy_rpc_types::eth::transaction::request::TransactionRequest"]],["impl Unpin for Signature",1,["alloy_rpc_types::eth::transaction::signature::Signature"]],["impl Unpin for Parity",1,["alloy_rpc_types::eth::transaction::signature::Parity"]],["impl Unpin for TxType",1,["alloy_rpc_types::eth::transaction::tx_type::TxType"]],["impl Unpin for TypedTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::TypedTransactionRequest"]],["impl Unpin for LegacyTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::LegacyTransactionRequest"]],["impl Unpin for EIP2930TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP2930TransactionRequest"]],["impl Unpin for EIP1559TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP1559TransactionRequest"]],["impl Unpin for TransactionKind",1,["alloy_rpc_types::eth::transaction::typed::TransactionKind"]],["impl Unpin for Transaction",1,["alloy_rpc_types::eth::transaction::Transaction"]],["impl Unpin for TxpoolInspectSummary",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummary"]],["impl Unpin for TxpoolInspectSummaryVisitor",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummaryVisitor"]],["impl Unpin for TxpoolContent",1,["alloy_rpc_types::eth::txpool::TxpoolContent"]],["impl Unpin for TxpoolContentFrom",1,["alloy_rpc_types::eth::txpool::TxpoolContentFrom"]],["impl Unpin for TxpoolInspect",1,["alloy_rpc_types::eth::txpool::TxpoolInspect"]],["impl Unpin for TxpoolStatus",1,["alloy_rpc_types::eth::txpool::TxpoolStatus"]],["impl Unpin for Withdrawal",1,["alloy_rpc_types::eth::withdrawal::Withdrawal"]],["impl Unpin for BeaconAPIWithdrawal",1,["alloy_rpc_types::eth::withdrawal::BeaconAPIWithdrawal"]],["impl Unpin for RpcModules",1,["alloy_rpc_types::rpc::RpcModules"]],["impl Unpin for JsonU256",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256"]],["impl Unpin for JsonU256Visitor",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256Visitor"]],["impl Unpin for U64HexOrNumber",1,["alloy_rpc_types::serde_helpers::num::U64HexOrNumber"]],["impl Unpin for NumberOrHexU256",1,["alloy_rpc_types::serde_helpers::num::NumberOrHexU256"]],["impl Unpin for JsonStorageKey",1,["alloy_rpc_types::serde_helpers::storage::JsonStorageKey"]]], +"alloy_signer":[["impl Unpin for Error",1,["alloy_signer::error::Error"]],["impl Unpin for UnsupportedSignerOperation",1,["alloy_signer::error::UnsupportedSignerOperation"]],["impl Unpin for Signature",1,["alloy_signer::signature::Signature"]],["impl Unpin for WalletError",1,["alloy_signer::wallet::error::WalletError"]],["impl<W> Unpin for MnemonicBuilder<W>
where\n W: Unpin,
",1,["alloy_signer::wallet::mnemonic::MnemonicBuilder"]],["impl Unpin for MnemonicBuilderError",1,["alloy_signer::wallet::mnemonic::MnemonicBuilderError"]],["impl<D> Unpin for Wallet<D>
where\n D: Unpin,
",1,["alloy_signer::wallet::Wallet"]]], +"alloy_signer_aws":[["impl Unpin for AwsSigner",1,["alloy_signer_aws::signer::AwsSigner"]],["impl Unpin for AwsSignerError",1,["alloy_signer_aws::signer::AwsSignerError"]]], +"alloy_signer_ledger":[["impl Unpin for LedgerSigner",1,["alloy_signer_ledger::signer::LedgerSigner"]],["impl Unpin for DerivationType",1,["alloy_signer_ledger::types::DerivationType"]],["impl Unpin for LedgerError",1,["alloy_signer_ledger::types::LedgerError"]],["impl Unpin for INS",1,["alloy_signer_ledger::types::INS"]],["impl Unpin for P1",1,["alloy_signer_ledger::types::P1"]],["impl Unpin for P2",1,["alloy_signer_ledger::types::P2"]]], +"alloy_signer_trezor":[["impl Unpin for TrezorSigner",1,["alloy_signer_trezor::signer::TrezorSigner"]],["impl Unpin for DerivationType",1,["alloy_signer_trezor::types::DerivationType"]],["impl Unpin for TrezorError",1,["alloy_signer_trezor::types::TrezorError"]],["impl Unpin for TrezorTransaction",1,["alloy_signer_trezor::types::TrezorTransaction"]]], +"alloy_transport":[["impl Unpin for BoxTransport",1,["alloy_transport::boxed::BoxTransport"]],["impl Unpin for Authorization",1,["alloy_transport::common::Authorization"]],["impl Unpin for TransportErrorKind",1,["alloy_transport::error::TransportErrorKind"]]], +"alloy_transport_http":[["impl<T> Unpin for Http<T>
where\n T: Unpin,
",1,["alloy_transport_http::Http"]]], +"alloy_transport_ipc":[["impl<T> Unpin for IpcConnect<T>
where\n T: Unpin,
",1,["alloy_transport_ipc::connect::IpcConnect"]],["impl Unpin for MockIpcServer",1,["alloy_transport_ipc::mock::MockIpcServer"]],["impl Unpin for IpcBackend",1,["alloy_transport_ipc::IpcBackend"]],["impl<'pin, T> Unpin for ReadJsonStream<T>
where\n __ReadJsonStream<'pin, T>: Unpin,
"]], +"alloy_transport_ws":[["impl Unpin for WsConnect",1,["alloy_transport_ws::native::WsConnect"]],["impl<T> Unpin for WsBackend<T>
where\n T: Unpin,
",1,["alloy_transport_ws::WsBackend"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.Deref.js b/trait.impl/core/ops/deref/trait.Deref.js new file mode 100644 index 000000000000..6fa622970ded --- /dev/null +++ b/trait.impl/core/ops/deref/trait.Deref.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"alloy_providers":[["impl<N, T> Deref for NetworkRpcClient<N, T>
where\n N: Network,\n T: Transport,
"]], +"alloy_rpc_types":[["impl Deref for StateDiff"],["impl Deref for OtherFields"],["impl<T> Deref for Rich<T>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.DerefMut.js b/trait.impl/core/ops/deref/trait.DerefMut.js new file mode 100644 index 000000000000..95b3a30ce91c --- /dev/null +++ b/trait.impl/core/ops/deref/trait.DerefMut.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl DerefMut for OtherFields"],["impl DerefMut for StateDiff"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 000000000000..7475466504c1 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,15 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl RefUnwindSafe for Id",1,["alloy_json_rpc::common::Id"]],["impl<E, ErrResp = Box<RawValue>> !RefUnwindSafe for RpcError<E, ErrResp>",1,["alloy_json_rpc::error::RpcError"]],["impl<T> RefUnwindSafe for EthNotification<T>
where\n T: RefUnwindSafe,
",1,["alloy_json_rpc::notification::EthNotification"]],["impl RefUnwindSafe for PubSubItem",1,["alloy_json_rpc::notification::PubSubItem"]],["impl RefUnwindSafe for RequestPacket",1,["alloy_json_rpc::packet::RequestPacket"]],["impl<Payload, ErrData> RefUnwindSafe for ResponsePacket<Payload, ErrData>
where\n ErrData: RefUnwindSafe,\n Payload: RefUnwindSafe,
",1,["alloy_json_rpc::packet::ResponsePacket"]],["impl RefUnwindSafe for RequestMeta",1,["alloy_json_rpc::request::RequestMeta"]],["impl<Params> RefUnwindSafe for Request<Params>
where\n Params: RefUnwindSafe,
",1,["alloy_json_rpc::request::Request"]],["impl RefUnwindSafe for SerializedRequest",1,["alloy_json_rpc::request::SerializedRequest"]],["impl<ErrData> RefUnwindSafe for ErrorPayload<ErrData>
where\n ErrData: RefUnwindSafe,
",1,["alloy_json_rpc::response::error::ErrorPayload"]],["impl<Payload, ErrData> RefUnwindSafe for ResponsePayload<Payload, ErrData>
where\n ErrData: RefUnwindSafe,\n Payload: RefUnwindSafe,
",1,["alloy_json_rpc::response::payload::ResponsePayload"]],["impl<Payload, ErrData> RefUnwindSafe for Response<Payload, ErrData>
where\n ErrData: RefUnwindSafe,\n Payload: RefUnwindSafe,
",1,["alloy_json_rpc::response::Response"]]], +"alloy_providers":[["impl<T, Inner, Outer> RefUnwindSafe for Stack<T, Inner, Outer>
where\n Inner: RefUnwindSafe,\n Outer: RefUnwindSafe,
",1,["alloy_providers::builder::Stack"]],["impl<L, N, T> RefUnwindSafe for ProviderBuilder<L, N, T>
where\n L: RefUnwindSafe,\n N: RefUnwindSafe,\n T: RefUnwindSafe,
",1,["alloy_providers::builder::ProviderBuilder"]],["impl RefUnwindSafe for ClientError",1,["alloy_providers::provider::ClientError"]],["impl<T> RefUnwindSafe for Provider<T>
where\n T: RefUnwindSafe,
",1,["alloy_providers::provider::Provider"]],["impl<N, T> RefUnwindSafe for NetworkRpcClient<N, T>
where\n T: RefUnwindSafe,
",1,["alloy_providers::NetworkRpcClient"]]], +"alloy_pubsub":[["impl !RefUnwindSafe for PubSubFrontend",1,["alloy_pubsub::frontend::PubSubFrontend"]],["impl !RefUnwindSafe for PubSubInstruction",1,["alloy_pubsub::ix::PubSubInstruction"]],["impl !RefUnwindSafe for ConnectionHandle",1,["alloy_pubsub::handle::ConnectionHandle"]],["impl !RefUnwindSafe for ConnectionInterface",1,["alloy_pubsub::handle::ConnectionInterface"]],["impl !RefUnwindSafe for ActiveSubscription",1,["alloy_pubsub::managers::active_sub::ActiveSubscription"]],["impl !RefUnwindSafe for InFlight",1,["alloy_pubsub::managers::in_flight::InFlight"]],["impl !RefUnwindSafe for RequestManager",1,["alloy_pubsub::managers::req::RequestManager"]],["impl !RefUnwindSafe for SubscriptionManager",1,["alloy_pubsub::managers::sub::SubscriptionManager"]],["impl<T> !RefUnwindSafe for PubSubService<T>",1,["alloy_pubsub::service::PubSubService"]]], +"alloy_rpc_client":[["impl<'a, T> !RefUnwindSafe for BatchRequest<'a, T>",1,["alloy_rpc_client::batch::BatchRequest"]],["impl<Resp> !RefUnwindSafe for Waiter<Resp>",1,["alloy_rpc_client::batch::Waiter"]],["impl<Conn> !RefUnwindSafe for BatchFuture<Conn>",1,["alloy_rpc_client::batch::BatchFuture"]],["impl<'pin, Conn> !RefUnwindSafe for CallStateProj<'pin, Conn>",1,["alloy_rpc_client::batch::CallStateProj"]],["impl<L> RefUnwindSafe for ClientBuilder<L>
where\n L: RefUnwindSafe,
",1,["alloy_rpc_client::builder::ClientBuilder"]],["impl<Params, Conn> !RefUnwindSafe for CallState<Params, Conn>",1,["alloy_rpc_client::call::CallState"]],["impl<'pin, Params, Conn> !RefUnwindSafe for CallStateProj<'pin, Params, Conn>",1,["alloy_rpc_client::call::CallStateProj"]],["impl<Conn, Params, Resp> !RefUnwindSafe for RpcCall<Conn, Params, Resp>",1,["alloy_rpc_client::call::RpcCall"]],["impl<T> RefUnwindSafe for RpcClient<T>
where\n T: RefUnwindSafe,
",1,["alloy_rpc_client::client::RpcClient"]]], +"alloy_rpc_types":[["impl RefUnwindSafe for AccountInfo",1,["alloy_rpc_types::eth::account::AccountInfo"]],["impl RefUnwindSafe for EIP1186StorageProof",1,["alloy_rpc_types::eth::account::EIP1186StorageProof"]],["impl RefUnwindSafe for EIP1186AccountProofResponse",1,["alloy_rpc_types::eth::account::EIP1186AccountProofResponse"]],["impl RefUnwindSafe for ExtAccountInfo",1,["alloy_rpc_types::eth::account::ExtAccountInfo"]],["impl RefUnwindSafe for RecoveredAccount",1,["alloy_rpc_types::eth::account::RecoveredAccount"]],["impl RefUnwindSafe for BlockTransactions",1,["alloy_rpc_types::eth::block::BlockTransactions"]],["impl<'a> RefUnwindSafe for BlockTransactionHashes<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashes"]],["impl<'a> RefUnwindSafe for BlockTransactionHashesInner<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInner"]],["impl<'a> RefUnwindSafe for BlockTransactionHashesMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesMut"]],["impl<'a> RefUnwindSafe for BlockTransactionHashesInnerMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInnerMut"]],["impl RefUnwindSafe for BlockTransactionsKind",1,["alloy_rpc_types::eth::block::BlockTransactionsKind"]],["impl RefUnwindSafe for BlockError",1,["alloy_rpc_types::eth::block::BlockError"]],["impl RefUnwindSafe for Block",1,["alloy_rpc_types::eth::block::Block"]],["impl RefUnwindSafe for Header",1,["alloy_rpc_types::eth::block::Header"]],["impl RefUnwindSafe for RpcBlockHash",1,["alloy_rpc_types::eth::block::RpcBlockHash"]],["impl RefUnwindSafe for BlockNumberOrTag",1,["alloy_rpc_types::eth::block::BlockNumberOrTag"]],["impl RefUnwindSafe for ParseBlockNumberError",1,["alloy_rpc_types::eth::block::ParseBlockNumberError"]],["impl RefUnwindSafe for HexStringMissingPrefixError",1,["alloy_rpc_types::eth::block::HexStringMissingPrefixError"]],["impl RefUnwindSafe for BlockId",1,["alloy_rpc_types::eth::block::BlockId"]],["impl RefUnwindSafe for BlockNumHash",1,["alloy_rpc_types::eth::block::BlockNumHash"]],["impl RefUnwindSafe for BlockHashOrNumber",1,["alloy_rpc_types::eth::block::BlockHashOrNumber"]],["impl RefUnwindSafe for ParseBlockHashOrNumberError",1,["alloy_rpc_types::eth::block::ParseBlockHashOrNumberError"]],["impl<T> RefUnwindSafe for Rich<T>
where\n T: RefUnwindSafe,
",1,["alloy_rpc_types::eth::block::Rich"]],["impl RefUnwindSafe for BlockOverrides",1,["alloy_rpc_types::eth::block::BlockOverrides"]],["impl RefUnwindSafe for Bundle",1,["alloy_rpc_types::eth::call::Bundle"]],["impl RefUnwindSafe for StateContext",1,["alloy_rpc_types::eth::call::StateContext"]],["impl RefUnwindSafe for EthCallResponse",1,["alloy_rpc_types::eth::call::EthCallResponse"]],["impl RefUnwindSafe for TransactionIndex",1,["alloy_rpc_types::eth::call::TransactionIndex"]],["impl RefUnwindSafe for CallRequest",1,["alloy_rpc_types::eth::call::CallRequest"]],["impl RefUnwindSafe for CallInput",1,["alloy_rpc_types::eth::call::CallInput"]],["impl RefUnwindSafe for CallInputError",1,["alloy_rpc_types::eth::call::CallInputError"]],["impl RefUnwindSafe for TxGasAndReward",1,["alloy_rpc_types::eth::fee::TxGasAndReward"]],["impl RefUnwindSafe for FeeHistory",1,["alloy_rpc_types::eth::fee::FeeHistory"]],["impl RefUnwindSafe for BloomFilter",1,["alloy_rpc_types::eth::filter::BloomFilter"]],["impl<T> RefUnwindSafe for FilterSet<T>
where\n T: RefUnwindSafe,
",1,["alloy_rpc_types::eth::filter::FilterSet"]],["impl RefUnwindSafe for FilterBlockOption",1,["alloy_rpc_types::eth::filter::FilterBlockOption"]],["impl RefUnwindSafe for Filter",1,["alloy_rpc_types::eth::filter::Filter"]],["impl<T> RefUnwindSafe for ValueOrArray<T>
where\n T: RefUnwindSafe,
",1,["alloy_rpc_types::eth::filter::ValueOrArray"]],["impl RefUnwindSafe for FilteredParams",1,["alloy_rpc_types::eth::filter::FilteredParams"]],["impl RefUnwindSafe for FilterChanges",1,["alloy_rpc_types::eth::filter::FilterChanges"]],["impl RefUnwindSafe for FilterId",1,["alloy_rpc_types::eth::filter::FilterId"]],["impl RefUnwindSafe for PendingTransactionFilterKind",1,["alloy_rpc_types::eth::filter::PendingTransactionFilterKind"]],["impl RefUnwindSafe for Log",1,["alloy_rpc_types::eth::log::Log"]],["impl RefUnwindSafe for LogError",1,["alloy_rpc_types::eth::log::LogError"]],["impl RefUnwindSafe for OtherFields",1,["alloy_rpc_types::eth::other::OtherFields"]],["impl RefUnwindSafe for SubscriptionResult",1,["alloy_rpc_types::eth::pubsub::SubscriptionResult"]],["impl RefUnwindSafe for PubSubSyncStatus",1,["alloy_rpc_types::eth::pubsub::PubSubSyncStatus"]],["impl RefUnwindSafe for SyncStatusMetadata",1,["alloy_rpc_types::eth::pubsub::SyncStatusMetadata"]],["impl RefUnwindSafe for SubscriptionKind",1,["alloy_rpc_types::eth::pubsub::SubscriptionKind"]],["impl RefUnwindSafe for Params",1,["alloy_rpc_types::eth::pubsub::Params"]],["impl RefUnwindSafe for Log",1,["alloy_rpc_types::eth::raw_log::Log"]],["impl RefUnwindSafe for AccountOverride",1,["alloy_rpc_types::eth::state::AccountOverride"]],["impl RefUnwindSafe for SyncInfo",1,["alloy_rpc_types::eth::syncing::SyncInfo"]],["impl RefUnwindSafe for Peers",1,["alloy_rpc_types::eth::syncing::Peers"]],["impl RefUnwindSafe for PeerCount",1,["alloy_rpc_types::eth::syncing::PeerCount"]],["impl RefUnwindSafe for PeerInfo",1,["alloy_rpc_types::eth::syncing::PeerInfo"]],["impl RefUnwindSafe for PeerNetworkInfo",1,["alloy_rpc_types::eth::syncing::PeerNetworkInfo"]],["impl RefUnwindSafe for PeerProtocolsInfo",1,["alloy_rpc_types::eth::syncing::PeerProtocolsInfo"]],["impl RefUnwindSafe for PeerEthProtocolInfo",1,["alloy_rpc_types::eth::syncing::PeerEthProtocolInfo"]],["impl RefUnwindSafe for PipProtocolInfo",1,["alloy_rpc_types::eth::syncing::PipProtocolInfo"]],["impl RefUnwindSafe for SyncStatus",1,["alloy_rpc_types::eth::syncing::SyncStatus"]],["impl RefUnwindSafe for TransactionStats",1,["alloy_rpc_types::eth::syncing::TransactionStats"]],["impl RefUnwindSafe for ChainStatus",1,["alloy_rpc_types::eth::syncing::ChainStatus"]],["impl<Ok, Err> RefUnwindSafe for TraceResult<Ok, Err>
where\n Err: RefUnwindSafe,\n Ok: RefUnwindSafe,
",1,["alloy_rpc_types::eth::trace::common::TraceResult"]],["impl RefUnwindSafe for TraceFilter",1,["alloy_rpc_types::eth::trace::filter::TraceFilter"]],["impl RefUnwindSafe for TraceFilterMode",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMode"]],["impl RefUnwindSafe for TraceFilterMatcher",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMatcher"]],["impl RefUnwindSafe for CallFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallFrame"]],["impl RefUnwindSafe for CallLogFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallLogFrame"]],["impl RefUnwindSafe for CallConfig",1,["alloy_rpc_types::eth::trace::geth::call::CallConfig"]],["impl RefUnwindSafe for FourByteFrame",1,["alloy_rpc_types::eth::trace::geth::four_byte::FourByteFrame"]],["impl RefUnwindSafe for NoopFrame",1,["alloy_rpc_types::eth::trace::geth::noop::NoopFrame"]],["impl RefUnwindSafe for Null",1,["alloy_rpc_types::eth::trace::geth::noop::Null"]],["impl RefUnwindSafe for PreStateFrame",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateFrame"]],["impl RefUnwindSafe for PreStateMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateMode"]],["impl RefUnwindSafe for DiffMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffMode"]],["impl RefUnwindSafe for DiffStateKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffStateKind"]],["impl RefUnwindSafe for AccountState",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountState"]],["impl RefUnwindSafe for AccountChangeKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountChangeKind"]],["impl RefUnwindSafe for PreStateConfig",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateConfig"]],["impl RefUnwindSafe for BlockTraceResult",1,["alloy_rpc_types::eth::trace::geth::BlockTraceResult"]],["impl RefUnwindSafe for DefaultFrame",1,["alloy_rpc_types::eth::trace::geth::DefaultFrame"]],["impl RefUnwindSafe for StructLog",1,["alloy_rpc_types::eth::trace::geth::StructLog"]],["impl RefUnwindSafe for GethTrace",1,["alloy_rpc_types::eth::trace::geth::GethTrace"]],["impl RefUnwindSafe for GethDebugBuiltInTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugBuiltInTracerType"]],["impl RefUnwindSafe for GethDebugTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerType"]],["impl RefUnwindSafe for GethDebugTracerConfig",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerConfig"]],["impl RefUnwindSafe for GethDebugTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingOptions"]],["impl RefUnwindSafe for GethDefaultTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDefaultTracingOptions"]],["impl RefUnwindSafe for GethDebugTracingCallOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingCallOptions"]],["impl RefUnwindSafe for TraceType",1,["alloy_rpc_types::eth::trace::parity::TraceType"]],["impl RefUnwindSafe for TraceResults",1,["alloy_rpc_types::eth::trace::parity::TraceResults"]],["impl RefUnwindSafe for TraceResultsWithTransactionHash",1,["alloy_rpc_types::eth::trace::parity::TraceResultsWithTransactionHash"]],["impl<T> RefUnwindSafe for ChangedType<T>
where\n T: RefUnwindSafe,
",1,["alloy_rpc_types::eth::trace::parity::ChangedType"]],["impl<T> RefUnwindSafe for Delta<T>
where\n T: RefUnwindSafe,
",1,["alloy_rpc_types::eth::trace::parity::Delta"]],["impl RefUnwindSafe for AccountDiff",1,["alloy_rpc_types::eth::trace::parity::AccountDiff"]],["impl RefUnwindSafe for StateDiff",1,["alloy_rpc_types::eth::trace::parity::StateDiff"]],["impl RefUnwindSafe for Action",1,["alloy_rpc_types::eth::trace::parity::Action"]],["impl RefUnwindSafe for ActionType",1,["alloy_rpc_types::eth::trace::parity::ActionType"]],["impl RefUnwindSafe for CallType",1,["alloy_rpc_types::eth::trace::parity::CallType"]],["impl RefUnwindSafe for CallAction",1,["alloy_rpc_types::eth::trace::parity::CallAction"]],["impl RefUnwindSafe for CreateAction",1,["alloy_rpc_types::eth::trace::parity::CreateAction"]],["impl RefUnwindSafe for RewardType",1,["alloy_rpc_types::eth::trace::parity::RewardType"]],["impl RefUnwindSafe for RewardAction",1,["alloy_rpc_types::eth::trace::parity::RewardAction"]],["impl RefUnwindSafe for SelfdestructAction",1,["alloy_rpc_types::eth::trace::parity::SelfdestructAction"]],["impl RefUnwindSafe for CallOutput",1,["alloy_rpc_types::eth::trace::parity::CallOutput"]],["impl RefUnwindSafe for CreateOutput",1,["alloy_rpc_types::eth::trace::parity::CreateOutput"]],["impl RefUnwindSafe for TraceOutput",1,["alloy_rpc_types::eth::trace::parity::TraceOutput"]],["impl RefUnwindSafe for TransactionTrace",1,["alloy_rpc_types::eth::trace::parity::TransactionTrace"]],["impl RefUnwindSafe for LocalizedTransactionTrace",1,["alloy_rpc_types::eth::trace::parity::LocalizedTransactionTrace"]],["impl RefUnwindSafe for VmTrace",1,["alloy_rpc_types::eth::trace::parity::VmTrace"]],["impl RefUnwindSafe for VmInstruction",1,["alloy_rpc_types::eth::trace::parity::VmInstruction"]],["impl RefUnwindSafe for VmExecutedOperation",1,["alloy_rpc_types::eth::trace::parity::VmExecutedOperation"]],["impl RefUnwindSafe for MemoryDelta",1,["alloy_rpc_types::eth::trace::parity::MemoryDelta"]],["impl RefUnwindSafe for StorageDelta",1,["alloy_rpc_types::eth::trace::parity::StorageDelta"]],["impl RefUnwindSafe for TraceCallRequest",1,["alloy_rpc_types::eth::trace::tracerequest::TraceCallRequest"]],["impl RefUnwindSafe for AccessListItem",1,["alloy_rpc_types::eth::transaction::access_list::AccessListItem"]],["impl RefUnwindSafe for AccessList",1,["alloy_rpc_types::eth::transaction::access_list::AccessList"]],["impl RefUnwindSafe for AccessListWithGasUsed",1,["alloy_rpc_types::eth::transaction::access_list::AccessListWithGasUsed"]],["impl RefUnwindSafe for TransactionInfo",1,["alloy_rpc_types::eth::transaction::common::TransactionInfo"]],["impl RefUnwindSafe for TransactionReceipt",1,["alloy_rpc_types::eth::transaction::receipt::TransactionReceipt"]],["impl RefUnwindSafe for TransactionRequest",1,["alloy_rpc_types::eth::transaction::request::TransactionRequest"]],["impl RefUnwindSafe for Signature",1,["alloy_rpc_types::eth::transaction::signature::Signature"]],["impl RefUnwindSafe for Parity",1,["alloy_rpc_types::eth::transaction::signature::Parity"]],["impl RefUnwindSafe for TxType",1,["alloy_rpc_types::eth::transaction::tx_type::TxType"]],["impl RefUnwindSafe for TypedTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::TypedTransactionRequest"]],["impl RefUnwindSafe for LegacyTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::LegacyTransactionRequest"]],["impl RefUnwindSafe for EIP2930TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP2930TransactionRequest"]],["impl RefUnwindSafe for EIP1559TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP1559TransactionRequest"]],["impl RefUnwindSafe for TransactionKind",1,["alloy_rpc_types::eth::transaction::typed::TransactionKind"]],["impl RefUnwindSafe for Transaction",1,["alloy_rpc_types::eth::transaction::Transaction"]],["impl RefUnwindSafe for TxpoolInspectSummary",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummary"]],["impl RefUnwindSafe for TxpoolInspectSummaryVisitor",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummaryVisitor"]],["impl RefUnwindSafe for TxpoolContent",1,["alloy_rpc_types::eth::txpool::TxpoolContent"]],["impl RefUnwindSafe for TxpoolContentFrom",1,["alloy_rpc_types::eth::txpool::TxpoolContentFrom"]],["impl RefUnwindSafe for TxpoolInspect",1,["alloy_rpc_types::eth::txpool::TxpoolInspect"]],["impl RefUnwindSafe for TxpoolStatus",1,["alloy_rpc_types::eth::txpool::TxpoolStatus"]],["impl RefUnwindSafe for Withdrawal",1,["alloy_rpc_types::eth::withdrawal::Withdrawal"]],["impl RefUnwindSafe for BeaconAPIWithdrawal",1,["alloy_rpc_types::eth::withdrawal::BeaconAPIWithdrawal"]],["impl RefUnwindSafe for RpcModules",1,["alloy_rpc_types::rpc::RpcModules"]],["impl RefUnwindSafe for JsonU256",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256"]],["impl RefUnwindSafe for JsonU256Visitor",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256Visitor"]],["impl RefUnwindSafe for U64HexOrNumber",1,["alloy_rpc_types::serde_helpers::num::U64HexOrNumber"]],["impl RefUnwindSafe for NumberOrHexU256",1,["alloy_rpc_types::serde_helpers::num::NumberOrHexU256"]],["impl RefUnwindSafe for JsonStorageKey",1,["alloy_rpc_types::serde_helpers::storage::JsonStorageKey"]]], +"alloy_signer":[["impl !RefUnwindSafe for Error",1,["alloy_signer::error::Error"]],["impl RefUnwindSafe for UnsupportedSignerOperation",1,["alloy_signer::error::UnsupportedSignerOperation"]],["impl RefUnwindSafe for Signature",1,["alloy_signer::signature::Signature"]],["impl !RefUnwindSafe for WalletError",1,["alloy_signer::wallet::error::WalletError"]],["impl<W> RefUnwindSafe for MnemonicBuilder<W>
where\n W: RefUnwindSafe,
",1,["alloy_signer::wallet::mnemonic::MnemonicBuilder"]],["impl RefUnwindSafe for MnemonicBuilderError",1,["alloy_signer::wallet::mnemonic::MnemonicBuilderError"]],["impl<D> RefUnwindSafe for Wallet<D>
where\n D: RefUnwindSafe,
",1,["alloy_signer::wallet::Wallet"]]], +"alloy_signer_aws":[["impl !RefUnwindSafe for AwsSigner",1,["alloy_signer_aws::signer::AwsSigner"]],["impl !RefUnwindSafe for AwsSignerError",1,["alloy_signer_aws::signer::AwsSignerError"]]], +"alloy_signer_ledger":[["impl !RefUnwindSafe for LedgerSigner",1,["alloy_signer_ledger::signer::LedgerSigner"]],["impl RefUnwindSafe for DerivationType",1,["alloy_signer_ledger::types::DerivationType"]],["impl !RefUnwindSafe for LedgerError",1,["alloy_signer_ledger::types::LedgerError"]],["impl RefUnwindSafe for INS",1,["alloy_signer_ledger::types::INS"]],["impl RefUnwindSafe for P1",1,["alloy_signer_ledger::types::P1"]],["impl RefUnwindSafe for P2",1,["alloy_signer_ledger::types::P2"]]], +"alloy_signer_trezor":[["impl RefUnwindSafe for TrezorSigner",1,["alloy_signer_trezor::signer::TrezorSigner"]],["impl RefUnwindSafe for DerivationType",1,["alloy_signer_trezor::types::DerivationType"]],["impl !RefUnwindSafe for TrezorError",1,["alloy_signer_trezor::types::TrezorError"]],["impl RefUnwindSafe for TrezorTransaction",1,["alloy_signer_trezor::types::TrezorTransaction"]]], +"alloy_transport":[["impl !RefUnwindSafe for BoxTransport",1,["alloy_transport::boxed::BoxTransport"]],["impl RefUnwindSafe for Authorization",1,["alloy_transport::common::Authorization"]],["impl !RefUnwindSafe for TransportErrorKind",1,["alloy_transport::error::TransportErrorKind"]]], +"alloy_transport_http":[["impl<T> RefUnwindSafe for Http<T>
where\n T: RefUnwindSafe,
",1,["alloy_transport_http::Http"]]], +"alloy_transport_ipc":[["impl<T> RefUnwindSafe for IpcConnect<T>
where\n T: RefUnwindSafe,
",1,["alloy_transport_ipc::connect::IpcConnect"]],["impl RefUnwindSafe for MockIpcServer",1,["alloy_transport_ipc::mock::MockIpcServer"]],["impl !RefUnwindSafe for IpcBackend",1,["alloy_transport_ipc::IpcBackend"]],["impl<T> RefUnwindSafe for ReadJsonStream<T>
where\n T: RefUnwindSafe,
",1,["alloy_transport_ipc::ReadJsonStream"]]], +"alloy_transport_ws":[["impl RefUnwindSafe for WsConnect",1,["alloy_transport_ws::native::WsConnect"]],["impl<T> !RefUnwindSafe for WsBackend<T>",1,["alloy_transport_ws::WsBackend"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 000000000000..edf5760ae170 --- /dev/null +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,15 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl UnwindSafe for Id",1,["alloy_json_rpc::common::Id"]],["impl<E, ErrResp = Box<RawValue>> !UnwindSafe for RpcError<E, ErrResp>",1,["alloy_json_rpc::error::RpcError"]],["impl<T> UnwindSafe for EthNotification<T>
where\n T: UnwindSafe,
",1,["alloy_json_rpc::notification::EthNotification"]],["impl UnwindSafe for PubSubItem",1,["alloy_json_rpc::notification::PubSubItem"]],["impl UnwindSafe for RequestPacket",1,["alloy_json_rpc::packet::RequestPacket"]],["impl<Payload, ErrData> UnwindSafe for ResponsePacket<Payload, ErrData>
where\n ErrData: UnwindSafe,\n Payload: UnwindSafe,
",1,["alloy_json_rpc::packet::ResponsePacket"]],["impl UnwindSafe for RequestMeta",1,["alloy_json_rpc::request::RequestMeta"]],["impl<Params> UnwindSafe for Request<Params>
where\n Params: UnwindSafe,
",1,["alloy_json_rpc::request::Request"]],["impl UnwindSafe for SerializedRequest",1,["alloy_json_rpc::request::SerializedRequest"]],["impl<ErrData> UnwindSafe for ErrorPayload<ErrData>
where\n ErrData: UnwindSafe,
",1,["alloy_json_rpc::response::error::ErrorPayload"]],["impl<Payload, ErrData> UnwindSafe for ResponsePayload<Payload, ErrData>
where\n ErrData: UnwindSafe,\n Payload: UnwindSafe,
",1,["alloy_json_rpc::response::payload::ResponsePayload"]],["impl<Payload, ErrData> UnwindSafe for Response<Payload, ErrData>
where\n ErrData: UnwindSafe,\n Payload: UnwindSafe,
",1,["alloy_json_rpc::response::Response"]]], +"alloy_providers":[["impl<T, Inner, Outer> UnwindSafe for Stack<T, Inner, Outer>
where\n Inner: UnwindSafe,\n Outer: UnwindSafe,
",1,["alloy_providers::builder::Stack"]],["impl<L, N, T> UnwindSafe for ProviderBuilder<L, N, T>
where\n L: UnwindSafe,\n N: UnwindSafe,\n T: UnwindSafe,
",1,["alloy_providers::builder::ProviderBuilder"]],["impl UnwindSafe for ClientError",1,["alloy_providers::provider::ClientError"]],["impl<T> UnwindSafe for Provider<T>
where\n T: UnwindSafe,
",1,["alloy_providers::provider::Provider"]],["impl<N, T> UnwindSafe for NetworkRpcClient<N, T>
where\n T: UnwindSafe,
",1,["alloy_providers::NetworkRpcClient"]]], +"alloy_pubsub":[["impl !UnwindSafe for PubSubFrontend",1,["alloy_pubsub::frontend::PubSubFrontend"]],["impl !UnwindSafe for PubSubInstruction",1,["alloy_pubsub::ix::PubSubInstruction"]],["impl !UnwindSafe for ConnectionHandle",1,["alloy_pubsub::handle::ConnectionHandle"]],["impl !UnwindSafe for ConnectionInterface",1,["alloy_pubsub::handle::ConnectionInterface"]],["impl !UnwindSafe for ActiveSubscription",1,["alloy_pubsub::managers::active_sub::ActiveSubscription"]],["impl !UnwindSafe for InFlight",1,["alloy_pubsub::managers::in_flight::InFlight"]],["impl !UnwindSafe for RequestManager",1,["alloy_pubsub::managers::req::RequestManager"]],["impl !UnwindSafe for SubscriptionManager",1,["alloy_pubsub::managers::sub::SubscriptionManager"]],["impl<T> !UnwindSafe for PubSubService<T>",1,["alloy_pubsub::service::PubSubService"]]], +"alloy_rpc_client":[["impl<'a, T> !UnwindSafe for BatchRequest<'a, T>",1,["alloy_rpc_client::batch::BatchRequest"]],["impl<Resp> !UnwindSafe for Waiter<Resp>",1,["alloy_rpc_client::batch::Waiter"]],["impl<Conn> !UnwindSafe for BatchFuture<Conn>",1,["alloy_rpc_client::batch::BatchFuture"]],["impl<'pin, Conn> !UnwindSafe for CallStateProj<'pin, Conn>",1,["alloy_rpc_client::batch::CallStateProj"]],["impl<L> UnwindSafe for ClientBuilder<L>
where\n L: UnwindSafe,
",1,["alloy_rpc_client::builder::ClientBuilder"]],["impl<Params, Conn> !UnwindSafe for CallState<Params, Conn>",1,["alloy_rpc_client::call::CallState"]],["impl<'pin, Params, Conn> !UnwindSafe for CallStateProj<'pin, Params, Conn>",1,["alloy_rpc_client::call::CallStateProj"]],["impl<Conn, Params, Resp> !UnwindSafe for RpcCall<Conn, Params, Resp>",1,["alloy_rpc_client::call::RpcCall"]],["impl<T> UnwindSafe for RpcClient<T>
where\n T: UnwindSafe,
",1,["alloy_rpc_client::client::RpcClient"]]], +"alloy_rpc_types":[["impl UnwindSafe for AccountInfo",1,["alloy_rpc_types::eth::account::AccountInfo"]],["impl UnwindSafe for EIP1186StorageProof",1,["alloy_rpc_types::eth::account::EIP1186StorageProof"]],["impl UnwindSafe for EIP1186AccountProofResponse",1,["alloy_rpc_types::eth::account::EIP1186AccountProofResponse"]],["impl UnwindSafe for ExtAccountInfo",1,["alloy_rpc_types::eth::account::ExtAccountInfo"]],["impl UnwindSafe for RecoveredAccount",1,["alloy_rpc_types::eth::account::RecoveredAccount"]],["impl UnwindSafe for BlockTransactions",1,["alloy_rpc_types::eth::block::BlockTransactions"]],["impl<'a> UnwindSafe for BlockTransactionHashes<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashes"]],["impl<'a> UnwindSafe for BlockTransactionHashesInner<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInner"]],["impl<'a> !UnwindSafe for BlockTransactionHashesMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesMut"]],["impl<'a> !UnwindSafe for BlockTransactionHashesInnerMut<'a>",1,["alloy_rpc_types::eth::block::BlockTransactionHashesInnerMut"]],["impl UnwindSafe for BlockTransactionsKind",1,["alloy_rpc_types::eth::block::BlockTransactionsKind"]],["impl UnwindSafe for BlockError",1,["alloy_rpc_types::eth::block::BlockError"]],["impl UnwindSafe for Block",1,["alloy_rpc_types::eth::block::Block"]],["impl UnwindSafe for Header",1,["alloy_rpc_types::eth::block::Header"]],["impl UnwindSafe for RpcBlockHash",1,["alloy_rpc_types::eth::block::RpcBlockHash"]],["impl UnwindSafe for BlockNumberOrTag",1,["alloy_rpc_types::eth::block::BlockNumberOrTag"]],["impl UnwindSafe for ParseBlockNumberError",1,["alloy_rpc_types::eth::block::ParseBlockNumberError"]],["impl UnwindSafe for HexStringMissingPrefixError",1,["alloy_rpc_types::eth::block::HexStringMissingPrefixError"]],["impl UnwindSafe for BlockId",1,["alloy_rpc_types::eth::block::BlockId"]],["impl UnwindSafe for BlockNumHash",1,["alloy_rpc_types::eth::block::BlockNumHash"]],["impl UnwindSafe for BlockHashOrNumber",1,["alloy_rpc_types::eth::block::BlockHashOrNumber"]],["impl UnwindSafe for ParseBlockHashOrNumberError",1,["alloy_rpc_types::eth::block::ParseBlockHashOrNumberError"]],["impl<T> UnwindSafe for Rich<T>
where\n T: UnwindSafe,
",1,["alloy_rpc_types::eth::block::Rich"]],["impl UnwindSafe for BlockOverrides",1,["alloy_rpc_types::eth::block::BlockOverrides"]],["impl UnwindSafe for Bundle",1,["alloy_rpc_types::eth::call::Bundle"]],["impl UnwindSafe for StateContext",1,["alloy_rpc_types::eth::call::StateContext"]],["impl UnwindSafe for EthCallResponse",1,["alloy_rpc_types::eth::call::EthCallResponse"]],["impl UnwindSafe for TransactionIndex",1,["alloy_rpc_types::eth::call::TransactionIndex"]],["impl UnwindSafe for CallRequest",1,["alloy_rpc_types::eth::call::CallRequest"]],["impl UnwindSafe for CallInput",1,["alloy_rpc_types::eth::call::CallInput"]],["impl UnwindSafe for CallInputError",1,["alloy_rpc_types::eth::call::CallInputError"]],["impl UnwindSafe for TxGasAndReward",1,["alloy_rpc_types::eth::fee::TxGasAndReward"]],["impl UnwindSafe for FeeHistory",1,["alloy_rpc_types::eth::fee::FeeHistory"]],["impl UnwindSafe for BloomFilter",1,["alloy_rpc_types::eth::filter::BloomFilter"]],["impl<T> UnwindSafe for FilterSet<T>
where\n T: UnwindSafe,
",1,["alloy_rpc_types::eth::filter::FilterSet"]],["impl UnwindSafe for FilterBlockOption",1,["alloy_rpc_types::eth::filter::FilterBlockOption"]],["impl UnwindSafe for Filter",1,["alloy_rpc_types::eth::filter::Filter"]],["impl<T> UnwindSafe for ValueOrArray<T>
where\n T: UnwindSafe,
",1,["alloy_rpc_types::eth::filter::ValueOrArray"]],["impl UnwindSafe for FilteredParams",1,["alloy_rpc_types::eth::filter::FilteredParams"]],["impl UnwindSafe for FilterChanges",1,["alloy_rpc_types::eth::filter::FilterChanges"]],["impl UnwindSafe for FilterId",1,["alloy_rpc_types::eth::filter::FilterId"]],["impl UnwindSafe for PendingTransactionFilterKind",1,["alloy_rpc_types::eth::filter::PendingTransactionFilterKind"]],["impl UnwindSafe for Log",1,["alloy_rpc_types::eth::log::Log"]],["impl UnwindSafe for LogError",1,["alloy_rpc_types::eth::log::LogError"]],["impl UnwindSafe for OtherFields",1,["alloy_rpc_types::eth::other::OtherFields"]],["impl UnwindSafe for SubscriptionResult",1,["alloy_rpc_types::eth::pubsub::SubscriptionResult"]],["impl UnwindSafe for PubSubSyncStatus",1,["alloy_rpc_types::eth::pubsub::PubSubSyncStatus"]],["impl UnwindSafe for SyncStatusMetadata",1,["alloy_rpc_types::eth::pubsub::SyncStatusMetadata"]],["impl UnwindSafe for SubscriptionKind",1,["alloy_rpc_types::eth::pubsub::SubscriptionKind"]],["impl UnwindSafe for Params",1,["alloy_rpc_types::eth::pubsub::Params"]],["impl UnwindSafe for Log",1,["alloy_rpc_types::eth::raw_log::Log"]],["impl UnwindSafe for AccountOverride",1,["alloy_rpc_types::eth::state::AccountOverride"]],["impl UnwindSafe for SyncInfo",1,["alloy_rpc_types::eth::syncing::SyncInfo"]],["impl UnwindSafe for Peers",1,["alloy_rpc_types::eth::syncing::Peers"]],["impl UnwindSafe for PeerCount",1,["alloy_rpc_types::eth::syncing::PeerCount"]],["impl UnwindSafe for PeerInfo",1,["alloy_rpc_types::eth::syncing::PeerInfo"]],["impl UnwindSafe for PeerNetworkInfo",1,["alloy_rpc_types::eth::syncing::PeerNetworkInfo"]],["impl UnwindSafe for PeerProtocolsInfo",1,["alloy_rpc_types::eth::syncing::PeerProtocolsInfo"]],["impl UnwindSafe for PeerEthProtocolInfo",1,["alloy_rpc_types::eth::syncing::PeerEthProtocolInfo"]],["impl UnwindSafe for PipProtocolInfo",1,["alloy_rpc_types::eth::syncing::PipProtocolInfo"]],["impl UnwindSafe for SyncStatus",1,["alloy_rpc_types::eth::syncing::SyncStatus"]],["impl UnwindSafe for TransactionStats",1,["alloy_rpc_types::eth::syncing::TransactionStats"]],["impl UnwindSafe for ChainStatus",1,["alloy_rpc_types::eth::syncing::ChainStatus"]],["impl<Ok, Err> UnwindSafe for TraceResult<Ok, Err>
where\n Err: UnwindSafe,\n Ok: UnwindSafe,
",1,["alloy_rpc_types::eth::trace::common::TraceResult"]],["impl UnwindSafe for TraceFilter",1,["alloy_rpc_types::eth::trace::filter::TraceFilter"]],["impl UnwindSafe for TraceFilterMode",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMode"]],["impl UnwindSafe for TraceFilterMatcher",1,["alloy_rpc_types::eth::trace::filter::TraceFilterMatcher"]],["impl UnwindSafe for CallFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallFrame"]],["impl UnwindSafe for CallLogFrame",1,["alloy_rpc_types::eth::trace::geth::call::CallLogFrame"]],["impl UnwindSafe for CallConfig",1,["alloy_rpc_types::eth::trace::geth::call::CallConfig"]],["impl UnwindSafe for FourByteFrame",1,["alloy_rpc_types::eth::trace::geth::four_byte::FourByteFrame"]],["impl UnwindSafe for NoopFrame",1,["alloy_rpc_types::eth::trace::geth::noop::NoopFrame"]],["impl UnwindSafe for Null",1,["alloy_rpc_types::eth::trace::geth::noop::Null"]],["impl UnwindSafe for PreStateFrame",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateFrame"]],["impl UnwindSafe for PreStateMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateMode"]],["impl UnwindSafe for DiffMode",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffMode"]],["impl UnwindSafe for DiffStateKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::DiffStateKind"]],["impl UnwindSafe for AccountState",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountState"]],["impl UnwindSafe for AccountChangeKind",1,["alloy_rpc_types::eth::trace::geth::pre_state::AccountChangeKind"]],["impl UnwindSafe for PreStateConfig",1,["alloy_rpc_types::eth::trace::geth::pre_state::PreStateConfig"]],["impl UnwindSafe for BlockTraceResult",1,["alloy_rpc_types::eth::trace::geth::BlockTraceResult"]],["impl UnwindSafe for DefaultFrame",1,["alloy_rpc_types::eth::trace::geth::DefaultFrame"]],["impl UnwindSafe for StructLog",1,["alloy_rpc_types::eth::trace::geth::StructLog"]],["impl UnwindSafe for GethTrace",1,["alloy_rpc_types::eth::trace::geth::GethTrace"]],["impl UnwindSafe for GethDebugBuiltInTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugBuiltInTracerType"]],["impl UnwindSafe for GethDebugTracerType",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerType"]],["impl UnwindSafe for GethDebugTracerConfig",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracerConfig"]],["impl UnwindSafe for GethDebugTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingOptions"]],["impl UnwindSafe for GethDefaultTracingOptions",1,["alloy_rpc_types::eth::trace::geth::GethDefaultTracingOptions"]],["impl UnwindSafe for GethDebugTracingCallOptions",1,["alloy_rpc_types::eth::trace::geth::GethDebugTracingCallOptions"]],["impl UnwindSafe for TraceType",1,["alloy_rpc_types::eth::trace::parity::TraceType"]],["impl UnwindSafe for TraceResults",1,["alloy_rpc_types::eth::trace::parity::TraceResults"]],["impl UnwindSafe for TraceResultsWithTransactionHash",1,["alloy_rpc_types::eth::trace::parity::TraceResultsWithTransactionHash"]],["impl<T> UnwindSafe for ChangedType<T>
where\n T: UnwindSafe,
",1,["alloy_rpc_types::eth::trace::parity::ChangedType"]],["impl<T> UnwindSafe for Delta<T>
where\n T: UnwindSafe,
",1,["alloy_rpc_types::eth::trace::parity::Delta"]],["impl UnwindSafe for AccountDiff",1,["alloy_rpc_types::eth::trace::parity::AccountDiff"]],["impl UnwindSafe for StateDiff",1,["alloy_rpc_types::eth::trace::parity::StateDiff"]],["impl UnwindSafe for Action",1,["alloy_rpc_types::eth::trace::parity::Action"]],["impl UnwindSafe for ActionType",1,["alloy_rpc_types::eth::trace::parity::ActionType"]],["impl UnwindSafe for CallType",1,["alloy_rpc_types::eth::trace::parity::CallType"]],["impl UnwindSafe for CallAction",1,["alloy_rpc_types::eth::trace::parity::CallAction"]],["impl UnwindSafe for CreateAction",1,["alloy_rpc_types::eth::trace::parity::CreateAction"]],["impl UnwindSafe for RewardType",1,["alloy_rpc_types::eth::trace::parity::RewardType"]],["impl UnwindSafe for RewardAction",1,["alloy_rpc_types::eth::trace::parity::RewardAction"]],["impl UnwindSafe for SelfdestructAction",1,["alloy_rpc_types::eth::trace::parity::SelfdestructAction"]],["impl UnwindSafe for CallOutput",1,["alloy_rpc_types::eth::trace::parity::CallOutput"]],["impl UnwindSafe for CreateOutput",1,["alloy_rpc_types::eth::trace::parity::CreateOutput"]],["impl UnwindSafe for TraceOutput",1,["alloy_rpc_types::eth::trace::parity::TraceOutput"]],["impl UnwindSafe for TransactionTrace",1,["alloy_rpc_types::eth::trace::parity::TransactionTrace"]],["impl UnwindSafe for LocalizedTransactionTrace",1,["alloy_rpc_types::eth::trace::parity::LocalizedTransactionTrace"]],["impl UnwindSafe for VmTrace",1,["alloy_rpc_types::eth::trace::parity::VmTrace"]],["impl UnwindSafe for VmInstruction",1,["alloy_rpc_types::eth::trace::parity::VmInstruction"]],["impl UnwindSafe for VmExecutedOperation",1,["alloy_rpc_types::eth::trace::parity::VmExecutedOperation"]],["impl UnwindSafe for MemoryDelta",1,["alloy_rpc_types::eth::trace::parity::MemoryDelta"]],["impl UnwindSafe for StorageDelta",1,["alloy_rpc_types::eth::trace::parity::StorageDelta"]],["impl UnwindSafe for TraceCallRequest",1,["alloy_rpc_types::eth::trace::tracerequest::TraceCallRequest"]],["impl UnwindSafe for AccessListItem",1,["alloy_rpc_types::eth::transaction::access_list::AccessListItem"]],["impl UnwindSafe for AccessList",1,["alloy_rpc_types::eth::transaction::access_list::AccessList"]],["impl UnwindSafe for AccessListWithGasUsed",1,["alloy_rpc_types::eth::transaction::access_list::AccessListWithGasUsed"]],["impl UnwindSafe for TransactionInfo",1,["alloy_rpc_types::eth::transaction::common::TransactionInfo"]],["impl UnwindSafe for TransactionReceipt",1,["alloy_rpc_types::eth::transaction::receipt::TransactionReceipt"]],["impl UnwindSafe for TransactionRequest",1,["alloy_rpc_types::eth::transaction::request::TransactionRequest"]],["impl UnwindSafe for Signature",1,["alloy_rpc_types::eth::transaction::signature::Signature"]],["impl UnwindSafe for Parity",1,["alloy_rpc_types::eth::transaction::signature::Parity"]],["impl UnwindSafe for TxType",1,["alloy_rpc_types::eth::transaction::tx_type::TxType"]],["impl UnwindSafe for TypedTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::TypedTransactionRequest"]],["impl UnwindSafe for LegacyTransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::LegacyTransactionRequest"]],["impl UnwindSafe for EIP2930TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP2930TransactionRequest"]],["impl UnwindSafe for EIP1559TransactionRequest",1,["alloy_rpc_types::eth::transaction::typed::EIP1559TransactionRequest"]],["impl UnwindSafe for TransactionKind",1,["alloy_rpc_types::eth::transaction::typed::TransactionKind"]],["impl UnwindSafe for Transaction",1,["alloy_rpc_types::eth::transaction::Transaction"]],["impl UnwindSafe for TxpoolInspectSummary",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummary"]],["impl UnwindSafe for TxpoolInspectSummaryVisitor",1,["alloy_rpc_types::eth::txpool::TxpoolInspectSummaryVisitor"]],["impl UnwindSafe for TxpoolContent",1,["alloy_rpc_types::eth::txpool::TxpoolContent"]],["impl UnwindSafe for TxpoolContentFrom",1,["alloy_rpc_types::eth::txpool::TxpoolContentFrom"]],["impl UnwindSafe for TxpoolInspect",1,["alloy_rpc_types::eth::txpool::TxpoolInspect"]],["impl UnwindSafe for TxpoolStatus",1,["alloy_rpc_types::eth::txpool::TxpoolStatus"]],["impl UnwindSafe for Withdrawal",1,["alloy_rpc_types::eth::withdrawal::Withdrawal"]],["impl UnwindSafe for BeaconAPIWithdrawal",1,["alloy_rpc_types::eth::withdrawal::BeaconAPIWithdrawal"]],["impl UnwindSafe for RpcModules",1,["alloy_rpc_types::rpc::RpcModules"]],["impl UnwindSafe for JsonU256",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256"]],["impl UnwindSafe for JsonU256Visitor",1,["alloy_rpc_types::serde_helpers::json_u256::JsonU256Visitor"]],["impl UnwindSafe for U64HexOrNumber",1,["alloy_rpc_types::serde_helpers::num::U64HexOrNumber"]],["impl UnwindSafe for NumberOrHexU256",1,["alloy_rpc_types::serde_helpers::num::NumberOrHexU256"]],["impl UnwindSafe for JsonStorageKey",1,["alloy_rpc_types::serde_helpers::storage::JsonStorageKey"]]], +"alloy_signer":[["impl !UnwindSafe for Error",1,["alloy_signer::error::Error"]],["impl UnwindSafe for UnsupportedSignerOperation",1,["alloy_signer::error::UnsupportedSignerOperation"]],["impl UnwindSafe for Signature",1,["alloy_signer::signature::Signature"]],["impl !UnwindSafe for WalletError",1,["alloy_signer::wallet::error::WalletError"]],["impl<W> UnwindSafe for MnemonicBuilder<W>
where\n W: UnwindSafe,
",1,["alloy_signer::wallet::mnemonic::MnemonicBuilder"]],["impl UnwindSafe for MnemonicBuilderError",1,["alloy_signer::wallet::mnemonic::MnemonicBuilderError"]],["impl<D> UnwindSafe for Wallet<D>
where\n D: UnwindSafe,
",1,["alloy_signer::wallet::Wallet"]]], +"alloy_signer_aws":[["impl !UnwindSafe for AwsSigner",1,["alloy_signer_aws::signer::AwsSigner"]],["impl !UnwindSafe for AwsSignerError",1,["alloy_signer_aws::signer::AwsSignerError"]]], +"alloy_signer_ledger":[["impl !UnwindSafe for LedgerSigner",1,["alloy_signer_ledger::signer::LedgerSigner"]],["impl UnwindSafe for DerivationType",1,["alloy_signer_ledger::types::DerivationType"]],["impl !UnwindSafe for LedgerError",1,["alloy_signer_ledger::types::LedgerError"]],["impl UnwindSafe for INS",1,["alloy_signer_ledger::types::INS"]],["impl UnwindSafe for P1",1,["alloy_signer_ledger::types::P1"]],["impl UnwindSafe for P2",1,["alloy_signer_ledger::types::P2"]]], +"alloy_signer_trezor":[["impl UnwindSafe for TrezorSigner",1,["alloy_signer_trezor::signer::TrezorSigner"]],["impl UnwindSafe for DerivationType",1,["alloy_signer_trezor::types::DerivationType"]],["impl !UnwindSafe for TrezorError",1,["alloy_signer_trezor::types::TrezorError"]],["impl UnwindSafe for TrezorTransaction",1,["alloy_signer_trezor::types::TrezorTransaction"]]], +"alloy_transport":[["impl !UnwindSafe for BoxTransport",1,["alloy_transport::boxed::BoxTransport"]],["impl UnwindSafe for Authorization",1,["alloy_transport::common::Authorization"]],["impl !UnwindSafe for TransportErrorKind",1,["alloy_transport::error::TransportErrorKind"]]], +"alloy_transport_http":[["impl<T> UnwindSafe for Http<T>
where\n T: UnwindSafe,
",1,["alloy_transport_http::Http"]]], +"alloy_transport_ipc":[["impl<T> UnwindSafe for IpcConnect<T>
where\n T: UnwindSafe,
",1,["alloy_transport_ipc::connect::IpcConnect"]],["impl UnwindSafe for MockIpcServer",1,["alloy_transport_ipc::mock::MockIpcServer"]],["impl !UnwindSafe for IpcBackend",1,["alloy_transport_ipc::IpcBackend"]],["impl<T> UnwindSafe for ReadJsonStream<T>
where\n T: UnwindSafe,
",1,["alloy_transport_ipc::ReadJsonStream"]]], +"alloy_transport_ws":[["impl UnwindSafe for WsConnect",1,["alloy_transport_ws::native::WsConnect"]],["impl<T> !UnwindSafe for WsBackend<T>",1,["alloy_transport_ws::WsBackend"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/str/traits/trait.FromStr.js b/trait.impl/core/str/traits/trait.FromStr.js new file mode 100644 index 000000000000..f117ce32d5ca --- /dev/null +++ b/trait.impl/core/str/traits/trait.FromStr.js @@ -0,0 +1,4 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl FromStr for BlockNumberOrTag"],["impl FromStr for BlockHashOrNumber"]], +"alloy_signer":[["impl FromStr for Wallet<SigningKey>"],["impl FromStr for Signature"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/futures_core/stream/trait.Stream.js b/trait.impl/futures_core/stream/trait.Stream.js new file mode 100644 index 000000000000..fd0464d35bf8 --- /dev/null +++ b/trait.impl/futures_core/stream/trait.Stream.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_transport_ipc":[["impl<T> Stream for ReadJsonStream<T>
where\n T: AsyncRead,
"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/proptest/arbitrary/traits/trait.Arbitrary.js b/trait.impl/proptest/arbitrary/traits/trait.Arbitrary.js new file mode 100644 index 000000000000..3859f0f6176a --- /dev/null +++ b/trait.impl/proptest/arbitrary/traits/trait.Arbitrary.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl Arbitrary for BlockHashOrNumber"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde/de/trait.Deserialize.js b/trait.impl/serde/de/trait.Deserialize.js new file mode 100644 index 000000000000..983729b35cac --- /dev/null +++ b/trait.impl/serde/de/trait.Deserialize.js @@ -0,0 +1,5 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl<'de, ErrData: Deserialize<'de>> Deserialize<'de> for ErrorPayload<ErrData>"],["impl<'de, Payload, ErrData> Deserialize<'de> for Response<Payload, ErrData>
where\n Payload: Deserialize<'de>,\n ErrData: Deserialize<'de>,
"],["impl<'de> Deserialize<'de> for Id"],["impl<'de> Deserialize<'de> for PubSubItem"],["impl<'de, T> Deserialize<'de> for EthNotification<T>
where\n T: Deserialize<'de>,
"],["impl<'de, Payload, ErrData> Deserialize<'de> for ResponsePacket<Payload, ErrData>
where\n Payload: Deserialize<'de>,\n ErrData: Deserialize<'de>,
"]], +"alloy_providers":[["impl<'de> Deserialize<'de> for ClientError"]], +"alloy_rpc_types":[["impl<'de> Deserialize<'de> for LocalizedTransactionTrace"],["impl<'de> Deserialize<'de> for BlockTransactions"],["impl<'de> Deserialize<'de> for TraceOutput"],["impl<'de> Deserialize<'de> for TxpoolInspect"],["impl<'de> Deserialize<'de> for ExtAccountInfo"],["impl<'de> Deserialize<'de> for PubSubSyncStatus"],["impl<'de> Deserialize<'de> for ActionType"],["impl<'de> Deserialize<'de> for SubscriptionKind"],["impl<'de> Deserialize<'de> for VmTrace"],["impl<'de> Deserialize<'de> for Header"],["impl<'a> Deserialize<'a> for JsonU256"],["impl<'de> Deserialize<'de> for TraceFilterMode"],["impl<'de> Deserialize<'de> for TraceResultsWithTransactionHash"],["impl<'de> Deserialize<'de> for AccessList"],["impl<'de> Deserialize<'de> for TxpoolContent"],["impl<'de> Deserialize<'de> for GethDebugTracerConfig"],["impl<'de> Deserialize<'de> for PreStateMode"],["impl<'de> Deserialize<'de> for PeerCount"],["impl<'de> Deserialize<'de> for VmInstruction"],["impl<'de> Deserialize<'de> for Log"],["impl<'de> Deserialize<'de> for AccountChangeKind"],["impl<'de> Deserialize<'de> for TransactionTrace"],["impl<'de> Deserialize<'de> for StorageDelta"],["impl<'de> Deserialize<'de> for BeaconAPIWithdrawal"],["impl<'de> Deserialize<'de> for BlockNumberOrTag"],["impl<'de> Deserialize<'de> for StructLog"],["impl<'de> Deserialize<'de> for SyncInfo"],["impl<'de> Deserialize<'de> for GethDebugBuiltInTracerType"],["impl<'de> Deserialize<'de> for Parity"],["impl<'de> Deserialize<'de> for CallRequest"],["impl<'de> Deserialize<'de> for RecoveredAccount"],["impl<'de> Deserialize<'de> for Block"],["impl<'de> Deserialize<'de> for FourByteFrame"],["impl<'de> Deserialize<'de> for Withdrawal"],["impl<'de, Ok, Err> Deserialize<'de> for TraceResult<Ok, Err>
where\n Ok: Deserialize<'de>,\n Err: Deserialize<'de>,
"],["impl<'de> Deserialize<'de> for TraceResults"],["impl<'de> Deserialize<'de> for AccessListItem"],["impl<'de> Deserialize<'de> for PeerProtocolsInfo"],["impl<'de> Deserialize<'de> for TraceCallRequest"],["impl<'de> Deserialize<'de> for TraceType"],["impl<'de> Deserialize<'de> for PreStateFrame"],["impl<'de> Deserialize<'de> for FilterChanges"],["impl<'de> Deserialize<'de> for PipProtocolInfo"],["impl<'de> Deserialize<'de> for GethDefaultTracingOptions"],["impl<'de> Deserialize<'de> for SyncStatus"],["impl<'de> Deserialize<'de> for AccessListWithGasUsed"],["impl<'de, T> Deserialize<'de> for Rich<T>
where\n T: Deserialize<'de>,
"],["impl<'de> Deserialize<'de> for OtherFields"],["impl<'de> Deserialize<'de> for AccountInfo"],["impl<'de> Deserialize<'de> for TransactionRequest"],["impl<'de> Deserialize<'de> for TxpoolStatus"],["impl<'de> Deserialize<'de> for DefaultFrame"],["impl<'de> Deserialize<'de> for TxType"],["impl<'de> Deserialize<'de> for CallLogFrame"],["impl<'de> Deserialize<'de> for NoopFrame"],["impl<'de> Deserialize<'de> for FeeHistory"],["impl<'a, T> Deserialize<'a> for ValueOrArray<T>
where\n T: DeserializeOwned,
"],["impl<'de> Deserialize<'de> for CreateOutput"],["impl<'de> Deserialize<'de> for Bundle
where\n Bundle: Default,
"],["impl<'de> Deserialize<'de> for EthCallResponse"],["impl<'de> Deserialize<'de> for BlockTraceResult"],["impl<'de> Deserialize<'de> for BlockOverrides"],["impl<'de, T> Deserialize<'de> for FilterSet<T>
where\n T: Deserialize<'de> + Eq + Hash,
"],["impl<'de> Deserialize<'de> for CallFrame"],["impl<'de> Deserialize<'de> for Null"],["impl<'de> Deserialize<'de> for TransactionReceipt"],["impl<'de> Deserialize<'de> for CallConfig"],["impl<'de> Deserialize<'de> for Signature"],["impl<'de> Deserialize<'de> for EIP1186AccountProofResponse"],["impl<'de, T> Deserialize<'de> for ChangedType<T>
where\n T: Deserialize<'de>,
"],["impl<'de, T> Deserialize<'de> for Delta<T>
where\n T: Deserialize<'de>,
"],["impl<'de> Deserialize<'de> for CallType"],["impl<'de> Deserialize<'de> for CallAction"],["impl<'de> Deserialize<'de> for Filter"],["impl<'de> Deserialize<'de> for AccountOverride"],["impl<'de> Deserialize<'de> for TxpoolInspectSummary"],["impl<'de> Deserialize<'de> for Transaction"],["impl<'de> Deserialize<'de> for SyncStatusMetadata"],["impl<'de> Deserialize<'de> for GethTrace"],["impl<'de> Deserialize<'de> for StateContext"],["impl<'de> Deserialize<'de> for TxpoolContentFrom"],["impl<'de> Deserialize<'de> for TransactionKind"],["impl<'de> Deserialize<'de> for NumberOrHexU256"],["impl<'de> Deserialize<'de> for PeerNetworkInfo"],["impl<'de> Deserialize<'de> for BlockHashOrNumber"],["impl<'de> Deserialize<'de> for PeerEthProtocolInfo"],["impl<'de> Deserialize<'de> for EIP1186StorageProof"],["impl<'de> Deserialize<'de> for RpcModules"],["impl<'de> Deserialize<'de> for SelfdestructAction"],["impl<'de> Deserialize<'de> for JsonStorageKey"],["impl<'de> Deserialize<'de> for TraceFilter"],["impl<'de> Deserialize<'de> for SubscriptionResult"],["impl<'de> Deserialize<'de> for PreStateConfig"],["impl<'de> Deserialize<'de> for TransactionIndex"],["impl<'de> Deserialize<'de> for CallInput"],["impl<'de> Deserialize<'de> for BlockId"],["impl<'a> Deserialize<'a> for Params"],["impl<'de> Deserialize<'de> for RewardType"],["impl<'de> Deserialize<'de> for AccountState"],["impl<'a> Deserialize<'a> for PendingTransactionFilterKind"],["impl<'de> Deserialize<'de> for MemoryDelta"],["impl<'de> Deserialize<'de> for Action"],["impl<'de> Deserialize<'de> for AccountDiff"],["impl<'de> Deserialize<'de> for DiffMode"],["impl<'de> Deserialize<'de> for GethDebugTracingOptions"],["impl<'de> Deserialize<'de> for VmExecutedOperation"],["impl<'de> Deserialize<'de> for StateDiff"],["impl<'de> Deserialize<'de> for FilterId"],["impl<'de> Deserialize<'de> for U64HexOrNumber"],["impl<'de> Deserialize<'de> for GethDebugTracerType"],["impl<'de> Deserialize<'de> for CallOutput"],["impl<'de> Deserialize<'de> for GethDebugTracingCallOptions"],["impl<'de> Deserialize<'de> for CreateAction"],["impl<'de> Deserialize<'de> for PeerInfo"],["impl<'de> Deserialize<'de> for RewardAction"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde/de/trait.Visitor.js b/trait.impl/serde/de/trait.Visitor.js new file mode 100644 index 000000000000..17cf56f2d552 --- /dev/null +++ b/trait.impl/serde/de/trait.Visitor.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl<'de> Visitor<'de> for TxpoolInspectSummaryVisitor"],["impl<'a> Visitor<'a> for JsonU256Visitor"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde/ser/trait.Serialize.js b/trait.impl/serde/ser/trait.Serialize.js new file mode 100644 index 000000000000..284f44305e68 --- /dev/null +++ b/trait.impl/serde/ser/trait.Serialize.js @@ -0,0 +1,5 @@ +(function() {var implementors = { +"alloy_json_rpc":[["impl Serialize for Id"],["impl Serialize for RequestPacket"],["impl<Params> Serialize for Request<Params>
where\n Params: RpcParam,
"],["impl<ErrData> Serialize for ErrorPayload<ErrData>
where\n ErrData: Serialize,
"],["impl Serialize for SerializedRequest"],["impl<Payload, ErrData> Serialize for Response<Payload, ErrData>
where\n Payload: Serialize,\n ErrData: Serialize,
"],["impl<T> Serialize for EthNotification<T>
where\n T: Serialize,
"]], +"alloy_providers":[["impl Serialize for ClientError"]], +"alloy_rpc_types":[["impl Serialize for BeaconAPIWithdrawal"],["impl Serialize for Filter"],["impl Serialize for StateContext"],["impl Serialize for JsonU256"],["impl Serialize for SyncStatus"],["impl Serialize for StorageDelta"],["impl Serialize for Signature"],["impl Serialize for GethDebugTracerType"],["impl Serialize for EthCallResponse"],["impl Serialize for FeeHistory"],["impl Serialize for PreStateConfig"],["impl Serialize for CallLogFrame"],["impl Serialize for StructLog"],["impl Serialize for CallFrame"],["impl Serialize for BlockId"],["impl Serialize for TransactionTrace"],["impl Serialize for AccessList"],["impl Serialize for PeerProtocolsInfo"],["impl Serialize for TransactionKind"],["impl Serialize for Peers"],["impl Serialize for GethDebugTracerConfig"],["impl<T> Serialize for Delta<T>
where\n T: Serialize,
"],["impl Serialize for Null"],["impl Serialize for Transaction"],["impl Serialize for MemoryDelta"],["impl Serialize for AccountDiff"],["impl Serialize for TraceType"],["impl Serialize for CallAction"],["impl Serialize for FilterId"],["impl Serialize for GethDebugBuiltInTracerType"],["impl Serialize for TransactionReceipt"],["impl Serialize for VmInstruction"],["impl<T> Serialize for ChangedType<T>
where\n T: Serialize,
"],["impl Serialize for Block"],["impl Serialize for AccessListWithGasUsed"],["impl Serialize for GethDebugTracingOptions"],["impl Serialize for TxpoolContentFrom"],["impl Serialize for TxpoolContent"],["impl Serialize for SyncStatusMetadata"],["impl Serialize for Withdrawal"],["impl Serialize for TraceFilterMode"],["impl Serialize for TraceFilter"],["impl<T> Serialize for ValueOrArray<T>
where\n T: Serialize,
"],["impl Serialize for CallConfig"],["impl Serialize for TxpoolInspect"],["impl Serialize for TraceResultsWithTransactionHash"],["impl Serialize for SelfdestructAction"],["impl Serialize for TraceResults"],["impl Serialize for AccountOverride"],["impl Serialize for LocalizedTransactionTrace"],["impl Serialize for GethTrace"],["impl Serialize for DiffMode"],["impl Serialize for RpcModules"],["impl Serialize for PeerEthProtocolInfo"],["impl Serialize for AccountState"],["impl Serialize for TransactionIndex"],["impl Serialize for TransactionStats"],["impl Serialize for GethDefaultTracingOptions"],["impl Serialize for PeerCount"],["impl Serialize for CallType"],["impl Serialize for BlockNumberOrTag"],["impl Serialize for PeerNetworkInfo"],["impl Serialize for RewardAction"],["impl Serialize for BlockTransactions"],["impl Serialize for VmExecutedOperation"],["impl Serialize for CreateOutput"],["impl Serialize for VmTrace"],["impl Serialize for RpcBlockHash"],["impl Serialize for AccountInfo"],["impl<T: Serialize> Serialize for Rich<T>"],["impl Serialize for CreateAction"],["impl Serialize for EIP1186AccountProofResponse"],["impl Serialize for PeerInfo"],["impl Serialize for SubscriptionResult"],["impl Serialize for RewardType"],["impl Serialize for PreStateMode"],["impl Serialize for ExtAccountInfo"],["impl Serialize for TraceOutput"],["impl Serialize for Params"],["impl Serialize for PreStateFrame"],["impl Serialize for OtherFields"],["impl<Ok, Err> Serialize for TraceResult<Ok, Err>
where\n Ok: Serialize,\n Err: Serialize,
"],["impl Serialize for EIP1186StorageProof"],["impl Serialize for TxpoolStatus"],["impl Serialize for DefaultFrame"],["impl Serialize for AccountChangeKind"],["impl Serialize for PendingTransactionFilterKind"],["impl Serialize for CallInput"],["impl Serialize for StateDiff"],["impl Serialize for PipProtocolInfo"],["impl Serialize for SyncInfo"],["impl Serialize for Bundle"],["impl Serialize for Parity"],["impl Serialize for TransactionRequest"],["impl Serialize for RecoveredAccount"],["impl Serialize for GethDebugTracingCallOptions"],["impl Serialize for BlockTraceResult"],["impl Serialize for TxType"],["impl Serialize for CallRequest"],["impl Serialize for FilterChanges"],["impl Serialize for PubSubSyncStatus"],["impl Serialize for AccessListItem"],["impl Serialize for Action"],["impl Serialize for SubscriptionKind"],["impl Serialize for Header"],["impl Serialize for Log"],["impl Serialize for JsonStorageKey"],["impl Serialize for ChainStatus"],["impl Serialize for BlockHashOrNumber"],["impl Serialize for FourByteFrame"],["impl Serialize for NoopFrame"],["impl Serialize for TraceCallRequest"],["impl Serialize for BlockOverrides"],["impl Serialize for ActionType"],["impl Serialize for U64HexOrNumber"],["impl Serialize for CallOutput"],["impl Serialize for TxpoolInspectSummary"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde_with/de/trait.DeserializeAs.js b/trait.impl/serde_with/de/trait.DeserializeAs.js new file mode 100644 index 000000000000..3d262527ad6a --- /dev/null +++ b/trait.impl/serde_with/de/trait.DeserializeAs.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl<'de> DeserializeAs<'de, Withdrawal> for BeaconAPIWithdrawal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/serde_with/ser/trait.SerializeAs.js b/trait.impl/serde_with/ser/trait.SerializeAs.js new file mode 100644 index 000000000000..fb1e664f8b21 --- /dev/null +++ b/trait.impl/serde_with/ser/trait.SerializeAs.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_rpc_types":[["impl SerializeAs<Withdrawal> for BeaconAPIWithdrawal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/tower_service/trait.Service.js b/trait.impl/tower_service/trait.Service.js new file mode 100644 index 000000000000..b414215d1ea1 --- /dev/null +++ b/trait.impl/tower_service/trait.Service.js @@ -0,0 +1,5 @@ +(function() {var implementors = { +"alloy_pubsub":[["impl Service<RequestPacket> for PubSubFrontend"],["impl Service<RequestPacket> for &PubSubFrontend"]], +"alloy_transport":[["impl Service<RequestPacket> for BoxTransport"]], +"alloy_transport_http":[["impl Service<RequestPacket> for Http<Client>"],["impl Service<RequestPacket> for &Http<Client>"],["impl<C> Service<RequestPacket> for Http<Client<C>>
where\n C: Connect + Clone + Send + Sync + 'static,
"],["impl<C> Service<RequestPacket> for &Http<Client<C>>
where\n C: Connect + Clone + Send + Sync + 'static,
"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/tungstenite/client/trait.IntoClientRequest.js b/trait.impl/tungstenite/client/trait.IntoClientRequest.js new file mode 100644 index 000000000000..c32f741d3544 --- /dev/null +++ b/trait.impl/tungstenite/client/trait.IntoClientRequest.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"alloy_transport_ws":[["impl IntoClientRequest for WsConnect"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/type.impl/alloc/vec/struct.Vec.js b/type.impl/alloc/vec/struct.Vec.js new file mode 100644 index 000000000000..9f480eee27fb --- /dev/null +++ b/type.impl/alloc/vec/struct.Vec.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_rpc_types":[["
source§

impl<T> Vec<T>

1.0.0 (const: 1.39.0) · source

pub const fn new() -> Vec<T>

Constructs a new, empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
Examples
\n
let mut vec: Vec<i32> = Vec::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> Vec<T>

Available on non-no_global_oom_handling only.

Constructs a new, empty Vec<T> with at least the specified capacity.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
Examples
\n
let mut vec = Vec::with_capacity(10);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<()>::with_capacity(10);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
1.0.0 · source

pub unsafe fn from_raw_parts(\n ptr: *mut T,\n length: usize,\n capacity: usize\n) -> Vec<T>

Creates a Vec<T> directly from a pointer, a capacity, and a length.

\n
Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must have been allocated using the global allocator, such as via\nthe alloc::alloc function.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to be the capacity that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is normally not safe\nto build a Vec<u8> from a pointer to a C char array with length\nsize_t, doing so is only safe if the array was initially allocated by\na Vec or String.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1. To avoid\nthese issues, it is often preferable to do casting/transmuting using\nslice::from_raw_parts instead.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
Examples
\n
use std::ptr;\nuse std::mem;\n\nlet v = vec![1, 2, 3];\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts(p, len, cap);\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
use std::alloc::{alloc, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = alloc(layout).cast::<u32>();\n        if mem.is_null() {\n            return;\n        }\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts(mem, 1, 16)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
",0,"alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

source

pub const fn new_in(alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Constructs a new, empty Vec<T, A>.

\n

The vector will not allocate until elements are pushed onto it.

\n
Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec: Vec<i32, _> = Vec::new_in(System);
\n
source

pub fn with_capacity_in(capacity: usize, alloc: A) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)
Available on non-no_global_oom_handling only.

Constructs a new, empty Vec<T, A> with at least the specified capacity\nwith the provided allocator.

\n

The vector will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the vector will not allocate.

\n

It is important to note that although the returned vector has the\nminimum capacity specified, the vector will have a zero length. For\nan explanation of the difference between length and capacity, see\nCapacity and reallocation.

\n

If it is important to know the exact allocated capacity of a Vec,\nalways use the capacity method after construction.

\n

For Vec<T, A> where T is a zero-sized type, there will be no allocation\nand the capacity will always be usize::MAX.

\n
Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut vec = Vec::with_capacity_in(10, System);\n\n// The vector contains no items, even though it has capacity for more\nassert_eq!(vec.len(), 0);\nassert!(vec.capacity() >= 10);\n\n// These are all done without reallocating...\nfor i in 0..10 {\n    vec.push(i);\n}\nassert_eq!(vec.len(), 10);\nassert!(vec.capacity() >= 10);\n\n// ...but this may make the vector reallocate\nvec.push(11);\nassert_eq!(vec.len(), 11);\nassert!(vec.capacity() >= 11);\n\n// A vector of a zero-sized type will always over-allocate, since no\n// allocation is necessary\nlet vec_units = Vec::<(), System>::with_capacity_in(10, System);\nassert_eq!(vec_units.capacity(), usize::MAX);
\n
source

pub unsafe fn from_raw_parts_in(\n ptr: *mut T,\n length: usize,\n capacity: usize,\n alloc: A\n) -> Vec<T, A>

🔬This is a nightly-only experimental API. (allocator_api)

Creates a Vec<T, A> directly from a pointer, a capacity, a length,\nand an allocator.

\n
Safety
\n

This is highly unsafe, due to the number of invariants that aren’t\nchecked:

\n
    \n
  • ptr must be currently allocated via the given allocator alloc.
  • \n
  • T needs to have the same alignment as what ptr was allocated with.\n(T having a less strict alignment is not sufficient, the alignment really\nneeds to be equal to satisfy the dealloc requirement that memory must be\nallocated and deallocated with the same layout.)
  • \n
  • The size of T times the capacity (ie. the allocated size in bytes) needs\nto be the same size as the pointer was allocated with. (Because similar to\nalignment, dealloc must be called with the same layout size.)
  • \n
  • length needs to be less than or equal to capacity.
  • \n
  • The first length values must be properly initialized values of type T.
  • \n
  • capacity needs to fit the layout size that the pointer was allocated with.
  • \n
  • The allocated size in bytes must be no larger than isize::MAX.\nSee the safety documentation of pointer::offset.
  • \n
\n

These requirements are always upheld by any ptr that has been allocated\nvia Vec<T, A>. Other allocation sources are allowed if the invariants are\nupheld.

\n

Violating these may cause problems like corrupting the allocator’s\ninternal data structures. For example it is not safe\nto build a Vec<u8> from a pointer to a C char array with length size_t.\nIt’s also not safe to build one from a Vec<u16> and its length, because\nthe allocator cares about the alignment, and these two types have different\nalignments. The buffer was allocated with alignment 2 (for u16), but after\nturning it into a Vec<u8> it’ll be deallocated with alignment 1.

\n

The ownership of ptr is effectively transferred to the\nVec<T> which may then deallocate, reallocate or change the\ncontents of memory pointed to by the pointer at will. Ensure\nthat nothing else uses the pointer after calling this\nfunction.

\n
Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nuse std::ptr;\nuse std::mem;\n\nlet mut v = Vec::with_capacity_in(3, System);\nv.push(1);\nv.push(2);\nv.push(3);\n\n// Prevent running `v`'s destructor so we are in complete control\n// of the allocation.\nlet mut v = mem::ManuallyDrop::new(v);\n\n// Pull out the various important pieces of information about `v`\nlet p = v.as_mut_ptr();\nlet len = v.len();\nlet cap = v.capacity();\nlet alloc = v.allocator();\n\nunsafe {\n    // Overwrite memory with 4, 5, 6\n    for i in 0..len {\n        ptr::write(p.add(i), 4 + i);\n    }\n\n    // Put everything back together into a Vec\n    let rebuilt = Vec::from_raw_parts_in(p, len, cap, alloc.clone());\n    assert_eq!(rebuilt, [4, 5, 6]);\n}
\n

Using memory that was allocated elsewhere:

\n\n
#![feature(allocator_api)]\n\nuse std::alloc::{AllocError, Allocator, Global, Layout};\n\nfn main() {\n    let layout = Layout::array::<u32>(16).expect(\"overflow cannot happen\");\n\n    let vec = unsafe {\n        let mem = match Global.allocate(layout) {\n            Ok(mem) => mem.cast::<u32>().as_ptr(),\n            Err(AllocError) => return,\n        };\n\n        mem.write(1_000_000);\n\n        Vec::from_raw_parts_in(mem, 1, 16, Global)\n    };\n\n    assert_eq!(vec, &[1_000_000]);\n    assert_eq!(vec.capacity(), 16);\n}
\n
source

pub fn into_raw_parts(self) -> (*mut T, usize, usize)

🔬This is a nightly-only experimental API. (vec_into_raw_parts)

Decomposes a Vec<T> into its raw components.

\n

Returns the raw pointer to the underlying data, the length of\nthe vector (in elements), and the allocated capacity of the\ndata (in elements). These are the same arguments in the same\norder as the arguments to from_raw_parts.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts function, allowing\nthe destructor to perform the cleanup.

\n
Examples
\n
#![feature(vec_into_raw_parts)]\nlet v: Vec<i32> = vec![-1, 0, 1];\n\nlet (ptr, len, cap) = v.into_raw_parts();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts(ptr, len, cap)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
source

pub fn into_raw_parts_with_alloc(self) -> (*mut T, usize, usize, A)

🔬This is a nightly-only experimental API. (allocator_api)

Decomposes a Vec<T> into its raw components.

\n

Returns the raw pointer to the underlying data, the length of the vector (in elements),\nthe allocated capacity of the data (in elements), and the allocator. These are the same\narguments in the same order as the arguments to from_raw_parts_in.

\n

After calling this function, the caller is responsible for the\nmemory previously managed by the Vec. The only way to do\nthis is to convert the raw pointer, length, and capacity back\ninto a Vec with the from_raw_parts_in function, allowing\nthe destructor to perform the cleanup.

\n
Examples
\n
#![feature(allocator_api, vec_into_raw_parts)]\n\nuse std::alloc::System;\n\nlet mut v: Vec<i32, System> = Vec::new_in(System);\nv.push(-1);\nv.push(0);\nv.push(1);\n\nlet (ptr, len, cap, alloc) = v.into_raw_parts_with_alloc();\n\nlet rebuilt = unsafe {\n    // We can now make changes to the components, such as\n    // transmuting the raw pointer to a compatible type.\n    let ptr = ptr as *mut u32;\n\n    Vec::from_raw_parts_in(ptr, len, cap, alloc)\n};\nassert_eq!(rebuilt, [4294967295, 0, 1]);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the total number of elements the vector can hold without\nreallocating.

\n
Examples
\n
let mut vec: Vec<i32> = Vec::with_capacity(10);\nvec.push(42);\nassert!(vec.capacity() >= 10);
\n
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Available on non-no_global_oom_handling only.

Reserves capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to\nspeculatively avoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
Examples
\n
let mut vec = vec![1];\nvec.reserve(10);\nassert!(vec.capacity() >= 11);
\n
1.0.0 · source

pub fn reserve_exact(&mut self, additional: usize)

Available on non-no_global_oom_handling only.

Reserves the minimum capacity for at least additional more elements to\nbe inserted in the given Vec<T>. Unlike reserve, this will not\ndeliberately over-allocate to speculatively avoid frequent allocations.\nAfter calling reserve_exact, capacity will be greater than or equal to\nself.len() + additional. Does nothing if the capacity is already\nsufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer reserve if future insertions are expected.

\n
Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
Examples
\n
let mut vec = vec![1];\nvec.reserve_exact(10);\nassert!(vec.capacity() >= 11);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the given Vec<T>. The collection may reserve more space to speculatively avoid\nfrequent reallocations. After calling try_reserve, capacity will be\ngreater than or equal to self.len() + additional if it returns\nOk(()). Does nothing if capacity is already sufficient. This method\npreserves the contents even if an error occurs.

\n
Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.57.0 · source

pub fn try_reserve_exact(\n &mut self,\n additional: usize\n) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for at least additional\nelements to be inserted in the given Vec<T>. Unlike try_reserve,\nthis will not deliberately over-allocate to speculatively avoid frequent\nallocations. After calling try_reserve_exact, capacity will be greater\nthan or equal to self.len() + additional if it returns Ok(()).\nDoes nothing if the capacity is already sufficient.

\n

Note that the allocator may give the collection more space than it\nrequests. Therefore, capacity can not be relied upon to be precisely\nminimal. Prefer try_reserve if future insertions are expected.

\n
Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
Examples
\n
use std::collections::TryReserveError;\n\nfn process_data(data: &[u32]) -> Result<Vec<u32>, TryReserveError> {\n    let mut output = Vec::new();\n\n    // Pre-reserve the memory, exiting if we can't\n    output.try_reserve_exact(data.len())?;\n\n    // Now we know this can't OOM in the middle of our complex work\n    output.extend(data.iter().map(|&val| {\n        val * 2 + 5 // very complicated\n    }));\n\n    Ok(output)\n}
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Available on non-no_global_oom_handling only.

Shrinks the capacity of the vector as much as possible.

\n

It will drop down as close as possible to the length but the allocator\nmay still inform the vector that there is space for a few more elements.

\n
Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to_fit();\nassert!(vec.capacity() >= 3);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Available on non-no_global_oom_handling only.

Shrinks the capacity of the vector with a lower bound.

\n

The capacity will remain at least as large as both the length\nand the supplied value.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
Examples
\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\nassert!(vec.capacity() >= 10);\nvec.shrink_to(4);\nassert!(vec.capacity() >= 4);\nvec.shrink_to(0);\nassert!(vec.capacity() >= 3);
\n
1.0.0 · source

pub fn into_boxed_slice(self) -> Box<[T], A>

Available on non-no_global_oom_handling only.

Converts the vector into Box<[T]>.

\n

If the vector has excess capacity, its items will be moved into a\nnewly-allocated buffer with exactly the right capacity.

\n
Examples
\n
let v = vec![1, 2, 3];\n\nlet slice = v.into_boxed_slice();
\n

Any excess capacity is removed:

\n\n
let mut vec = Vec::with_capacity(10);\nvec.extend([1, 2, 3]);\n\nassert!(vec.capacity() >= 10);\nlet slice = vec.into_boxed_slice();\nassert_eq!(slice.into_vec().capacity(), 3);
\n
1.0.0 · source

pub fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping\nthe rest.

\n

If len is greater or equal to the vector’s current length, this has\nno effect.

\n

The drain method can emulate truncate, but causes the excess\nelements to be returned instead of dropped.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
Examples
\n

Truncating a five element vector to two elements:

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nvec.truncate(2);\nassert_eq!(vec, [1, 2]);
\n

No truncation occurs when len is greater than the vector’s current\nlength:

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(8);\nassert_eq!(vec, [1, 2, 3]);
\n

Truncating when len == 0 is equivalent to calling the clear\nmethod.

\n\n
let mut vec = vec![1, 2, 3];\nvec.truncate(0);\nassert_eq!(vec, []);
\n
1.7.0 · source

pub fn as_slice(&self) -> &[T]

Extracts a slice containing the entire vector.

\n

Equivalent to &s[..].

\n
Examples
\n
use std::io::{self, Write};\nlet buffer = vec![1, 2, 3, 5, 8];\nio::sink().write(buffer.as_slice()).unwrap();
\n
1.7.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Extracts a mutable slice of the entire vector.

\n

Equivalent to &mut s[..].

\n
Examples
\n
use std::io::{self, Read};\nlet mut buffer = vec![0; 3];\nio::repeat(0b101).read_exact(buffer.as_mut_slice()).unwrap();
\n
1.37.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the vector’s buffer, or a dangling raw pointer\nvalid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the slice,\nor mutable references to specific elements you are planning on accessing through this pointer,\nas well as writing to those elements, may still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
Examples
\n
let x = vec![1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(*x_ptr.add(i), 1 << i);\n    }\n}
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0, 1, 2];\n    let ptr1 = v.as_ptr();\n    let _ = ptr1.read();\n    let ptr2 = v.as_mut_ptr().offset(2);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`\n    // because it mutated a different element:\n    let _ = ptr1.read();\n}
\n
1.37.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the vector’s buffer, or a dangling\nraw pointer valid for zero sized reads if the vector didn’t allocate.

\n

The caller must ensure that the vector outlives the pointer this\nfunction returns, or else it will end up pointing to garbage.\nModifying the vector may cause its buffer to be reallocated,\nwhich would also make any pointers to it invalid.

\n

This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying slice, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the slice,\nor references to specific elements you are planning on accessing through this pointer,\nmay still invalidate this pointer.\nSee the second example below for how this guarantee can be used.

\n
Examples
\n
// Allocate vector big enough for 4 elements.\nlet size = 4;\nlet mut x: Vec<i32> = Vec::with_capacity(size);\nlet x_ptr = x.as_mut_ptr();\n\n// Initialize elements via raw pointer writes, then set length.\nunsafe {\n    for i in 0..size {\n        *x_ptr.add(i) = i as i32;\n    }\n    x.set_len(size);\n}\nassert_eq!(&*x, &[0, 1, 2, 3]);
\n

Due to the aliasing guarantee, the following code is legal:

\n\n
unsafe {\n    let mut v = vec![0];\n    let ptr1 = v.as_mut_ptr();\n    ptr1.write(1);\n    let ptr2 = v.as_mut_ptr();\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
\n
source

pub fn allocator(&self) -> &A

🔬This is a nightly-only experimental API. (allocator_api)

Returns a reference to the underlying allocator.

\n
1.0.0 · source

pub unsafe fn set_len(&mut self, new_len: usize)

Forces the length of the vector to new_len.

\n

This is a low-level operation that maintains none of the normal\ninvariants of the type. Normally changing the length of a vector\nis done using one of the safe operations instead, such as\ntruncate, resize, extend, or clear.

\n
Safety
\n
    \n
  • new_len must be less than or equal to capacity().
  • \n
  • The elements at old_len..new_len must be initialized.
  • \n
\n
Examples
\n

This method can be useful for situations in which the vector\nis serving as a buffer for other code, particularly over FFI:

\n\n
pub fn get_dictionary(&self) -> Option<Vec<u8>> {\n    // Per the FFI method's docs, \"32768 bytes is always enough\".\n    let mut dict = Vec::with_capacity(32_768);\n    let mut dict_length = 0;\n    // SAFETY: When `deflateGetDictionary` returns `Z_OK`, it holds that:\n    // 1. `dict_length` elements were initialized.\n    // 2. `dict_length` <= the capacity (32_768)\n    // which makes `set_len` safe to call.\n    unsafe {\n        // Make the FFI call...\n        let r = deflateGetDictionary(self.strm, dict.as_mut_ptr(), &mut dict_length);\n        if r == Z_OK {\n            // ...and update the length to what was initialized.\n            dict.set_len(dict_length);\n            Some(dict)\n        } else {\n            None\n        }\n    }\n}
\n

While the following example is sound, there is a memory leak since\nthe inner vectors were not freed prior to the set_len call:

\n\n
let mut vec = vec![vec![1, 0, 0],\n                   vec![0, 1, 0],\n                   vec![0, 0, 1]];\n// SAFETY:\n// 1. `old_len..0` is empty so no elements need to be initialized.\n// 2. `0 <= capacity` always holds whatever `capacity` is.\nunsafe {\n    vec.set_len(0);\n}
\n

Normally, here, one would use clear instead to correctly drop\nthe contents and thus not leak memory.

\n
1.0.0 · source

pub fn swap_remove(&mut self, index: usize) -> T

Removes an element from the vector and returns it.

\n

The removed element is replaced by the last element of the vector.

\n

This does not preserve ordering, but is O(1).\nIf you need to preserve the element order, use remove instead.

\n
Panics
\n

Panics if index is out of bounds.

\n
Examples
\n
let mut v = vec![\"foo\", \"bar\", \"baz\", \"qux\"];\n\nassert_eq!(v.swap_remove(1), \"bar\");\nassert_eq!(v, [\"foo\", \"qux\", \"baz\"]);\n\nassert_eq!(v.swap_remove(0), \"foo\");\nassert_eq!(v, [\"baz\", \"qux\"]);
\n
1.0.0 · source

pub fn insert(&mut self, index: usize, element: T)

Available on non-no_global_oom_handling only.

Inserts an element at position index within the vector, shifting all\nelements after it to the right.

\n
Panics
\n

Panics if index > len.

\n
Examples
\n
let mut vec = vec![1, 2, 3];\nvec.insert(1, 4);\nassert_eq!(vec, [1, 4, 2, 3]);\nvec.insert(4, 5);\nassert_eq!(vec, [1, 4, 2, 3, 5]);
\n
1.0.0 · source

pub fn remove(&mut self, index: usize) -> T

Removes and returns the element at position index within the vector,\nshifting all elements after it to the left.

\n

Note: Because this shifts over the remaining elements, it has a\nworst-case performance of O(n). If you don’t need the order of elements\nto be preserved, use swap_remove instead. If you’d like to remove\nelements from the beginning of the Vec, consider using\nVecDeque::pop_front instead.

\n
Panics
\n

Panics if index is out of bounds.

\n
Examples
\n
let mut v = vec![1, 2, 3];\nassert_eq!(v.remove(1), 2);\nassert_eq!(v, [1, 3]);
\n
1.0.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&T) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all elements e for which f(&e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain(|&x| x % 2 == 0);\nassert_eq!(vec, [2, 4]);
\n

Because the elements are visited exactly once in the original order,\nexternal state may be used to decide which elements to keep.

\n\n
let mut vec = vec![1, 2, 3, 4, 5];\nlet keep = [false, true, true, false, true];\nlet mut iter = keep.iter();\nvec.retain(|_| *iter.next().unwrap());\nassert_eq!(vec, [2, 3, 5]);
\n
1.61.0 · source

pub fn retain_mut<F>(&mut self, f: F)
where\n F: FnMut(&mut T) -> bool,

Retains only the elements specified by the predicate, passing a mutable reference to it.

\n

In other words, remove all elements e such that f(&mut e) returns false.\nThis method operates in place, visiting each element exactly once in the\noriginal order, and preserves the order of the retained elements.

\n
Examples
\n
let mut vec = vec![1, 2, 3, 4];\nvec.retain_mut(|x| if *x <= 3 {\n    *x += 1;\n    true\n} else {\n    false\n});\nassert_eq!(vec, [2, 3, 4]);
\n
1.16.0 · source

pub fn dedup_by_key<F, K>(&mut self, key: F)
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

Removes all but the first of consecutive elements in the vector that resolve to the same\nkey.

\n

If the vector is sorted, this removes all duplicates.

\n
Examples
\n
let mut vec = vec![10, 20, 21, 30, 20];\n\nvec.dedup_by_key(|i| *i / 10);\n\nassert_eq!(vec, [10, 20, 30, 20]);
\n
1.16.0 · source

pub fn dedup_by<F>(&mut self, same_bucket: F)
where\n F: FnMut(&mut T, &mut T) -> bool,

Removes all but the first of consecutive elements in the vector satisfying a given equality\nrelation.

\n

The same_bucket function is passed references to two elements from the vector and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is removed.

\n

If the vector is sorted, this removes all duplicates.

\n
Examples
\n
let mut vec = vec![\"foo\", \"bar\", \"Bar\", \"baz\", \"bar\"];\n\nvec.dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(vec, [\"foo\", \"bar\", \"baz\", \"bar\"]);
\n
1.0.0 · source

pub fn push(&mut self, value: T)

Available on non-no_global_oom_handling only.

Appends an element to the back of a collection.

\n
Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
Examples
\n
let mut vec = vec![1, 2];\nvec.push(3);\nassert_eq!(vec, [1, 2, 3]);
\n
source

pub fn push_within_capacity(&mut self, value: T) -> Result<(), T>

🔬This is a nightly-only experimental API. (vec_push_within_capacity)

Appends an element if there is sufficient spare capacity, otherwise an error is returned\nwith the element.

\n

Unlike push this method will not reallocate when there’s insufficient capacity.\nThe caller should use reserve or try_reserve to ensure that there is enough capacity.

\n
Examples
\n

A manual, panic-free alternative to FromIterator:

\n\n
#![feature(vec_push_within_capacity)]\n\nuse std::collections::TryReserveError;\nfn from_iter_fallible<T>(iter: impl Iterator<Item=T>) -> Result<Vec<T>, TryReserveError> {\n    let mut vec = Vec::new();\n    for value in iter {\n        if let Err(value) = vec.push_within_capacity(value) {\n            vec.try_reserve(1)?;\n            // this cannot fail, the previous line either returned or added at least 1 free slot\n            let _ = vec.push_within_capacity(value);\n        }\n    }\n    Ok(vec)\n}\nassert_eq!(from_iter_fallible(0..100), Ok(Vec::from_iter(0..100)));
\n
1.0.0 · source

pub fn pop(&mut self) -> Option<T>

Removes the last element from a vector and returns it, or None if it\nis empty.

\n

If you’d like to pop the first element, consider using\nVecDeque::pop_front instead.

\n
Examples
\n
let mut vec = vec![1, 2, 3];\nassert_eq!(vec.pop(), Some(3));\nassert_eq!(vec, [1, 2]);
\n
1.4.0 · source

pub fn append(&mut self, other: &mut Vec<T, A>)

Available on non-no_global_oom_handling only.

Moves all the elements of other into self, leaving other empty.

\n
Panics
\n

Panics if the new capacity exceeds isize::MAX bytes.

\n
Examples
\n
let mut vec = vec![1, 2, 3];\nlet mut vec2 = vec![4, 5, 6];\nvec.append(&mut vec2);\nassert_eq!(vec, [1, 2, 3, 4, 5, 6]);\nassert_eq!(vec2, []);
\n
1.6.0 · source

pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
where\n R: RangeBounds<usize>,

Removes the specified range from the vector in bulk, returning all\nremoved elements as an iterator. If the iterator is dropped before\nbeing fully consumed, it drops the remaining removed elements.

\n

The returned iterator keeps a mutable borrow on the vector to optimize\nits implementation.

\n
Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
Leaking
\n

If the returned iterator goes out of scope without being dropped (due to\nmem::forget, for example), the vector may have lost and leaked\nelements arbitrarily, including elements outside the range.

\n
Examples
\n
let mut v = vec![1, 2, 3];\nlet u: Vec<_> = v.drain(1..).collect();\nassert_eq!(v, &[1]);\nassert_eq!(u, &[2, 3]);\n\n// A full range clears the vector, like `clear()` does\nv.drain(..);\nassert_eq!(v, &[]);
\n
1.0.0 · source

pub fn clear(&mut self)

Clears the vector, removing all values.

\n

Note that this method has no effect on the allocated capacity\nof the vector.

\n
Examples
\n
let mut v = vec![1, 2, 3];\n\nv.clear();\n\nassert!(v.is_empty());
\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the vector, also referred to\nas its ‘length’.

\n
Examples
\n
let a = vec![1, 2, 3];\nassert_eq!(a.len(), 3);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the vector contains no elements.

\n
Examples
\n
let mut v = Vec::new();\nassert!(v.is_empty());\n\nv.push(1);\nassert!(!v.is_empty());
\n
1.4.0 · source

pub fn split_off(&mut self, at: usize) -> Vec<T, A>
where\n A: Clone,

Available on non-no_global_oom_handling only.

Splits the collection into two at the given index.

\n

Returns a newly allocated vector containing the elements in the range\n[at, len). After the call, the original vector will be left containing\nthe elements [0, at) with its previous capacity unchanged.

\n
Panics
\n

Panics if at > len.

\n
Examples
\n
let mut vec = vec![1, 2, 3];\nlet vec2 = vec.split_off(1);\nassert_eq!(vec, [1]);\nassert_eq!(vec2, [2, 3]);
\n
1.33.0 · source

pub fn resize_with<F>(&mut self, new_len: usize, f: F)
where\n F: FnMut() -> T,

Available on non-no_global_oom_handling only.

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with the result of\ncalling the closure f. The return values from f will end up\nin the Vec in the order they have been generated.

\n

If new_len is less than len, the Vec is simply truncated.

\n

This method uses a closure to create new values on every push. If\nyou’d rather Clone a given value, use Vec::resize. If you\nwant to use the Default trait to generate values, you can\npass Default::default as the second argument.

\n
Examples
\n
let mut vec = vec![1, 2, 3];\nvec.resize_with(5, Default::default);\nassert_eq!(vec, [1, 2, 3, 0, 0]);\n\nlet mut vec = vec![];\nlet mut p = 1;\nvec.resize_with(4, || { p *= 2; p });\nassert_eq!(vec, [2, 4, 8, 16]);
\n
1.47.0 · source

pub fn leak<'a>(self) -> &'a mut [T]
where\n A: 'a,

Consumes and leaks the Vec, returning a mutable reference to the contents,\n&'a mut [T]. Note that the type T must outlive the chosen lifetime\n'a. If the type has only static references, or none at all, then this\nmay be chosen to be 'static.

\n

As of Rust 1.57, this method does not reallocate or shrink the Vec,\nso the leaked allocation may include unused capacity that is not part\nof the returned slice.

\n

This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak.

\n
Examples
\n

Simple usage:

\n\n
let x = vec![1, 2, 3];\nlet static_ref: &'static mut [usize] = x.leak();\nstatic_ref[0] += 1;\nassert_eq!(static_ref, &[2, 2, 3]);
\n
1.60.0 · source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the vector as a slice of\nMaybeUninit<T>.

\n

The returned slice can be used to fill the vector with data (e.g. by\nreading from a file) before marking the data as initialized using the\nset_len method.

\n
Examples
\n
// Allocate vector big enough for 10 elements.\nlet mut v = Vec::with_capacity(10);\n\n// Fill in the first 3 elements.\nlet uninit = v.spare_capacity_mut();\nuninit[0].write(0);\nuninit[1].write(1);\nuninit[2].write(2);\n\n// Mark the first 3 elements of the vector as being initialized.\nunsafe {\n    v.set_len(3);\n}\n\nassert_eq!(&v, &[0, 1, 2]);
\n
source

pub fn split_at_spare_mut(&mut self) -> (&mut [T], &mut [MaybeUninit<T>])

🔬This is a nightly-only experimental API. (vec_split_at_spare)

Returns vector content as a slice of T, along with the remaining spare\ncapacity of the vector as a slice of MaybeUninit<T>.

\n

The returned spare capacity slice can be used to fill the vector with data\n(e.g. by reading from a file) before marking the data as initialized using\nthe set_len method.

\n

Note that this is a low-level API, which should be used with care for\noptimization purposes. If you need to append data to a Vec\nyou can use push, extend, extend_from_slice,\nextend_from_within, insert, append, resize or\nresize_with, depending on your exact needs.

\n
Examples
\n
#![feature(vec_split_at_spare)]\n\nlet mut v = vec![1, 1, 2];\n\n// Reserve additional space big enough for 10 elements.\nv.reserve(10);\n\nlet (init, uninit) = v.split_at_spare_mut();\nlet sum = init.iter().copied().sum::<u32>();\n\n// Fill in the next 4 elements.\nuninit[0].write(sum);\nuninit[1].write(sum * 2);\nuninit[2].write(sum * 3);\nuninit[3].write(sum * 4);\n\n// Mark the 4 elements of the vector as being initialized.\nunsafe {\n    let len = v.len();\n    v.set_len(len + 4);\n}\n\nassert_eq!(&v, &[1, 1, 2, 4, 8, 12, 16]);
\n
",0,"alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<T, A> Vec<T, A>
where\n T: Clone,\n A: Allocator,

1.5.0 · source

pub fn resize(&mut self, new_len: usize, value: T)

Available on non-no_global_oom_handling only.

Resizes the Vec in-place so that len is equal to new_len.

\n

If new_len is greater than len, the Vec is extended by the\ndifference, with each additional slot filled with value.\nIf new_len is less than len, the Vec is simply truncated.

\n

This method requires T to implement Clone,\nin order to be able to clone the passed value.\nIf you need more flexibility (or want to rely on Default instead of\nClone), use Vec::resize_with.\nIf you only need to resize to a smaller size, use Vec::truncate.

\n
Examples
\n
let mut vec = vec![\"hello\"];\nvec.resize(3, \"world\");\nassert_eq!(vec, [\"hello\", \"world\", \"world\"]);\n\nlet mut vec = vec![1, 2, 3, 4];\nvec.resize(2, 0);\nassert_eq!(vec, [1, 2]);
\n
1.6.0 · source

pub fn extend_from_slice(&mut self, other: &[T])

Available on non-no_global_oom_handling only.

Clones and appends all elements in a slice to the Vec.

\n

Iterates over the slice other, clones each element, and then appends\nit to this Vec. The other slice is traversed in-order.

\n

Note that this function is same as extend except that it is\nspecialized to work with slices instead. If and when Rust gets\nspecialization this function will likely be deprecated (but still\navailable).

\n
Examples
\n
let mut vec = vec![1];\nvec.extend_from_slice(&[2, 3, 4]);\nassert_eq!(vec, [1, 2, 3, 4]);
\n
1.53.0 · source

pub fn extend_from_within<R>(&mut self, src: R)
where\n R: RangeBounds<usize>,

Available on non-no_global_oom_handling only.

Copies elements from src range to the end of the vector.

\n
Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
Examples
\n
let mut vec = vec![0, 1, 2, 3, 4];\n\nvec.extend_from_within(2..);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);\n\nvec.extend_from_within(..2);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);\n\nvec.extend_from_within(4..8);\nassert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);
\n
",0,"alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<T, A> Vec<T, A>
where\n T: PartialEq,\n A: Allocator,

1.0.0 · source

pub fn dedup(&mut self)

Removes consecutive repeated elements in the vector according to the\nPartialEq trait implementation.

\n

If the vector is sorted, this removes all duplicates.

\n
Examples
\n
let mut vec = vec![1, 2, 2, 3, 2];\n\nvec.dedup();\n\nassert_eq!(vec, [1, 2, 3, 2]);
\n
",0,"alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<T, A> Vec<T, A>
where\n A: Allocator,

1.21.0 · source

pub fn splice<R, I>(\n &mut self,\n range: R,\n replace_with: I\n) -> Splice<'_, <I as IntoIterator>::IntoIter, A>
where\n R: RangeBounds<usize>,\n I: IntoIterator<Item = T>,

Available on non-no_global_oom_handling only.

Creates a splicing iterator that replaces the specified range in the vector\nwith the given replace_with iterator and yields the removed items.\nreplace_with does not need to be the same length as range.

\n

range is removed even if the iterator is not consumed until the end.

\n

It is unspecified how many elements are removed from the vector\nif the Splice value is leaked.

\n

The input iterator replace_with is only consumed when the Splice value is dropped.

\n

This is optimal if:

\n
    \n
  • The tail (elements in the vector after range) is empty,
  • \n
  • or replace_with yields fewer or equal elements than range’s length
  • \n
  • or the lower bound of its size_hint() is exact.
  • \n
\n

Otherwise, a temporary vector is allocated and the tail is moved twice.

\n
Panics
\n

Panics if the starting point is greater than the end point or if\nthe end point is greater than the length of the vector.

\n
Examples
\n
let mut v = vec![1, 2, 3, 4];\nlet new = [7, 8, 9];\nlet u: Vec<_> = v.splice(1..3, new).collect();\nassert_eq!(v, &[1, 7, 8, 9, 4]);\nassert_eq!(u, &[2, 3]);
\n
source

pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where\n F: FnMut(&mut T) -> bool,

🔬This is a nightly-only experimental API. (extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, then the element is removed and yielded.\nIf the closure returns false, the element will remain in the vector and will not be yielded\nby the iterator.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n

Using this method is equivalent to the following code:

\n\n
let mut i = 0;\nwhile i < vec.len() {\n    if some_predicate(&mut vec[i]) {\n        let val = vec.remove(i);\n        // your code here\n    } else {\n        i += 1;\n    }\n}\n
\n

But extract_if is easier to use. extract_if is also more efficient,\nbecause it can backshift the elements of the array in bulk.

\n

Note that extract_if also lets you mutate every element in the filter closure,\nregardless of whether you choose to keep or remove it.

\n
Examples
\n

Splitting an array into evens and odds, reusing the original allocation:

\n\n
#![feature(extract_if)]\nlet mut numbers = vec![1, 2, 3, 4, 5, 6, 8, 9, 11, 13, 14, 15];\n\nlet evens = numbers.extract_if(|x| *x % 2 == 0).collect::<Vec<_>>();\nlet odds = numbers;\n\nassert_eq!(evens, vec![2, 4, 6, 8, 14]);\nassert_eq!(odds, vec![1, 3, 5, 9, 11, 13, 15]);
\n
",0,"alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, I, A> Index<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &<Vec<T, A> as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, I, A> IndexMut<I> for Vec<T, A>
where\n I: SliceIndex<[T]>,\n A: Allocator,

source§

fn index_mut(&mut self, index: I) -> &mut <Vec<T, A> as Index<I>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Hash for Vec<T, A>
where\n T: Hash,\n A: Allocator,

The hash of a vector is the same as that of the corresponding slice,\nas required by the core::borrow::Borrow implementation.

\n\n
use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet v: Vec<u8> = vec![0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(v), b.hash_one(s));
\n
source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.5.0 · source§

impl<T, A> AsMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.5.0 · source§

impl<T, A> AsMut<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_mut(&mut self) -> &mut Vec<T, A>

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Eq for Vec<T, A>
where\n T: Eq,\n A: Allocator,

","Eq","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.2.0 · source§

impl<'a, T, A> Extend<&'a T> for Vec<T, A>
where\n T: Copy + 'a,\n A: Allocator,

Available on non-no_global_oom_handling only.

Extend implementation that copies elements out of references before pushing them onto the Vec.

\n

This implementation is specialized for slice iterators, where it uses copy_from_slice to\nappend the entire slice at once.

\n
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = &'a T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: &'a T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<&'a T>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Extend<T> for Vec<T, A>
where\n A: Allocator,

Available on non-no_global_oom_handling only.
source§

fn extend<I>(&mut self, iter: I)
where\n I: IntoIterator<Item = T>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T> Default for Vec<T>

source§

fn default() -> Vec<T>

Creates an empty Vec<T>.

\n

The vector will not allocate until elements are pushed onto it.

\n
","Default","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Debug for Vec<T, A>
where\n T: Debug,\n A: Allocator,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> IntoIterator for Vec<T, A>
where\n A: Allocator,

source§

fn into_iter(self) -> <Vec<T, A> as IntoIterator>::IntoIter

Creates a consuming iterator, that is, one that moves each value out of\nthe vector (from start to end). The vector cannot be used after calling\nthis.

\n
Examples
\n
let v = vec![\"a\".to_string(), \"b\".to_string()];\nlet mut v_iter = v.into_iter();\n\nlet first_element: Option<String> = v_iter.next();\n\nassert_eq!(first_element, Some(\"a\".to_string()));\nassert_eq!(v_iter.next(), Some(\"b\".to_string()));\nassert_eq!(v_iter.next(), None);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T, A>

Which kind of iterator are we turning this into?
","IntoIterator","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.74.0 · source§

impl<T, const N: usize> From<&[T; N]> for Vec<T>
where\n T: Clone,

Available on non-no_global_oom_handling only.
source§

fn from(s: &[T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
Examples
\n
assert_eq!(Vec::from(&[1, 2, 3]), vec![1, 2, 3]);
\n
","From<&[T; N]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.14.0 · source§

impl<'a, T> From<Cow<'a, [T]>> for Vec<T>
where\n [T]: ToOwned<Owned = Vec<T>>,

source§

fn from(s: Cow<'a, [T]>) -> Vec<T>

Convert a clone-on-write slice into a vector.

\n

If s already owns a Vec<T>, it will be returned directly.\nIf s is borrowing a slice, a new Vec<T> will be allocated and\nfilled by cloning s’s items into it.

\n
Examples
\n
let o: Cow<'_, [i32]> = Cow::Owned(vec![1, 2, 3]);\nlet b: Cow<'_, [i32]> = Cow::Borrowed(&[1, 2, 3]);\nassert_eq!(Vec::from(o), Vec::from(b));
\n
","From>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.10.0 · source§

impl<T, A> From<VecDeque<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(other: VecDeque<T, A>) -> Vec<T, A>

Turn a VecDeque<T> into a Vec<T>.

\n

This never needs to re-allocate, but does need to do O(n) data movement if\nthe circular buffer doesn’t happen to be at the beginning of the allocation.

\n
Examples
\n
use std::collections::VecDeque;\n\n// This one is *O*(1).\nlet deque: VecDeque<_> = (1..5).collect();\nlet ptr = deque.as_slices().0.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);\n\n// This one needs data rearranging.\nlet mut deque: VecDeque<_> = (1..5).collect();\ndeque.push_front(9);\ndeque.push_front(8);\nlet ptr = deque.as_slices().1.as_ptr();\nlet vec = Vec::from(deque);\nassert_eq!(vec, [8, 9, 1, 2, 3, 4]);\nassert_eq!(vec.as_ptr(), ptr);
\n
","From>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.74.0 · source§

impl<T, const N: usize> From<&mut [T; N]> for Vec<T>
where\n T: Clone,

Available on non-no_global_oom_handling only.
source§

fn from(s: &mut [T; N]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3]), vec![1, 2, 3]);
\n
","From<&mut [T; N]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.19.0 · source§

impl<T> From<&mut [T]> for Vec<T>
where\n T: Clone,

Available on non-no_global_oom_handling only.
source§

fn from(s: &mut [T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
Examples
\n
assert_eq!(Vec::from(&mut [1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&mut [T]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.18.0 · source§

impl<T, A> From<Box<[T], A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(s: Box<[T], A>) -> Vec<T, A>

Convert a boxed slice into a vector by transferring ownership of\nthe existing heap allocation.

\n
Examples
\n
let b: Box<[i32]> = vec![1, 2, 3].into_boxed_slice();\nassert_eq!(Vec::from(b), vec![1, 2, 3]);
\n
","From>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.44.0 · source§

impl<T, const N: usize> From<[T; N]> for Vec<T>

Available on non-no_global_oom_handling only.
source§

fn from(s: [T; N]) -> Vec<T>

Allocate a Vec<T> and move s’s items into it.

\n
Examples
\n
assert_eq!(Vec::from([1, 2, 3]), vec![1, 2, 3]);
\n
","From<[T; N]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.5.0 · source§

impl<T, A> From<BinaryHeap<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn from(heap: BinaryHeap<T, A>) -> Vec<T, A>

Converts a BinaryHeap<T> into a Vec<T>.

\n

This conversion requires no data movement or allocation, and has\nconstant time complexity.

\n
","From>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T> From<&[T]> for Vec<T>
where\n T: Clone,

Available on non-no_global_oom_handling only.
source§

fn from(s: &[T]) -> Vec<T>

Allocate a Vec<T> and fill it by cloning s’s items.

\n
Examples
\n
assert_eq!(Vec::from(&[1, 2, 3][..]), vec![1, 2, 3]);
\n
","From<&[T]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> BorrowMut<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T> FromIterator<T> for Vec<T>

Available on non-no_global_oom_handling only.
source§

fn from_iter<I>(iter: I) -> Vec<T>
where\n I: IntoIterator<Item = T>,

Creates a value from an iterator. Read more
","FromIterator","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&mut [U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&mut [U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&mut [U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&mut [U]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.48.0 · source§

impl<T, U, A> PartialEq<[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<[U; N]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, U, A1, A2> PartialEq<Vec<U, A2>> for Vec<T, A1>
where\n A1: Allocator,\n A2: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A2>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Vec<U, A2>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, U, A, const N: usize> PartialEq<&[U; N]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U; N]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U; N]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U; N]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, U, A> PartialEq<&[U]> for Vec<T, A>
where\n A: Allocator,\n T: PartialEq<U>,

source§

fn eq(&self, other: &&[U]) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &&[U]) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq<&[U]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Ord for Vec<T, A>
where\n T: Ord,\n A: Allocator,

Implements ordering of vectors, lexicographically.

\n
source§

fn cmp(&self, other: &Vec<T, A>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Deref for Vec<T, A>
where\n A: Allocator,

§

type Target = [T]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[T]

Dereferences the value.
","Deref","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A1, A2> PartialOrd<Vec<T, A2>> for Vec<T, A1>
where\n T: PartialOrd,\n A1: Allocator,\n A2: Allocator,

Implements comparison of vectors, lexicographically.

\n
source§

fn partial_cmp(&self, other: &Vec<T, A2>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Drop for Vec<T, A>
where\n A: Allocator,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> AsRef<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> AsRef<Vec<T, A>> for Vec<T, A>
where\n A: Allocator,

source§

fn as_ref(&self) -> &Vec<T, A>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Clone for Vec<T, A>
where\n T: Clone,\n A: Allocator + Clone,

Available on non-no_global_oom_handling only.
source§

fn clone(&self) -> Vec<T, A>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &Vec<T, A>)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> DerefMut for Vec<T, A>
where\n A: Allocator,

source§

fn deref_mut(&mut self) -> &mut [T]

Mutably dereferences the value.
","DerefMut","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
1.0.0 · source§

impl<T, A> Borrow<[T]> for Vec<T, A>
where\n A: Allocator,

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<T> Encodable for Vec<T>
where\n T: Encodable,

§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
","Encodable","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<T> Decodable for Vec<T>
where\n T: Decodable,

§

fn decode(buf: &mut &[u8]) -> Result<Vec<T>, Error>

Decodes the blob into the appropriate type. buf must be advanced past\nthe decoded object.
","Decodable","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<'de, T> Deserialize<'de> for Vec<T>
where\n T: Deserialize<'de>,

Available on crate features std or alloc only.
source§

fn deserialize<D>(\n deserializer: D\n) -> Result<Vec<T>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<'de, T, E> IntoDeserializer<'de, E> for Vec<T>
where\n T: IntoDeserializer<'de, E>,\n E: Error,

Available on crate features std or alloc only.
§

type Deserializer = SeqDeserializer<<Vec<T> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> <Vec<T> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<T> Serialize for Vec<T>
where\n T: Serialize,

Available on crate features std or alloc only.
source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<'a, A> Arbitrary<'a> for Vec<A>
where\n A: Arbitrary<'a>,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Vec<A>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Vec<A>, Error>

Generate an arbitrary value of Self from the entirety of the given\nunstructured data. Read more
§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type\nneeds to construct itself. Read more
","Arbitrary<'a>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<A> Arbitrary for Vec<A>
where\n A: Arbitrary,

§

type Parameters = (SizeRange, <A as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = VecStrategy<<A as Arbitrary>::Strategy>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Vec<A> as Arbitrary>::Parameters\n) -> <Vec<A> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<A> ArbitraryF1<A> for Vec<A>
where\n A: Debug,

§

type Parameters = SizeRange

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<S>(\n base: S,\n args: <Vec<A> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<Vec<A>>
where\n S: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<T> Shuffleable for Vec<T>

§

fn shuffle_len(&self) -> usize

Return the length of this collection.
§

fn shuffle_swap(&mut self, a: usize, b: usize)

Swap the elements at the given indices.
","Shuffleable","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<T> Strategy for Vec<T>
where\n T: Strategy,

§

type Tree = VecValueTree<<T as Strategy>::Tree>

The value tree generated by this Strategy.
§

type Value = Vec<<T as Strategy>::Value>

The type of value used by functions under test generated by this Strategy. Read more
§

fn new_tree(\n &self,\n runner: &mut TestRunner\n) -> Result<<Vec<T> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
§

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where\n O: Debug,\n F: Fn(Self::Value) -> O,\n Self: Sized,

Returns a strategy which produces values transformed by the function\nfun. Read more
§

fn prop_map_into<O>(self) -> MapInto<Self, O>
where\n O: Debug,\n Self: Sized,\n Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming\nSelf with Into<O>. Read more
§

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where\n O: Debug,\n F: Fn(Self::Value, TestRng) -> O,\n Self: Sized,

Returns a strategy which produces values transformed by the function\nfun, which is additionally given a random number generator. Read more
§

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where\n S: Strategy,\n F: Fn(Self::Value) -> S,\n Self: Sized,

Maps values produced by this strategy into new strategies and picks\nvalues from those strategies. Read more
§

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where\n S: Strategy,\n F: Fn(Self::Value) -> S,\n Self: Sized,

Maps values produced by this strategy into new strategies and picks\nvalues from those strategies while considering the new strategies to be\nindependent. Read more
§

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where\n S: Strategy,\n F: Fn(Self::Value) -> S,\n Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input\ngenerated from self in slot 0 and the derived strategy in slot 1. Read more
§

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where\n R: Into<Reason>,\n F: Fn(&Self::Value) -> bool,\n Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
§

fn prop_filter_map<F, O>(\n self,\n whence: impl Into<Reason>,\n fun: F\n) -> FilterMap<Self, F>
where\n F: Fn(Self::Value) -> Option<O>,\n O: Debug,\n Self: Sized,

Returns a strategy which only produces transformed values where fun\nreturns Some(value) and rejects those where fun returns None. Read more
§

fn prop_union(self, other: Self) -> Union<Self>
where\n Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
§

fn prop_recursive<R, F>(\n self,\n depth: u32,\n desired_size: u32,\n expected_branch_size: u32,\n recurse: F\n) -> Recursive<Self::Value, F>
where\n R: Strategy<Value = Self::Value> + 'static,\n F: Fn(BoxedStrategy<Self::Value>) -> R,\n Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
§

fn boxed(self) -> BoxedStrategy<Self::Value>
where\n Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a\nsimple trait object. Read more
§

fn no_shrink(self) -> NoShrink<Self>
where\n Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
","Strategy","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<'de, T, U> DeserializeAs<'de, Vec<T>> for Vec<U>
where\n U: DeserializeAs<'de, T>,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<Vec<T>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, Vec>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
source§

impl<T, U> SerializeAs<Vec<T>> for Vec<U>
where\n U: SerializeAs<T>,

source§

fn serialize_as<S>(\n source: &Vec<T>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::filter::RawTopicsFilter"],["
§

impl<U, T> PartialEq<Cow<'_, [T], U>> for Vec<T>
where\n U: Capacity,\n T: Clone + PartialEq,

§

fn eq(&self, other: &Cow<'_, [T], U>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","alloy_rpc_types::eth::filter::RawTopicsFilter"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_json_rpc/error/enum.RpcError.js b/type.impl/alloy_json_rpc/error/enum.RpcError.js new file mode 100644 index 000000000000..eb628bdcdc4b --- /dev/null +++ b/type.impl/alloy_json_rpc/error/enum.RpcError.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_transport":[["
§

impl<E, ErrResp> RpcError<E, ErrResp>
where\n ErrResp: RpcReturn,

pub const fn err_resp(err: ErrorPayload<ErrResp>) -> RpcError<E, ErrResp>

Instantiate a new TransportError from an error response.

\n
",0,"alloy_transport::error::TransportError"],["
§

impl<E, ErrResp> RpcError<E, ErrResp>

pub const fn ser_err(err: Error) -> RpcError<E, ErrResp>

Instantiate a new TransportError from a serde_json::Error. This\nshould be called when the error occurs during serialization.

\n

pub fn deser_err(err: Error, text: impl AsRef<str>) -> RpcError<E, ErrResp>

Instantiate a new TransportError from a serde_json::Error and the\ntext. This should be called when the error occurs during\ndeserialization.

\n

pub const fn is_ser_error(&self) -> bool

Check if the error is a serialization error.

\n

pub const fn is_deser_error(&self) -> bool

Check if the error is a deserialization error.

\n

pub const fn is_transport_error(&self) -> bool

Check if the error is a transport error.

\n

pub const fn is_error_resp(&self) -> bool

Check if the error is an error response.

\n

pub const fn as_error_resp(&self) -> Option<&ErrorPayload<ErrResp>>

Fallible conversion to an error response.

\n
",0,"alloy_transport::error::TransportError"],["
§

impl<E, ErrResp> Debug for RpcError<E, ErrResp>
where\n E: Debug,\n ErrResp: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_transport::error::TransportError"],["
§

impl<E, ErrResp> Error for RpcError<E, ErrResp>
where\n E: Error + 'static,\n RpcError<E, ErrResp>: Debug + Display,

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
","Error","alloy_transport::error::TransportError"],["
§

impl<E, ErrResp> Display for RpcError<E, ErrResp>
where\n ErrorPayload<ErrResp>: Display,\n E: Display,

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Display","alloy_transport::error::TransportError"],["
§

impl<E, ErrResp> From<E> for RpcError<E, ErrResp>

§

fn from(source: E) -> RpcError<E, ErrResp>

Converts to this type from the input type.
","From","alloy_transport::error::TransportError"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_json_rpc/packet/enum.ResponsePacket.js b/type.impl/alloy_json_rpc/packet/enum.ResponsePacket.js new file mode 100644 index 000000000000..44967db2b15d --- /dev/null +++ b/type.impl/alloy_json_rpc/packet/enum.ResponsePacket.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_json_rpc":[["
source§

impl<Payload, ErrData> ResponsePacket<Payload, ErrData>

source

pub fn responses_by_ids(\n &self,\n ids: &HashSet<Id>\n) -> Vec<&Response<Payload, ErrData>>

Find responses by a list of IDs.

\n

This is intended to be used in conjunction with\nRequestPacket::subscription_request_ids to identify subscription\nresponses.

\n
Note
\n
    \n
  • Responses are not guaranteed to be in the same order.
  • \n
  • Responses are not guaranteed to be in the set.
  • \n
  • If the packet contains duplicate IDs, both will be found.
  • \n
\n
",0,"alloy_json_rpc::packet::BorrowedResponsePacket"],["
source§

impl<Payload: Clone, ErrData: Clone> Clone for ResponsePacket<Payload, ErrData>

source§

fn clone(&self) -> ResponsePacket<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_json_rpc::packet::BorrowedResponsePacket"],["
source§

impl<Payload, ErrData> FromIterator<Response<Payload, ErrData>> for ResponsePacket<Payload, ErrData>

source§

fn from_iter<T: IntoIterator<Item = Response<Payload, ErrData>>>(\n iter: T\n) -> Self

Creates a value from an iterator. Read more
","FromIterator>","alloy_json_rpc::packet::BorrowedResponsePacket"],["
source§

impl<Payload: Debug, ErrData: Debug> Debug for ResponsePacket<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_json_rpc::packet::BorrowedResponsePacket"],["
source§

impl<'de, Payload, ErrData> Deserialize<'de> for ResponsePacket<Payload, ErrData>
where\n Payload: Deserialize<'de>,\n ErrData: Deserialize<'de>,

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_json_rpc::packet::BorrowedResponsePacket"],["
source§

impl<Payload, ErrData> From<Vec<Response<Payload, ErrData>>> for ResponsePacket<Payload, ErrData>

source§

fn from(value: Vec<Response<Payload, ErrData>>) -> Self

Converts to this type from the input type.
","From>>","alloy_json_rpc::packet::BorrowedResponsePacket"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_json_rpc/request/struct.Request.js b/type.impl/alloy_json_rpc/request/struct.Request.js new file mode 100644 index 000000000000..d0cfcb5e033f --- /dev/null +++ b/type.impl/alloy_json_rpc/request/struct.Request.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_json_rpc":[["
source§

impl<Params> Request<Params>
where\n Params: RpcParam,

source

pub fn box_params(self) -> PartiallySerializedRequest

Serialize the request parameters as a boxed RawValue.

\n
Panics
\n

If serialization of the params fails.

\n
source

pub fn serialize(self) -> Result<SerializedRequest>

Serialize the request, including the request parameters.

\n
",0,"alloy_json_rpc::request::PartiallySerializedRequest"],["
source§

impl<'a, Params> Request<Params>
where\n Params: AsRef<RawValue> + 'a,

source

pub fn try_params_as<T: DeserializeOwned>(&self) -> Result<T>

Attempt to deserialize the params.

\n

To borrow from the params via the deserializer, use\nRequest::try_borrow_params_as.

\n
Returns
\n
    \n
  • Ok(T) if the params can be deserialized as T
  • \n
  • Err(e) if the params cannot be deserialized as T
  • \n
\n
source

pub fn try_borrow_params_as<T: Deserialize<'a>>(&'a self) -> Result<T>

Attempt to deserialize the params, borrowing from the params

\n
Returns
\n
    \n
  • Ok(T) if the params can be deserialized as T
  • \n
  • Err(e) if the params cannot be deserialized as T
  • \n
\n
",0,"alloy_json_rpc::request::PartiallySerializedRequest"],["
source§

impl<Params: Debug> Debug for Request<Params>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_json_rpc::request::PartiallySerializedRequest"],["
source§

impl<Params> Serialize for Request<Params>
where\n Params: RpcParam,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_json_rpc::request::PartiallySerializedRequest"],["
source§

impl<Params: Clone> Clone for Request<Params>

source§

fn clone(&self) -> Request<Params>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_json_rpc::request::PartiallySerializedRequest"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_json_rpc/response/error/struct.ErrorPayload.js b/type.impl/alloy_json_rpc/response/error/struct.ErrorPayload.js new file mode 100644 index 000000000000..60534a6807f8 --- /dev/null +++ b/type.impl/alloy_json_rpc/response/error/struct.ErrorPayload.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_json_rpc":[["
source§

impl<'a, Data> ErrorPayload<Data>
where\n Data: Borrow<RawValue> + 'a,

source

pub fn try_data_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Deserialize the error’s data field, borrowing from the data field if\nnecessary.

\n
Returns
\n
    \n
  • None if the error has no data field.
  • \n
  • Some(Ok(data)) if the error has a data field that can be deserialized.
  • \n
  • Some(Err(err)) if the error has a data field that can’t be deserialized.
  • \n
\n
source

pub fn deser_data<T: DeserializeOwned>(self) -> Result<ErrorPayload<T>, Self>

Attempt to deserialize the data field.

\n
Returns
\n
    \n
  • Ok(ErrorPayload<T>) if the data field can be deserialized
  • \n
  • Err(self) if the data field can’t be deserialized, or if there is no data field.
  • \n
\n
",0,"alloy_json_rpc::response::error::BorrowedErrorPayload"],["
source§

impl<'de, ErrData: Deserialize<'de>> Deserialize<'de> for ErrorPayload<ErrData>

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_json_rpc::response::error::BorrowedErrorPayload"],["
source§

impl<ErrData: Debug> Debug for ErrorPayload<ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_json_rpc::response::error::BorrowedErrorPayload"],["
source§

impl<ErrData> Display for ErrorPayload<ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Display","alloy_json_rpc::response::error::BorrowedErrorPayload"],["
source§

impl<ErrData> Serialize for ErrorPayload<ErrData>
where\n ErrData: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_json_rpc::response::error::BorrowedErrorPayload"],["
source§

impl<ErrData: Clone> Clone for ErrorPayload<ErrData>

source§

fn clone(&self) -> ErrorPayload<ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_json_rpc::response::error::BorrowedErrorPayload"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_json_rpc/response/payload/enum.ResponsePayload.js b/type.impl/alloy_json_rpc/response/payload/enum.ResponsePayload.js new file mode 100644 index 000000000000..f32847d17fc1 --- /dev/null +++ b/type.impl/alloy_json_rpc/response/payload/enum.ResponsePayload.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_json_rpc":[["
source§

impl<Payload, ErrData> ResponsePayload<Payload, ErrData>

source

pub const fn as_success(&self) -> Option<&Payload>

Fallible conversion to the succesful payload.

\n
source

pub const fn as_error(&self) -> Option<&ErrorPayload<ErrData>>

Fallible conversion to the error object.

\n
source

pub const fn is_success(&self) -> bool

Returns true if the response payload is a success.

\n
source

pub const fn is_error(&self) -> bool

Returns true if the response payload is an error.

\n
",0,"alloy_json_rpc::response::payload::BorrowedResponsePayload"],["
source§

impl<'a, Payload, ErrData> ResponsePayload<Payload, ErrData>
where\n Payload: AsRef<RawValue> + 'a,

source

pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the success payload, borrowing from the payload\nif necessary.

\n
Returns
\n
    \n
  • None if the payload is an error
  • \n
  • Some(Ok(T)) if the payload is a success and can be deserialized
  • \n
  • Some(Err(serde_json::Error)) if the payload is a success and can’t be deserialized as\nT
  • \n
\n
source

pub fn deserialize_success<T: DeserializeOwned>(\n self\n) -> Result<ResponsePayload<T, ErrData>, Self>

Deserialize a Success payload, if possible, transforming this type.

\n
Returns
\n
    \n
  • Ok(ResponsePayload<T>) if the payload is an error, or if the payload is a success and\ncan be deserialized as T
  • \n
  • Err(self) if the payload is a success and can’t be deserialized
  • \n
\n
",0,"alloy_json_rpc::response::payload::BorrowedResponsePayload"],["
source§

impl<'a, Payload, Data> ResponsePayload<Payload, Data>
where\n Data: Borrow<RawValue> + 'a,

source

pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the error payload, borrowing from the payload if\nnecessary.

\n
Returns
\n
    \n
  • None if the payload is a success
  • \n
  • Some(Ok(T)) if the payload is an error and can be deserialized
  • \n
  • Some(Err(serde_json::Error)) if the payload is an error and can’t be deserialized as T
  • \n
\n
source

pub fn deserialize_error<T: DeserializeOwned>(\n self\n) -> Result<ResponsePayload<Payload, T>, Self>

Deserialize an Error payload, if possible, transforming this type.

\n
Returns
\n
    \n
  • Ok(ResponsePayload<Payload, T>) if the payload is an error, or if the payload is an\nerror and can be deserialized as T.
  • \n
  • Err(self) if the payload is an error and can’t be deserialized.
  • \n
\n
",0,"alloy_json_rpc::response::payload::BorrowedResponsePayload"],["
source§

impl<Payload: Debug, ErrData: Debug> Debug for ResponsePayload<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_json_rpc::response::payload::BorrowedResponsePayload"],["
source§

impl<Payload: Clone, ErrData: Clone> Clone for ResponsePayload<Payload, ErrData>

source§

fn clone(&self) -> ResponsePayload<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_json_rpc::response::payload::BorrowedResponsePayload"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_json_rpc/response/struct.Response.js b/type.impl/alloy_json_rpc/response/struct.Response.js new file mode 100644 index 000000000000..0426de0b9287 --- /dev/null +++ b/type.impl/alloy_json_rpc/response/struct.Response.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_json_rpc":[["
source§

impl<Payload, ErrData> Response<Payload, ErrData>

source

pub const fn is_success(&self) -> bool

Returns true if the response is a success.

\n
source

pub const fn is_error(&self) -> bool

Returns true if the response is an error.

\n
",0,"alloy_json_rpc::response::BorrowedResponse"],["
source§

impl<'a, Payload, ErrData> Response<Payload, ErrData>
where\n Payload: AsRef<RawValue> + 'a,

source

pub fn try_success_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the success payload, borrowing from the payload\nif necessary.

\n

See ResponsePayload::try_success_as.

\n
source

pub fn deser_success<T: DeserializeOwned>(\n self\n) -> Result<Response<T, ErrData>, Self>

Attempt to deserialize the Success payload, transforming this type.

\n
Returns
\n
    \n
  • Ok(Response<T, ErrData>) if the payload is a success and can be deserialized as T, or if\nthe payload is an error.
  • \n
  • Err(self) if the payload is a success and can’t be deserialized.
  • \n
\n
",0,"alloy_json_rpc::response::BorrowedResponse"],["
source§

impl<'a, Payload, ErrData> Response<Payload, ErrData>
where\n ErrData: Borrow<RawValue> + 'a,

source

pub fn try_error_as<T: Deserialize<'a>>(&'a self) -> Option<Result<T>>

Attempt to deserialize the error payload, borrowing from the payload if\nnecesary.

\n

See ResponsePayload::try_error_as.

\n
source

pub fn deser_err<T: DeserializeOwned>(\n self\n) -> Result<Response<Payload, T>, Self>

Attempt to deserialize the Error payload, transforming this type.

\n
Returns
\n
    \n
  • Ok(Response<Payload, T>) if the payload is an error and can be deserialized as T, or\nif the payload is a success.
  • \n
  • Err(self) if the payload is an error and can’t be deserialized.
  • \n
\n
",0,"alloy_json_rpc::response::BorrowedResponse"],["
source§

impl<'de, Payload, ErrData> Deserialize<'de> for Response<Payload, ErrData>
where\n Payload: Deserialize<'de>,\n ErrData: Deserialize<'de>,

source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_json_rpc::response::BorrowedResponse"],["
source§

impl<Payload: Debug, ErrData: Debug> Debug for Response<Payload, ErrData>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_json_rpc::response::BorrowedResponse"],["
source§

impl<Payload, ErrData> Serialize for Response<Payload, ErrData>
where\n Payload: Serialize,\n ErrData: Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_json_rpc::response::BorrowedResponse"],["
source§

impl<Payload: Clone, ErrData: Clone> Clone for Response<Payload, ErrData>

source§

fn clone(&self) -> Response<Payload, ErrData>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_json_rpc::response::BorrowedResponse"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_json_rpc/result/type.RpcResult.js b/type.impl/alloy_json_rpc/result/type.RpcResult.js new file mode 100644 index 000000000000..12364dfb371b --- /dev/null +++ b/type.impl/alloy_json_rpc/result/type.RpcResult.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_json_rpc":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_rpc_types/eth/block/struct.BlockNumHash.js b/type.impl/alloy_rpc_types/eth/block/struct.BlockNumHash.js new file mode 100644 index 000000000000..1bdc0e0f36ef --- /dev/null +++ b/type.impl/alloy_rpc_types/eth/block/struct.BlockNumHash.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_rpc_types":[["
source§

impl BlockNumHash

source

pub fn new(number: BlockNumber, hash: BlockHash) -> Self

Creates a new BlockNumHash from a block number and hash.

\n
source

pub fn into_components(self) -> (BlockNumber, BlockHash)

Consumes Self and returns [BlockNumber], [BlockHash]

\n
source

pub fn matches_block_or_num(&self, block: &BlockHashOrNumber) -> bool

Returns whether or not the block matches the given BlockHashOrNumber.

\n
",0,"alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl Eq for BlockNumHash

","Eq","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl Copy for BlockNumHash

","Copy","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl Hash for BlockNumHash

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl StructuralPartialEq for BlockNumHash

","StructuralPartialEq","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl Default for BlockNumHash

source§

fn default() -> BlockNumHash

Returns the “default value” for a type. Read more
","Default","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl From<(u64, FixedBytes<32>)> for BlockNumHash

source§

fn from(val: (BlockNumber, BlockHash)) -> Self

Converts to this type from the input type.
","From<(u64, FixedBytes<32>)>","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl Clone for BlockNumHash

source§

fn clone(&self) -> BlockNumHash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl StructuralEq for BlockNumHash

","StructuralEq","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl From<(FixedBytes<32>, u64)> for BlockNumHash

source§

fn from(val: (BlockHash, BlockNumber)) -> Self

Converts to this type from the input type.
","From<(FixedBytes<32>, u64)>","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl PartialEq for BlockNumHash

source§

fn eq(&self, other: &BlockNumHash) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_rpc_types::eth::block::ForkBlock"],["
source§

impl Debug for BlockNumHash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_types::eth::block::ForkBlock"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_rpc_types/eth/block/struct.Rich.js b/type.impl/alloy_rpc_types/eth/block/struct.Rich.js new file mode 100644 index 000000000000..517da8c44a64 --- /dev/null +++ b/type.impl/alloy_rpc_types/eth/block/struct.Rich.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_rpc_types":[["
source§

impl<T: PartialEq> PartialEq for Rich<T>

source§

fn eq(&self, other: &Rich<T>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<T: Debug> Debug for Rich<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<'de, T> Deserialize<'de> for Rich<T>
where\n T: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<T: Clone> Clone for Rich<T>

source§

fn clone(&self) -> Rich<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<T: Eq> Eq for Rich<T>

","Eq","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<T> StructuralPartialEq for Rich<T>

","StructuralPartialEq","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<T: Serialize> Serialize for Rich<T>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<T> Deref for Rich<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
","Deref","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"],["
source§

impl<T> StructuralEq for Rich<T>

","StructuralEq","alloy_rpc_types::eth::block::RichBlock","alloy_rpc_types::eth::block::RichHeader"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_rpc_types/eth/filter/enum.ValueOrArray.js b/type.impl/alloy_rpc_types/eth/filter/enum.ValueOrArray.js new file mode 100644 index 000000000000..b9a4015bbd53 --- /dev/null +++ b/type.impl/alloy_rpc_types/eth/filter/enum.ValueOrArray.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_rpc_types":[["
source§

impl<T: Clone> Clone for ValueOrArray<T>

source§

fn clone(&self) -> ValueOrArray<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<T> StructuralEq for ValueOrArray<T>

","StructuralEq","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<T> StructuralPartialEq for ValueOrArray<T>

","StructuralPartialEq","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<T> Serialize for ValueOrArray<T>
where\n T: Serialize,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<'a, T> Deserialize<'a> for ValueOrArray<T>
where\n T: DeserializeOwned,

source§

fn deserialize<D>(deserializer: D) -> Result<ValueOrArray<T>, D::Error>
where\n D: Deserializer<'a>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'a>","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<T: Eq> Eq for ValueOrArray<T>

","Eq","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<T: Debug> Debug for ValueOrArray<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<T: PartialEq> PartialEq for ValueOrArray<T>

source§

fn eq(&self, other: &ValueOrArray<T>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_rpc_types::eth::filter::RawAddressFilter"],["
source§

impl<T: Hash> Hash for ValueOrArray<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_rpc_types::eth::filter::RawAddressFilter"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_rpc_types/eth/filter/struct.FilterSet.js b/type.impl/alloy_rpc_types/eth/filter/struct.FilterSet.js new file mode 100644 index 000000000000..469e973e874c --- /dev/null +++ b/type.impl/alloy_rpc_types/eth/filter/struct.FilterSet.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_rpc_types":[["
source§

impl<T: Eq + Hash> FilterSet<T>

source

pub fn is_empty(&self) -> bool

Returns wheter the filter is empty

\n
source

pub fn matches(&self, value: &T) -> bool

Returns whether the given value matches the filter. It the filter is empty\nany value matches. Otherwise, the filter must include the value

\n
",0,"alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: AsRef<[u8]> + Eq + Hash> FilterSet<T>

source

pub fn to_bloom_filter(&self) -> BloomFilter

Returns a list of Bloom (BloomFilter) corresponding to the filter’s values

\n
",0,"alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Clone + Eq + Hash> FilterSet<T>

source

pub fn to_value_or_array(&self) -> Option<ValueOrArray<T>>

Returns a ValueOrArray inside an Option, so that:

\n
    \n
  • If the filter is empty, it returns None
  • \n
  • If the filter has only 1 value, it returns the single value
  • \n
  • Otherwise it returns an array of values\nThis should be useful for serialization
  • \n
\n
",0,"alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: PartialEq + Eq + Hash> PartialEq for FilterSet<T>

source§

fn eq(&self, other: &FilterSet<T>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Hash> From<Vec<T>> for FilterSet<T>

source§

fn from(src: Vec<T>) -> Self

Converts to this type from the input type.
","From>","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Hash> StructuralPartialEq for FilterSet<T>

","StructuralPartialEq","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Clone + Eq + Hash> Clone for FilterSet<T>

source§

fn clone(&self) -> FilterSet<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Hash> From<ValueOrArray<Option<T>>> for FilterSet<T>

source§

fn from(src: ValueOrArray<Option<T>>) -> Self

Converts to this type from the input type.
","From>>","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Hash> Hash for FilterSet<T>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Hash> StructuralEq for FilterSet<T>

","StructuralEq","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<'de, T> Deserialize<'de> for FilterSet<T>
where\n T: Deserialize<'de> + Eq + Hash,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Default + Eq + Hash> Default for FilterSet<T>

source§

fn default() -> FilterSet<T>

Returns the “default value” for a type. Read more
","Default","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Hash> From<T> for FilterSet<T>

source§

fn from(src: T) -> Self

Converts to this type from the input type.
","From","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Eq + Hash> Eq for FilterSet<T>

","Eq","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Eq + Hash> From<ValueOrArray<T>> for FilterSet<T>

source§

fn from(src: ValueOrArray<T>) -> Self

Converts to this type from the input type.
","From>","alloy_rpc_types::eth::filter::Topic"],["
source§

impl<T: Debug + Eq + Hash> Debug for FilterSet<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_types::eth::filter::Topic"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_rpc_types/eth/trace/common/enum.TraceResult.js b/type.impl/alloy_rpc_types/eth/trace/common/enum.TraceResult.js new file mode 100644 index 000000000000..da2a82408826 --- /dev/null +++ b/type.impl/alloy_rpc_types/eth/trace/common/enum.TraceResult.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_rpc_types":[["
source§

impl<Ok: Debug, Err: Debug> Debug for TraceResult<Ok, Err>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_types::eth::trace::geth::TraceResult"],["
source§

impl<'de, Ok, Err> Deserialize<'de> for TraceResult<Ok, Err>
where\n Ok: Deserialize<'de>,\n Err: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_rpc_types::eth::trace::geth::TraceResult"],["
source§

impl<Ok, Err> StructuralEq for TraceResult<Ok, Err>

","StructuralEq","alloy_rpc_types::eth::trace::geth::TraceResult"],["
source§

impl<Ok: Eq, Err: Eq> Eq for TraceResult<Ok, Err>

","Eq","alloy_rpc_types::eth::trace::geth::TraceResult"],["
source§

impl<Ok: Clone, Err: Clone> Clone for TraceResult<Ok, Err>

source§

fn clone(&self) -> TraceResult<Ok, Err>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_types::eth::trace::geth::TraceResult"],["
source§

impl<Ok, Err> StructuralPartialEq for TraceResult<Ok, Err>

","StructuralPartialEq","alloy_rpc_types::eth::trace::geth::TraceResult"],["
source§

impl<Ok: PartialEq, Err: PartialEq> PartialEq for TraceResult<Ok, Err>

source§

fn eq(&self, other: &TraceResult<Ok, Err>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_rpc_types::eth::trace::geth::TraceResult"],["
source§

impl<Ok, Err> Serialize for TraceResult<Ok, Err>
where\n Ok: Serialize,\n Err: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where\n __S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_rpc_types::eth::trace::geth::TraceResult"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_signer/wallet/struct.Wallet.js b/type.impl/alloy_signer/wallet/struct.Wallet.js new file mode 100644 index 000000000000..7c9b09247242 --- /dev/null +++ b/type.impl/alloy_signer/wallet/struct.Wallet.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_signer":[["
source§

impl Wallet<SigningKey>

source

pub fn from_bytes(bytes: &FieldBytes) -> Result<Self, Error>

Creates a new Wallet instance from a raw scalar serialized as a byte array.

\n
source

pub fn from_slice(bytes: &[u8]) -> Result<Self, Error>

Creates a new Wallet instance from a raw scalar serialized as a byte slice.

\n
source

pub fn random() -> Self

Creates a new random keypair seeded with rand::thread_rng().

\n
source

pub fn random_with<R: Rng + CryptoRng>(rng: &mut R) -> Self

Creates a new random keypair seeded with the provided RNG.

\n
source

fn new_pk(signer: SigningKey) -> Self

",0,"alloy_signer::LocalWallet"],["
source§

impl Wallet<SigningKey>

source

pub fn new_keystore<P, R, S>(\n dir: P,\n rng: &mut R,\n password: S,\n name: Option<&str>\n) -> Result<(Self, String), WalletError>
where\n P: AsRef<Path>,\n R: Rng + CryptoRng + CryptoRng,\n S: AsRef<[u8]>,

Available on crate feature keystore only.

Creates a new random encrypted JSON with the provided password and stores it in the\nprovided directory. Returns a tuple (Wallet, String) of the wallet instance for the\nkeystore with its random UUID. Accepts an optional name for the keystore file. If None,\nthe keystore is stored as the stringified UUID.

\n
source

pub fn decrypt_keystore<P, S>(\n keypath: P,\n password: S\n) -> Result<Self, WalletError>
where\n P: AsRef<Path>,\n S: AsRef<[u8]>,

Available on crate feature keystore only.

Decrypts an encrypted JSON from the provided path to construct a Wallet instance

\n
source

pub fn encrypt_keystore<P, R, B, S>(\n keypath: P,\n rng: &mut R,\n pk: B,\n password: S,\n name: Option<&str>\n) -> Result<(Self, String), WalletError>
where\n P: AsRef<Path>,\n R: Rng + CryptoRng,\n B: AsRef<[u8]>,\n S: AsRef<[u8]>,

Available on crate feature keystore only.

Creates a new encrypted JSON with the provided private key and password and stores it in the\nprovided directory. Returns a tuple (Wallet, String) of the wallet instance for the\nkeystore with its random UUID. Accepts an optional name for the keystore file. If None,\nthe keystore is stored as the stringified UUID.

\n
",0,"alloy_signer::LocalWallet"],["
source§

impl Wallet<Signer<Secp256k1>>

source

pub fn connect(connector: Connector, credentials: Credentials, id: Id) -> Self

Connects to a yubi key’s ECDSA account at the provided id

\n
source

pub fn new(\n connector: Connector,\n credentials: Credentials,\n id: Id,\n label: Label,\n domain: Domain\n) -> Self

Creates a new random ECDSA keypair on the yubi at the provided id

\n
source

pub fn from_key(\n connector: Connector,\n credentials: Credentials,\n id: Id,\n label: Label,\n domain: Domain,\n key: impl Into<Vec<u8>>\n) -> Self

Uploads the provided keypair on the yubi at the provided id

\n
",0,"alloy_signer::YubiWallet"],["
source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Wallet<D>

source

pub const fn new_with_signer(signer: D, address: Address, chain_id: u64) -> Self

Construct a new wallet with an external [PrehashSigner].

\n
source

pub const fn signer(&self) -> &D

Returns this wallet’s signer.

\n
",0,"alloy_signer::LocalWallet","alloy_signer::YubiWallet"],["
source§

impl<D: Clone> Clone for Wallet<D>

source§

fn clone(&self) -> Wallet<D>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_signer::LocalWallet","alloy_signer::YubiWallet"],["
source§

impl FromStr for Wallet<SigningKey>

§

type Err = WalletError

The associated error which can be returned from parsing.
source§

fn from_str(src: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
","FromStr","alloy_signer::LocalWallet"],["
source§

impl<D: PrehashSigner<(Signature, RecoveryId)> + Send + Sync> Signer for Wallet<D>

source§

fn sign_hash<'life0, 'life1, 'async_trait>(\n &'life0 self,\n hash: &'life1 B256\n) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where\n Self: 'async_trait,\n 'life0: 'async_trait,\n 'life1: 'async_trait,

Signs the given hash.
source§

fn address(&self) -> Address

Returns the signer’s Ethereum Address.
source§

fn chain_id(&self) -> u64

Returns the signer’s chain ID.
source§

fn set_chain_id(&mut self, chain_id: u64)

Sets the signer’s chain ID.
source§

fn sign_message<'life0, 'life1, 'async_trait>(\n &'life0 self,\n message: &'life1 [u8]\n) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where\n Self: 'async_trait,\n 'life0: 'async_trait,\n 'life1: 'async_trait,

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data<'life0, 'life1, 'life2, 'async_trait, T>(\n &'life0 self,\n payload: &'life1 T,\n domain: &'life2 Eip712Domain\n) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where\n Self: Sized + 'async_trait,\n T: 'async_trait + SolStruct + Send + Sync,\n 'life0: 'async_trait,\n 'life1: 'async_trait,\n 'life2: 'async_trait,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
source§

fn with_chain_id(self, chain_id: u64) -> Self
where\n Self: Sized,

Sets the signer’s chain ID and returns self.
","Signer","alloy_signer::LocalWallet","alloy_signer::YubiWallet"],["
source§

impl PartialEq for Wallet<SigningKey>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_signer::LocalWallet"],["
source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> Debug for Wallet<D>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
","Debug","alloy_signer::LocalWallet","alloy_signer::YubiWallet"],["
source§

impl<D: PrehashSigner<(Signature, RecoveryId)>> SignerSync for Wallet<D>

source§

fn sign_hash_sync(&self, hash: &B256) -> Result<Signature>

Signs the given hash.
source§

fn sign_message_sync(&self, message: &[u8]) -> Result<Signature>

Signs the hash of the provided message after prefixing it, as specified in EIP-191.
source§

fn sign_typed_data_sync<T: SolStruct>(\n &self,\n payload: &T,\n domain: &Eip712Domain\n) -> Result<Signature>
where\n Self: Sized,

Available on crate feature eip712 only.
Encodes and signs the typed data according to EIP-712.
","SignerSync","alloy_signer::LocalWallet","alloy_signer::YubiWallet"],["
source§

impl From<SecretKey<Secp256k1>> for Wallet<SigningKey>

source§

fn from(value: K256SecretKey) -> Self

Converts to this type from the input type.
","From>","alloy_signer::LocalWallet"],["
source§

impl From<Signer<Secp256k1>> for Wallet<Signer<Secp256k1>>

source§

fn from(signer: YubiSigner<Secp256k1>) -> Self

Converts to this type from the input type.
","From>","alloy_signer::YubiWallet"],["
source§

impl From<SigningKey<Secp256k1>> for Wallet<SigningKey>

source§

fn from(value: SigningKey) -> Self

Converts to this type from the input type.
","From>","alloy_signer::LocalWallet"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/alloy_transport/type.RpcResult.js b/type.impl/alloy_transport/type.RpcResult.js new file mode 100644 index 000000000000..00db4fe10a4f --- /dev/null +++ b/type.impl/alloy_transport/type.RpcResult.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_transport":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/core/pin/struct.Pin.js b/type.impl/core/pin/struct.Pin.js new file mode 100644 index 000000000000..8151377b153a --- /dev/null +++ b/type.impl/core/pin/struct.Pin.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_transport":[["
source§

impl<P> Pin<P>
where\n P: Deref,\n <P as Deref>::Target: Unpin,

1.33.0 (const: unstable) · source

pub fn new(pointer: P) -> Pin<P>

Construct a new Pin<P> around a pointer to some data of a type that\nimplements Unpin.

\n

Unlike Pin::new_unchecked, this method is safe because the pointer\nP dereferences to an Unpin type, which cancels the pinning guarantees.

\n
Examples
\n
use std::pin::Pin;\n\nlet mut val: u8 = 5;\n// We can pin the value, since it doesn't care about being moved\nlet mut pinned: Pin<&mut u8> = Pin::new(&mut val);
\n
1.39.0 (const: unstable) · source

pub fn into_inner(pin: Pin<P>) -> P

Unwraps this Pin<P> returning the underlying pointer.

\n

This requires that the data inside this Pin implements Unpin so that we\ncan ignore the pinning invariants when unwrapping it.

\n
Examples
\n
use std::pin::Pin;\n\nlet mut val: u8 = 5;\nlet pinned: Pin<&mut u8> = Pin::new(&mut val);\n// Unwrap the pin to get a reference to the value\nlet r = Pin::into_inner(pinned);\nassert_eq!(*r, 5);
\n
",0,"alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
source§

impl<P> Pin<P>
where\n P: Deref,

1.33.0 (const: unstable) · source

pub unsafe fn new_unchecked(pointer: P) -> Pin<P>

Construct a new Pin<P> around a reference to some data of a type that\nmay or may not implement Unpin.

\n

If pointer dereferences to an Unpin type, Pin::new should be used\ninstead.

\n
Safety
\n

This constructor is unsafe because we cannot guarantee that the data\npointed to by pointer is pinned, meaning that the data will not be moved or\nits storage invalidated until it gets dropped. If the constructed Pin<P> does\nnot guarantee that the data P points to is pinned, that is a violation of\nthe API contract and may lead to undefined behavior in later (safe) operations.

\n

By using this method, you are making a promise about the P::Deref and\nP::DerefMut implementations, if they exist. Most importantly, they\nmust not move out of their self arguments: Pin::as_mut and Pin::as_ref\nwill call DerefMut::deref_mut and Deref::deref on the pinned pointer\nand expect these methods to uphold the pinning invariants.\nMoreover, by calling this method you promise that the reference P\ndereferences to will not be moved out of again; in particular, it\nmust not be possible to obtain a &mut P::Target and then\nmove out of that reference (using, for example mem::swap).

\n

For example, calling Pin::new_unchecked on an &'a mut T is unsafe because\nwhile you are able to pin it for the given lifetime 'a, you have no control\nover whether it is kept pinned once 'a ends:

\n\n
use std::mem;\nuse std::pin::Pin;\n\nfn move_pinned_ref<T>(mut a: T, mut b: T) {\n    unsafe {\n        let p: Pin<&mut T> = Pin::new_unchecked(&mut a);\n        // This should mean the pointee `a` can never move again.\n    }\n    mem::swap(&mut a, &mut b); // Potential UB down the road ⚠️\n    // The address of `a` changed to `b`'s stack slot, so `a` got moved even\n    // though we have previously pinned it! We have violated the pinning API contract.\n}
\n

A value, once pinned, must remain pinned until it is dropped (unless its type implements\nUnpin). Because Pin<&mut T> does not own the value, dropping the Pin will not drop\nthe value and will not end the pinning contract. So moving the value after dropping the\nPin<&mut T> is still a violation of the API contract.

\n

Similarly, calling Pin::new_unchecked on an Rc<T> is unsafe because there could be\naliases to the same data that are not subject to the pinning restrictions:

\n\n
use std::rc::Rc;\nuse std::pin::Pin;\n\nfn move_pinned_rc<T>(mut x: Rc<T>) {\n    let pinned = unsafe { Pin::new_unchecked(Rc::clone(&x)) };\n    {\n        let p: Pin<&T> = pinned.as_ref();\n        // This should mean the pointee can never move again.\n    }\n    drop(pinned);\n    let content = Rc::get_mut(&mut x).unwrap(); // Potential UB down the road ⚠️\n    // Now, if `x` was the only reference, we have a mutable reference to\n    // data that we pinned above, which we could use to move it as we have\n    // seen in the previous example. We have violated the pinning API contract.\n }
\n
Pinning of closure captures
\n

Particular care is required when using Pin::new_unchecked in a closure:\nPin::new_unchecked(&mut var) where var is a by-value (moved) closure capture\nimplicitly makes the promise that the closure itself is pinned, and that all uses\nof this closure capture respect that pinning.

\n\n
use std::pin::Pin;\nuse std::task::Context;\nuse std::future::Future;\n\nfn move_pinned_closure(mut x: impl Future, cx: &mut Context<'_>) {\n    // Create a closure that moves `x`, and then internally uses it in a pinned way.\n    let mut closure = move || unsafe {\n        let _ignore = Pin::new_unchecked(&mut x).poll(cx);\n    };\n    // Call the closure, so the future can assume it has been pinned.\n    closure();\n    // Move the closure somewhere else. This also moves `x`!\n    let mut moved = closure;\n    // Calling it again means we polled the future from two different locations,\n    // violating the pinning API contract.\n    moved(); // Potential UB ⚠️\n}
\n

When passing a closure to another API, it might be moving the closure any time, so\nPin::new_unchecked on closure captures may only be used if the API explicitly documents\nthat the closure is pinned.

\n

The better alternative is to avoid all that trouble and do the pinning in the outer function\ninstead (here using the pin! macro):

\n\n
use std::pin::pin;\nuse std::task::Context;\nuse std::future::Future;\n\nfn move_pinned_closure(mut x: impl Future, cx: &mut Context<'_>) {\n    let mut x = pin!(x);\n    // Create a closure that captures `x: Pin<&mut _>`, which is safe to move.\n    let mut closure = move || {\n        let _ignore = x.as_mut().poll(cx);\n    };\n    // Call the closure, so the future can assume it has been pinned.\n    closure();\n    // Move the closure somewhere else.\n    let mut moved = closure;\n    // Calling it again here is fine (except that we might be polling a future that already\n    // returned `Poll::Ready`, but that is a separate problem).\n    moved();\n}
\n
1.33.0 · source

pub fn as_ref(&self) -> Pin<&<P as Deref>::Target>

Gets a pinned shared reference from this pinned pointer.

\n

This is a generic method to go from &Pin<Pointer<T>> to Pin<&T>.\nIt is safe because, as part of the contract of Pin::new_unchecked,\nthe pointee cannot move after Pin<Pointer<T>> got created.\n“Malicious” implementations of Pointer::Deref are likewise\nruled out by the contract of Pin::new_unchecked.

\n
1.39.0 (const: unstable) · source

pub unsafe fn into_inner_unchecked(pin: Pin<P>) -> P

Unwraps this Pin<P> returning the underlying pointer.

\n
Safety
\n

This function is unsafe. You must guarantee that you will continue to\ntreat the pointer P as pinned after you call this function, so that\nthe invariants on the Pin type can be upheld. If the code using the\nresulting P does not continue to maintain the pinning invariants that\nis a violation of the API contract and may lead to undefined behavior in\nlater (safe) operations.

\n

If the underlying data is Unpin, Pin::into_inner should be used\ninstead.

\n
",0,"alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
source§

impl<P> Pin<P>
where\n P: DerefMut,

1.33.0 · source

pub fn as_mut(&mut self) -> Pin<&mut <P as Deref>::Target>

Gets a pinned mutable reference from this pinned pointer.

\n

This is a generic method to go from &mut Pin<Pointer<T>> to Pin<&mut T>.\nIt is safe because, as part of the contract of Pin::new_unchecked,\nthe pointee cannot move after Pin<Pointer<T>> got created.\n“Malicious” implementations of Pointer::DerefMut are likewise\nruled out by the contract of Pin::new_unchecked.

\n

This method is useful when doing multiple calls to functions that consume the pinned type.

\n
Example
\n
use std::pin::Pin;\n\nimpl Type {\n    fn method(self: Pin<&mut Self>) {\n        // do something\n    }\n\n    fn call_method_twice(mut self: Pin<&mut Self>) {\n        // `method` consumes `self`, so reborrow the `Pin<&mut Self>` via `as_mut`.\n        self.as_mut().method();\n        self.as_mut().method();\n    }\n}
\n
1.33.0 · source

pub fn set(&mut self, value: <P as Deref>::Target)
where\n <P as Deref>::Target: Sized,

Assigns a new value to the memory behind the pinned reference.

\n

This overwrites pinned data, but that is okay: its destructor gets\nrun before being overwritten, so no pinning guarantee is violated.

\n
Example
\n
use std::pin::Pin;\n\nlet mut val: u8 = 5;\nlet mut pinned: Pin<&mut u8> = Pin::new(&mut val);\nprintln!(\"{}\", pinned); // 5\npinned.as_mut().set(10);\nprintln!(\"{}\", pinned); // 10
\n
",0,"alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P> Debug for Pin<P>
where\n P: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P>
where\n P: DispatchFromDyn<U>,

","DispatchFromDyn>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P> Copy for Pin<P>
where\n P: Copy,

","Copy","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.41.0 · source§

impl<P, Q> PartialOrd<Pin<Q>> for Pin<P>
where\n P: Deref,\n Q: Deref,\n <P as Deref>::Target: PartialOrd<<Q as Deref>::Target>,

source§

fn partial_cmp(&self, other: &Pin<Q>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &Pin<Q>) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &Pin<Q>) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
source§

fn gt(&self, other: &Pin<Q>) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
source§

fn ge(&self, other: &Pin<Q>) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P> DerefMut for Pin<P>
where\n P: DerefMut,\n <P as Deref>::Target: Unpin,

source§

fn deref_mut(&mut self) -> &mut <P as Deref>::Target

Mutably dereferences the value.
","DerefMut","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P> Clone for Pin<P>
where\n P: Clone,

source§

fn clone(&self) -> Pin<P>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
","Clone","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P, U> CoerceUnsized<Pin<U>> for Pin<P>
where\n P: CoerceUnsized<U>,

","CoerceUnsized>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.41.0 · source§

impl<P> Eq for Pin<P>
where\n P: Deref,\n <P as Deref>::Target: Eq,

","Eq","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P> Deref for Pin<P>
where\n P: Deref,

§

type Target = <P as Deref>::Target

The resulting type after dereferencing.
source§

fn deref(&self) -> &<P as Deref>::Target

Dereferences the value.
","Deref","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.41.0 · source§

impl<P> Hash for Pin<P>
where\n P: Deref,\n <P as Deref>::Target: Hash,

source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P> Pointer for Pin<P>
where\n P: Pointer,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter.
","Pointer","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.41.0 · source§

impl<P> Ord for Pin<P>
where\n P: Deref,\n <P as Deref>::Target: Ord,

source§

fn cmp(&self, other: &Pin<P>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
source§

impl<P> AsyncIterator for Pin<P>
where\n P: DerefMut,\n <P as Deref>::Target: AsyncIterator,

§

type Item = <<P as Deref>::Target as AsyncIterator>::Item

🔬This is a nightly-only experimental API. (async_iterator)
The type of items yielded by the async iterator.
source§

fn poll_next(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Option<<Pin<P> as AsyncIterator>::Item>>

🔬This is a nightly-only experimental API. (async_iterator)
Attempt to pull out the next value of this async iterator, registering the\ncurrent task for wakeup if the value is not yet available, and returning\nNone if the async iterator is exhausted. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

🔬This is a nightly-only experimental API. (async_iterator)
Returns the bounds on the remaining length of the async iterator. Read more
","AsyncIterator","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.41.0 · source§

impl<P, Q> PartialEq<Pin<Q>> for Pin<P>
where\n P: Deref,\n Q: Deref,\n <P as Deref>::Target: PartialEq<<Q as Deref>::Target>,

source§

fn eq(&self, other: &Pin<Q>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
source§

fn ne(&self, other: &Pin<Q>) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.36.0 · source§

impl<P> Future for Pin<P>
where\n P: DerefMut,\n <P as Deref>::Target: Future,

§

type Output = <<P as Deref>::Target as Future>::Output

The type of value produced on completion.
source§

fn poll(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<<Pin<P> as Future>::Output>

Attempt to resolve the future to a final value, registering\nthe current task for wakeup if the value is not yet available. Read more
","Future","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<P> Display for Pin<P>
where\n P: Display,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Display","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
1.33.0 · source§

impl<T, A> From<Box<T, A>> for Pin<Box<T, A>>
where\n A: Allocator + 'static,\n T: ?Sized,

source§

fn from(boxed: Box<T, A>) -> Pin<Box<T, A>>

Converts a Box<T> into a Pin<Box<T>>. If T does not implement Unpin, then\n*boxed will be pinned in memory and unable to be moved.

\n

This conversion does not allocate on the heap and happens in place.

\n

This is also available via Box::into_pin.

\n

Constructing and pinning a Box with <Pin<Box<T>>>::from(Box::new(x))\ncan also be written more concisely using Box::pin(x).\nThis From implementation is useful if you already have a Box<T>, or you are\nconstructing a (pinned) Box in a different way than with Box::new.

\n
","From>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
source§

impl<G, R, A> Coroutine<R> for Pin<Box<G, A>>
where\n G: Coroutine<R> + ?Sized,\n A: Allocator + 'static,

§

type Yield = <G as Coroutine<R>>::Yield

🔬This is a nightly-only experimental API. (coroutine_trait)
The type of value this coroutine yields. Read more
§

type Return = <G as Coroutine<R>>::Return

🔬This is a nightly-only experimental API. (coroutine_trait)
The type of value this coroutine returns. Read more
source§

fn resume(\n self: Pin<&mut Pin<Box<G, A>>>,\n arg: R\n) -> CoroutineState<<Pin<Box<G, A>> as Coroutine<R>>::Yield, <Pin<Box<G, A>> as Coroutine<R>>::Return>

🔬This is a nightly-only experimental API. (coroutine_trait)
Resumes the execution of this coroutine. Read more
","Coroutine","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> FusedFuture for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: FusedFuture,

§

fn is_terminated(&self) -> bool

Returns true if the underlying future should no longer be polled.
","FusedFuture","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> FusedStream for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: FusedStream,

§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
","FusedStream","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> Stream for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: Stream,

§

type Item = <<P as Deref>::Target as Stream>::Item

Values yielded by the stream.
§

fn poll_next(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Option<<Pin<P> as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the\ncurrent task for wakeup if the value is not yet available, and returning\nNone if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
","Stream","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<'a, T, F> UnsafeFutureObj<'a, T> for Pin<Box<F>>
where\n F: Future<Output = T> + 'a,

§

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
§

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
","UnsafeFutureObj<'a, T>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<'a, T> UnsafeFutureObj<'a, T> for Pin<Box<dyn Future<Output = T> + 'a>>
where\n T: 'a,

§

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
§

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
","UnsafeFutureObj<'a, T>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<'a, T> UnsafeFutureObj<'a, T> for Pin<Box<dyn Future<Output = T> + Send + 'a>>
where\n T: 'a,

§

fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

Convert an owned instance into a (conceptually owned) fat pointer. Read more
§

unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

Drops the future represented by the given fat pointer. Read more
","UnsafeFutureObj<'a, T>","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P, Item> Sink<Item> for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: Sink<Item>,

§

type Error = <<P as Deref>::Target as Sink<Item>>::Error

The type of value produced by the sink when an error occurs.
§

fn poll_ready(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), <Pin<P> as Sink<Item>>::Error>>

Attempts to prepare the Sink to receive a value. Read more
§

fn start_send(\n self: Pin<&mut Pin<P>>,\n item: Item\n) -> Result<(), <Pin<P> as Sink<Item>>::Error>

Begin the process of sending a value to the sink.\nEach call to this function must be preceded by a successful call to\npoll_ready which returned Poll::Ready(Ok(())). Read more
§

fn poll_flush(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), <Pin<P> as Sink<Item>>::Error>>

Flush any remaining output from this sink. Read more
§

fn poll_close(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), <Pin<P> as Sink<Item>>::Error>>

Flush any remaining output and close this sink, if necessary. Read more
","Sink","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncWrite for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncWrite,

§

fn poll_write(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n buf: &[u8]\n) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
§

fn poll_write_vectored(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n bufs: &[IoSlice<'_>]\n) -> Poll<Result<usize, Error>>

Attempt to write bytes from bufs into the object using vectored\nIO operations. Read more
§

fn poll_flush(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), Error>>

Attempt to flush the object, ensuring that any buffered data reach\ntheir destination. Read more
§

fn poll_close(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), Error>>

Attempt to close the object. Read more
","AsyncWrite","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncRead for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncRead,

§

fn poll_read(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n buf: &mut [u8]\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n bufs: &mut [IoSliceMut<'_>]\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored\nIO operations. Read more
","AsyncRead","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncSeek for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncSeek,

§

fn poll_seek(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n pos: SeekFrom\n) -> Poll<Result<u64, Error>>

Attempt to seek to an offset, in bytes, in a stream. Read more
","AsyncSeek","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncBufRead for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncBufRead,

§

fn poll_fill_buf(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<&[u8], Error>>

Attempt to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut Pin<P>>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncSeek for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncSeek,

§

fn start_seek(self: Pin<&mut Pin<P>>, pos: SeekFrom) -> Result<(), Error>

Attempts to seek to an offset, in bytes, in a stream. Read more
§

fn poll_complete(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<u64, Error>>

Waits for a seek operation to complete. Read more
","AsyncSeek","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncWrite for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncWrite,

§

fn poll_write(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n buf: &[u8]\n) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
§

fn poll_write_vectored(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n bufs: &[IoSlice<'_>]\n) -> Poll<Result<usize, Error>>

Like poll_write, except that it writes from a slice of buffers. Read more
§

fn is_write_vectored(&self) -> bool

Determines if this writer has an efficient poll_write_vectored\nimplementation. Read more
§

fn poll_flush(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), Error>>

Attempts to flush the object, ensuring that any buffered data reach\ntheir destination. Read more
§

fn poll_shutdown(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), Error>>

Initiates or attempts to shut down this writer, returning success when\nthe I/O connection has completely shut down. Read more
","AsyncWrite","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncBufRead for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncBufRead,

§

fn poll_fill_buf(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>\n) -> Poll<Result<&[u8], Error>>

Attempts to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut Pin<P>>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"],["
§

impl<P> AsyncRead for Pin<P>
where\n P: DerefMut + Unpin,\n <P as Deref>::Target: AsyncRead,

§

fn poll_read(\n self: Pin<&mut Pin<P>>,\n cx: &mut Context<'_>,\n buf: &mut ReadBuf<'_>\n) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
","AsyncRead","alloy_transport::type_aliases::Pbf","alloy_transport::type_aliases::TransportFut","alloy_transport::type_aliases::RpcFut"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/core/result/enum.Result.js b/type.impl/core/result/enum.Result.js new file mode 100644 index 000000000000..4f059a89f15b --- /dev/null +++ b/type.impl/core/result/enum.Result.js @@ -0,0 +1,6 @@ +(function() {var type_impls = { +"alloy_json_rpc":[["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls the provided closure with a reference to the contained value (if Ok).

\n
Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls the provided closure with a reference to the contained error (if Err).

\n
Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
Safety
\n

Calling this method on an Err is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
Safety
\n

Calling this method on an Ok is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"alloy_json_rpc::result::RpcResult"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_json_rpc::result::RpcResult"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E> Try for Result<T, E>

§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> StructuralEq for Result<T, E>

","StructuralEq","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","alloy_json_rpc::result::RpcResult"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","alloy_json_rpc::result::RpcResult"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","alloy_json_rpc::result::RpcResult"],["
source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_json_rpc::result::RpcResult"],["
source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_json_rpc::result::RpcResult"],["
§

impl<'a, A, B> Arbitrary<'a> for Result<A, B>
where\n A: Arbitrary<'a>,\n B: Arbitrary<'a>,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Result<A, B>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type\nneeds to construct itself. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given\nunstructured data. Read more
","Arbitrary<'a>","alloy_json_rpc::result::RpcResult"],["
§

impl<A, B> Arbitrary for Result<A, B>
where\n A: Arbitrary,\n B: Arbitrary,

§

type Parameters = (Probability, <A as Arbitrary>::Parameters, <B as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = MaybeOk<<A as Arbitrary>::Strategy, <B as Arbitrary>::Strategy>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<A, B> as Arbitrary>::Parameters\n) -> <Result<A, B> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_json_rpc::result::RpcResult"],["
§

impl<A> Arbitrary for Result<Infallible, A>
where\n A: Arbitrary,

§

type Parameters = <A as Arbitrary>::Parameters

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = Map<<A as Arbitrary>::Strategy, fn(_: A) -> Result<Infallible, A>>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<Infallible, A> as Arbitrary>::Parameters\n) -> <Result<Infallible, A> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_json_rpc::result::RpcResult"],["
§

impl<A, E> ArbitraryF1<A> for Result<A, E>
where\n A: Debug,\n E: Arbitrary,\n <E as Arbitrary>::Strategy: 'static,

§

type Parameters = (Probability, <E as Arbitrary>::Parameters)

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<AS>(\n base: AS,\n args: <Result<A, E> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<Result<A, E>>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_json_rpc::result::RpcResult"],["
§

impl<A, B> ArbitraryF2<A, B> for Result<A, B>
where\n A: Debug,\n B: Debug,

§

type Parameters = Probability

The type of parameters that lift2_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift2_with<AS, BS>(\n fst: AS,\n snd: BS,\n args: <Result<A, B> as ArbitraryF2<A, B>>::Parameters\n) -> BoxedStrategy<Result<A, B>>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>.\nThe composite strategy is passed the arguments given in args. Read more
§

fn lift2<AS, BS>(fst: AS, snd: BS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>. Read more
","ArbitraryF2","alloy_json_rpc::result::RpcResult"],["
§

impl<T, E> ResultExt<T, E> for Result<T, E>

§

fn context<X>(self, x: X) -> Result<T, Context<X, E>>

The method is use to add context information to current operation Read more
","ResultExt","alloy_json_rpc::result::RpcResult"]], +"alloy_signer":[["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls the provided closure with a reference to the contained value (if Ok).

\n
Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls the provided closure with a reference to the contained error (if Err).

\n
Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
Safety
\n

Calling this method on an Err is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
Safety
\n

Calling this method on an Ok is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"alloy_signer::error::Result"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_signer::error::Result"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_signer::error::Result"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"alloy_signer::error::Result"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"alloy_signer::error::Result"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","alloy_signer::error::Result"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_signer::error::Result"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_signer::error::Result"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","alloy_signer::error::Result"],["
source§

impl<T, E> Try for Result<T, E>

§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","alloy_signer::error::Result"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> StructuralEq for Result<T, E>

","StructuralEq","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","alloy_signer::error::Result"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","alloy_signer::error::Result"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","alloy_signer::error::Result"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","alloy_signer::error::Result"],["
source§

impl From<&StreamResult> for Result<MZStatus, MZError>

source§

fn from(res: &StreamResult) -> Result<MZStatus, MZError>

Converts to this type from the input type.
","From<&StreamResult>","alloy_signer::error::Result"],["
source§

impl From<StreamResult> for Result<MZStatus, MZError>

source§

fn from(res: StreamResult) -> Result<MZStatus, MZError>

Converts to this type from the input type.
","From","alloy_signer::error::Result"],["
source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_signer::error::Result"],["
source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_signer::error::Result"],["
§

impl<'a, A, B> Arbitrary<'a> for Result<A, B>
where\n A: Arbitrary<'a>,\n B: Arbitrary<'a>,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Result<A, B>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type\nneeds to construct itself. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given\nunstructured data. Read more
","Arbitrary<'a>","alloy_signer::error::Result"],["
§

impl<A, B> Arbitrary for Result<A, B>
where\n A: Arbitrary,\n B: Arbitrary,

§

type Parameters = (Probability, <A as Arbitrary>::Parameters, <B as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = MaybeOk<<A as Arbitrary>::Strategy, <B as Arbitrary>::Strategy>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<A, B> as Arbitrary>::Parameters\n) -> <Result<A, B> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_signer::error::Result"],["
§

impl<A> Arbitrary for Result<A, Infallible>
where\n A: Arbitrary,

§

type Parameters = <A as Arbitrary>::Parameters

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = Map<<A as Arbitrary>::Strategy, fn(_: A) -> Result<A, Infallible>>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<A, Infallible> as Arbitrary>::Parameters\n) -> <Result<A, Infallible> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_signer::error::Result"],["
§

impl<A> Arbitrary for Result<Infallible, A>
where\n A: Arbitrary,

§

type Parameters = <A as Arbitrary>::Parameters

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = Map<<A as Arbitrary>::Strategy, fn(_: A) -> Result<Infallible, A>>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<Infallible, A> as Arbitrary>::Parameters\n) -> <Result<Infallible, A> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_signer::error::Result"],["
§

impl<A, E> ArbitraryF1<A> for Result<A, E>
where\n A: Debug,\n E: Arbitrary,\n <E as Arbitrary>::Strategy: 'static,

§

type Parameters = (Probability, <E as Arbitrary>::Parameters)

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<AS>(\n base: AS,\n args: <Result<A, E> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<Result<A, E>>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_signer::error::Result"],["
§

impl<A> ArbitraryF1<A> for Result<A, Infallible>
where\n A: Debug + 'static,

§

type Parameters = ()

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<S>(\n base: S,\n _args: <Result<A, Infallible> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<Result<A, Infallible>>
where\n S: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_signer::error::Result"],["
§

impl<A, B> ArbitraryF2<A, B> for Result<A, B>
where\n A: Debug,\n B: Debug,

§

type Parameters = Probability

The type of parameters that lift2_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift2_with<AS, BS>(\n fst: AS,\n snd: BS,\n args: <Result<A, B> as ArbitraryF2<A, B>>::Parameters\n) -> BoxedStrategy<Result<A, B>>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>.\nThe composite strategy is passed the arguments given in args. Read more
§

fn lift2<AS, BS>(fst: AS, snd: BS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>. Read more
","ArbitraryF2","alloy_signer::error::Result"],["
§

impl<T, E> ResultExt<T, E> for Result<T, E>

§

fn context<X>(self, x: X) -> Result<T, Context<X, E>>

The method is use to add context information to current operation Read more
","ResultExt","alloy_signer::error::Result"],["
§

impl Sub<Length> for Result<Length, Error>

§

type Output = Result<Length, Error>

The resulting type after applying the - operator.
§

fn sub(self, other: Length) -> Result<Length, Error>

Performs the - operation. Read more
","Sub","alloy_signer::error::Result"],["
§

impl Add<Length> for Result<Length, Error>

§

type Output = Result<Length, Error>

The resulting type after applying the + operator.
§

fn add(self, other: Length) -> Result<Length, Error>

Performs the + operation. Read more
","Add","alloy_signer::error::Result"],["
§

impl<T, E> TapFallible for Result<T, E>

§

type Ok = T

The interior type used to indicate a successful construction.
§

type Err = E

The interior type used to indicate a failed construction.
§

fn tap_ok(self, func: impl FnOnce(&T)) -> Result<T, E>

Immutably accesses an interior success value. Read more
§

fn tap_ok_mut(self, func: impl FnOnce(&mut T)) -> Result<T, E>

Mutably accesses an interior success value. Read more
§

fn tap_err(self, func: impl FnOnce(&E)) -> Result<T, E>

Immutably accesses an interior failure value. Read more
§

fn tap_err_mut(self, func: impl FnOnce(&mut E)) -> Result<T, E>

Mutably accesses an interior failure value. Read more
§

fn tap_ok_dbg(self, func: impl FnOnce(&Self::Ok)) -> Self

Calls .tap_ok() only in debug builds, and is erased in release builds.
§

fn tap_ok_mut_dbg(self, func: impl FnOnce(&mut Self::Ok)) -> Self

Calls .tap_ok_mut() only in debug builds, and is erased in release\nbuilds.
§

fn tap_err_dbg(self, func: impl FnOnce(&Self::Err)) -> Self

Calls .tap_err() only in debug builds, and is erased in release\nbuilds.
§

fn tap_err_mut_dbg(self, func: impl FnOnce(&mut Self::Err)) -> Self

Calls .tap_err_mut() only in debug builds, and is erased in release\nbuilds.
","TapFallible","alloy_signer::error::Result"]], +"alloy_transport":[["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls the provided closure with a reference to the contained value (if Ok).

\n
Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls the provided closure with a reference to the contained error (if Err).

\n
Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
Safety
\n

Calling this method on an Err is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
Safety
\n

Calling this method on an Ok is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"alloy_transport::RpcResult"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_transport::RpcResult"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_transport::RpcResult"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"alloy_transport::RpcResult"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"alloy_transport::RpcResult"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","alloy_transport::RpcResult"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_transport::RpcResult"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_transport::RpcResult"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","alloy_transport::RpcResult"],["
source§

impl<T, E> Try for Result<T, E>

§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> StructuralEq for Result<T, E>

","StructuralEq","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","alloy_transport::RpcResult"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","alloy_transport::RpcResult"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","alloy_transport::RpcResult"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","alloy_transport::RpcResult"],["
source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_transport::RpcResult"],["
source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_transport::RpcResult"],["
§

impl<'a, A, B> Arbitrary<'a> for Result<A, B>
where\n A: Arbitrary<'a>,\n B: Arbitrary<'a>,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Result<A, B>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type\nneeds to construct itself. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given\nunstructured data. Read more
","Arbitrary<'a>","alloy_transport::RpcResult"],["
§

impl<A, B> Arbitrary for Result<A, B>
where\n A: Arbitrary,\n B: Arbitrary,

§

type Parameters = (Probability, <A as Arbitrary>::Parameters, <B as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = MaybeOk<<A as Arbitrary>::Strategy, <B as Arbitrary>::Strategy>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<A, B> as Arbitrary>::Parameters\n) -> <Result<A, B> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_transport::RpcResult"],["
§

impl<A> Arbitrary for Result<Infallible, A>
where\n A: Arbitrary,

§

type Parameters = <A as Arbitrary>::Parameters

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = Map<<A as Arbitrary>::Strategy, fn(_: A) -> Result<Infallible, A>>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<Infallible, A> as Arbitrary>::Parameters\n) -> <Result<Infallible, A> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_transport::RpcResult"],["
§

impl<A, E> ArbitraryF1<A> for Result<A, E>
where\n A: Debug,\n E: Arbitrary,\n <E as Arbitrary>::Strategy: 'static,

§

type Parameters = (Probability, <E as Arbitrary>::Parameters)

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<AS>(\n base: AS,\n args: <Result<A, E> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<Result<A, E>>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_transport::RpcResult"],["
§

impl<A, B> ArbitraryF2<A, B> for Result<A, B>
where\n A: Debug,\n B: Debug,

§

type Parameters = Probability

The type of parameters that lift2_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift2_with<AS, BS>(\n fst: AS,\n snd: BS,\n args: <Result<A, B> as ArbitraryF2<A, B>>::Parameters\n) -> BoxedStrategy<Result<A, B>>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>.\nThe composite strategy is passed the arguments given in args. Read more
§

fn lift2<AS, BS>(fst: AS, snd: BS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>. Read more
","ArbitraryF2","alloy_transport::RpcResult"],["
§

impl<T, E> ResultExt<T, E> for Result<T, E>

§

fn context<X>(self, x: X) -> Result<T, Context<X, E>>

The method is use to add context information to current operation Read more
","ResultExt","alloy_transport::RpcResult"]], +"alloy_transport_ipc":[["
source§

impl<T, E> Result<T, E>

1.0.0 (const: 1.48.0) · source

pub const fn is_ok(&self) -> bool

Returns true if the result is Ok.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_ok(), true);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_ok(), false);
\n
1.70.0 · source

pub fn is_ok_and(self, f: impl FnOnce(T) -> bool) -> bool

Returns true if the result is Ok and the value inside of it matches a predicate.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.is_ok_and(|x| x > 1), true);\n\nlet x: Result<u32, &str> = Ok(0);\nassert_eq!(x.is_ok_and(|x| x > 1), false);\n\nlet x: Result<u32, &str> = Err(\"hey\");\nassert_eq!(x.is_ok_and(|x| x > 1), false);
\n
1.0.0 (const: 1.48.0) · source

pub const fn is_err(&self) -> bool

Returns true if the result is Err.

\n
Examples
\n
let x: Result<i32, &str> = Ok(-3);\nassert_eq!(x.is_err(), false);\n\nlet x: Result<i32, &str> = Err(\"Some error message\");\nassert_eq!(x.is_err(), true);
\n
1.70.0 · source

pub fn is_err_and(self, f: impl FnOnce(E) -> bool) -> bool

Returns true if the result is Err and the value inside of it matches a predicate.

\n
Examples
\n
use std::io::{Error, ErrorKind};\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::NotFound, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), true);\n\nlet x: Result<u32, Error> = Err(Error::new(ErrorKind::PermissionDenied, \"!\"));\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);\n\nlet x: Result<u32, Error> = Ok(123);\nassert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
\n
1.0.0 · source

pub fn ok(self) -> Option<T>

Converts from Result<T, E> to Option<T>.

\n

Converts self into an Option<T>, consuming self,\nand discarding the error, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.ok(), Some(2));\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.ok(), None);
\n
1.0.0 · source

pub fn err(self) -> Option<E>

Converts from Result<T, E> to Option<E>.

\n

Converts self into an Option<E>, consuming self,\nand discarding the success value, if any.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.err(), None);\n\nlet x: Result<u32, &str> = Err(\"Nothing here\");\nassert_eq!(x.err(), Some(\"Nothing here\"));
\n
1.0.0 (const: 1.48.0) · source

pub const fn as_ref(&self) -> Result<&T, &E>

Converts from &Result<T, E> to Result<&T, &E>.

\n

Produces a new Result, containing a reference\ninto the original, leaving the original in place.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.as_ref(), Ok(&2));\n\nlet x: Result<u32, &str> = Err(\"Error\");\nassert_eq!(x.as_ref(), Err(&\"Error\"));
\n
1.0.0 (const: unstable) · source

pub fn as_mut(&mut self) -> Result<&mut T, &mut E>

Converts from &mut Result<T, E> to Result<&mut T, &mut E>.

\n
Examples
\n
fn mutate(r: &mut Result<i32, i32>) {\n    match r.as_mut() {\n        Ok(v) => *v = 42,\n        Err(e) => *e = 0,\n    }\n}\n\nlet mut x: Result<i32, i32> = Ok(2);\nmutate(&mut x);\nassert_eq!(x.unwrap(), 42);\n\nlet mut x: Result<i32, i32> = Err(13);\nmutate(&mut x);\nassert_eq!(x.unwrap_err(), 0);
\n
1.0.0 · source

pub fn map<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> U,

Maps a Result<T, E> to Result<U, E> by applying a function to a\ncontained Ok value, leaving an Err value untouched.

\n

This function can be used to compose the results of two functions.

\n
Examples
\n

Print the numbers on each line of a string multiplied by two.

\n\n
let line = \"1\\n2\\n3\\n4\\n\";\n\nfor num in line.lines() {\n    match num.parse::<i32>().map(|i| i * 2) {\n        Ok(n) => println!(\"{n}\"),\n        Err(..) => {}\n    }\n}
\n
1.41.0 · source

pub fn map_or<U, F>(self, default: U, f: F) -> U
where\n F: FnOnce(T) -> U,

Returns the provided default (if Err), or\napplies a function to the contained value (if Ok).

\n

Arguments passed to map_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use map_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let x: Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or(42, |v| v.len()), 3);\n\nlet x: Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or(42, |v| v.len()), 42);
\n
1.41.0 · source

pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
where\n D: FnOnce(E) -> U,\n F: FnOnce(T) -> U,

Maps a Result<T, E> to U by applying fallback function default to\na contained Err value, or function f to a contained Ok value.

\n

This function can be used to unpack a successful result\nwhile handling an error.

\n
Examples
\n
let k = 21;\n\nlet x : Result<_, &str> = Ok(\"foo\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 3);\n\nlet x : Result<&str, _> = Err(\"bar\");\nassert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
\n
1.0.0 · source

pub fn map_err<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> F,

Maps a Result<T, E> to Result<T, F> by applying a function to a\ncontained Err value, leaving an Ok value untouched.

\n

This function can be used to pass through a successful result while handling\nan error.

\n
Examples
\n
fn stringify(x: u32) -> String { format!(\"error code: {x}\") }\n\nlet x: Result<u32, u32> = Ok(2);\nassert_eq!(x.map_err(stringify), Ok(2));\n\nlet x: Result<u32, u32> = Err(13);\nassert_eq!(x.map_err(stringify), Err(\"error code: 13\".to_string()));
\n
1.76.0 · source

pub fn inspect<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&T),

Calls the provided closure with a reference to the contained value (if Ok).

\n
Examples
\n
let x: u8 = \"4\"\n    .parse::<u8>()\n    .inspect(|x| println!(\"original: {x}\"))\n    .map(|x| x.pow(3))\n    .expect(\"failed to parse number\");
\n
1.76.0 · source

pub fn inspect_err<F>(self, f: F) -> Result<T, E>
where\n F: FnOnce(&E),

Calls the provided closure with a reference to the contained error (if Err).

\n
Examples
\n
use std::{fs, io};\n\nfn read() -> io::Result<String> {\n    fs::read_to_string(\"address.txt\")\n        .inspect_err(|e| eprintln!(\"failed to read file: {e}\"))\n}
\n
1.47.0 · source

pub fn as_deref(&self) -> Result<&<T as Deref>::Target, &E>
where\n T: Deref,

Converts from Result<T, E> (or &Result<T, E>) to Result<&<T as Deref>::Target, &E>.

\n

Coerces the Ok variant of the original Result via Deref\nand returns the new Result.

\n
Examples
\n
let x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&str, &u32> = Ok(\"hello\");\nassert_eq!(x.as_deref(), y);\n\nlet x: Result<String, u32> = Err(42);\nlet y: Result<&str, &u32> = Err(&42);\nassert_eq!(x.as_deref(), y);
\n
1.47.0 · source

pub fn as_deref_mut(&mut self) -> Result<&mut <T as Deref>::Target, &mut E>
where\n T: DerefMut,

Converts from Result<T, E> (or &mut Result<T, E>) to Result<&mut <T as DerefMut>::Target, &mut E>.

\n

Coerces the Ok variant of the original Result via DerefMut\nand returns the new Result.

\n
Examples
\n
let mut s = \"HELLO\".to_string();\nlet mut x: Result<String, u32> = Ok(\"hello\".to_string());\nlet y: Result<&mut str, &mut u32> = Ok(&mut s);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);\n\nlet mut i = 42;\nlet mut x: Result<String, u32> = Err(42);\nlet y: Result<&mut str, &mut u32> = Err(&mut i);\nassert_eq!(x.as_deref_mut().map(|x| { x.make_ascii_uppercase(); x }), y);
\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(7);\nassert_eq!(x.iter().next(), Some(&7));\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter().next(), None);
\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns a mutable iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let mut x: Result<u32, &str> = Ok(7);\nmatch x.iter_mut().next() {\n    Some(v) => *v = 40,\n    None => {},\n}\nassert_eq!(x, Ok(40));\n\nlet mut x: Result<u32, &str> = Err(\"nothing!\");\nassert_eq!(x.iter_mut().next(), None);
\n
1.4.0 · source

pub fn expect(self, msg: &str) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message including the\npassed message, and the content of the Err.

\n
Examples
\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.expect(\"Testing expect\"); // panics with `Testing expect: emergency failure`
\n
Recommended Message Style
\n

We recommend that expect messages are used to describe the reason you\nexpect the Result should be Ok.

\n\n
let path = std::env::var(\"IMPORTANT_PATH\")\n    .expect(\"env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`\");
\n

Hint: If you’re having trouble remembering how to phrase expect\nerror messages remember to focus on the word “should” as in “env\nvariable should be set by blah” or “the given binary should be available\nand executable by the current user”.

\n

For more detail on expect message styles and the reasoning behind our recommendation please\nrefer to the section on “Common Message\nStyles” in the\nstd::error module docs.

\n
1.0.0 · source

pub fn unwrap(self) -> T
where\n E: Debug,

Returns the contained Ok value, consuming the self value.

\n

Because this function may panic, its use is generally discouraged.\nInstead, prefer to use pattern matching and handle the Err\ncase explicitly, or call unwrap_or, unwrap_or_else, or\nunwrap_or_default.

\n
Panics
\n

Panics if the value is an Err, with a panic message provided by the\nErr’s value.

\n
Examples
\n

Basic usage:

\n\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(x.unwrap(), 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nx.unwrap(); // panics with `emergency failure`
\n
1.16.0 · source

pub fn unwrap_or_default(self) -> T
where\n T: Default,

Returns the contained Ok value or a default

\n

Consumes the self argument then, if Ok, returns the contained\nvalue, otherwise if Err, returns the default value for that\ntype.

\n
Examples
\n

Converts a string to an integer, turning poorly-formed strings\ninto 0 (the default value for integers). parse converts\na string to any other type that implements FromStr, returning an\nErr on error.

\n\n
let good_year_from_input = \"1909\";\nlet bad_year_from_input = \"190blarg\";\nlet good_year = good_year_from_input.parse().unwrap_or_default();\nlet bad_year = bad_year_from_input.parse().unwrap_or_default();\n\nassert_eq!(1909, good_year);\nassert_eq!(0, bad_year);
\n
1.17.0 · source

pub fn expect_err(self, msg: &str) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a panic message including the\npassed message, and the content of the Ok.

\n
Examples
\n
let x: Result<u32, &str> = Ok(10);\nx.expect_err(\"Testing expect_err\"); // panics with `Testing expect_err: 10`
\n
1.0.0 · source

pub fn unwrap_err(self) -> E
where\n T: Debug,

Returns the contained Err value, consuming the self value.

\n
Panics
\n

Panics if the value is an Ok, with a custom panic message provided\nby the Ok’s value.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nx.unwrap_err(); // panics with `2`
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(x.unwrap_err(), \"emergency failure\");
\n
source

pub fn into_ok(self) -> T
where\n E: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Ok value, but never panics.

\n

Unlike unwrap, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap as a maintainability safeguard that will fail\nto compile if the error type of the Result is later changed\nto an error that can actually occur.

\n
Examples
\n
\nfn only_good_news() -> Result<String, !> {\n    Ok(\"this is fine\".into())\n}\n\nlet s: String = only_good_news().into_ok();\nprintln!(\"{s}\");
\n
source

pub fn into_err(self) -> E
where\n T: Into<!>,

🔬This is a nightly-only experimental API. (unwrap_infallible)

Returns the contained Err value, but never panics.

\n

Unlike unwrap_err, this method is known to never panic on the\nresult types it is implemented for. Therefore, it can be used\ninstead of unwrap_err as a maintainability safeguard that will fail\nto compile if the ok type of the Result is later changed\nto a type that can actually occur.

\n
Examples
\n
\nfn only_bad_news() -> Result<!, String> {\n    Err(\"Oops, it failed\".into())\n}\n\nlet error: String = only_bad_news().into_err();\nprintln!(\"{error}\");
\n
1.0.0 · source

pub fn and<U>(self, res: Result<U, E>) -> Result<U, E>

Returns res if the result is Ok, otherwise returns the Err value of self.

\n

Arguments passed to and are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use and_then, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<&str, &str> = Ok(\"foo\");\nassert_eq!(x.and(y), Err(\"early error\"));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<&str, &str> = Err(\"late error\");\nassert_eq!(x.and(y), Err(\"not a 2\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<&str, &str> = Ok(\"different result type\");\nassert_eq!(x.and(y), Ok(\"different result type\"));
\n
1.0.0 · source

pub fn and_then<U, F>(self, op: F) -> Result<U, E>
where\n F: FnOnce(T) -> Result<U, E>,

Calls op if the result is Ok, otherwise returns the Err value of self.

\n

This function can be used for control flow based on Result values.

\n
Examples
\n
fn sq_then_to_string(x: u32) -> Result<String, &'static str> {\n    x.checked_mul(x).map(|sq| sq.to_string()).ok_or(\"overflowed\")\n}\n\nassert_eq!(Ok(2).and_then(sq_then_to_string), Ok(4.to_string()));\nassert_eq!(Ok(1_000_000).and_then(sq_then_to_string), Err(\"overflowed\"));\nassert_eq!(Err(\"not a number\").and_then(sq_then_to_string), Err(\"not a number\"));
\n

Often used to chain fallible operations that may return Err.

\n\n
use std::{io::ErrorKind, path::Path};\n\n// Note: on Windows \"/\" maps to \"C:\\\"\nlet root_modified_time = Path::new(\"/\").metadata().and_then(|md| md.modified());\nassert!(root_modified_time.is_ok());\n\nlet should_fail = Path::new(\"/bad/path\").metadata().and_then(|md| md.modified());\nassert!(should_fail.is_err());\nassert_eq!(should_fail.unwrap_err().kind(), ErrorKind::NotFound);
\n
1.0.0 · source

pub fn or<F>(self, res: Result<T, F>) -> Result<T, F>

Returns res if the result is Err, otherwise returns the Ok value of self.

\n

Arguments passed to or are eagerly evaluated; if you are passing the\nresult of a function call, it is recommended to use or_else, which is\nlazily evaluated.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"early error\");\nlet y: Result<u32, &str> = Ok(2);\nassert_eq!(x.or(y), Ok(2));\n\nlet x: Result<u32, &str> = Err(\"not a 2\");\nlet y: Result<u32, &str> = Err(\"late error\");\nassert_eq!(x.or(y), Err(\"late error\"));\n\nlet x: Result<u32, &str> = Ok(2);\nlet y: Result<u32, &str> = Ok(100);\nassert_eq!(x.or(y), Ok(2));
\n
1.0.0 · source

pub fn or_else<F, O>(self, op: O) -> Result<T, F>
where\n O: FnOnce(E) -> Result<T, F>,

Calls op if the result is Err, otherwise returns the Ok value of self.

\n

This function can be used for control flow based on result values.

\n
Examples
\n
fn sq(x: u32) -> Result<u32, u32> { Ok(x * x) }\nfn err(x: u32) -> Result<u32, u32> { Err(x) }\n\nassert_eq!(Ok(2).or_else(sq).or_else(sq), Ok(2));\nassert_eq!(Ok(2).or_else(err).or_else(sq), Ok(2));\nassert_eq!(Err(3).or_else(sq).or_else(err), Ok(9));\nassert_eq!(Err(3).or_else(err).or_else(err), Err(3));
\n
1.0.0 · source

pub fn unwrap_or(self, default: T) -> T

Returns the contained Ok value or a provided default.

\n

Arguments passed to unwrap_or are eagerly evaluated; if you are passing\nthe result of a function call, it is recommended to use unwrap_or_else,\nwhich is lazily evaluated.

\n
Examples
\n
let default = 2;\nlet x: Result<u32, &str> = Ok(9);\nassert_eq!(x.unwrap_or(default), 9);\n\nlet x: Result<u32, &str> = Err(\"error\");\nassert_eq!(x.unwrap_or(default), default);
\n
1.0.0 · source

pub fn unwrap_or_else<F>(self, op: F) -> T
where\n F: FnOnce(E) -> T,

Returns the contained Ok value or computes it from a closure.

\n
Examples
\n
fn count(x: &str) -> usize { x.len() }\n\nassert_eq!(Ok(2).unwrap_or_else(count), 2);\nassert_eq!(Err(\"foo\").unwrap_or_else(count), 3);
\n
1.58.0 · source

pub unsafe fn unwrap_unchecked(self) -> T

Returns the contained Ok value, consuming the self value,\nwithout checking that the value is not an Err.

\n
Safety
\n

Calling this method on an Err is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nassert_eq!(unsafe { x.unwrap_unchecked() }, 2);
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nunsafe { x.unwrap_unchecked(); } // Undefined behavior!
\n
1.58.0 · source

pub unsafe fn unwrap_err_unchecked(self) -> E

Returns the contained Err value, consuming the self value,\nwithout checking that the value is not an Ok.

\n
Safety
\n

Calling this method on an Ok is undefined behavior.

\n
Examples
\n
let x: Result<u32, &str> = Ok(2);\nunsafe { x.unwrap_err_unchecked() }; // Undefined behavior!
\n\n
let x: Result<u32, &str> = Err(\"emergency failure\");\nassert_eq!(unsafe { x.unwrap_err_unchecked() }, \"emergency failure\");
\n
",0,"alloy_transport_ipc::Result"],["
source§

impl<T, E> Result<&T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let val = 12;\nlet x: Result<&i32, i32> = Ok(&val);\nassert_eq!(x, Ok(&12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_transport_ipc::Result"],["
source§

impl<T, E> Result<&mut T, E>

1.59.0 · source

pub fn copied(self) -> Result<T, E>
where\n T: Copy,

Maps a Result<&mut T, E> to a Result<T, E> by copying the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet copied = x.copied();\nassert_eq!(copied, Ok(12));
\n
1.59.0 · source

pub fn cloned(self) -> Result<T, E>
where\n T: Clone,

Maps a Result<&mut T, E> to a Result<T, E> by cloning the contents of the\nOk part.

\n
Examples
\n
let mut val = 12;\nlet x: Result<&mut i32, i32> = Ok(&mut val);\nassert_eq!(x, Ok(&mut 12));\nlet cloned = x.cloned();\nassert_eq!(cloned, Ok(12));
\n
",0,"alloy_transport_ipc::Result"],["
source§

impl<T, E> Result<Option<T>, E>

1.33.0 (const: unstable) · source

pub fn transpose(self) -> Option<Result<T, E>>

Transposes a Result of an Option into an Option of a Result.

\n

Ok(None) will be mapped to None.\nOk(Some(_)) and Err(_) will be mapped to Some(Ok(_)) and Some(Err(_)).

\n
Examples
\n
#[derive(Debug, Eq, PartialEq)]\nstruct SomeErr;\n\nlet x: Result<Option<i32>, SomeErr> = Ok(Some(5));\nlet y: Option<Result<i32, SomeErr>> = Some(Ok(5));\nassert_eq!(x.transpose(), y);
\n
",0,"alloy_transport_ipc::Result"],["
source§

impl<T, E> Result<Result<T, E>, E>

source

pub fn flatten(self) -> Result<T, E>

🔬This is a nightly-only experimental API. (result_flattening)

Converts from Result<Result<T, E>, E> to Result<T, E>

\n
Examples
\n
#![feature(result_flattening)]\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Ok(\"hello\"));\nassert_eq!(Ok(\"hello\"), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Ok(Err(6));\nassert_eq!(Err(6), x.flatten());\n\nlet x: Result<Result<&'static str, u32>, u32> = Err(6);\nassert_eq!(Err(6), x.flatten());
\n

Flattening only removes one level of nesting at a time:

\n\n
#![feature(result_flattening)]\nlet x: Result<Result<Result<&'static str, u32>, u32>, u32> = Ok(Ok(Ok(\"hello\")));\nassert_eq!(Ok(Ok(\"hello\")), x.flatten());\nassert_eq!(Ok(\"hello\"), x.flatten().flatten());
\n
",0,"alloy_transport_ipc::Result"],["
1.61.0 · source§

impl<T, E> Termination for Result<T, E>
where\n T: Termination,\n E: Debug,

source§

fn report(self) -> ExitCode

Is called to get the representation of the value as status code.\nThis status code is returned to the operating system.
","Termination","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> Debug for Result<T, E>
where\n T: Debug,\n E: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> Copy for Result<T, E>
where\n T: Copy,\n E: Copy,

","Copy","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> PartialOrd for Result<T, E>
where\n T: PartialOrd,\n E: PartialOrd,

source§

fn partial_cmp(&self, other: &Result<T, E>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","alloy_transport_ipc::Result"],["
source§

impl<T, E, F> FromResidual<Yeet<E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(_: Yeet<E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_transport_ipc::Result"],["
source§

impl<T, E, F> FromResidual<Result<Infallible, E>> for Result<T, F>
where\n F: From<E>,

source§

fn from_residual(residual: Result<Infallible, E>) -> Result<T, F>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from a compatible Residual type. Read more
","FromResidual>","alloy_transport_ipc::Result"],["
1.16.0 · source§

impl<T, U, E> Product<Result<U, E>> for Result<T, E>
where\n T: Product<U>,

source§

fn product<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the product of all elements is returned.

\n
Examples
\n

This multiplies each number in a vector of strings,\nif a string could not be parsed the operation returns Err:

\n\n
let nums = vec![\"5\", \"10\", \"1\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert_eq!(total, Ok(100));\nlet nums = vec![\"5\", \"10\", \"one\", \"2\"];\nlet total: Result<usize, _> = nums.iter().map(|w| w.parse::<usize>()).product();\nassert!(total.is_err());
\n
","Product>","alloy_transport_ipc::Result"],["
source§

impl<T, E> Try for Result<T, E>

§

type Output = T

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
§

type Residual = Result<Infallible, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual\nas part of ? when short-circuiting. Read more
source§

fn from_output(output: <Result<T, E> as Try>::Output) -> Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
source§

fn branch(\n self\n) -> ControlFlow<<Result<T, E> as Try>::Residual, <Result<T, E> as Try>::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value\n(because this returned ControlFlow::Continue)\nor propagate a value back to the caller\n(because this returned ControlFlow::Break). Read more
","Try","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> Clone for Result<T, E>
where\n T: Clone,\n E: Clone,

source§

fn clone(&self) -> Result<T, E>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Result<T, E>)

Performs copy-assignment from source. Read more
","Clone","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<A, E, V> FromIterator<Result<A, E>> for Result<V, E>
where\n V: FromIterator<A>,

source§

fn from_iter<I>(iter: I) -> Result<V, E>
where\n I: IntoIterator<Item = Result<A, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err occur, a\ncontainer with the values of each Result is returned.

\n

Here is an example which increments every integer in a vector,\nchecking for overflow:

\n\n
let v = vec![1, 2];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_add(1).ok_or(\"Overflow!\")\n).collect();\nassert_eq!(res, Ok(vec![2, 3]));
\n

Here is another example that tries to subtract one from another list\nof integers, this time checking for underflow:

\n\n
let v = vec![1, 2, 0];\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32|\n    x.checked_sub(1).ok_or(\"Underflow!\")\n).collect();\nassert_eq!(res, Err(\"Underflow!\"));
\n

Here is a variation on the previous example, showing that no\nfurther elements are taken from iter after the first Err.

\n\n
let v = vec![3, 2, 1, 10];\nlet mut shared = 0;\nlet res: Result<Vec<u32>, &'static str> = v.iter().map(|x: &u32| {\n    shared += x;\n    x.checked_sub(2).ok_or(\"Underflow!\")\n}).collect();\nassert_eq!(res, Err(\"Underflow!\"));\nassert_eq!(shared, 6);
\n

Since the third element caused an underflow, no further elements were taken,\nso the final value of shared is 6 (= 3 + 2 + 1), not 16.

\n
","FromIterator>","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> StructuralEq for Result<T, E>

","StructuralEq","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> Eq for Result<T, E>
where\n T: Eq,\n E: Eq,

","Eq","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> Hash for Result<T, E>
where\n T: Hash,\n E: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where\n __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where\n H: Hasher,\n Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
","Hash","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> Ord for Result<T, E>
where\n T: Ord,\n E: Ord,

source§

fn cmp(&self, other: &Result<T, E>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where\n Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where\n Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
","Ord","alloy_transport_ipc::Result"],["
source§

impl<T, E> Residual<T> for Result<Infallible, E>

§

type TryType = Result<T, E>

🔬This is a nightly-only experimental API. (try_trait_v2_residual)
The “return” type of this meta-function.
","Residual","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> PartialEq for Result<T, E>
where\n T: PartialEq,\n E: PartialEq,

source§

fn eq(&self, other: &Result<T, E>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> IntoIterator for Result<T, E>

source§

fn into_iter(self) -> IntoIter<T>

Returns a consuming iterator over the possibly contained value.

\n

The iterator yields one value if the result is Result::Ok, otherwise none.

\n
Examples
\n
let x: Result<u32, &str> = Ok(5);\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, [5]);\n\nlet x: Result<u32, &str> = Err(\"nothing!\");\nlet v: Vec<u32> = x.into_iter().collect();\nassert_eq!(v, []);
\n
§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?
","IntoIterator","alloy_transport_ipc::Result"],["
1.0.0 · source§

impl<T, E> StructuralPartialEq for Result<T, E>

","StructuralPartialEq","alloy_transport_ipc::Result"],["
1.16.0 · source§

impl<T, U, E> Sum<Result<U, E>> for Result<T, E>
where\n T: Sum<U>,

source§

fn sum<I>(iter: I) -> Result<T, E>
where\n I: Iterator<Item = Result<U, E>>,

Takes each element in the Iterator: if it is an Err, no further\nelements are taken, and the Err is returned. Should no Err\noccur, the sum of all elements is returned.

\n
Examples
\n

This sums up every integer in a vector, rejecting the sum if a negative\nelement is encountered:

\n\n
let f = |&x: &i32| if x < 0 { Err(\"Negative element found\") } else { Ok(x) };\nlet v = vec![1, 2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Ok(3));\nlet v = vec![1, -2];\nlet res: Result<i32, _> = v.iter().map(f).sum();\nassert_eq!(res, Err(\"Negative element found\"));
\n
","Sum>","alloy_transport_ipc::Result"],["
source§

impl<'de, T, E> Deserialize<'de> for Result<T, E>
where\n T: Deserialize<'de>,\n E: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<Result<T, E>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_transport_ipc::Result"],["
source§

impl<T, E> Serialize for Result<T, E>
where\n T: Serialize,\n E: Serialize,

source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_transport_ipc::Result"],["
§

impl<'a, A, B> Arbitrary<'a> for Result<A, B>
where\n A: Arbitrary<'a>,\n B: Arbitrary<'a>,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Result<A, B>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type\nneeds to construct itself. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given\nunstructured data. Read more
","Arbitrary<'a>","alloy_transport_ipc::Result"],["
§

impl<A, B> Arbitrary for Result<A, B>
where\n A: Arbitrary,\n B: Arbitrary,

§

type Parameters = (Probability, <A as Arbitrary>::Parameters, <B as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = MaybeOk<<A as Arbitrary>::Strategy, <B as Arbitrary>::Strategy>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<A, B> as Arbitrary>::Parameters\n) -> <Result<A, B> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_transport_ipc::Result"],["
§

impl<A> Arbitrary for Result<Infallible, A>
where\n A: Arbitrary,

§

type Parameters = <A as Arbitrary>::Parameters

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = Map<<A as Arbitrary>::Strategy, fn(_: A) -> Result<Infallible, A>>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <Result<Infallible, A> as Arbitrary>::Parameters\n) -> <Result<Infallible, A> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_transport_ipc::Result"],["
§

impl<A, E> ArbitraryF1<A> for Result<A, E>
where\n A: Debug,\n E: Arbitrary,\n <E as Arbitrary>::Strategy: 'static,

§

type Parameters = (Probability, <E as Arbitrary>::Parameters)

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<AS>(\n base: AS,\n args: <Result<A, E> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<Result<A, E>>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_transport_ipc::Result"],["
§

impl<A, B> ArbitraryF2<A, B> for Result<A, B>
where\n A: Debug,\n B: Debug,

§

type Parameters = Probability

The type of parameters that lift2_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift2_with<AS, BS>(\n fst: AS,\n snd: BS,\n args: <Result<A, B> as ArbitraryF2<A, B>>::Parameters\n) -> BoxedStrategy<Result<A, B>>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>.\nThe composite strategy is passed the arguments given in args. Read more
§

fn lift2<AS, BS>(fst: AS, snd: BS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>. Read more
","ArbitraryF2","alloy_transport_ipc::Result"],["
§

impl<T, E> ResultExt<T, E> for Result<T, E>

§

fn context<X>(self, x: X) -> Result<T, Context<X, E>>

The method is use to add context information to current operation Read more
","ResultExt","alloy_transport_ipc::Result"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/futures_channel/oneshot/struct.Sender.js b/type.impl/futures_channel/oneshot/struct.Sender.js new file mode 100644 index 000000000000..701ec2fc924b --- /dev/null +++ b/type.impl/futures_channel/oneshot/struct.Sender.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_rpc_client":[["
§

impl<T> Sender<T>

pub fn send(self, t: T) -> Result<(), T>

Completes this oneshot with a successful result.

\n

This function will consume self and indicate to the other end, the\n[Receiver], that the value provided is the result of the computation\nthis represents.

\n

If the value is successfully enqueued for the remote end to receive,\nthen Ok(()) is returned. If the receiving end was dropped before\nthis function was called, however, then Err(t) is returned.

\n

pub fn poll_canceled(&mut self, cx: &mut Context<'_>) -> Poll<()>

Polls this Sender half to detect whether its associated\n[Receiver] has been dropped.

\n
Return values
\n

If Ready(()) is returned then the associated Receiver has been\ndropped, which means any work required for sending should be canceled.

\n

If Pending is returned then the associated Receiver is still\nalive and may be able to receive a message if sent. The current task,\nhowever, is scheduled to receive a notification if the corresponding\nReceiver goes away.

\n

pub fn cancellation(&mut self) -> Cancellation<'_, T>

Creates a future that resolves when this Sender’s corresponding\n[Receiver] half has hung up.

\n

This is a utility wrapping poll_canceled\nto expose a Future.

\n

pub fn is_canceled(&self) -> bool

Tests to see whether this Sender’s corresponding Receiver\nhas been dropped.

\n

Unlike poll_canceled, this function does not\nenqueue a task for wakeup upon cancellation, but merely reports the\ncurrent state, which may be subject to concurrent modification.

\n

pub fn is_connected_to(&self, receiver: &Receiver<T>) -> bool

Tests to see whether this Sender is connected to the given Receiver. That is, whether\nthey were created by the same call to channel.

\n
",0,"alloy_rpc_client::batch::Channel"],["
§

impl<T> Debug for Sender<T>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_client::batch::Channel"],["
§

impl<T> Unpin for Sender<T>

","Unpin","alloy_rpc_client::batch::Channel"],["
§

impl<T> Drop for Sender<T>

§

fn drop(&mut self)

Executes the destructor for this type. Read more
","Drop","alloy_rpc_client::batch::Channel"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/std/collections/hash/map/struct.HashMap.js b/type.impl/std/collections/hash/map/struct.HashMap.js new file mode 100644 index 000000000000..097a8b66518f --- /dev/null +++ b/type.impl/std/collections/hash/map/struct.HashMap.js @@ -0,0 +1,4 @@ +(function() {var type_impls = { +"alloy_rpc_client":[["
source§

impl<K, V> HashMap<K, V>

1.0.0 · source

pub fn new() -> HashMap<K, V>

Creates an empty HashMap.

\n

The hash map is initially created with a capacity of 0, so it will not allocate until it\nis first inserted into.

\n
Examples
\n
use std::collections::HashMap;\nlet mut map: HashMap<&str, i32> = HashMap::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> HashMap<K, V>

Creates an empty HashMap with at least the specified capacity.

\n

The hash map will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the hash map will not allocate.

\n
Examples
\n
use std::collections::HashMap;\nlet mut map: HashMap<&str, i32> = HashMap::with_capacity(10);
\n
",0,"alloy_rpc_client::batch::ChannelMap"],["
source§

impl<K, V, S> HashMap<K, V, S>

1.7.0 (const: unstable) · source

pub fn with_hasher(hash_builder: S) -> HashMap<K, V, S>

Creates an empty HashMap which will use the given hash builder to hash\nkeys.

\n

The created map has the default initial capacity.

\n

Warning: hash_builder is normally randomly generated, and\nis designed to allow HashMaps to be resistant to attacks that\ncause many collisions and very poor performance. Setting it\nmanually using this function can expose a DoS attack vector.

\n

The hash_builder passed should implement the BuildHasher trait for\nthe HashMap to be useful, see its documentation for details.

\n
Examples
\n
use std::collections::HashMap;\nuse std::hash::RandomState;\n\nlet s = RandomState::new();\nlet mut map = HashMap::with_hasher(s);\nmap.insert(1, 2);
\n
1.7.0 · source

pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> HashMap<K, V, S>

Creates an empty HashMap with at least the specified capacity, using\nhasher to hash the keys.

\n

The hash map will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the hash map will not allocate.

\n

Warning: hasher is normally randomly generated, and\nis designed to allow HashMaps to be resistant to attacks that\ncause many collisions and very poor performance. Setting it\nmanually using this function can expose a DoS attack vector.

\n

The hasher passed should implement the BuildHasher trait for\nthe HashMap to be useful, see its documentation for details.

\n
Examples
\n
use std::collections::HashMap;\nuse std::hash::RandomState;\n\nlet s = RandomState::new();\nlet mut map = HashMap::with_capacity_and_hasher(10, s);\nmap.insert(1, 2);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the number of elements the map can hold without reallocating.

\n

This number is a lower bound; the HashMap<K, V> might be able to hold\nmore, but is guaranteed to be able to hold at least this many.

\n
Examples
\n
use std::collections::HashMap;\nlet map: HashMap<i32, i32> = HashMap::with_capacity(100);\nassert!(map.capacity() >= 100);
\n
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

An iterator visiting all keys in arbitrary order.\nThe iterator element type is &'a K.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor key in map.keys() {\n    println!(\"{key}\");\n}
\n
Performance
\n

In the current implementation, iterating over keys takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.54.0 · source

pub fn into_keys(self) -> IntoKeys<K, V>

Creates a consuming iterator visiting all the keys in arbitrary order.\nThe map cannot be used after calling this.\nThe iterator element type is K.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nlet mut vec: Vec<&str> = map.into_keys().collect();\n// The `IntoKeys` iterator produces keys in arbitrary order, so the\n// keys must be sorted to test them against a sorted array.\nvec.sort_unstable();\nassert_eq!(vec, [\"a\", \"b\", \"c\"]);
\n
Performance
\n

In the current implementation, iterating over keys takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

An iterator visiting all values in arbitrary order.\nThe iterator element type is &'a V.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor val in map.values() {\n    println!(\"{val}\");\n}
\n
Performance
\n

In the current implementation, iterating over values takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

An iterator visiting all values mutably in arbitrary order.\nThe iterator element type is &'a mut V.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor val in map.values_mut() {\n    *val = *val + 10;\n}\n\nfor val in map.values() {\n    println!(\"{val}\");\n}
\n
Performance
\n

In the current implementation, iterating over values takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.54.0 · source

pub fn into_values(self) -> IntoValues<K, V>

Creates a consuming iterator visiting all the values in arbitrary order.\nThe map cannot be used after calling this.\nThe iterator element type is V.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nlet mut vec: Vec<i32> = map.into_values().collect();\n// The `IntoValues` iterator produces values in arbitrary order, so\n// the values must be sorted to test them against a sorted array.\nvec.sort_unstable();\nassert_eq!(vec, [1, 2, 3]);
\n
Performance
\n

In the current implementation, iterating over values takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

An iterator visiting all key-value pairs in arbitrary order.\nThe iterator element type is (&'a K, &'a V).

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor (key, val) in map.iter() {\n    println!(\"key: {key} val: {val}\");\n}
\n
Performance
\n

In the current implementation, iterating over map takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

An iterator visiting all key-value pairs in arbitrary order,\nwith mutable references to the values.\nThe iterator element type is (&'a K, &'a mut V).

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\n// Update all values\nfor (_, val) in map.iter_mut() {\n    *val *= 2;\n}\n\nfor (key, val) in &map {\n    println!(\"key: {key} val: {val}\");\n}
\n
Performance
\n

In the current implementation, iterating over map takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\nassert_eq!(a.len(), 0);\na.insert(1, \"a\");\nassert_eq!(a.len(), 1);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\nassert!(a.is_empty());\na.insert(1, \"a\");\nassert!(!a.is_empty());
\n
1.6.0 · source

pub fn drain(&mut self) -> Drain<'_, K, V>

Clears the map, returning all key-value pairs as an iterator. Keeps the\nallocated memory for reuse.

\n

If the returned iterator is dropped before being fully consumed, it\ndrops the remaining key-value pairs. The returned iterator keeps a\nmutable borrow on the map to optimize its implementation.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\na.insert(1, \"a\");\na.insert(2, \"b\");\n\nfor (k, v) in a.drain().take(1) {\n    assert!(k == 1 || k == 2);\n    assert!(v == \"a\" || v == \"b\");\n}\n\nassert!(a.is_empty());
\n
source

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F>
where\n F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (hash_extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, the element is removed from the map and yielded.\nIf the closure returns false, or panics, the element remains in the map and will not be\nyielded.

\n

Note that extract_if lets you mutate every value in the filter closure, regardless of\nwhether you choose to keep or remove it.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n
Examples
\n

Splitting a map into even and odd keys, reusing the original map:

\n\n
#![feature(hash_extract_if)]\nuse std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x)).collect();\nlet extracted: HashMap<i32, i32> = map.extract_if(|k, _v| k % 2 == 0).collect();\n\nlet mut evens = extracted.keys().copied().collect::<Vec<_>>();\nlet mut odds = map.keys().copied().collect::<Vec<_>>();\nevens.sort();\nodds.sort();\n\nassert_eq!(evens, vec![0, 2, 4, 6]);\nassert_eq!(odds, vec![1, 3, 5, 7]);
\n
1.18.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false.\nThe elements are visited in unsorted (and unspecified) order.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();\nmap.retain(|&k, _| k % 2 == 0);\nassert_eq!(map.len(), 4);
\n
Performance
\n

In the current implementation, this operation takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all key-value pairs. Keeps the allocated memory\nfor reuse.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\na.insert(1, \"a\");\na.clear();\nassert!(a.is_empty());
\n
1.9.0 · source

pub fn hasher(&self) -> &S

Returns a reference to the map’s BuildHasher.

\n
Examples
\n
use std::collections::HashMap;\nuse std::hash::RandomState;\n\nlet hasher = RandomState::new();\nlet map: HashMap<i32, i32> = HashMap::with_hasher(hasher);\nlet hasher: &RandomState = map.hasher();
\n
",0,"alloy_rpc_client::batch::ChannelMap"],["
source§

impl<K, V, S> HashMap<K, V, S>
where\n K: Eq + Hash,\n S: BuildHasher,

1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the HashMap. The collection may reserve more space to speculatively\navoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
Panics
\n

Panics if the new allocation size overflows usize.

\n
Examples
\n
use std::collections::HashMap;\nlet mut map: HashMap<&str, i32> = HashMap::new();\nmap.reserve(10);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the HashMap. The collection may reserve more space to speculatively\navoid frequent reallocations. After calling try_reserve,\ncapacity will be greater than or equal to self.len() + additional if\nit returns Ok(()).\nDoes nothing if capacity is already sufficient.

\n
Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<&str, isize> = HashMap::new();\nmap.try_reserve(10).expect(\"why is the test harness OOMing on a handful of bytes?\");
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the map as much as possible. It will drop\ndown as much as possible while maintaining the internal rules\nand possibly leaving some space in accordance with the resize policy.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = HashMap::with_capacity(100);\nmap.insert(1, 2);\nmap.insert(3, 4);\nassert!(map.capacity() >= 100);\nmap.shrink_to_fit();\nassert!(map.capacity() >= 2);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the map with a lower limit. It will drop\ndown no lower than the supplied limit while maintaining the internal rules\nand possibly leaving some space in accordance with the resize policy.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = HashMap::with_capacity(100);\nmap.insert(1, 2);\nmap.insert(3, 4);\nassert!(map.capacity() >= 100);\nmap.shrink_to(10);\nassert!(map.capacity() >= 10);\nmap.shrink_to(0);\nassert!(map.capacity() >= 2);
\n
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>

Gets the given key’s corresponding entry in the map for in-place manipulation.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut letters = HashMap::new();\n\nfor ch in \"a short treatise on fungi\".chars() {\n    letters.entry(ch).and_modify(|counter| *counter += 1).or_insert(1);\n}\n\nassert_eq!(letters[&'s'], 2);\nassert_eq!(letters[&'t'], 3);\nassert_eq!(letters[&'u'], 1);\nassert_eq!(letters.get(&'y'), None);
\n
1.0.0 · source

pub fn get<Q>(&self, k: &Q) -> Option<&V>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns a reference to the value corresponding to the key.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.get(&1), Some(&\"a\"));\nassert_eq!(map.get(&2), None);
\n
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns the key-value pair corresponding to the supplied key.

\n

The supplied key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.get_key_value(&1), Some((&1, &\"a\")));\nassert_eq!(map.get_key_value(&2), None);
\n
source

pub fn get_many_mut<Q, const N: usize>(\n &mut self,\n ks: [&Q; N]\n) -> Option<[&mut V; N]>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

🔬This is a nightly-only experimental API. (map_many_mut)

Attempts to get mutable references to N values in the map at once.

\n

Returns an array of length N with the results of each query. For soundness, at most one\nmutable reference will be returned to any value. None will be returned if any of the\nkeys are duplicates or missing.

\n
Examples
\n
#![feature(map_many_mut)]\nuse std::collections::HashMap;\n\nlet mut libraries = HashMap::new();\nlibraries.insert(\"Bodleian Library\".to_string(), 1602);\nlibraries.insert(\"Athenæum\".to_string(), 1807);\nlibraries.insert(\"Herzogin-Anna-Amalia-Bibliothek\".to_string(), 1691);\nlibraries.insert(\"Library of Congress\".to_string(), 1800);\n\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"Library of Congress\",\n]);\nassert_eq!(\n    got,\n    Some([\n        &mut 1807,\n        &mut 1800,\n    ]),\n);\n\n// Missing keys result in None\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"New York Public Library\",\n]);\nassert_eq!(got, None);\n\n// Duplicate keys result in None\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"Athenæum\",\n]);\nassert_eq!(got, None);
\n
source

pub unsafe fn get_many_unchecked_mut<Q, const N: usize>(\n &mut self,\n ks: [&Q; N]\n) -> Option<[&mut V; N]>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

🔬This is a nightly-only experimental API. (map_many_mut)

Attempts to get mutable references to N values in the map at once, without validating that\nthe values are unique.

\n

Returns an array of length N with the results of each query. None will be returned if\nany of the keys are missing.

\n

For a safe alternative see get_many_mut.

\n
Safety
\n

Calling this method with overlapping keys is undefined behavior even if the resulting\nreferences are not used.

\n
Examples
\n
#![feature(map_many_mut)]\nuse std::collections::HashMap;\n\nlet mut libraries = HashMap::new();\nlibraries.insert(\"Bodleian Library\".to_string(), 1602);\nlibraries.insert(\"Athenæum\".to_string(), 1807);\nlibraries.insert(\"Herzogin-Anna-Amalia-Bibliothek\".to_string(), 1691);\nlibraries.insert(\"Library of Congress\".to_string(), 1800);\n\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"Library of Congress\",\n]);\nassert_eq!(\n    got,\n    Some([\n        &mut 1807,\n        &mut 1800,\n    ]),\n);\n\n// Missing keys result in None\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"New York Public Library\",\n]);\nassert_eq!(got, None);
\n
1.0.0 · source

pub fn contains_key<Q>(&self, k: &Q) -> bool
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns true if the map contains a value for the specified key.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.contains_key(&1), true);\nassert_eq!(map.contains_key(&2), false);
\n
1.0.0 · source

pub fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut V>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns a mutable reference to the value corresponding to the key.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nif let Some(x) = map.get_mut(&1) {\n    *x = \"b\";\n}\nassert_eq!(map[&1], \"b\");
\n
1.0.0 · source

pub fn insert(&mut self, k: K, v: V) -> Option<V>

Inserts a key-value pair into the map.

\n

If the map did not have this key present, None is returned.

\n

If the map did have this key present, the value is updated, and the old\nvalue is returned. The key is not updated, though; this matters for\ntypes that can be == without being identical. See the module-level\ndocumentation for more.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nassert_eq!(map.insert(37, \"a\"), None);\nassert_eq!(map.is_empty(), false);\n\nmap.insert(37, \"b\");\nassert_eq!(map.insert(37, \"c\"), Some(\"b\"));\nassert_eq!(map[&37], \"c\");
\n
source

pub fn try_insert(\n &mut self,\n key: K,\n value: V\n) -> Result<&mut V, OccupiedError<'_, K, V>>

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns\na mutable reference to the value in the entry.

\n

If the map already had this key present, nothing is updated, and\nan error containing the occupied entry and the value is returned.

\n
Examples
\n

Basic usage:

\n\n
#![feature(map_try_insert)]\n\nuse std::collections::HashMap;\n\nlet mut map = HashMap::new();\nassert_eq!(map.try_insert(37, \"a\").unwrap(), &\"a\");\n\nlet err = map.try_insert(37, \"b\").unwrap_err();\nassert_eq!(err.entry.key(), &37);\nassert_eq!(err.entry.get(), &\"a\");\nassert_eq!(err.value, \"b\");
\n
1.0.0 · source

pub fn remove<Q>(&mut self, k: &Q) -> Option<V>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Removes a key from the map, returning the value at the key if the key\nwas previously in the map.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.remove(&1), Some(\"a\"));\nassert_eq!(map.remove(&1), None);
\n
1.27.0 · source

pub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Removes a key from the map, returning the stored key and value if the\nkey was previously in the map.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.remove_entry(&1), Some((1, \"a\")));\nassert_eq!(map.remove(&1), None);
\n
",0,"alloy_rpc_client::batch::ChannelMap"],["
source§

impl<K, V, S> HashMap<K, V, S>
where\n S: BuildHasher,

source

pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, K, V, S>

🔬This is a nightly-only experimental API. (hash_raw_entry)

Creates a raw entry builder for the HashMap.

\n

Raw entries provide the lowest level of control for searching and\nmanipulating a map. They must be manually initialized with a hash and\nthen manually searched. After this, insertions into a vacant entry\nstill require an owned key to be provided.

\n

Raw entries are useful for such exotic situations as:

\n
    \n
  • Hash memoization
  • \n
  • Deferring the creation of an owned key until it is known to be required
  • \n
  • Using a search key that doesn’t work with the Borrow trait
  • \n
  • Using custom comparison logic without newtype wrappers
  • \n
\n

Because raw entries provide much more low-level control, it’s much easier\nto put the HashMap into an inconsistent state which, while memory-safe,\nwill cause the map to produce seemingly random results. Higher-level and\nmore foolproof APIs like entry should be preferred when possible.

\n

In particular, the hash used to initialized the raw entry must still be\nconsistent with the hash of the key that is ultimately stored in the entry.\nThis is because implementations of HashMap may need to recompute hashes\nwhen resizing, at which point only the keys are available.

\n

Raw entries give mutable access to the keys. This must not be used\nto modify how the key would compare or hash, as the map will not re-evaluate\nwhere the key should go, meaning the keys may become “lost” if their\nlocation does not reflect their state. For instance, if you change a key\nso that the map now contains keys which compare equal, search may start\nacting erratically, with two keys randomly masking each other. Implementations\nare free to assume this doesn’t happen (within the limits of memory-safety).

\n
source

pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S>

🔬This is a nightly-only experimental API. (hash_raw_entry)

Creates a raw immutable entry builder for the HashMap.

\n

Raw entries provide the lowest level of control for searching and\nmanipulating a map. They must be manually initialized with a hash and\nthen manually searched.

\n

This is useful for

\n
    \n
  • Hash memoization
  • \n
  • Using a search key that doesn’t work with the Borrow trait
  • \n
  • Using custom comparison logic without newtype wrappers
  • \n
\n

Unless you are in such a situation, higher-level and more foolproof APIs like\nget should be preferred.

\n

Immutable raw entries have very limited use; you might instead want raw_entry_mut.

\n
",0,"alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, Q, V, S> Index<&Q> for HashMap<K, V, S>
where\n K: Eq + Hash + Borrow<Q>,\n Q: Eq + Hash + ?Sized,\n S: BuildHasher,

source§

fn index(&self, key: &Q) -> &V

Returns a reference to the value corresponding to the supplied key.

\n
Panics
\n

Panics if the key is not present in the HashMap.

\n
§

type Output = V

The returned type after indexing.
","Index<&Q>","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> Eq for HashMap<K, V, S>
where\n K: Eq + Hash,\n V: Eq,\n S: BuildHasher,

","Eq","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
where\n K: Eq + Hash,\n S: BuildHasher,

Inserts all new key-values from the iterator and replaces values with existing\nkeys with new values returned from the iterator.

\n
source§

fn extend<T>(&mut self, iter: T)
where\n T: IntoIterator<Item = (K, V)>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: (K, V))

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<(K, V)>","alloy_rpc_client::batch::ChannelMap"],["
1.4.0 · source§

impl<'a, K, V, S> Extend<(&'a K, &'a V)> for HashMap<K, V, S>
where\n K: Eq + Hash + Copy,\n V: Copy,\n S: BuildHasher,

source§

fn extend<T>(&mut self, iter: T)
where\n T: IntoIterator<Item = (&'a K, &'a V)>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: (&'a K, &'a V))

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<(&'a K, &'a V)>","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> Default for HashMap<K, V, S>
where\n S: Default,

source§

fn default() -> HashMap<K, V, S>

Creates an empty HashMap<K, V, S>, with the Default value for the hasher.

\n
","Default","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> Debug for HashMap<K, V, S>
where\n K: Debug,\n V: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> IntoIterator for HashMap<K, V, S>

source§

fn into_iter(self) -> IntoIter<K, V>

Creates a consuming iterator, that is, one that moves each key-value\npair out of the map in arbitrary order. The map cannot be used after\ncalling this.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\n// Not possible with .iter()\nlet vec: Vec<(&str, i32)> = map.into_iter().collect();
\n
§

type Item = (K, V)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<K, V>

Which kind of iterator are we turning this into?
","IntoIterator","alloy_rpc_client::batch::ChannelMap"],["
1.56.0 · source§

impl<K, V, const N: usize> From<[(K, V); N]> for HashMap<K, V>
where\n K: Eq + Hash,

source§

fn from(arr: [(K, V); N]) -> HashMap<K, V>

Examples
\n
use std::collections::HashMap;\n\nlet map1 = HashMap::from([(1, 2), (3, 4)]);\nlet map2: HashMap<_, _> = [(1, 2), (3, 4)].into();\nassert_eq!(map1, map2);
\n
","From<[(K, V); N]>","alloy_rpc_client::batch::ChannelMap"],["
1.36.0 · source§

impl<K, V, S> UnwindSafe for HashMap<K, V, S>
where\n K: UnwindSafe,\n V: UnwindSafe,\n S: UnwindSafe,

","UnwindSafe","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> FromIterator<(K, V)> for HashMap<K, V, S>
where\n K: Eq + Hash,\n S: BuildHasher + Default,

source§

fn from_iter<T>(iter: T) -> HashMap<K, V, S>
where\n T: IntoIterator<Item = (K, V)>,

Creates a value from an iterator. Read more
","FromIterator<(K, V)>","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> PartialEq for HashMap<K, V, S>
where\n K: Eq + Hash,\n V: PartialEq,\n S: BuildHasher,

source§

fn eq(&self, other: &HashMap<K, V, S>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_rpc_client::batch::ChannelMap"],["
1.0.0 · source§

impl<K, V, S> Clone for HashMap<K, V, S>
where\n K: Clone,\n V: Clone,\n S: Clone,

source§

fn clone(&self) -> HashMap<K, V, S>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &HashMap<K, V, S>)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_client::batch::ChannelMap"],["
source§

impl<'de, K, V, S> Deserialize<'de> for HashMap<K, V, S>
where\n K: Deserialize<'de> + Eq + Hash,\n V: Deserialize<'de>,\n S: BuildHasher + Default,

Available on crate feature std only.
source§

fn deserialize<D>(\n deserializer: D\n) -> Result<HashMap<K, V, S>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_rpc_client::batch::ChannelMap"],["
source§

impl<'de, K, V, S, E> IntoDeserializer<'de, E> for HashMap<K, V, S>
where\n K: IntoDeserializer<'de, E> + Eq + Hash,\n V: IntoDeserializer<'de, E>,\n S: BuildHasher,\n E: Error,

Available on crate feature std only.
§

type Deserializer = MapDeserializer<'de, <HashMap<K, V, S> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(\n self\n) -> <HashMap<K, V, S> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","alloy_rpc_client::batch::ChannelMap"],["
source§

impl<K, V, H> Serialize for HashMap<K, V, H>
where\n K: Serialize,\n V: Serialize,

Available on crate feature std only.
source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_rpc_client::batch::ChannelMap"],["
§

impl<'a, K, V, S> Arbitrary<'a> for HashMap<K, V, S>
where\n K: Arbitrary<'a> + Eq + Hash,\n V: Arbitrary<'a>,\n S: BuildHasher + Default,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<HashMap<K, V, S>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<HashMap<K, V, S>, Error>

Generate an arbitrary value of Self from the entirety of the given\nunstructured data. Read more
§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type\nneeds to construct itself. Read more
","Arbitrary<'a>","alloy_rpc_client::batch::ChannelMap"],["
§

impl<A, B> Arbitrary for HashMap<A, B>
where\n A: Arbitrary + Hash + Eq,\n B: Arbitrary,

§

type Parameters = (SizeRange, <A as Arbitrary>::Parameters, <B as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = HashMapStrategy<<A as Arbitrary>::Strategy, <B as Arbitrary>::Strategy>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <HashMap<A, B> as Arbitrary>::Parameters\n) -> <HashMap<A, B> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_rpc_client::batch::ChannelMap"],["
§

impl<A, K> ArbitraryF1<A> for HashMap<K, A>
where\n A: Debug,\n K: Hash + Eq + Arbitrary + 'static,

§

type Parameters = (SizeRange, <K as Arbitrary>::Parameters)

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<S>(\n base: S,\n args: <HashMap<K, A> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<HashMap<K, A>>
where\n S: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_rpc_client::batch::ChannelMap"],["
§

impl<A, B> ArbitraryF2<A, B> for HashMap<A, B>
where\n A: Debug + Eq + Hash,\n B: Debug,

Available on crate feature std only.
§

type Parameters = SizeRange

The type of parameters that lift2_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift2_with<AS, BS>(\n fst: AS,\n snd: BS,\n args: <HashMap<A, B> as ArbitraryF2<A, B>>::Parameters\n) -> BoxedStrategy<HashMap<A, B>>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>.\nThe composite strategy is passed the arguments given in args. Read more
§

fn lift2<AS, BS>(fst: AS, snd: BS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>. Read more
","ArbitraryF2","alloy_rpc_client::batch::ChannelMap"]], +"alloy_rpc_types":[["
source§

impl<K, V> HashMap<K, V>

1.0.0 · source

pub fn new() -> HashMap<K, V>

Creates an empty HashMap.

\n

The hash map is initially created with a capacity of 0, so it will not allocate until it\nis first inserted into.

\n
Examples
\n
use std::collections::HashMap;\nlet mut map: HashMap<&str, i32> = HashMap::new();
\n
1.0.0 · source

pub fn with_capacity(capacity: usize) -> HashMap<K, V>

Creates an empty HashMap with at least the specified capacity.

\n

The hash map will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the hash map will not allocate.

\n
Examples
\n
use std::collections::HashMap;\nlet mut map: HashMap<&str, i32> = HashMap::with_capacity(10);
\n
",0,"alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, V, S> HashMap<K, V, S>

1.7.0 (const: unstable) · source

pub fn with_hasher(hash_builder: S) -> HashMap<K, V, S>

Creates an empty HashMap which will use the given hash builder to hash\nkeys.

\n

The created map has the default initial capacity.

\n

Warning: hash_builder is normally randomly generated, and\nis designed to allow HashMaps to be resistant to attacks that\ncause many collisions and very poor performance. Setting it\nmanually using this function can expose a DoS attack vector.

\n

The hash_builder passed should implement the BuildHasher trait for\nthe HashMap to be useful, see its documentation for details.

\n
Examples
\n
use std::collections::HashMap;\nuse std::hash::RandomState;\n\nlet s = RandomState::new();\nlet mut map = HashMap::with_hasher(s);\nmap.insert(1, 2);
\n
1.7.0 · source

pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> HashMap<K, V, S>

Creates an empty HashMap with at least the specified capacity, using\nhasher to hash the keys.

\n

The hash map will be able to hold at least capacity elements without\nreallocating. This method is allowed to allocate for more elements than\ncapacity. If capacity is 0, the hash map will not allocate.

\n

Warning: hasher is normally randomly generated, and\nis designed to allow HashMaps to be resistant to attacks that\ncause many collisions and very poor performance. Setting it\nmanually using this function can expose a DoS attack vector.

\n

The hasher passed should implement the BuildHasher trait for\nthe HashMap to be useful, see its documentation for details.

\n
Examples
\n
use std::collections::HashMap;\nuse std::hash::RandomState;\n\nlet s = RandomState::new();\nlet mut map = HashMap::with_capacity_and_hasher(10, s);\nmap.insert(1, 2);
\n
1.0.0 · source

pub fn capacity(&self) -> usize

Returns the number of elements the map can hold without reallocating.

\n

This number is a lower bound; the HashMap<K, V> might be able to hold\nmore, but is guaranteed to be able to hold at least this many.

\n
Examples
\n
use std::collections::HashMap;\nlet map: HashMap<i32, i32> = HashMap::with_capacity(100);\nassert!(map.capacity() >= 100);
\n
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

An iterator visiting all keys in arbitrary order.\nThe iterator element type is &'a K.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor key in map.keys() {\n    println!(\"{key}\");\n}
\n
Performance
\n

In the current implementation, iterating over keys takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.54.0 · source

pub fn into_keys(self) -> IntoKeys<K, V>

Creates a consuming iterator visiting all the keys in arbitrary order.\nThe map cannot be used after calling this.\nThe iterator element type is K.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nlet mut vec: Vec<&str> = map.into_keys().collect();\n// The `IntoKeys` iterator produces keys in arbitrary order, so the\n// keys must be sorted to test them against a sorted array.\nvec.sort_unstable();\nassert_eq!(vec, [\"a\", \"b\", \"c\"]);
\n
Performance
\n

In the current implementation, iterating over keys takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

An iterator visiting all values in arbitrary order.\nThe iterator element type is &'a V.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor val in map.values() {\n    println!(\"{val}\");\n}
\n
Performance
\n

In the current implementation, iterating over values takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

An iterator visiting all values mutably in arbitrary order.\nThe iterator element type is &'a mut V.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor val in map.values_mut() {\n    *val = *val + 10;\n}\n\nfor val in map.values() {\n    println!(\"{val}\");\n}
\n
Performance
\n

In the current implementation, iterating over values takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.54.0 · source

pub fn into_values(self) -> IntoValues<K, V>

Creates a consuming iterator visiting all the values in arbitrary order.\nThe map cannot be used after calling this.\nThe iterator element type is V.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nlet mut vec: Vec<i32> = map.into_values().collect();\n// The `IntoValues` iterator produces values in arbitrary order, so\n// the values must be sorted to test them against a sorted array.\nvec.sort_unstable();\nassert_eq!(vec, [1, 2, 3]);
\n
Performance
\n

In the current implementation, iterating over values takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

An iterator visiting all key-value pairs in arbitrary order.\nThe iterator element type is (&'a K, &'a V).

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\nfor (key, val) in map.iter() {\n    println!(\"key: {key} val: {val}\");\n}
\n
Performance
\n

In the current implementation, iterating over map takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

An iterator visiting all key-value pairs in arbitrary order,\nwith mutable references to the values.\nThe iterator element type is (&'a K, &'a mut V).

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\n// Update all values\nfor (_, val) in map.iter_mut() {\n    *val *= 2;\n}\n\nfor (key, val) in &map {\n    println!(\"key: {key} val: {val}\");\n}
\n
Performance
\n

In the current implementation, iterating over map takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\nassert_eq!(a.len(), 0);\na.insert(1, \"a\");\nassert_eq!(a.len(), 1);
\n
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\nassert!(a.is_empty());\na.insert(1, \"a\");\nassert!(!a.is_empty());
\n
1.6.0 · source

pub fn drain(&mut self) -> Drain<'_, K, V>

Clears the map, returning all key-value pairs as an iterator. Keeps the\nallocated memory for reuse.

\n

If the returned iterator is dropped before being fully consumed, it\ndrops the remaining key-value pairs. The returned iterator keeps a\nmutable borrow on the map to optimize its implementation.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\na.insert(1, \"a\");\na.insert(2, \"b\");\n\nfor (k, v) in a.drain().take(1) {\n    assert!(k == 1 || k == 2);\n    assert!(v == \"a\" || v == \"b\");\n}\n\nassert!(a.is_empty());
\n
source

pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F>
where\n F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (hash_extract_if)

Creates an iterator which uses a closure to determine if an element should be removed.

\n

If the closure returns true, the element is removed from the map and yielded.\nIf the closure returns false, or panics, the element remains in the map and will not be\nyielded.

\n

Note that extract_if lets you mutate every value in the filter closure, regardless of\nwhether you choose to keep or remove it.

\n

If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating\nor the iteration short-circuits, then the remaining elements will be retained.\nUse retain with a negated predicate if you do not need the returned iterator.

\n
Examples
\n

Splitting a map into even and odd keys, reusing the original map:

\n\n
#![feature(hash_extract_if)]\nuse std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x)).collect();\nlet extracted: HashMap<i32, i32> = map.extract_if(|k, _v| k % 2 == 0).collect();\n\nlet mut evens = extracted.keys().copied().collect::<Vec<_>>();\nlet mut odds = map.keys().copied().collect::<Vec<_>>();\nevens.sort();\nodds.sort();\n\nassert_eq!(evens, vec![0, 2, 4, 6]);\nassert_eq!(odds, vec![1, 3, 5, 7]);
\n
1.18.0 · source

pub fn retain<F>(&mut self, f: F)
where\n F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

\n

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false.\nThe elements are visited in unsorted (and unspecified) order.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();\nmap.retain(|&k, _| k % 2 == 0);\nassert_eq!(map.len(), 4);
\n
Performance
\n

In the current implementation, this operation takes O(capacity) time\ninstead of O(len) because it internally visits empty buckets too.

\n
1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all key-value pairs. Keeps the allocated memory\nfor reuse.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut a = HashMap::new();\na.insert(1, \"a\");\na.clear();\nassert!(a.is_empty());
\n
1.9.0 · source

pub fn hasher(&self) -> &S

Returns a reference to the map’s BuildHasher.

\n
Examples
\n
use std::collections::HashMap;\nuse std::hash::RandomState;\n\nlet hasher = RandomState::new();\nlet map: HashMap<i32, i32> = HashMap::with_hasher(hasher);\nlet hasher: &RandomState = map.hasher();
\n
",0,"alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, V, S> HashMap<K, V, S>
where\n K: Eq + Hash,\n S: BuildHasher,

1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted\nin the HashMap. The collection may reserve more space to speculatively\navoid frequent reallocations. After calling reserve,\ncapacity will be greater than or equal to self.len() + additional.\nDoes nothing if capacity is already sufficient.

\n
Panics
\n

Panics if the new allocation size overflows usize.

\n
Examples
\n
use std::collections::HashMap;\nlet mut map: HashMap<&str, i32> = HashMap::new();\nmap.reserve(10);
\n
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted\nin the HashMap. The collection may reserve more space to speculatively\navoid frequent reallocations. After calling try_reserve,\ncapacity will be greater than or equal to self.len() + additional if\nit returns Ok(()).\nDoes nothing if capacity is already sufficient.

\n
Errors
\n

If the capacity overflows, or the allocator reports a failure, then an error\nis returned.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<&str, isize> = HashMap::new();\nmap.try_reserve(10).expect(\"why is the test harness OOMing on a handful of bytes?\");
\n
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the map as much as possible. It will drop\ndown as much as possible while maintaining the internal rules\nand possibly leaving some space in accordance with the resize policy.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = HashMap::with_capacity(100);\nmap.insert(1, 2);\nmap.insert(3, 4);\nassert!(map.capacity() >= 100);\nmap.shrink_to_fit();\nassert!(map.capacity() >= 2);
\n
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the map with a lower limit. It will drop\ndown no lower than the supplied limit while maintaining the internal rules\nand possibly leaving some space in accordance with the resize policy.

\n

If the current capacity is less than the lower limit, this is a no-op.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map: HashMap<i32, i32> = HashMap::with_capacity(100);\nmap.insert(1, 2);\nmap.insert(3, 4);\nassert!(map.capacity() >= 100);\nmap.shrink_to(10);\nassert!(map.capacity() >= 10);\nmap.shrink_to(0);\nassert!(map.capacity() >= 2);
\n
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>

Gets the given key’s corresponding entry in the map for in-place manipulation.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut letters = HashMap::new();\n\nfor ch in \"a short treatise on fungi\".chars() {\n    letters.entry(ch).and_modify(|counter| *counter += 1).or_insert(1);\n}\n\nassert_eq!(letters[&'s'], 2);\nassert_eq!(letters[&'t'], 3);\nassert_eq!(letters[&'u'], 1);\nassert_eq!(letters.get(&'y'), None);
\n
1.0.0 · source

pub fn get<Q>(&self, k: &Q) -> Option<&V>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns a reference to the value corresponding to the key.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.get(&1), Some(&\"a\"));\nassert_eq!(map.get(&2), None);
\n
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns the key-value pair corresponding to the supplied key.

\n

The supplied key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.get_key_value(&1), Some((&1, &\"a\")));\nassert_eq!(map.get_key_value(&2), None);
\n
source

pub fn get_many_mut<Q, const N: usize>(\n &mut self,\n ks: [&Q; N]\n) -> Option<[&mut V; N]>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

🔬This is a nightly-only experimental API. (map_many_mut)

Attempts to get mutable references to N values in the map at once.

\n

Returns an array of length N with the results of each query. For soundness, at most one\nmutable reference will be returned to any value. None will be returned if any of the\nkeys are duplicates or missing.

\n
Examples
\n
#![feature(map_many_mut)]\nuse std::collections::HashMap;\n\nlet mut libraries = HashMap::new();\nlibraries.insert(\"Bodleian Library\".to_string(), 1602);\nlibraries.insert(\"Athenæum\".to_string(), 1807);\nlibraries.insert(\"Herzogin-Anna-Amalia-Bibliothek\".to_string(), 1691);\nlibraries.insert(\"Library of Congress\".to_string(), 1800);\n\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"Library of Congress\",\n]);\nassert_eq!(\n    got,\n    Some([\n        &mut 1807,\n        &mut 1800,\n    ]),\n);\n\n// Missing keys result in None\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"New York Public Library\",\n]);\nassert_eq!(got, None);\n\n// Duplicate keys result in None\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"Athenæum\",\n]);\nassert_eq!(got, None);
\n
source

pub unsafe fn get_many_unchecked_mut<Q, const N: usize>(\n &mut self,\n ks: [&Q; N]\n) -> Option<[&mut V; N]>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

🔬This is a nightly-only experimental API. (map_many_mut)

Attempts to get mutable references to N values in the map at once, without validating that\nthe values are unique.

\n

Returns an array of length N with the results of each query. None will be returned if\nany of the keys are missing.

\n

For a safe alternative see get_many_mut.

\n
Safety
\n

Calling this method with overlapping keys is undefined behavior even if the resulting\nreferences are not used.

\n
Examples
\n
#![feature(map_many_mut)]\nuse std::collections::HashMap;\n\nlet mut libraries = HashMap::new();\nlibraries.insert(\"Bodleian Library\".to_string(), 1602);\nlibraries.insert(\"Athenæum\".to_string(), 1807);\nlibraries.insert(\"Herzogin-Anna-Amalia-Bibliothek\".to_string(), 1691);\nlibraries.insert(\"Library of Congress\".to_string(), 1800);\n\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"Library of Congress\",\n]);\nassert_eq!(\n    got,\n    Some([\n        &mut 1807,\n        &mut 1800,\n    ]),\n);\n\n// Missing keys result in None\nlet got = libraries.get_many_mut([\n    \"Athenæum\",\n    \"New York Public Library\",\n]);\nassert_eq!(got, None);
\n
1.0.0 · source

pub fn contains_key<Q>(&self, k: &Q) -> bool
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns true if the map contains a value for the specified key.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.contains_key(&1), true);\nassert_eq!(map.contains_key(&2), false);
\n
1.0.0 · source

pub fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut V>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Returns a mutable reference to the value corresponding to the key.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nif let Some(x) = map.get_mut(&1) {\n    *x = \"b\";\n}\nassert_eq!(map[&1], \"b\");
\n
1.0.0 · source

pub fn insert(&mut self, k: K, v: V) -> Option<V>

Inserts a key-value pair into the map.

\n

If the map did not have this key present, None is returned.

\n

If the map did have this key present, the value is updated, and the old\nvalue is returned. The key is not updated, though; this matters for\ntypes that can be == without being identical. See the module-level\ndocumentation for more.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nassert_eq!(map.insert(37, \"a\"), None);\nassert_eq!(map.is_empty(), false);\n\nmap.insert(37, \"b\");\nassert_eq!(map.insert(37, \"c\"), Some(\"b\"));\nassert_eq!(map[&37], \"c\");
\n
source

pub fn try_insert(\n &mut self,\n key: K,\n value: V\n) -> Result<&mut V, OccupiedError<'_, K, V>>

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns\na mutable reference to the value in the entry.

\n

If the map already had this key present, nothing is updated, and\nan error containing the occupied entry and the value is returned.

\n
Examples
\n

Basic usage:

\n\n
#![feature(map_try_insert)]\n\nuse std::collections::HashMap;\n\nlet mut map = HashMap::new();\nassert_eq!(map.try_insert(37, \"a\").unwrap(), &\"a\");\n\nlet err = map.try_insert(37, \"b\").unwrap_err();\nassert_eq!(err.entry.key(), &37);\nassert_eq!(err.entry.get(), &\"a\");\nassert_eq!(err.value, \"b\");
\n
1.0.0 · source

pub fn remove<Q>(&mut self, k: &Q) -> Option<V>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Removes a key from the map, returning the value at the key if the key\nwas previously in the map.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.remove(&1), Some(\"a\"));\nassert_eq!(map.remove(&1), None);
\n
1.27.0 · source

pub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)>
where\n K: Borrow<Q>,\n Q: Hash + Eq + ?Sized,

Removes a key from the map, returning the stored key and value if the\nkey was previously in the map.

\n

The key may be any borrowed form of the map’s key type, but\nHash and Eq on the borrowed form must match those for\nthe key type.

\n
Examples
\n
use std::collections::HashMap;\n\nlet mut map = HashMap::new();\nmap.insert(1, \"a\");\nassert_eq!(map.remove_entry(&1), Some((1, \"a\")));\nassert_eq!(map.remove(&1), None);
\n
",0,"alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, V, S> HashMap<K, V, S>
where\n S: BuildHasher,

source

pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, K, V, S>

🔬This is a nightly-only experimental API. (hash_raw_entry)

Creates a raw entry builder for the HashMap.

\n

Raw entries provide the lowest level of control for searching and\nmanipulating a map. They must be manually initialized with a hash and\nthen manually searched. After this, insertions into a vacant entry\nstill require an owned key to be provided.

\n

Raw entries are useful for such exotic situations as:

\n
    \n
  • Hash memoization
  • \n
  • Deferring the creation of an owned key until it is known to be required
  • \n
  • Using a search key that doesn’t work with the Borrow trait
  • \n
  • Using custom comparison logic without newtype wrappers
  • \n
\n

Because raw entries provide much more low-level control, it’s much easier\nto put the HashMap into an inconsistent state which, while memory-safe,\nwill cause the map to produce seemingly random results. Higher-level and\nmore foolproof APIs like entry should be preferred when possible.

\n

In particular, the hash used to initialized the raw entry must still be\nconsistent with the hash of the key that is ultimately stored in the entry.\nThis is because implementations of HashMap may need to recompute hashes\nwhen resizing, at which point only the keys are available.

\n

Raw entries give mutable access to the keys. This must not be used\nto modify how the key would compare or hash, as the map will not re-evaluate\nwhere the key should go, meaning the keys may become “lost” if their\nlocation does not reflect their state. For instance, if you change a key\nso that the map now contains keys which compare equal, search may start\nacting erratically, with two keys randomly masking each other. Implementations\nare free to assume this doesn’t happen (within the limits of memory-safety).

\n
source

pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S>

🔬This is a nightly-only experimental API. (hash_raw_entry)

Creates a raw immutable entry builder for the HashMap.

\n

Raw entries provide the lowest level of control for searching and\nmanipulating a map. They must be manually initialized with a hash and\nthen manually searched.

\n

This is useful for

\n
    \n
  • Hash memoization
  • \n
  • Using a search key that doesn’t work with the Borrow trait
  • \n
  • Using custom comparison logic without newtype wrappers
  • \n
\n

Unless you are in such a situation, higher-level and more foolproof APIs like\nget should be preferred.

\n

Immutable raw entries have very limited use; you might instead want raw_entry_mut.

\n
",0,"alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, Q, V, S> Index<&Q> for HashMap<K, V, S>
where\n K: Eq + Hash + Borrow<Q>,\n Q: Eq + Hash + ?Sized,\n S: BuildHasher,

source§

fn index(&self, key: &Q) -> &V

Returns a reference to the value corresponding to the supplied key.

\n
Panics
\n

Panics if the key is not present in the HashMap.

\n
§

type Output = V

The returned type after indexing.
","Index<&Q>","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> Eq for HashMap<K, V, S>
where\n K: Eq + Hash,\n V: Eq,\n S: BuildHasher,

","Eq","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
where\n K: Eq + Hash,\n S: BuildHasher,

Inserts all new key-values from the iterator and replaces values with existing\nkeys with new values returned from the iterator.

\n
source§

fn extend<T>(&mut self, iter: T)
where\n T: IntoIterator<Item = (K, V)>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: (K, V))

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<(K, V)>","alloy_rpc_types::eth::state::StateOverride"],["
1.4.0 · source§

impl<'a, K, V, S> Extend<(&'a K, &'a V)> for HashMap<K, V, S>
where\n K: Eq + Hash + Copy,\n V: Copy,\n S: BuildHasher,

source§

fn extend<T>(&mut self, iter: T)
where\n T: IntoIterator<Item = (&'a K, &'a V)>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, _: (&'a K, &'a V))

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
","Extend<(&'a K, &'a V)>","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> Default for HashMap<K, V, S>
where\n S: Default,

source§

fn default() -> HashMap<K, V, S>

Creates an empty HashMap<K, V, S>, with the Default value for the hasher.

\n
","Default","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> Debug for HashMap<K, V, S>
where\n K: Debug,\n V: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> IntoIterator for HashMap<K, V, S>

source§

fn into_iter(self) -> IntoIter<K, V>

Creates a consuming iterator, that is, one that moves each key-value\npair out of the map in arbitrary order. The map cannot be used after\ncalling this.

\n
Examples
\n
use std::collections::HashMap;\n\nlet map = HashMap::from([\n    (\"a\", 1),\n    (\"b\", 2),\n    (\"c\", 3),\n]);\n\n// Not possible with .iter()\nlet vec: Vec<(&str, i32)> = map.into_iter().collect();
\n
§

type Item = (K, V)

The type of the elements being iterated over.
§

type IntoIter = IntoIter<K, V>

Which kind of iterator are we turning this into?
","IntoIterator","alloy_rpc_types::eth::state::StateOverride"],["
1.56.0 · source§

impl<K, V, const N: usize> From<[(K, V); N]> for HashMap<K, V>
where\n K: Eq + Hash,

source§

fn from(arr: [(K, V); N]) -> HashMap<K, V>

Examples
\n
use std::collections::HashMap;\n\nlet map1 = HashMap::from([(1, 2), (3, 4)]);\nlet map2: HashMap<_, _> = [(1, 2), (3, 4)].into();\nassert_eq!(map1, map2);
\n
","From<[(K, V); N]>","alloy_rpc_types::eth::state::StateOverride"],["
1.36.0 · source§

impl<K, V, S> UnwindSafe for HashMap<K, V, S>
where\n K: UnwindSafe,\n V: UnwindSafe,\n S: UnwindSafe,

","UnwindSafe","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> FromIterator<(K, V)> for HashMap<K, V, S>
where\n K: Eq + Hash,\n S: BuildHasher + Default,

source§

fn from_iter<T>(iter: T) -> HashMap<K, V, S>
where\n T: IntoIterator<Item = (K, V)>,

Creates a value from an iterator. Read more
","FromIterator<(K, V)>","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> PartialEq for HashMap<K, V, S>
where\n K: Eq + Hash,\n V: PartialEq,\n S: BuildHasher,

source§

fn eq(&self, other: &HashMap<K, V, S>) -> bool

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
","PartialEq","alloy_rpc_types::eth::state::StateOverride"],["
1.0.0 · source§

impl<K, V, S> Clone for HashMap<K, V, S>
where\n K: Clone,\n V: Clone,\n S: Clone,

source§

fn clone(&self) -> HashMap<K, V, S>

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &HashMap<K, V, S>)

Performs copy-assignment from source. Read more
","Clone","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, V, S> Deserialize<'de> for HashMap<K, V, S>
where\n K: Deserialize<'de> + Eq + Hash,\n V: Deserialize<'de>,\n S: BuildHasher + Default,

Available on crate feature std only.
source§

fn deserialize<D>(\n deserializer: D\n) -> Result<HashMap<K, V, S>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, V, S, E> IntoDeserializer<'de, E> for HashMap<K, V, S>
where\n K: IntoDeserializer<'de, E> + Eq + Hash,\n V: IntoDeserializer<'de, E>,\n S: BuildHasher,\n E: Error,

Available on crate feature std only.
§

type Deserializer = MapDeserializer<'de, <HashMap<K, V, S> as IntoIterator>::IntoIter, E>

The type of the deserializer being converted into.
source§

fn into_deserializer(\n self\n) -> <HashMap<K, V, S> as IntoDeserializer<'de, E>>::Deserializer

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, V, H> Serialize for HashMap<K, V, H>
where\n K: Serialize,\n V: Serialize,

Available on crate feature std only.
source§

fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","alloy_rpc_types::eth::state::StateOverride"],["
§

impl<'a, K, V, S> Arbitrary<'a> for HashMap<K, V, S>
where\n K: Arbitrary<'a> + Eq + Hash,\n V: Arbitrary<'a>,\n S: BuildHasher + Default,

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<HashMap<K, V, S>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<HashMap<K, V, S>, Error>

Generate an arbitrary value of Self from the entirety of the given\nunstructured data. Read more
§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type\nneeds to construct itself. Read more
","Arbitrary<'a>","alloy_rpc_types::eth::state::StateOverride"],["
§

impl<A, B> Arbitrary for HashMap<A, B>
where\n A: Arbitrary + Hash + Eq,\n B: Arbitrary,

§

type Parameters = (SizeRange, <A as Arbitrary>::Parameters, <B as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration\nof the generated Strategy. Parameters must implement Default.
§

type Strategy = HashMapStrategy<<A as Arbitrary>::Strategy, <B as Arbitrary>::Strategy>

The type of Strategy used to generate values of type Self.
§

fn arbitrary_with(\n args: <HashMap<A, B> as Arbitrary>::Parameters\n) -> <HashMap<A, B> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the\nimplementing type (Self). The strategy is passed the arguments given\nin args. Read more
§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values\nof type the implementing type (Self). Read more
","Arbitrary","alloy_rpc_types::eth::state::StateOverride"],["
§

impl<A, K> ArbitraryF1<A> for HashMap<K, A>
where\n A: Debug,\n K: Hash + Eq + Arbitrary + 'static,

§

type Parameters = (SizeRange, <K as Arbitrary>::Parameters)

The type of parameters that lift1_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift1_with<S>(\n base: S,\n args: <HashMap<K, A> as ArbitraryF1<A>>::Parameters\n) -> BoxedStrategy<HashMap<K, A>>
where\n S: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec of SomeType. The composite strategy is\npassed the arguments given in args. Read more
§

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for SomeType\nto a container such as Vec<SomeType>. Read more
","ArbitraryF1","alloy_rpc_types::eth::state::StateOverride"],["
§

impl<A, B> ArbitraryF2<A, B> for HashMap<A, B>
where\n A: Debug + Eq + Hash,\n B: Debug,

Available on crate feature std only.
§

type Parameters = SizeRange

The type of parameters that lift2_with accepts for\nconfiguration of the lifted and generated Strategy. Parameters\nmust implement Default.
§

fn lift2_with<AS, BS>(\n fst: AS,\n snd: BS,\n args: <HashMap<A, B> as ArbitraryF2<A, B>>::Parameters\n) -> BoxedStrategy<HashMap<A, B>>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>.\nThe composite strategy is passed the arguments given in args. Read more
§

fn lift2<AS, BS>(fst: AS, snd: BS) -> BoxedStrategy<Self>
where\n AS: Strategy<Value = A> + 'static,\n BS: Strategy<Value = B> + 'static,

Lifts two given strategies to a new Strategy for the (presumably)\nbigger type. This is useful for lifting a Strategy for Type1\nand one for Type2 to a container such as HashMap<Type1, Type2>. Read more
","ArbitraryF2","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs, S> DeserializeAs<'de, HashSet<(K, V), S>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,\n (K, V): Eq + Hash,\n S: BuildHasher + Default,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<HashSet<(K, V), S>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, HashSet<(K, V), S>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, Box<[(K, V)]>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<Box<[(K, V)]>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, Box<[(K, V)]>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, LinkedList<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<LinkedList<(K, V)>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, LinkedList<(K, V)>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, V, KU, VU, S> DeserializeAs<'de, HashMap<K, V, S>> for HashMap<KU, VU, S>
where\n KU: DeserializeAs<'de, K>,\n VU: DeserializeAs<'de, V>,\n K: Eq + Hash,\n S: BuildHasher + Default,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<HashMap<K, V, S>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, HashMap>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, Option<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<Option<(K, V)>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, Option<(K, V)>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, BTreeSet<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,\n (K, V): Ord,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<BTreeSet<(K, V)>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, BTreeSet<(K, V)>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, VecDeque<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<VecDeque<(K, V)>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, VecDeque<(K, V)>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, BinaryHeap<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,\n (K, V): Ord,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<BinaryHeap<(K, V)>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, BinaryHeap<(K, V)>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs, const N: usize> DeserializeAs<'de, [(K, V); N]> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<[(K, V); N], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, [(K, V); N]>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<'de, K, KAs, V, VAs> DeserializeAs<'de, Vec<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: DeserializeAs<'de, K>,\n VAs: DeserializeAs<'de, V>,

source§

fn deserialize_as<D>(\n deserializer: D\n) -> Result<Vec<(K, V)>, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
","DeserializeAs<'de, Vec<(K, V)>>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs, const N: usize> SerializeAs<[(K, V); N]> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &[(K, V); N],\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs<[(K, V); N]>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KU, V, VU, H> SerializeAs<HashMap<K, V, H>> for HashMap<KU, VU, H>
where\n KU: SerializeAs<K>,\n VU: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &HashMap<K, V, H>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<[(K, V)]> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &[(K, V)],\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs<[(K, V)]>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<LinkedList<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &LinkedList<(K, V)>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<Vec<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &Vec<(K, V)>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<VecDeque<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &VecDeque<(K, V)>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<BinaryHeap<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &BinaryHeap<(K, V)>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<Option<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &Option<(K, V)>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<BTreeSet<(K, V)>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &BTreeSet<(K, V)>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs> SerializeAs<Box<[(K, V)]>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &Box<[(K, V)]>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"],["
source§

impl<K, KAs, V, VAs, H> SerializeAs<HashSet<(K, V), H>> for HashMap<KAs, VAs>
where\n KAs: SerializeAs<K>,\n VAs: SerializeAs<V>,

source§

fn serialize_as<S>(\n source: &HashSet<(K, V), H>,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs>","alloy_rpc_types::eth::state::StateOverride"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/std/primitive.fn.js b/type.impl/std/primitive.fn.js new file mode 100644 index 000000000000..4f0c0ee076a5 --- /dev/null +++ b/type.impl/std/primitive.fn.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_providers":[] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/type.impl/tokio_tungstenite/struct.WebSocketStream.js b/type.impl/tokio_tungstenite/struct.WebSocketStream.js new file mode 100644 index 000000000000..5244b68851d3 --- /dev/null +++ b/type.impl/tokio_tungstenite/struct.WebSocketStream.js @@ -0,0 +1,3 @@ +(function() {var type_impls = { +"alloy_transport_ws":[["
§

impl<S> WebSocketStream<S>

pub async fn from_raw_socket(\n stream: S,\n role: Role,\n config: Option<WebSocketConfig>\n) -> WebSocketStream<S>
where\n S: AsyncRead + AsyncWrite + Unpin,

Convert a raw socket into a WebSocketStream without performing a\nhandshake.

\n

pub async fn from_partially_read(\n stream: S,\n part: Vec<u8>,\n role: Role,\n config: Option<WebSocketConfig>\n) -> WebSocketStream<S>
where\n S: AsyncRead + AsyncWrite + Unpin,

Convert a raw socket into a WebSocketStream without performing a\nhandshake.

\n

pub fn get_ref(&self) -> &S
where\n S: AsyncRead + AsyncWrite + Unpin,

Returns a shared reference to the inner stream.

\n

pub fn get_mut(&mut self) -> &mut S
where\n S: AsyncRead + AsyncWrite + Unpin,

Returns a mutable reference to the inner stream.

\n

pub fn get_config(&self) -> &WebSocketConfig

Returns a reference to the configuration of the tungstenite stream.

\n

pub async fn close(&mut self, msg: Option<CloseFrame<'_>>) -> Result<(), Error>
where\n S: AsyncRead + AsyncWrite + Unpin,

Close the underlying web socket

\n
",0,"alloy_transport_ws::native::TungsteniteStream"],["
§

impl<S> Debug for WebSocketStream<S>
where\n S: Debug,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","alloy_transport_ws::native::TungsteniteStream"],["
§

impl<T> Sink<Message> for WebSocketStream<T>
where\n T: AsyncRead + AsyncWrite + Unpin,

§

type Error = Error

The type of value produced by the sink when an error occurs.
§

fn poll_ready(\n self: Pin<&mut WebSocketStream<T>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), <WebSocketStream<T> as Sink<Message>>::Error>>

Attempts to prepare the Sink to receive a value. Read more
§

fn start_send(\n self: Pin<&mut WebSocketStream<T>>,\n item: Message\n) -> Result<(), <WebSocketStream<T> as Sink<Message>>::Error>

Begin the process of sending a value to the sink.\nEach call to this function must be preceded by a successful call to\npoll_ready which returned Poll::Ready(Ok(())). Read more
§

fn poll_flush(\n self: Pin<&mut WebSocketStream<T>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), <WebSocketStream<T> as Sink<Message>>::Error>>

Flush any remaining output from this sink. Read more
§

fn poll_close(\n self: Pin<&mut WebSocketStream<T>>,\n cx: &mut Context<'_>\n) -> Poll<Result<(), <WebSocketStream<T> as Sink<Message>>::Error>>

Flush any remaining output and close this sink, if necessary. Read more
","Sink","alloy_transport_ws::native::TungsteniteStream"],["
§

impl<T> FusedStream for WebSocketStream<T>
where\n T: AsyncRead + AsyncWrite + Unpin,

§

fn is_terminated(&self) -> bool

Returns true if the stream should no longer be polled.
","FusedStream","alloy_transport_ws::native::TungsteniteStream"],["
§

impl<T> Stream for WebSocketStream<T>
where\n T: AsyncRead + AsyncWrite + Unpin,

§

type Item = Result<Message, Error>

Values yielded by the stream.
§

fn poll_next(\n self: Pin<&mut WebSocketStream<T>>,\n cx: &mut Context<'_>\n) -> Poll<Option<<WebSocketStream<T> as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the\ncurrent task for wakeup if the value is not yet available, and returning\nNone if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more
","Stream","alloy_transport_ws::native::TungsteniteStream"]] +};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file