pub type TmpDB = Arc<TempDatabase<DatabaseEnv>>;
Expand description
A shared TempDatabase
used for testing
Aliased Type§
struct TmpDB { /* 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: 8 bytes
Implementations
Source§impl<T> Arc<T>where
T: ?Sized,
impl<T> Arc<T>where
T: ?Sized,
1.17.0 · Sourcepub unsafe fn from_raw(ptr: *const T) -> Arc<T>
pub unsafe fn from_raw(ptr: *const T) -> Arc<T>
Constructs an Arc<T>
from a raw pointer.
The raw pointer must have been previously returned by a call to
Arc<U>::into_raw
with the following requirements:
- If
U
is sized, it must have the same size and alignment asT
. This is trivially true ifU
isT
. - If
U
is unsized, its data pointer must have the same size and alignment asT
. This is trivially true ifArc<U>
was constructed throughArc<T>
and then converted toArc<U>
through an unsized coercion.
Note that if U
or U
’s data pointer is not T
but has the same size
and alignment, this is basically like transmuting references of
different types. See mem::transmute
for more information
on what restrictions apply in this case.
The raw pointer must point to a block of memory allocated by the global allocator.
The user of from_raw
has to make sure a specific value of T
is only
dropped once.
This function is unsafe because improper use may lead to memory unsafety,
even if the returned Arc<T>
is never accessed.
§Examples
use std::sync::Arc;
let x = Arc::new("hello".to_owned());
let x_ptr = Arc::into_raw(x);
unsafe {
// Convert back to an `Arc` to prevent leak.
let x = Arc::from_raw(x_ptr);
assert_eq!(&*x, "hello");
// Further calls to `Arc::from_raw(x_ptr)` would be memory-unsafe.
}
// The memory was freed when `x` went out of scope above, so `x_ptr` is now dangling!
Convert a slice back into its original array:
use std::sync::Arc;
let x: Arc<[u32]> = Arc::new([1, 2, 3]);
let x_ptr: *const [u32] = Arc::into_raw(x);
unsafe {
let x: Arc<[u32; 3]> = Arc::from_raw(x_ptr.cast::<[u32; 3]>());
assert_eq!(&*x, &[1, 2, 3]);
}
1.51.0 · Sourcepub unsafe fn increment_strong_count(ptr: *const T)
pub unsafe fn increment_strong_count(ptr: *const T)
Increments the strong reference count on the Arc<T>
associated with the
provided pointer by one.
§Safety
The pointer must have been obtained through Arc::into_raw
and must satisfy the
same layout requirements specified in Arc::from_raw_in
.
The associated Arc
instance must be valid (i.e. the strong count must be at
least 1) for the duration of this method, and ptr
must point to a block of memory
allocated by the global allocator.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
unsafe {
let ptr = Arc::into_raw(five);
Arc::increment_strong_count(ptr);
// This assertion is deterministic because we haven't shared
// the `Arc` between threads.
let five = Arc::from_raw(ptr);
assert_eq!(2, Arc::strong_count(&five));
}
1.51.0 · Sourcepub unsafe fn decrement_strong_count(ptr: *const T)
pub unsafe fn decrement_strong_count(ptr: *const T)
Decrements the strong reference count on the Arc<T>
associated with the
provided pointer by one.
§Safety
The pointer must have been obtained through Arc::into_raw
and must satisfy the
same layout requirements specified in Arc::from_raw_in
.
The associated Arc
instance must be valid (i.e. the strong count must be at
least 1) when invoking this method, and ptr
must point to a block of memory
allocated by the global allocator. This method can be used to release the final
Arc
and backing storage, but should not be called after the final Arc
has been
released.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
unsafe {
let ptr = Arc::into_raw(five);
Arc::increment_strong_count(ptr);
// Those assertions are deterministic because we haven't shared
// the `Arc` between threads.
let five = Arc::from_raw(ptr);
assert_eq!(2, Arc::strong_count(&five));
Arc::decrement_strong_count(ptr);
assert_eq!(1, Arc::strong_count(&five));
}
Source§impl<T> Arc<T>
impl<T> Arc<T>
1.60.0 · Sourcepub fn new_cyclic<F>(data_fn: F) -> Arc<T>
pub fn new_cyclic<F>(data_fn: F) -> Arc<T>
Constructs a new Arc<T>
while giving you a Weak<T>
to the allocation,
to allow you to construct a T
which holds a weak pointer to itself.
Generally, a structure circularly referencing itself, either directly or
indirectly, should not hold a strong reference to itself to prevent a memory leak.
Using this function, you get access to the weak pointer during the
initialization of T
, before the Arc<T>
is created, such that you can
clone and store it inside the T
.
new_cyclic
first allocates the managed allocation for the Arc<T>
,
then calls your closure, giving it a Weak<T>
to this allocation,
and only afterwards completes the construction of the Arc<T>
by placing
the T
returned from your closure into the allocation.
Since the new Arc<T>
is not fully-constructed until Arc<T>::new_cyclic
returns, calling upgrade
on the weak reference inside your closure will
fail and result in a None
value.
§Panics
If data_fn
panics, the panic is propagated to the caller, and the
temporary Weak<T>
is dropped normally.
§Example
use std::sync::{Arc, Weak};
struct Gadget {
me: Weak<Gadget>,
}
impl Gadget {
/// Constructs a reference counted Gadget.
fn new() -> Arc<Self> {
// `me` is a `Weak<Gadget>` pointing at the new allocation of the
// `Arc` we're constructing.
Arc::new_cyclic(|me| {
// Create the actual struct here.
Gadget { me: me.clone() }
})
}
/// Returns a reference counted pointer to Self.
fn me(&self) -> Arc<Self> {
self.me.upgrade().unwrap()
}
}
1.82.0 · Sourcepub fn new_uninit() -> Arc<MaybeUninit<T>>
pub fn new_uninit() -> Arc<MaybeUninit<T>>
Constructs a new Arc
with uninitialized contents.
§Examples
#![feature(get_mut_unchecked)]
use std::sync::Arc;
let mut five = Arc::<u32>::new_uninit();
// Deferred initialization:
Arc::get_mut(&mut five).unwrap().write(5);
let five = unsafe { five.assume_init() };
assert_eq!(*five, 5)
Sourcepub fn new_zeroed() -> Arc<MaybeUninit<T>>
🔬This is a nightly-only experimental API. (new_zeroed_alloc
#129396)
pub fn new_zeroed() -> Arc<MaybeUninit<T>>
new_zeroed_alloc
#129396)Constructs a new Arc
with uninitialized contents, with the memory
being filled with 0
bytes.
See MaybeUninit::zeroed
for examples of correct and incorrect usage
of this method.
§Examples
#![feature(new_zeroed_alloc)]
use std::sync::Arc;
let zero = Arc::<u32>::new_zeroed();
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0)
1.33.0 · Sourcepub fn pin(data: T) -> Pin<Arc<T>>
pub fn pin(data: T) -> Pin<Arc<T>>
Constructs a new Pin<Arc<T>>
. If T
does not implement Unpin
, then
data
will be pinned in memory and unable to be moved.
Sourcepub fn try_pin(data: T) -> Result<Pin<Arc<T>>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_pin(data: T) -> Result<Pin<Arc<T>>, AllocError>
allocator_api
#32838)Constructs a new Pin<Arc<T>>
, return an error if allocation fails.
Sourcepub fn try_new(data: T) -> Result<Arc<T>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new(data: T) -> Result<Arc<T>, AllocError>
allocator_api
#32838)Constructs a new Arc<T>
, returning an error if allocation fails.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
let five = Arc::try_new(5)?;
Sourcepub fn try_new_uninit() -> Result<Arc<MaybeUninit<T>>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_uninit() -> Result<Arc<MaybeUninit<T>>, AllocError>
allocator_api
#32838)Constructs a new Arc
with uninitialized contents, returning an error
if allocation fails.
§Examples
#![feature(allocator_api)]
#![feature(get_mut_unchecked)]
use std::sync::Arc;
let mut five = Arc::<u32>::try_new_uninit()?;
// Deferred initialization:
Arc::get_mut(&mut five).unwrap().write(5);
let five = unsafe { five.assume_init() };
assert_eq!(*five, 5);
Sourcepub fn try_new_zeroed() -> Result<Arc<MaybeUninit<T>>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_zeroed() -> Result<Arc<MaybeUninit<T>>, AllocError>
allocator_api
#32838)Constructs a new Arc
with uninitialized contents, with the memory
being filled with 0
bytes, returning an error if allocation fails.
See MaybeUninit::zeroed
for examples of correct and incorrect usage
of this method.
§Examples
#![feature( allocator_api)]
use std::sync::Arc;
let zero = Arc::<u32>::try_new_zeroed()?;
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0);
Source§impl<T, A> Arc<T, A>
impl<T, A> Arc<T, A>
Sourcepub fn allocator(this: &Arc<T, A>) -> &A
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn allocator(this: &Arc<T, A>) -> &A
allocator_api
#32838)Returns a reference to the underlying allocator.
Note: this is an associated function, which means that you have
to call it as Arc::allocator(&a)
instead of a.allocator()
. This
is so that there is no conflict with a method on the inner type.
1.17.0 · Sourcepub fn into_raw(this: Arc<T, A>) -> *const T
pub fn into_raw(this: Arc<T, A>) -> *const T
Consumes the Arc
, returning the wrapped pointer.
To avoid a memory leak the pointer must be converted back to an Arc
using
Arc::from_raw
.
§Examples
use std::sync::Arc;
let x = Arc::new("hello".to_owned());
let x_ptr = Arc::into_raw(x);
assert_eq!(unsafe { &*x_ptr }, "hello");
Sourcepub fn into_raw_with_allocator(this: Arc<T, A>) -> (*const T, A)
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn into_raw_with_allocator(this: Arc<T, A>) -> (*const T, A)
allocator_api
#32838)Consumes the Arc
, returning the wrapped pointer and allocator.
To avoid a memory leak the pointer must be converted back to an Arc
using
Arc::from_raw_in
.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let x = Arc::new_in("hello".to_owned(), System);
let (ptr, alloc) = Arc::into_raw_with_allocator(x);
assert_eq!(unsafe { &*ptr }, "hello");
let x = unsafe { Arc::from_raw_in(ptr, alloc) };
assert_eq!(&*x, "hello");
1.45.0 · Sourcepub fn as_ptr(this: &Arc<T, A>) -> *const T
pub fn as_ptr(this: &Arc<T, A>) -> *const T
Provides a raw pointer to the data.
The counts are not affected in any way and the Arc
is not consumed. The pointer is valid for
as long as there are strong counts in the Arc
.
§Examples
use std::sync::Arc;
let x = Arc::new("hello".to_owned());
let y = Arc::clone(&x);
let x_ptr = Arc::as_ptr(&x);
assert_eq!(x_ptr, Arc::as_ptr(&y));
assert_eq!(unsafe { &*x_ptr }, "hello");
Sourcepub unsafe fn from_raw_in(ptr: *const T, alloc: A) -> Arc<T, A>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub unsafe fn from_raw_in(ptr: *const T, alloc: A) -> Arc<T, A>
allocator_api
#32838)Constructs an Arc<T, A>
from a raw pointer.
The raw pointer must have been previously returned by a call to Arc<U, A>::into_raw
with the following requirements:
- If
U
is sized, it must have the same size and alignment asT
. This is trivially true ifU
isT
. - If
U
is unsized, its data pointer must have the same size and alignment asT
. This is trivially true ifArc<U>
was constructed throughArc<T>
and then converted toArc<U>
through an unsized coercion.
Note that if U
or U
’s data pointer is not T
but has the same size
and alignment, this is basically like transmuting references of
different types. See mem::transmute
for more information
on what restrictions apply in this case.
The raw pointer must point to a block of memory allocated by alloc
The user of from_raw
has to make sure a specific value of T
is only
dropped once.
This function is unsafe because improper use may lead to memory unsafety,
even if the returned Arc<T>
is never accessed.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let x = Arc::new_in("hello".to_owned(), System);
let x_ptr = Arc::into_raw(x);
unsafe {
// Convert back to an `Arc` to prevent leak.
let x = Arc::from_raw_in(x_ptr, System);
assert_eq!(&*x, "hello");
// Further calls to `Arc::from_raw(x_ptr)` would be memory-unsafe.
}
// The memory was freed when `x` went out of scope above, so `x_ptr` is now dangling!
Convert a slice back into its original array:
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let x: Arc<[u32], _> = Arc::new_in([1, 2, 3], System);
let x_ptr: *const [u32] = Arc::into_raw(x);
unsafe {
let x: Arc<[u32; 3], _> = Arc::from_raw_in(x_ptr.cast::<[u32; 3]>(), System);
assert_eq!(&*x, &[1, 2, 3]);
}
1.15.0 · Sourcepub fn weak_count(this: &Arc<T, A>) -> usize
pub fn weak_count(this: &Arc<T, A>) -> usize
Gets the number of Weak
pointers to this allocation.
§Safety
This method by itself is safe, but using it correctly requires extra care. Another thread can change the weak count at any time, including potentially between calling this method and acting on the result.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
let _weak_five = Arc::downgrade(&five);
// This assertion is deterministic because we haven't shared
// the `Arc` or `Weak` between threads.
assert_eq!(1, Arc::weak_count(&five));
1.15.0 · Sourcepub fn strong_count(this: &Arc<T, A>) -> usize
pub fn strong_count(this: &Arc<T, A>) -> usize
Gets the number of strong (Arc
) pointers to this allocation.
§Safety
This method by itself is safe, but using it correctly requires extra care. Another thread can change the strong count at any time, including potentially between calling this method and acting on the result.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
let _also_five = Arc::clone(&five);
// This assertion is deterministic because we haven't shared
// the `Arc` between threads.
assert_eq!(2, Arc::strong_count(&five));
Sourcepub unsafe fn increment_strong_count_in(ptr: *const T, alloc: A)where
A: Clone,
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub unsafe fn increment_strong_count_in(ptr: *const T, alloc: A)where
A: Clone,
allocator_api
#32838)Increments the strong reference count on the Arc<T>
associated with the
provided pointer by one.
§Safety
The pointer must have been obtained through Arc::into_raw
and must satisfy the
same layout requirements specified in Arc::from_raw_in
.
The associated Arc
instance must be valid (i.e. the strong count must be at
least 1) for the duration of this method, and ptr
must point to a block of memory
allocated by alloc
.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let five = Arc::new_in(5, System);
unsafe {
let ptr = Arc::into_raw(five);
Arc::increment_strong_count_in(ptr, System);
// This assertion is deterministic because we haven't shared
// the `Arc` between threads.
let five = Arc::from_raw_in(ptr, System);
assert_eq!(2, Arc::strong_count(&five));
}
Sourcepub unsafe fn decrement_strong_count_in(ptr: *const T, alloc: A)
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub unsafe fn decrement_strong_count_in(ptr: *const T, alloc: A)
allocator_api
#32838)Decrements the strong reference count on the Arc<T>
associated with the
provided pointer by one.
§Safety
The pointer must have been obtained through Arc::into_raw
and must satisfy the
same layout requirements specified in Arc::from_raw_in
.
The associated Arc
instance must be valid (i.e. the strong count must be at
least 1) when invoking this method, and ptr
must point to a block of memory
allocated by alloc
. This method can be used to release the final
Arc
and backing storage, but should not be called after the final Arc
has been
released.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let five = Arc::new_in(5, System);
unsafe {
let ptr = Arc::into_raw(five);
Arc::increment_strong_count_in(ptr, System);
// Those assertions are deterministic because we haven't shared
// the `Arc` between threads.
let five = Arc::from_raw_in(ptr, System);
assert_eq!(2, Arc::strong_count(&five));
Arc::decrement_strong_count_in(ptr, System);
assert_eq!(1, Arc::strong_count(&five));
}
1.17.0 · Sourcepub fn ptr_eq(this: &Arc<T, A>, other: &Arc<T, A>) -> bool
pub fn ptr_eq(this: &Arc<T, A>, other: &Arc<T, A>) -> bool
Returns true
if the two Arc
s point to the same allocation in a vein similar to
ptr::eq
. This function ignores the metadata of dyn Trait
pointers.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
let same_five = Arc::clone(&five);
let other_five = Arc::new(5);
assert!(Arc::ptr_eq(&five, &same_five));
assert!(!Arc::ptr_eq(&five, &other_five));
Source§impl<T, A> Arc<T, A>
impl<T, A> Arc<T, A>
1.4.0 · Sourcepub fn make_mut(this: &mut Arc<T, A>) -> &mut T
pub fn make_mut(this: &mut Arc<T, A>) -> &mut T
Makes a mutable reference into the given Arc
.
If there are other Arc
pointers to the same allocation, then make_mut
will
clone
the inner value to a new allocation to ensure unique ownership. This is also
referred to as clone-on-write.
However, if there are no other Arc
pointers to this allocation, but some Weak
pointers, then the Weak
pointers will be dissociated and the inner value will not
be cloned.
See also get_mut
, which will fail rather than cloning the inner value
or dissociating Weak
pointers.
§Examples
use std::sync::Arc;
let mut data = Arc::new(5);
*Arc::make_mut(&mut data) += 1; // Won't clone anything
let mut other_data = Arc::clone(&data); // Won't clone inner data
*Arc::make_mut(&mut data) += 1; // Clones inner data
*Arc::make_mut(&mut data) += 1; // Won't clone anything
*Arc::make_mut(&mut other_data) *= 2; // Won't clone anything
// Now `data` and `other_data` point to different allocations.
assert_eq!(*data, 8);
assert_eq!(*other_data, 12);
Weak
pointers will be dissociated:
use std::sync::Arc;
let mut data = Arc::new(75);
let weak = Arc::downgrade(&data);
assert!(75 == *data);
assert!(75 == *weak.upgrade().unwrap());
*Arc::make_mut(&mut data) += 1;
assert!(76 == *data);
assert!(weak.upgrade().is_none());
Source§impl<T, A> Arc<T, A>
impl<T, A> Arc<T, A>
1.76.0 · Sourcepub fn unwrap_or_clone(this: Arc<T, A>) -> T
pub fn unwrap_or_clone(this: Arc<T, A>) -> T
If we have the only reference to T
then unwrap it. Otherwise, clone T
and return the
clone.
Assuming arc_t
is of type Arc<T>
, this function is functionally equivalent to
(*arc_t).clone()
, but will avoid cloning the inner value where possible.
§Examples
let inner = String::from("test");
let ptr = inner.as_ptr();
let arc = Arc::new(inner);
let inner = Arc::unwrap_or_clone(arc);
// The inner value was not cloned
assert!(ptr::eq(ptr, inner.as_ptr()));
let arc = Arc::new(inner);
let arc2 = arc.clone();
let inner = Arc::unwrap_or_clone(arc);
// Because there were 2 references, we had to clone the inner value.
assert!(!ptr::eq(ptr, inner.as_ptr()));
// `arc2` is the last reference, so when we unwrap it we get back
// the original `String`.
let inner = Arc::unwrap_or_clone(arc2);
assert!(ptr::eq(ptr, inner.as_ptr()));
Source§impl<T, A> Arc<T, A>
impl<T, A> Arc<T, A>
1.4.0 · Sourcepub fn get_mut(this: &mut Arc<T, A>) -> Option<&mut T>
pub fn get_mut(this: &mut Arc<T, A>) -> Option<&mut T>
Returns a mutable reference into the given Arc
, if there are
no other Arc
or Weak
pointers to the same allocation.
Returns None
otherwise, because it is not safe to
mutate a shared value.
See also make_mut
, which will clone
the inner value when there are other Arc
pointers.
§Examples
use std::sync::Arc;
let mut x = Arc::new(3);
*Arc::get_mut(&mut x).unwrap() = 4;
assert_eq!(*x, 4);
let _y = Arc::clone(&x);
assert!(Arc::get_mut(&mut x).is_none());
Sourcepub unsafe fn get_mut_unchecked(this: &mut Arc<T, A>) -> &mut T
🔬This is a nightly-only experimental API. (get_mut_unchecked
#63292)
pub unsafe fn get_mut_unchecked(this: &mut Arc<T, A>) -> &mut T
get_mut_unchecked
#63292)Returns a mutable reference into the given Arc
,
without any check.
See also get_mut
, which is safe and does appropriate checks.
§Safety
If any other Arc
or Weak
pointers to the same allocation exist, then
they must not be dereferenced or have active borrows for the duration
of the returned borrow, and their inner type must be exactly the same as the
inner type of this Rc (including lifetimes). This is trivially the case if no
such pointers exist, for example immediately after Arc::new
.
§Examples
#![feature(get_mut_unchecked)]
use std::sync::Arc;
let mut x = Arc::new(String::new());
unsafe {
Arc::get_mut_unchecked(&mut x).push_str("foo")
}
assert_eq!(*x, "foo");
Other Arc
pointers to the same allocation must be to the same type.
#![feature(get_mut_unchecked)]
use std::sync::Arc;
let x: Arc<str> = Arc::from("Hello, world!");
let mut y: Arc<[u8]> = x.clone().into();
unsafe {
// this is Undefined Behavior, because x's inner type is str, not [u8]
Arc::get_mut_unchecked(&mut y).fill(0xff); // 0xff is invalid in UTF-8
}
println!("{}", &*x); // Invalid UTF-8 in a str
Other Arc
pointers to the same allocation must be to the exact same type, including lifetimes.
#![feature(get_mut_unchecked)]
use std::sync::Arc;
let x: Arc<&str> = Arc::new("Hello, world!");
{
let s = String::from("Oh, no!");
let mut y: Arc<&str> = x.clone();
unsafe {
// this is Undefined Behavior, because x's inner type
// is &'long str, not &'short str
*Arc::get_mut_unchecked(&mut y) = &s;
}
}
println!("{}", &*x); // Use-after-free
Source§impl<T, A> Arc<T, A>where
A: Allocator,
impl<T, A> Arc<T, A>where
A: Allocator,
Sourcepub fn new_in(data: T, alloc: A) -> Arc<T, A>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn new_in(data: T, alloc: A) -> Arc<T, A>
allocator_api
#32838)Constructs a new Arc<T>
in the provided allocator.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let five = Arc::new_in(5, System);
Sourcepub fn new_uninit_in(alloc: A) -> Arc<MaybeUninit<T>, A>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn new_uninit_in(alloc: A) -> Arc<MaybeUninit<T>, A>
allocator_api
#32838)Constructs a new Arc
with uninitialized contents in the provided allocator.
§Examples
#![feature(get_mut_unchecked)]
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let mut five = Arc::<u32, _>::new_uninit_in(System);
let five = unsafe {
// Deferred initialization:
Arc::get_mut_unchecked(&mut five).as_mut_ptr().write(5);
five.assume_init()
};
assert_eq!(*five, 5)
Sourcepub fn new_zeroed_in(alloc: A) -> Arc<MaybeUninit<T>, A>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn new_zeroed_in(alloc: A) -> Arc<MaybeUninit<T>, A>
allocator_api
#32838)Constructs a new Arc
with uninitialized contents, with the memory
being filled with 0
bytes, in the provided allocator.
See MaybeUninit::zeroed
for examples of correct and incorrect usage
of this method.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let zero = Arc::<u32, _>::new_zeroed_in(System);
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0)
Sourcepub fn new_cyclic_in<F>(data_fn: F, alloc: A) -> Arc<T, A>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn new_cyclic_in<F>(data_fn: F, alloc: A) -> Arc<T, A>
allocator_api
#32838)Constructs a new Arc<T, A>
in the given allocator while giving you a Weak<T, A>
to the allocation,
to allow you to construct a T
which holds a weak pointer to itself.
Generally, a structure circularly referencing itself, either directly or
indirectly, should not hold a strong reference to itself to prevent a memory leak.
Using this function, you get access to the weak pointer during the
initialization of T
, before the Arc<T, A>
is created, such that you can
clone and store it inside the T
.
new_cyclic_in
first allocates the managed allocation for the Arc<T, A>
,
then calls your closure, giving it a Weak<T, A>
to this allocation,
and only afterwards completes the construction of the Arc<T, A>
by placing
the T
returned from your closure into the allocation.
Since the new Arc<T, A>
is not fully-constructed until Arc<T, A>::new_cyclic_in
returns, calling upgrade
on the weak reference inside your closure will
fail and result in a None
value.
§Panics
If data_fn
panics, the panic is propagated to the caller, and the
temporary Weak<T>
is dropped normally.
§Example
See new_cyclic
Sourcepub fn pin_in(data: T, alloc: A) -> Pin<Arc<T, A>>where
A: 'static,
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn pin_in(data: T, alloc: A) -> Pin<Arc<T, A>>where
A: 'static,
allocator_api
#32838)Constructs a new Pin<Arc<T, A>>
in the provided allocator. If T
does not implement Unpin
,
then data
will be pinned in memory and unable to be moved.
Sourcepub fn try_pin_in(data: T, alloc: A) -> Result<Pin<Arc<T, A>>, AllocError>where
A: 'static,
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_pin_in(data: T, alloc: A) -> Result<Pin<Arc<T, A>>, AllocError>where
A: 'static,
allocator_api
#32838)Constructs a new Pin<Arc<T, A>>
in the provided allocator, return an error if allocation
fails.
Sourcepub fn try_new_in(data: T, alloc: A) -> Result<Arc<T, A>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_in(data: T, alloc: A) -> Result<Arc<T, A>, AllocError>
allocator_api
#32838)Constructs a new Arc<T, A>
in the provided allocator, returning an error if allocation fails.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let five = Arc::try_new_in(5, System)?;
Sourcepub fn try_new_uninit_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_uninit_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>
allocator_api
#32838)Constructs a new Arc
with uninitialized contents, in the provided allocator, returning an
error if allocation fails.
§Examples
#![feature(allocator_api)]
#![feature(get_mut_unchecked)]
use std::sync::Arc;
use std::alloc::System;
let mut five = Arc::<u32, _>::try_new_uninit_in(System)?;
let five = unsafe {
// Deferred initialization:
Arc::get_mut_unchecked(&mut five).as_mut_ptr().write(5);
five.assume_init()
};
assert_eq!(*five, 5);
Sourcepub fn try_new_zeroed_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_zeroed_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>
allocator_api
#32838)Constructs a new Arc
with uninitialized contents, with the memory
being filled with 0
bytes, in the provided allocator, returning an error if allocation
fails.
See MaybeUninit::zeroed
for examples of correct and incorrect usage
of this method.
§Examples
#![feature(allocator_api)]
use std::sync::Arc;
use std::alloc::System;
let zero = Arc::<u32, _>::try_new_zeroed_in(System)?;
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0);
1.4.0 · Sourcepub fn try_unwrap(this: Arc<T, A>) -> Result<T, Arc<T, A>>
pub fn try_unwrap(this: Arc<T, A>) -> Result<T, Arc<T, A>>
Returns the inner value, if the Arc
has exactly one strong reference.
Otherwise, an Err
is returned with the same Arc
that was
passed in.
This will succeed even if there are outstanding weak references.
It is strongly recommended to use Arc::into_inner
instead if you don’t
keep the Arc
in the Err
case.
Immediately dropping the Err
-value, as the expression
Arc::try_unwrap(this).ok()
does, can cause the strong count to
drop to zero and the inner value of the Arc
to be dropped.
For instance, if two threads execute such an expression in parallel,
there is a race condition without the possibility of unsafety:
The threads could first both check whether they own the last instance
in Arc::try_unwrap
, determine that they both do not, and then both
discard and drop their instance in the call to ok
.
In this scenario, the value inside the Arc
is safely destroyed
by exactly one of the threads, but neither thread will ever be able
to use the value.
§Examples
use std::sync::Arc;
let x = Arc::new(3);
assert_eq!(Arc::try_unwrap(x), Ok(3));
let x = Arc::new(4);
let _y = Arc::clone(&x);
assert_eq!(*Arc::try_unwrap(x).unwrap_err(), 4);
1.70.0 · Sourcepub fn into_inner(this: Arc<T, A>) -> Option<T>
pub fn into_inner(this: Arc<T, A>) -> Option<T>
Returns the inner value, if the Arc
has exactly one strong reference.
Otherwise, None
is returned and the Arc
is dropped.
This will succeed even if there are outstanding weak references.
If Arc::into_inner
is called on every clone of this Arc
,
it is guaranteed that exactly one of the calls returns the inner value.
This means in particular that the inner value is not dropped.
Arc::try_unwrap
is conceptually similar to Arc::into_inner
, but it
is meant for different use-cases. If used as a direct replacement
for Arc::into_inner
anyway, such as with the expression
Arc::try_unwrap(this).ok()
, then it does
not give the same guarantee as described in the previous paragraph.
For more information, see the examples below and read the documentation
of Arc::try_unwrap
.
§Examples
Minimal example demonstrating the guarantee that Arc::into_inner
gives.
use std::sync::Arc;
let x = Arc::new(3);
let y = Arc::clone(&x);
// Two threads calling `Arc::into_inner` on both clones of an `Arc`:
let x_thread = std::thread::spawn(|| Arc::into_inner(x));
let y_thread = std::thread::spawn(|| Arc::into_inner(y));
let x_inner_value = x_thread.join().unwrap();
let y_inner_value = y_thread.join().unwrap();
// One of the threads is guaranteed to receive the inner value:
assert!(matches!(
(x_inner_value, y_inner_value),
(None, Some(3)) | (Some(3), None)
));
// The result could also be `(None, None)` if the threads called
// `Arc::try_unwrap(x).ok()` and `Arc::try_unwrap(y).ok()` instead.
A more practical example demonstrating the need for Arc::into_inner
:
use std::sync::Arc;
// Definition of a simple singly linked list using `Arc`:
#[derive(Clone)]
struct LinkedList<T>(Option<Arc<Node<T>>>);
struct Node<T>(T, Option<Arc<Node<T>>>);
// Dropping a long `LinkedList<T>` relying on the destructor of `Arc`
// can cause a stack overflow. To prevent this, we can provide a
// manual `Drop` implementation that does the destruction in a loop:
impl<T> Drop for LinkedList<T> {
fn drop(&mut self) {
let mut link = self.0.take();
while let Some(arc_node) = link.take() {
if let Some(Node(_value, next)) = Arc::into_inner(arc_node) {
link = next;
}
}
}
}
// Implementation of `new` and `push` omitted
impl<T> LinkedList<T> {
/* ... */
}
// The following code could have still caused a stack overflow
// despite the manual `Drop` impl if that `Drop` impl had used
// `Arc::try_unwrap(arc).ok()` instead of `Arc::into_inner(arc)`.
// Create a long list and clone it
let mut x = LinkedList::new();
let size = 100000;
for i in 0..size {
x.push(i); // Adds i to the front of x
}
let y = x.clone();
// Drop the clones in parallel
let x_thread = std::thread::spawn(|| drop(x));
let y_thread = std::thread::spawn(|| drop(y));
x_thread.join().unwrap();
y_thread.join().unwrap();
Trait Implementations
§impl<T> AccessListItemTr for Arc<T>where
T: AccessListItemTr + ?Sized,
impl<T> AccessListItemTr for Arc<T>where
T: AccessListItemTr + ?Sized,
§fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>
fn storage_slots(&self) -> impl Iterator<Item = &FixedBytes<32>>
§impl<T> AccountExtReader for Arc<T>where
T: AccountExtReader + ?Sized,
impl<T> AccountExtReader for Arc<T>where
T: AccountExtReader + ?Sized,
§fn changed_accounts_with_range(
&self,
_range: impl RangeBounds<u64>,
) -> Result<BTreeSet<Address>, ProviderError>
fn changed_accounts_with_range( &self, _range: impl RangeBounds<u64>, ) -> Result<BTreeSet<Address>, ProviderError>
§fn basic_accounts(
&self,
_iter: impl IntoIterator<Item = Address>,
) -> Result<Vec<(Address, Option<Account>)>, ProviderError>
fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> Result<Vec<(Address, Option<Account>)>, ProviderError>
AccountReader::basic_account
] repeatedly. Read more§fn changed_accounts_and_blocks_with_range(
&self,
range: RangeInclusive<u64>,
) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>
fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>
§impl<T> AccountReader for Arc<T>where
T: AccountReader + ?Sized,
impl<T> AccountReader for Arc<T>where
T: AccountReader + ?Sized,
§fn basic_account(
&self,
address: &Address,
) -> Result<Option<Account>, ProviderError>
fn basic_account( &self, address: &Address, ) -> Result<Option<Account>, ProviderError>
§impl<T> BlockHeader for Arc<T>where
T: BlockHeader + ?Sized,
impl<T> BlockHeader for Arc<T>where
T: BlockHeader + ?Sized,
§fn parent_hash(&self) -> FixedBytes<32>
fn parent_hash(&self) -> FixedBytes<32>
§fn ommers_hash(&self) -> FixedBytes<32>
fn ommers_hash(&self) -> FixedBytes<32>
§fn beneficiary(&self) -> Address
fn beneficiary(&self) -> Address
§fn state_root(&self) -> FixedBytes<32>
fn state_root(&self) -> FixedBytes<32>
§fn transactions_root(&self) -> FixedBytes<32>
fn transactions_root(&self) -> FixedBytes<32>
§fn receipts_root(&self) -> FixedBytes<32>
fn receipts_root(&self) -> FixedBytes<32>
§fn withdrawals_root(&self) -> Option<FixedBytes<32>>
fn withdrawals_root(&self) -> Option<FixedBytes<32>>
§fn logs_bloom(&self) -> Bloom
fn logs_bloom(&self) -> Bloom
§fn difficulty(&self) -> Uint<256, 4>
fn difficulty(&self) -> Uint<256, 4>
§fn base_fee_per_gas(&self) -> Option<u64>
fn base_fee_per_gas(&self) -> Option<u64>
§fn blob_gas_used(&self) -> Option<u64>
fn blob_gas_used(&self) -> Option<u64>
§fn excess_blob_gas(&self) -> Option<u64>
fn excess_blob_gas(&self) -> Option<u64>
§fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>
fn parent_beacon_block_root(&self) -> Option<FixedBytes<32>>
§fn requests_hash(&self) -> Option<FixedBytes<32>>
fn requests_hash(&self) -> Option<FixedBytes<32>>
§fn extra_data(&self) -> &Bytes
fn extra_data(&self) -> &Bytes
§fn blob_fee(&self, blob_params: BlobParams) -> Option<u128>
fn blob_fee(&self, blob_params: BlobParams) -> Option<u128>
§fn next_block_excess_blob_gas(&self, blob_params: BlobParams) -> Option<u64>
fn next_block_excess_blob_gas(&self, blob_params: BlobParams) -> Option<u64>
§fn maybe_next_block_excess_blob_gas(
&self,
blob_params: Option<BlobParams>,
) -> Option<u64>
fn maybe_next_block_excess_blob_gas( &self, blob_params: Option<BlobParams>, ) -> Option<u64>
Self::next_block_excess_blob_gas
] with an optional
[BlobParams
] argument. Read more§fn next_block_blob_fee(&self, blob_params: BlobParams) -> Option<u128>
fn next_block_blob_fee(&self, blob_params: BlobParams) -> Option<u128>
§fn maybe_next_block_blob_fee(
&self,
blob_params: Option<BlobParams>,
) -> Option<u128>
fn maybe_next_block_blob_fee( &self, blob_params: Option<BlobParams>, ) -> Option<u128>
Self::next_block_blob_fee
] with an optional [BlobParams
]
argument. Read more§fn next_block_base_fee(&self, base_fee_params: BaseFeeParams) -> Option<u64>
fn next_block_base_fee(&self, base_fee_params: BaseFeeParams) -> Option<u64>
§fn parent_num_hash(&self) -> NumHash
fn parent_num_hash(&self) -> NumHash
§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
§fn is_zero_difficulty(&self) -> bool
fn is_zero_difficulty(&self) -> bool
§fn exceeds_allowed_future_timestamp(&self, present_timestamp: u64) -> bool
fn exceeds_allowed_future_timestamp(&self, present_timestamp: u64) -> bool
§fn is_nonce_zero(&self) -> bool
fn is_nonce_zero(&self) -> bool
§impl<'a, A> Arbitrary<'a> for Arc<A>where
A: Arbitrary<'a>,
impl<'a, A> Arbitrary<'a> for Arc<A>where
A: Arbitrary<'a>,
§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Arc<A>, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Arc<A>, Error>
Self
from the given unstructured data. Read more§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read more§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read more§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read more§impl<A> Arbitrary for Arc<A>where
A: Arbitrary,
impl<A> Arbitrary for Arc<A>where
A: Arbitrary,
§type Parameters = <A as Arbitrary>::Parameters
type Parameters = <A as Arbitrary>::Parameters
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = MapInto<<A as Arbitrary>::Strategy, Arc<A>>
type Strategy = MapInto<<A as Arbitrary>::Strategy, Arc<A>>
Strategy
used to generate values of type Self
.§fn arbitrary_with(
args: <Arc<A> as Arbitrary>::Parameters,
) -> <Arc<A> as Arbitrary>::Strategy ⓘ
fn arbitrary_with( args: <Arc<A> as Arbitrary>::Parameters, ) -> <Arc<A> as Arbitrary>::Strategy ⓘ
§impl<A> ArbitraryF1<A> for Arc<A>where
A: Debug + 'static,
impl<A> ArbitraryF1<A> for Arc<A>where
A: Debug + 'static,
§type Parameters = ()
type Parameters = ()
lift1_with
accepts for
configuration of the lifted and generated Strategy
. Parameters
must implement Default
.§fn lift1_with<S>(
base: S,
_args: <Arc<A> as ArbitraryF1<A>>::Parameters,
) -> BoxedStrategy<Arc<A>>where
S: Strategy<Value = A> + 'static,
fn lift1_with<S>(
base: S,
_args: <Arc<A> as ArbitraryF1<A>>::Parameters,
) -> BoxedStrategy<Arc<A>>where
S: Strategy<Value = A> + 'static,
1.64.0 · Source§impl<T> AsFd for Arc<T>
This impl allows implementing traits that require AsFd
on Arc.
impl<T> AsFd for Arc<T>
This impl allows implementing traits that require AsFd
on Arc.
use std::net::UdpSocket;
use std::sync::Arc;
trait MyTrait: AsFd {}
impl MyTrait for Arc<UdpSocket> {}
impl MyTrait for Box<UdpSocket> {}
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
1.63.0 · Source§impl<T> AsRawFd for Arc<T>where
T: AsRawFd,
This impl allows implementing traits that require AsRawFd
on Arc.
impl<T> AsRawFd for Arc<T>where
T: AsRawFd,
This impl allows implementing traits that require AsRawFd
on Arc.
use std::net::UdpSocket;
use std::sync::Arc;
trait MyTrait: AsRawFd {
}
impl MyTrait for Arc<UdpSocket> {}
impl MyTrait for Box<UdpSocket> {}
§impl<T> Block for Arc<T>where
T: Block + ?Sized,
impl<T> Block for Arc<T>where
T: Block + ?Sized,
§fn beneficiary(&self) -> Address
fn beneficiary(&self) -> Address
§fn difficulty(&self) -> Uint<256, 4>
fn difficulty(&self) -> Uint<256, 4>
§fn prevrandao(&self) -> Option<FixedBytes<32>>
fn prevrandao(&self) -> Option<FixedBytes<32>>
§fn blob_excess_gas_and_price(&self) -> Option<BlobExcessGasAndPrice>
fn blob_excess_gas_and_price(&self) -> Option<BlobExcessGasAndPrice>
calc_excess_blob_gas
]
and [calc_blob_gasprice
]. Read more§impl<F, T> BlockAssembler<F> for Arc<T>where
F: BlockExecutorFactory,
T: BlockAssembler<F> + ?Sized,
impl<F, T> BlockAssembler<F> for Arc<T>where
F: BlockExecutorFactory,
T: BlockAssembler<F> + ?Sized,
§fn assemble_block(
&self,
input: BlockAssemblerInput<'_, '_, F, <<Arc<T> as BlockAssembler<F>>::Block as Block>::Header>,
) -> Result<<Arc<T> as BlockAssembler<F>>::Block, BlockExecutionError>
fn assemble_block( &self, input: BlockAssemblerInput<'_, '_, F, <<Arc<T> as BlockAssembler<F>>::Block as Block>::Header>, ) -> Result<<Arc<T> as BlockAssembler<F>>::Block, BlockExecutionError>
BlockAssemblerInput
] documentation for more details.§impl<T> BlockBodyIndicesProvider for Arc<T>
impl<T> BlockBodyIndicesProvider for Arc<T>
§fn block_body_indices(
&self,
num: u64,
) -> Result<Option<StoredBlockBodyIndices>, ProviderError>
fn block_body_indices( &self, num: u64, ) -> Result<Option<StoredBlockBodyIndices>, ProviderError>
§fn block_body_indices_range(
&self,
range: RangeInclusive<u64>,
) -> Result<Vec<StoredBlockBodyIndices>, ProviderError>
fn block_body_indices_range( &self, range: RangeInclusive<u64>, ) -> Result<Vec<StoredBlockBodyIndices>, ProviderError>
§impl<Provider, T> BlockBodyReader<Provider> for Arc<T>where
T: BlockBodyReader<Provider> + ?Sized,
impl<Provider, T> BlockBodyReader<Provider> for Arc<T>where
T: BlockBodyReader<Provider> + ?Sized,
§fn read_block_bodies(
&self,
provider: &Provider,
inputs: Vec<(&<<Arc<T> as BlockBodyReader<Provider>>::Block as Block>::Header, Vec<<<<Arc<T> as BlockBodyReader<Provider>>::Block as Block>::Body as BlockBody>::Transaction>)>,
) -> Result<Vec<<<Arc<T> as BlockBodyReader<Provider>>::Block as Block>::Body>, ProviderError>
fn read_block_bodies( &self, provider: &Provider, inputs: Vec<(&<<Arc<T> as BlockBodyReader<Provider>>::Block as Block>::Header, Vec<<<<Arc<T> as BlockBodyReader<Provider>>::Block as Block>::Body as BlockBody>::Transaction>)>, ) -> Result<Vec<<<Arc<T> as BlockBodyReader<Provider>>::Block as Block>::Body>, ProviderError>
§impl<Provider, Body, T> BlockBodyWriter<Provider, Body> for Arc<T>where
Body: BlockBody,
T: BlockBodyWriter<Provider, Body> + ?Sized,
impl<Provider, Body, T> BlockBodyWriter<Provider, Body> for Arc<T>where
Body: BlockBody,
T: BlockBodyWriter<Provider, Body> + ?Sized,
§impl<T> BlockExecutorFactory for Arc<T>
impl<T> BlockExecutorFactory for Arc<T>
§type EvmFactory = <T as BlockExecutorFactory>::EvmFactory
type EvmFactory = <T as BlockExecutorFactory>::EvmFactory
§type ExecutionCtx<'a> = <T as BlockExecutorFactory>::ExecutionCtx<'a>
type ExecutionCtx<'a> = <T as BlockExecutorFactory>::ExecutionCtx<'a>
§type Transaction = <T as BlockExecutorFactory>::Transaction
type Transaction = <T as BlockExecutorFactory>::Transaction
BlockExecutor::Transaction
].§type Receipt = <T as BlockExecutorFactory>::Receipt
type Receipt = <T as BlockExecutorFactory>::Receipt
BlockExecutor::Receipt
].§fn evm_factory(&self) -> &<Arc<T> as BlockExecutorFactory>::EvmFactory ⓘ
fn evm_factory(&self) -> &<Arc<T> as BlockExecutorFactory>::EvmFactory ⓘ
§fn create_executor<'a, DB, I>(
&'a self,
evm: <<Arc<T> as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>,
ctx: <Arc<T> as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockExecutorFor<'a, Arc<T>, DB, I>where
DB: Database + 'a,
I: Inspector<<<Arc<T> as BlockExecutorFactory>::EvmFactory as EvmFactory>::Context<&'a mut State<DB>>> + 'a,
fn create_executor<'a, DB, I>(
&'a self,
evm: <<Arc<T> as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>,
ctx: <Arc<T> as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockExecutorFor<'a, Arc<T>, DB, I>where
DB: Database + 'a,
I: Inspector<<<Arc<T> as BlockExecutorFactory>::EvmFactory as EvmFactory>::Context<&'a mut State<DB>>> + 'a,
§impl<T> BlockHashReader for Arc<T>
impl<T> BlockHashReader for Arc<T>
§fn block_hash(
&self,
number: u64,
) -> Result<Option<FixedBytes<32>>, ProviderError>
fn block_hash( &self, number: u64, ) -> Result<Option<FixedBytes<32>>, ProviderError>
None
if no block with this number
exists.§fn convert_block_hash(
&self,
hash_or_number: HashOrNumber,
) -> Result<Option<FixedBytes<32>>, ProviderError>
fn convert_block_hash( &self, hash_or_number: HashOrNumber, ) -> Result<Option<FixedBytes<32>>, ProviderError>
None
if no block with this number
exists.§impl<T> BlockIdReader for Arc<T>
impl<T> BlockIdReader for Arc<T>
§fn convert_block_number(
&self,
num: BlockNumberOrTag,
) -> Result<Option<u64>, ProviderError>
fn convert_block_number( &self, num: BlockNumberOrTag, ) -> Result<Option<u64>, ProviderError>
BlockNumberOrTag
variants to a block number.§fn block_hash_for_id(
&self,
block_id: BlockId,
) -> Result<Option<FixedBytes<32>>, ProviderError>
fn block_hash_for_id( &self, block_id: BlockId, ) -> Result<Option<FixedBytes<32>>, ProviderError>
§fn block_number_for_id(
&self,
block_id: BlockId,
) -> Result<Option<u64>, ProviderError>
fn block_number_for_id( &self, block_id: BlockId, ) -> Result<Option<u64>, ProviderError>
§fn pending_block_num_hash(&self) -> Result<Option<NumHash>, ProviderError>
fn pending_block_num_hash(&self) -> Result<Option<NumHash>, ProviderError>
§fn safe_block_num_hash(&self) -> Result<Option<NumHash>, ProviderError>
fn safe_block_num_hash(&self) -> Result<Option<NumHash>, ProviderError>
§fn finalized_block_num_hash(&self) -> Result<Option<NumHash>, ProviderError>
fn finalized_block_num_hash(&self) -> Result<Option<NumHash>, ProviderError>
§fn safe_block_number(&self) -> Result<Option<u64>, ProviderError>
fn safe_block_number(&self) -> Result<Option<u64>, ProviderError>
§fn finalized_block_number(&self) -> Result<Option<u64>, ProviderError>
fn finalized_block_number(&self) -> Result<Option<u64>, ProviderError>
§fn safe_block_hash(&self) -> Result<Option<FixedBytes<32>>, ProviderError>
fn safe_block_hash(&self) -> Result<Option<FixedBytes<32>>, ProviderError>
§fn finalized_block_hash(&self) -> Result<Option<FixedBytes<32>>, ProviderError>
fn finalized_block_hash(&self) -> Result<Option<FixedBytes<32>>, ProviderError>
§impl<T> BlockNumReader for Arc<T>
impl<T> BlockNumReader for Arc<T>
§fn chain_info(&self) -> Result<ChainInfo, ProviderError>
fn chain_info(&self) -> Result<ChainInfo, ProviderError>
§fn best_block_number(&self) -> Result<u64, ProviderError>
fn best_block_number(&self) -> Result<u64, ProviderError>
§fn last_block_number(&self) -> Result<u64, ProviderError>
fn last_block_number(&self) -> Result<u64, ProviderError>
§fn block_number(
&self,
hash: FixedBytes<32>,
) -> Result<Option<u64>, ProviderError>
fn block_number( &self, hash: FixedBytes<32>, ) -> Result<Option<u64>, ProviderError>
BlockNumber
for the given hash. Returns None
if no block with this hash exists.§fn convert_hash_or_number(
&self,
id: HashOrNumber,
) -> Result<Option<u64>, ProviderError>
fn convert_hash_or_number( &self, id: HashOrNumber, ) -> Result<Option<u64>, ProviderError>
BlockHashOrNumber
. Returns None
if no block with
this hash exists. If the BlockHashOrNumber
is a Number
, it is returned as is.§fn convert_number(
&self,
id: HashOrNumber,
) -> Result<Option<FixedBytes<32>>, ProviderError>
fn convert_number( &self, id: HashOrNumber, ) -> Result<Option<FixedBytes<32>>, ProviderError>
BlockHashOrNumber
. Returns None
if no block with this
number exists. If the BlockHashOrNumber
is a Hash
, it is returned as is.§impl<T> BlockProvider for Arc<T>
impl<T> BlockProvider for Arc<T>
§fn subscribe_blocks(
&self,
tx: Sender<<Arc<T> as BlockProvider>::Block>,
) -> impl Future<Output = ()> + Send
fn subscribe_blocks( &self, tx: Sender<<Arc<T> as BlockProvider>::Block>, ) -> impl Future<Output = ()> + Send
§fn get_block(
&self,
block_number: u64,
) -> impl Future<Output = Result<<Arc<T> as BlockProvider>::Block, Report>> + Send
fn get_block( &self, block_number: u64, ) -> impl Future<Output = Result<<Arc<T> as BlockProvider>::Block, Report>> + Send
§fn get_or_fetch_previous_block(
&self,
previous_block_hashes: &AllocRingBuffer<FixedBytes<32>>,
current_block_number: u64,
offset: usize,
) -> impl Future<Output = Result<FixedBytes<32>, Report>> + Send
fn get_or_fetch_previous_block( &self, previous_block_hashes: &AllocRingBuffer<FixedBytes<32>>, current_block_number: u64, offset: usize, ) -> impl Future<Output = Result<FixedBytes<32>, Report>> + Send
offset
), fetch it using get_block
.§impl<T> BlockReader for Arc<T>where
T: BlockReader,
impl<T> BlockReader for Arc<T>where
T: BlockReader,
§fn find_block_by_hash(
&self,
hash: FixedBytes<32>,
source: BlockSource,
) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
fn find_block_by_hash( &self, hash: FixedBytes<32>, source: BlockSource, ) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
§fn block(
&self,
id: HashOrNumber,
) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
fn block( &self, id: HashOrNumber, ) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
§fn pending_block(
&self,
) -> Result<Option<SealedBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
fn pending_block( &self, ) -> Result<Option<SealedBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
§fn pending_block_with_senders(
&self,
) -> Result<Option<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
fn pending_block_with_senders( &self, ) -> Result<Option<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
§fn pending_block_and_receipts(
&self,
) -> Result<Option<(SealedBlock<<Arc<T> as BlockReader>::Block>, Vec<<Arc<T> as ReceiptProvider>::Receipt>)>, ProviderError>
fn pending_block_and_receipts( &self, ) -> Result<Option<(SealedBlock<<Arc<T> as BlockReader>::Block>, Vec<<Arc<T> as ReceiptProvider>::Receipt>)>, ProviderError>
§fn block_by_hash(
&self,
hash: FixedBytes<32>,
) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
fn block_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
§fn block_by_number(
&self,
num: u64,
) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
fn block_by_number( &self, num: u64, ) -> Result<Option<<Arc<T> as BlockReader>::Block>, ProviderError>
§fn recovered_block(
&self,
id: HashOrNumber,
transaction_kind: TransactionVariant,
) -> Result<Option<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
fn recovered_block( &self, id: HashOrNumber, transaction_kind: TransactionVariant, ) -> Result<Option<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
§fn sealed_block_with_senders(
&self,
id: HashOrNumber,
transaction_kind: TransactionVariant,
) -> Result<Option<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
fn sealed_block_with_senders( &self, id: HashOrNumber, transaction_kind: TransactionVariant, ) -> Result<Option<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
§fn block_range(
&self,
range: RangeInclusive<u64>,
) -> Result<Vec<<Arc<T> as BlockReader>::Block>, ProviderError>
fn block_range( &self, range: RangeInclusive<u64>, ) -> Result<Vec<<Arc<T> as BlockReader>::Block>, ProviderError>
§fn block_with_senders_range(
&self,
range: RangeInclusive<u64>,
) -> Result<Vec<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
fn block_with_senders_range( &self, range: RangeInclusive<u64>, ) -> Result<Vec<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
§fn recovered_block_range(
&self,
range: RangeInclusive<u64>,
) -> Result<Vec<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
fn recovered_block_range( &self, range: RangeInclusive<u64>, ) -> Result<Vec<RecoveredBlock<<Arc<T> as BlockReader>::Block>>, ProviderError>
§impl<T> BlockWriter for Arc<T>
impl<T> BlockWriter for Arc<T>
§fn insert_block(
&self,
block: RecoveredBlock<<Arc<T> as BlockWriter>::Block>,
write_to: StorageLocation,
) -> Result<StoredBlockBodyIndices, ProviderError>
fn insert_block( &self, block: RecoveredBlock<<Arc<T> as BlockWriter>::Block>, write_to: StorageLocation, ) -> Result<StoredBlockBodyIndices, ProviderError>
§fn append_block_bodies(
&self,
bodies: Vec<(u64, Option<<<Arc<T> as BlockWriter>::Block as Block>::Body>)>,
write_to: StorageLocation,
) -> Result<(), ProviderError>
fn append_block_bodies( &self, bodies: Vec<(u64, Option<<<Arc<T> as BlockWriter>::Block as Block>::Body>)>, write_to: StorageLocation, ) -> Result<(), ProviderError>
Bodies
stage and does not write to TransactionHashNumbers
and TransactionSenders
tables which are populated on later stages. Read more§fn remove_blocks_above(
&self,
block: u64,
remove_from: StorageLocation,
) -> Result<(), ProviderError>
fn remove_blocks_above( &self, block: u64, remove_from: StorageLocation, ) -> Result<(), ProviderError>
§fn remove_bodies_above(
&self,
block: u64,
remove_from: StorageLocation,
) -> Result<(), ProviderError>
fn remove_bodies_above( &self, block: u64, remove_from: StorageLocation, ) -> Result<(), ProviderError>
§fn append_blocks_with_state(
&self,
blocks: Vec<RecoveredBlock<<Arc<T> as BlockWriter>::Block>>,
execution_outcome: &ExecutionOutcome<<Arc<T> as BlockWriter>::Receipt>,
hashed_state: HashedPostStateSorted,
trie_updates: TrieUpdates,
) -> Result<(), ProviderError>
fn append_blocks_with_state( &self, blocks: Vec<RecoveredBlock<<Arc<T> as BlockWriter>::Block>>, execution_outcome: &ExecutionOutcome<<Arc<T> as BlockWriter>::Receipt>, hashed_state: HashedPostStateSorted, trie_updates: TrieUpdates, ) -> Result<(), ProviderError>
§impl<T> BodiesClient for Arc<T>
impl<T> BodiesClient for Arc<T>
§type Output = <T as BodiesClient>::Output
type Output = <T as BodiesClient>::Output
§fn get_block_bodies(
&self,
hashes: Vec<FixedBytes<32>>,
) -> <Arc<T> as BodiesClient>::Output ⓘ
fn get_block_bodies( &self, hashes: Vec<FixedBytes<32>>, ) -> <Arc<T> as BodiesClient>::Output ⓘ
§fn get_block_bodies_with_priority(
&self,
hashes: Vec<FixedBytes<32>>,
priority: Priority,
) -> <Arc<T> as BodiesClient>::Output ⓘ
fn get_block_bodies_with_priority( &self, hashes: Vec<FixedBytes<32>>, priority: Priority, ) -> <Arc<T> as BodiesClient>::Output ⓘ
§fn get_block_body(
&self,
hash: FixedBytes<32>,
) -> SingleBodyRequest<<Arc<T> as BodiesClient>::Output>
fn get_block_body( &self, hash: FixedBytes<32>, ) -> SingleBodyRequest<<Arc<T> as BodiesClient>::Output>
§fn get_block_body_with_priority(
&self,
hash: FixedBytes<32>,
priority: Priority,
) -> SingleBodyRequest<<Arc<T> as BodiesClient>::Output>
fn get_block_body_with_priority( &self, hash: FixedBytes<32>, priority: Priority, ) -> SingleBodyRequest<<Arc<T> as BodiesClient>::Output>
§impl<T> BufferProvider for Arc<T>where
T: BufferProvider + ?Sized,
impl<T> BufferProvider for Arc<T>where
T: BufferProvider + ?Sized,
§fn load_buffer(
&self,
key: DataKey,
req: DataRequest<'_>,
) -> Result<DataResponse<BufferMarker>, DataError>
fn load_buffer( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<BufferMarker>, DataError>
DataPayload
]<
[BufferMarker
]>
according to the key and request.Source§impl<T> BuiltPayload for Arc<T>
impl<T> BuiltPayload for Arc<T>
Source§type Primitives = <T as BuiltPayload>::Primitives
type Primitives = <T as BuiltPayload>::Primitives
Source§fn block(
&self,
) -> &SealedBlock<<<Arc<T> as BuiltPayload>::Primitives as NodePrimitives>::Block>
fn block( &self, ) -> &SealedBlock<<<Arc<T> as BuiltPayload>::Primitives as NodePrimitives>::Block>
Source§fn executed_block(
&self,
) -> Option<ExecutedBlockWithTrieUpdates<<Arc<T> as BuiltPayload>::Primitives>>
fn executed_block( &self, ) -> Option<ExecutedBlockWithTrieUpdates<<Arc<T> as BuiltPayload>::Primitives>>
§impl<T> CanonicalDeserialize for Arc<T>
impl<T> CanonicalDeserialize for Arc<T>
§fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<Arc<T>, SerializationError>where
R: Read,
fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<Arc<T>, SerializationError>where
R: Read,
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
§impl<T> CanonicalSerialize for Arc<T>where
T: CanonicalSerialize + ToOwned,
impl<T> CanonicalSerialize for Arc<T>where
T: CanonicalSerialize + ToOwned,
§fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
§impl<T> Cfg for Arc<T>where
T: Cfg + ?Sized,
impl<T> Cfg for Arc<T>where
T: Cfg + ?Sized,
type Spec = <T as Cfg>::Spec
fn chain_id(&self) -> u64
fn spec(&self) -> <Arc<T> as Cfg>::Spec ⓘ
§fn blob_max_count(&self, spec_id: SpecId) -> u64
fn blob_max_count(&self, spec_id: SpecId) -> u64
fn max_code_size(&self) -> usize
fn is_eip3607_disabled(&self) -> bool
fn is_balance_check_disabled(&self) -> bool
fn is_block_gas_limit_disabled(&self) -> bool
fn is_nonce_check_disabled(&self) -> bool
fn is_base_fee_check_disabled(&self) -> bool
§impl<T> ChangeSetReader for Arc<T>where
T: ChangeSetReader + ?Sized,
impl<T> ChangeSetReader for Arc<T>where
T: ChangeSetReader + ?Sized,
§fn account_block_changeset(
&self,
block_number: u64,
) -> Result<Vec<AccountBeforeTx>, ProviderError>
fn account_block_changeset( &self, block_number: u64, ) -> Result<Vec<AccountBeforeTx>, ProviderError>
1.0.0 · Source§impl<T, A> Clone for Arc<T, A>
impl<T, A> Clone for Arc<T, A>
Source§fn clone(&self) -> Arc<T, A>
fn clone(&self) -> Arc<T, A>
Makes a clone of the Arc
pointer.
This creates another pointer to the same allocation, increasing the strong reference count.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
let _ = Arc::clone(&five);
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl<T> ConfigureEvm for Arc<T>
impl<T> ConfigureEvm for Arc<T>
§type Primitives = <T as ConfigureEvm>::Primitives
type Primitives = <T as ConfigureEvm>::Primitives
§type NextBlockEnvCtx = <T as ConfigureEvm>::NextBlockEnvCtx
type NextBlockEnvCtx = <T as ConfigureEvm>::NextBlockEnvCtx
§type BlockExecutorFactory = <T as ConfigureEvm>::BlockExecutorFactory
type BlockExecutorFactory = <T as ConfigureEvm>::BlockExecutorFactory
BlockExecutorFactory
], contains [EvmFactory
] internally.§type BlockAssembler = <T as ConfigureEvm>::BlockAssembler
type BlockAssembler = <T as ConfigureEvm>::BlockAssembler
§fn block_executor_factory(
&self,
) -> &<Arc<T> as ConfigureEvm>::BlockExecutorFactory ⓘ
fn block_executor_factory( &self, ) -> &<Arc<T> as ConfigureEvm>::BlockExecutorFactory ⓘ
BlockExecutorFactory
].§fn block_assembler(&self) -> &<Arc<T> as ConfigureEvm>::BlockAssembler ⓘ
fn block_assembler(&self) -> &<Arc<T> as ConfigureEvm>::BlockAssembler ⓘ
BlockAssembler
].§fn evm_env(
&self,
header: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader,
) -> EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>
fn evm_env( &self, header: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, ) -> EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>
EvmEnv
] for the given header.§fn next_evm_env(
&self,
parent: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader,
attributes: &<Arc<T> as ConfigureEvm>::NextBlockEnvCtx,
) -> Result<EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, <Arc<T> as ConfigureEvm>::Error>
fn next_evm_env( &self, parent: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader, attributes: &<Arc<T> as ConfigureEvm>::NextBlockEnvCtx, ) -> Result<EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>, <Arc<T> as ConfigureEvm>::Error>
§fn context_for_block<'a>(
&self,
block: &'a SealedBlock<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::Block>,
) -> <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a> ⓘ
fn context_for_block<'a>( &self, block: &'a SealedBlock<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::Block>, ) -> <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a> ⓘ
BlockExecutorFactory::ExecutionCtx
] for a given block.§fn context_for_next_block(
&self,
parent: &SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>,
attributes: <Arc<T> as ConfigureEvm>::NextBlockEnvCtx,
) -> <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'_> ⓘ
fn context_for_next_block( &self, parent: &SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>, attributes: <Arc<T> as ConfigureEvm>::NextBlockEnvCtx, ) -> <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'_> ⓘ
BlockExecutorFactory::ExecutionCtx
] for parent + 1
block.§fn tx_env(
&self,
transaction: impl IntoTxEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx>,
) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx ⓘ
fn tx_env( &self, transaction: impl IntoTxEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx>, ) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Tx ⓘ
TxEnv
] from a transaction and [Address
].§fn evm_factory(
&self,
) -> &<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory ⓘ
fn evm_factory( &self, ) -> &<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory ⓘ
EvmFactory
] implementation.§fn evm_with_env<DB>(
&self,
db: DB,
evm_env: EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>,
) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector> ⓘwhere
DB: Database,
fn evm_with_env<DB>(
&self,
db: DB,
evm_env: EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>,
) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector> ⓘwhere
DB: Database,
§fn evm_for_block<DB>(
&self,
db: DB,
header: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader,
) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector> ⓘwhere
DB: Database,
fn evm_for_block<DB>(
&self,
db: DB,
header: &<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader,
) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, NoOpInspector> ⓘwhere
DB: Database,
cfg
and block_env
configuration derived from the given header. Relies on
[ConfigureEvm::evm_env
]. Read more§fn evm_with_env_and_inspector<DB, I>(
&self,
db: DB,
evm_env: EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>,
inspector: I,
) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, I> ⓘwhere
DB: Database,
I: InspectorFor<Arc<T>, DB>,
fn evm_with_env_and_inspector<DB, I>(
&self,
db: DB,
evm_env: EvmEnv<<<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Spec>,
inspector: I,
) -> <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<DB, I> ⓘwhere
DB: Database,
I: InspectorFor<Arc<T>, DB>,
§fn create_executor<'a, DB, I>(
&'a self,
evm: <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>,
ctx: <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB, I>where
DB: Database,
I: InspectorFor<Arc<T>, &'a mut State<DB>> + 'a,
fn create_executor<'a, DB, I>(
&'a self,
evm: <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>,
ctx: <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB, I>where
DB: Database,
I: InspectorFor<Arc<T>, &'a mut State<DB>> + 'a,
§fn executor_for_block<'a, DB>(
&'a self,
db: &'a mut State<DB>,
block: &'a SealedBlock<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::Block>,
) -> impl BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB>where
DB: Database,
fn executor_for_block<'a, DB>(
&'a self,
db: &'a mut State<DB>,
block: &'a SealedBlock<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::Block>,
) -> impl BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB>where
DB: Database,
§fn create_block_builder<'a, DB, I>(
&'a self,
evm: <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>,
parent: &'a SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>,
ctx: <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockBuilder<Primitives = <Arc<T> as ConfigureEvm>::Primitives> + BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB, I>where
DB: Database,
I: InspectorFor<Arc<T>, &'a mut State<DB>> + 'a,
fn create_block_builder<'a, DB, I>(
&'a self,
evm: <<<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmFactory as EvmFactory>::Evm<&'a mut State<DB>, I>,
parent: &'a SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>,
ctx: <<Arc<T> as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockBuilder<Primitives = <Arc<T> as ConfigureEvm>::Primitives> + BlockExecutorFor<'a, <Arc<T> as ConfigureEvm>::BlockExecutorFactory, DB, I>where
DB: Database,
I: InspectorFor<Arc<T>, &'a mut State<DB>> + 'a,
BlockBuilder
]. Should be used when building a new block. Read more§fn builder_for_next_block<'a, DB>(
&'a self,
db: &'a mut State<DB>,
parent: &'a SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>,
attributes: <Arc<T> as ConfigureEvm>::NextBlockEnvCtx,
) -> Result<impl BlockBuilder<Primitives = <Arc<T> as ConfigureEvm>::Primitives>, <Arc<T> as ConfigureEvm>::Error>where
DB: Database,
fn builder_for_next_block<'a, DB>(
&'a self,
db: &'a mut State<DB>,
parent: &'a SealedHeader<<<Arc<T> as ConfigureEvm>::Primitives as NodePrimitives>::BlockHeader>,
attributes: <Arc<T> as ConfigureEvm>::NextBlockEnvCtx,
) -> Result<impl BlockBuilder<Primitives = <Arc<T> as ConfigureEvm>::Primitives>, <Arc<T> as ConfigureEvm>::Error>where
DB: Database,
BlockBuilder
] for building of a new block. This is a helper to invoke
[ConfigureEvm::create_block_builder
].§impl<B, T> Consensus<B> for Arc<T>
impl<B, T> Consensus<B> for Arc<T>
§fn validate_body_against_header(
&self,
body: &<B as Block>::Body,
header: &SealedHeader<<B as Block>::Header>,
) -> Result<(), <Arc<T> as Consensus<B>>::Error>
fn validate_body_against_header( &self, body: &<B as Block>::Body, header: &SealedHeader<<B as Block>::Header>, ) -> Result<(), <Arc<T> as Consensus<B>>::Error>
§impl<DB> Database for Arc<DB>where
DB: Database,
impl<DB> Database for Arc<DB>where
DB: Database,
§fn tx_mut(&self) -> Result<<Arc<DB> as Database>::TXMut, DatabaseError>
fn tx_mut(&self) -> Result<<Arc<DB> as Database>::TXMut, DatabaseError>
§impl<DB> DatabaseMetrics for Arc<DB>where
DB: DatabaseMetrics,
impl<DB> DatabaseMetrics for Arc<DB>where
DB: DatabaseMetrics,
§impl<T> DatabaseProviderFactory for Arc<T>
impl<T> DatabaseProviderFactory for Arc<T>
§type ProviderRW = <T as DatabaseProviderFactory>::ProviderRW
type ProviderRW = <T as DatabaseProviderFactory>::ProviderRW
§fn database_provider_ro(
&self,
) -> Result<<Arc<T> as DatabaseProviderFactory>::Provider, ProviderError>
fn database_provider_ro( &self, ) -> Result<<Arc<T> as DatabaseProviderFactory>::Provider, ProviderError>
§fn database_provider_rw(
&self,
) -> Result<<Arc<T> as DatabaseProviderFactory>::ProviderRW, ProviderError>
fn database_provider_rw( &self, ) -> Result<<Arc<T> as DatabaseProviderFactory>::ProviderRW, ProviderError>
§impl<T> DatabaseRef for Arc<T>where
T: DatabaseRef + ?Sized,
impl<T> DatabaseRef for Arc<T>where
T: DatabaseRef + ?Sized,
§fn basic_ref(
&self,
address: Address,
) -> Result<Option<AccountInfo>, <Arc<T> as DatabaseRef>::Error>
fn basic_ref( &self, address: Address, ) -> Result<Option<AccountInfo>, <Arc<T> as DatabaseRef>::Error>
§fn code_by_hash_ref(
&self,
code_hash: FixedBytes<32>,
) -> Result<Bytecode, <Arc<T> as DatabaseRef>::Error>
fn code_by_hash_ref( &self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <Arc<T> as DatabaseRef>::Error>
§fn storage_ref(
&self,
address: Address,
index: Uint<256, 4>,
) -> Result<Uint<256, 4>, <Arc<T> as DatabaseRef>::Error>
fn storage_ref( &self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <Arc<T> as DatabaseRef>::Error>
§fn block_hash_ref(
&self,
number: u64,
) -> Result<FixedBytes<32>, <Arc<T> as DatabaseRef>::Error>
fn block_hash_ref( &self, number: u64, ) -> Result<FixedBytes<32>, <Arc<T> as DatabaseRef>::Error>
§impl<T> Decode for Arc<T>where
T: Decode,
impl<T> Decode for Arc<T>where
T: Decode,
§fn is_ssz_fixed_len() -> bool
fn is_ssz_fixed_len() -> bool
true
if this object has a fixed-length. Read more§fn ssz_fixed_len() -> usize
fn ssz_fixed_len() -> usize
Source§impl<'de, T> Deserialize<'de> for Arc<T>
This impl requires the "rc"
Cargo feature of Serde.
impl<'de, T> Deserialize<'de> for Arc<T>
This impl requires the "rc"
Cargo feature of Serde.
Deserializing a data structure containing Arc
will not attempt to
deduplicate Arc
references to the same data. Every deserialized Arc
will end up with a strong count of 1.
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Arc<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Arc<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<'de, T, U> DeserializeAs<'de, Arc<T>> for Arc<U>where
U: DeserializeAs<'de, T>,
impl<'de, T, U> DeserializeAs<'de, Arc<T>> for Arc<U>where
U: DeserializeAs<'de, T>,
Source§fn deserialize_as<D>(
deserializer: D,
) -> Result<Arc<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize_as<D>(
deserializer: D,
) -> Result<Arc<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
§impl<T> DownloadClient for Arc<T>
impl<T> DownloadClient for Arc<T>
§fn report_bad_message(&self, peer_id: FixedBytes<64>)
fn report_bad_message(&self, peer_id: FixedBytes<64>)
§fn num_connected_peers(&self) -> usize
fn num_connected_peers(&self) -> usize
1.0.0 · Source§impl<T, A> Drop for Arc<T, A>
impl<T, A> Drop for Arc<T, A>
Source§fn drop(&mut self)
fn drop(&mut self)
Drops the Arc
.
This will decrement the strong reference count. If the strong reference
count reaches zero then the only other references (if any) are
Weak
, so we drop
the inner value.
§Examples
use std::sync::Arc;
struct Foo;
impl Drop for Foo {
fn drop(&mut self) {
println!("dropped!");
}
}
let foo = Arc::new(Foo);
let foo2 = Arc::clone(&foo);
drop(foo); // Doesn't print anything
drop(foo2); // Prints "dropped!"
§impl<M, P> DynamicDataProvider<M> for Arc<P>where
M: DataMarker,
P: DynamicDataProvider<M> + ?Sized,
impl<M, P> DynamicDataProvider<M> for Arc<P>where
M: DataMarker,
P: DynamicDataProvider<M> + ?Sized,
§impl<T> Encode for Arc<T>where
T: Encode,
impl<T> Encode for Arc<T>where
T: Encode,
§fn is_ssz_fixed_len() -> bool
fn is_ssz_fixed_len() -> bool
true
if this object has a fixed-length. Read more§fn ssz_fixed_len() -> usize
fn ssz_fixed_len() -> usize
§fn ssz_append(&self, buf: &mut Vec<u8>)
fn ssz_append(&self, buf: &mut Vec<u8>)
§fn ssz_bytes_len(&self) -> usize
fn ssz_bytes_len(&self) -> usize
self
is serialized. Read more1.52.0 · Source§impl<T> Error for Arc<T>
impl<T> Error for Arc<T>
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
§impl<T> EthApiSpec for Arc<T>
impl<T> EthApiSpec for Arc<T>
§type Transaction = <T as EthApiSpec>::Transaction
type Transaction = <T as EthApiSpec>::Transaction
§fn starting_block(&self) -> Uint<256, 4>
fn starting_block(&self) -> Uint<256, 4>
§fn signers(
&self,
) -> &RwLock<RawRwLock, Vec<Box<dyn EthSigner<<Arc<T> as EthApiSpec>::Transaction>>>>
fn signers( &self, ) -> &RwLock<RawRwLock, Vec<Box<dyn EthSigner<<Arc<T> as EthApiSpec>::Transaction>>>>
§fn protocol_version(
&self,
) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send
fn protocol_version( &self, ) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send
§fn chain_info(&self) -> Result<ChainInfo, RethError>
fn chain_info(&self) -> Result<ChainInfo, RethError>
§fn is_syncing(&self) -> bool
fn is_syncing(&self) -> bool
true
if the network is undergoing sync.§fn sync_status(&self) -> Result<SyncStatus, RethError>
fn sync_status(&self) -> Result<SyncStatus, RethError>
SyncStatus
] of the network§impl<T> EthChainSpec for Arc<T>
impl<T> EthChainSpec for Arc<T>
§fn base_fee_params_at_block(&self, block_number: u64) -> BaseFeeParams
fn base_fee_params_at_block(&self, block_number: u64) -> BaseFeeParams
BaseFeeParams
] for the chain at the given block.§fn base_fee_params_at_timestamp(&self, timestamp: u64) -> BaseFeeParams
fn base_fee_params_at_timestamp(&self, timestamp: u64) -> BaseFeeParams
BaseFeeParams
] for the chain at the given timestamp.§fn blob_params_at_timestamp(&self, timestamp: u64) -> Option<BlobParams>
fn blob_params_at_timestamp(&self, timestamp: u64) -> Option<BlobParams>
BlobParams
] for the given timestamp§fn deposit_contract(&self) -> Option<&DepositContract>
fn deposit_contract(&self) -> Option<&DepositContract>
§fn genesis_hash(&self) -> FixedBytes<32>
fn genesis_hash(&self) -> FixedBytes<32>
§fn prune_delete_limit(&self) -> usize
fn prune_delete_limit(&self) -> usize
§fn display_hardforks(&self) -> Box<dyn Display>
fn display_hardforks(&self) -> Box<dyn Display>
§fn genesis_header(&self) -> &<Arc<T> as EthChainSpec>::Header ⓘ
fn genesis_header(&self) -> &<Arc<T> as EthChainSpec>::Header ⓘ
§fn is_optimism(&self) -> bool
fn is_optimism(&self) -> bool
true
if this chain contains Optimism configuration.§fn is_ethereum(&self) -> bool
fn is_ethereum(&self) -> bool
true
if this chain contains Ethereum configuration.§fn final_paris_total_difficulty(&self) -> Option<Uint<256, 4>>
fn final_paris_total_difficulty(&self) -> Option<Uint<256, 4>>
§impl<T> EthExecutorSpec for Arc<T>
impl<T> EthExecutorSpec for Arc<T>
§fn deposit_contract_address(&self) -> Option<Address>
fn deposit_contract_address(&self) -> Option<Address>
§impl<T> EthereumHardforks for Arc<T>where
T: EthereumHardforks + ?Sized,
impl<T> EthereumHardforks for Arc<T>where
T: EthereumHardforks + ?Sized,
§fn ethereum_fork_activation(&self, fork: EthereumHardfork) -> ForkCondition
fn ethereum_fork_activation(&self, fork: EthereumHardfork) -> ForkCondition
ForkCondition
] by an [EthereumHardfork
]. If fork
is not present, returns
[ForkCondition::Never
].§fn is_ethereum_fork_active_at_timestamp(
&self,
fork: EthereumHardfork,
timestamp: u64,
) -> bool
fn is_ethereum_fork_active_at_timestamp( &self, fork: EthereumHardfork, timestamp: u64, ) -> bool
EthereumHardfork
] is active at a given timestamp.§fn is_ethereum_fork_active_at_block(
&self,
fork: EthereumHardfork,
block_number: u64,
) -> bool
fn is_ethereum_fork_active_at_block( &self, fork: EthereumHardfork, block_number: u64, ) -> bool
EthereumHardfork
] is active at a given block number.§fn is_shanghai_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_shanghai_active_at_timestamp(&self, timestamp: u64) -> bool
EthereumHardfork::Shanghai
] is active at a given
timestamp.§fn is_cancun_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_cancun_active_at_timestamp(&self, timestamp: u64) -> bool
EthereumHardfork::Cancun
] is active at a given timestamp.§fn is_prague_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_prague_active_at_timestamp(&self, timestamp: u64) -> bool
EthereumHardfork::Prague
] is active at a given timestamp.§fn is_osaka_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_osaka_active_at_timestamp(&self, timestamp: u64) -> bool
EthereumHardfork::Osaka
] is active at a given timestamp.§fn is_byzantium_active_at_block(&self, block_number: u64) -> bool
fn is_byzantium_active_at_block(&self, block_number: u64) -> bool
EthereumHardfork::Byzantium
] is active at a given block
number.§fn is_spurious_dragon_active_at_block(&self, block_number: u64) -> bool
fn is_spurious_dragon_active_at_block(&self, block_number: u64) -> bool
EthereumHardfork::SpuriousDragon
] is active at a given
block number.§fn is_homestead_active_at_block(&self, block_number: u64) -> bool
fn is_homestead_active_at_block(&self, block_number: u64) -> bool
EthereumHardfork::Homestead
] is active at a given block
number.§fn is_london_active_at_block(&self, block_number: u64) -> bool
fn is_london_active_at_block(&self, block_number: u64) -> bool
EthereumHardfork::London
] is active at a given block
number.§fn is_constantinople_active_at_block(&self, block_number: u64) -> bool
fn is_constantinople_active_at_block(&self, block_number: u64) -> bool
EthereumHardfork::Constantinople
] is active at a given
block number.§fn is_paris_active_at_block(&self, block_number: u64) -> bool
fn is_paris_active_at_block(&self, block_number: u64) -> bool
EthereumHardfork::Paris
] is active at a given block
number.§impl<N, T> FullConsensus<N> for Arc<T>
impl<N, T> FullConsensus<N> for Arc<T>
§fn validate_block_post_execution(
&self,
block: &RecoveredBlock<<N as NodePrimitives>::Block>,
result: &BlockExecutionResult<<N as NodePrimitives>::Receipt>,
) -> Result<(), ConsensusError>
fn validate_block_post_execution( &self, block: &RecoveredBlock<<N as NodePrimitives>::Block>, result: &BlockExecutionResult<<N as NodePrimitives>::Receipt>, ) -> Result<(), ConsensusError>
§impl<T> Hardforks for Arc<T>
impl<T> Hardforks for Arc<T>
§fn fork<H>(&self, fork: H) -> ForkConditionwhere
H: Hardfork,
fn fork<H>(&self, fork: H) -> ForkConditionwhere
H: Hardfork,
ForkCondition
] from fork
. If fork
is not present, returns
[ForkCondition::Never
].§fn forks_iter(
&self,
) -> impl Iterator<Item = (&(dyn Hardfork + 'static), ForkCondition)>
fn forks_iter( &self, ) -> impl Iterator<Item = (&(dyn Hardfork + 'static), ForkCondition)>
§fn is_fork_active_at_timestamp<H>(&self, fork: H, timestamp: u64) -> boolwhere
H: Hardfork,
fn is_fork_active_at_timestamp<H>(&self, fork: H, timestamp: u64) -> boolwhere
H: Hardfork,
§fn is_fork_active_at_block<H>(&self, fork: H, block_number: u64) -> boolwhere
H: Hardfork,
fn is_fork_active_at_block<H>(&self, fork: H, block_number: u64) -> boolwhere
H: Hardfork,
§fn fork_id(&self, head: &Head) -> ForkId
fn fork_id(&self, head: &Head) -> ForkId
ForkId
] for the given [Head
] following eip-6122 spec§fn latest_fork_id(&self) -> ForkId
fn latest_fork_id(&self) -> ForkId
ForkId
] for the last fork. Read more§fn fork_filter(&self, head: Head) -> ForkFilter
fn fork_filter(&self, head: Head) -> ForkFilter
ForkFilter
] for the block described by [Head].§impl<T> HashedPostStateProvider for Arc<T>
impl<T> HashedPostStateProvider for Arc<T>
§fn hashed_post_state(&self, bundle_state: &BundleState) -> HashedPostState
fn hashed_post_state(&self, bundle_state: &BundleState) -> HashedPostState
HashedPostState
of the provided [BundleState
].§impl<T> HashingWriter for Arc<T>
impl<T> HashingWriter for Arc<T>
§fn unwind_account_hashing<'a>(
&self,
changesets: impl Iterator<Item = &'a (u64, AccountBeforeTx)>,
) -> Result<BTreeMap<FixedBytes<32>, Option<Account>>, ProviderError>
fn unwind_account_hashing<'a>( &self, changesets: impl Iterator<Item = &'a (u64, AccountBeforeTx)>, ) -> Result<BTreeMap<FixedBytes<32>, Option<Account>>, ProviderError>
§fn unwind_account_hashing_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<BTreeMap<FixedBytes<32>, Option<Account>>, ProviderError>
fn unwind_account_hashing_range( &self, range: impl RangeBounds<u64>, ) -> Result<BTreeMap<FixedBytes<32>, Option<Account>>, ProviderError>
§fn insert_account_for_hashing(
&self,
accounts: impl IntoIterator<Item = (Address, Option<Account>)>,
) -> Result<BTreeMap<FixedBytes<32>, Option<Account>>, ProviderError>
fn insert_account_for_hashing( &self, accounts: impl IntoIterator<Item = (Address, Option<Account>)>, ) -> Result<BTreeMap<FixedBytes<32>, Option<Account>>, ProviderError>
AccountsHistory
][reth_db_api::tables::AccountsHistory] table. Read more§fn unwind_storage_hashing(
&self,
changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>,
) -> Result<HashMap<FixedBytes<32>, BTreeSet<FixedBytes<32>>, RandomState>, ProviderError>
fn unwind_storage_hashing( &self, changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>, ) -> Result<HashMap<FixedBytes<32>, BTreeSet<FixedBytes<32>>, RandomState>, ProviderError>
§fn unwind_storage_hashing_range(
&self,
range: impl RangeBounds<BlockNumberAddress>,
) -> Result<HashMap<FixedBytes<32>, BTreeSet<FixedBytes<32>>, RandomState>, ProviderError>
fn unwind_storage_hashing_range( &self, range: impl RangeBounds<BlockNumberAddress>, ) -> Result<HashMap<FixedBytes<32>, BTreeSet<FixedBytes<32>>, RandomState>, ProviderError>
§fn insert_storage_for_hashing(
&self,
storages: impl IntoIterator<Item = (Address, impl IntoIterator<Item = StorageEntry>)>,
) -> Result<HashMap<FixedBytes<32>, BTreeSet<FixedBytes<32>>, RandomState>, ProviderError>
fn insert_storage_for_hashing( &self, storages: impl IntoIterator<Item = (Address, impl IntoIterator<Item = StorageEntry>)>, ) -> Result<HashMap<FixedBytes<32>, BTreeSet<FixedBytes<32>>, RandomState>, ProviderError>
§fn insert_hashes(
&self,
range: RangeInclusive<u64>,
end_block_hash: FixedBytes<32>,
expected_state_root: FixedBytes<32>,
) -> Result<(), ProviderError>
fn insert_hashes( &self, range: RangeInclusive<u64>, end_block_hash: FixedBytes<32>, expected_state_root: FixedBytes<32>, ) -> Result<(), ProviderError>
§impl<T> HeaderProvider for Arc<T>
impl<T> HeaderProvider for Arc<T>
§fn is_known(&self, block_hash: &FixedBytes<32>) -> Result<bool, ProviderError>
fn is_known(&self, block_hash: &FixedBytes<32>) -> Result<bool, ProviderError>
§fn header(
&self,
block_hash: &FixedBytes<32>,
) -> Result<Option<<Arc<T> as HeaderProvider>::Header>, ProviderError>
fn header( &self, block_hash: &FixedBytes<32>, ) -> Result<Option<<Arc<T> as HeaderProvider>::Header>, ProviderError>
§fn sealed_header_by_hash(
&self,
block_hash: FixedBytes<32>,
) -> Result<Option<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
fn sealed_header_by_hash( &self, block_hash: FixedBytes<32>, ) -> Result<Option<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
§fn header_by_number(
&self,
num: u64,
) -> Result<Option<<Arc<T> as HeaderProvider>::Header>, ProviderError>
fn header_by_number( &self, num: u64, ) -> Result<Option<<Arc<T> as HeaderProvider>::Header>, ProviderError>
§fn header_by_hash_or_number(
&self,
hash_or_num: HashOrNumber,
) -> Result<Option<<Arc<T> as HeaderProvider>::Header>, ProviderError>
fn header_by_hash_or_number( &self, hash_or_num: HashOrNumber, ) -> Result<Option<<Arc<T> as HeaderProvider>::Header>, ProviderError>
§fn header_td(
&self,
hash: &FixedBytes<32>,
) -> Result<Option<Uint<256, 4>>, ProviderError>
fn header_td( &self, hash: &FixedBytes<32>, ) -> Result<Option<Uint<256, 4>>, ProviderError>
§fn header_td_by_number(
&self,
number: u64,
) -> Result<Option<Uint<256, 4>>, ProviderError>
fn header_td_by_number( &self, number: u64, ) -> Result<Option<Uint<256, 4>>, ProviderError>
§fn headers_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<Vec<<Arc<T> as HeaderProvider>::Header>, ProviderError>
fn headers_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<<Arc<T> as HeaderProvider>::Header>, ProviderError>
§fn sealed_header(
&self,
number: u64,
) -> Result<Option<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
fn sealed_header( &self, number: u64, ) -> Result<Option<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
§fn sealed_headers_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<Vec<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
fn sealed_headers_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
§fn sealed_headers_while(
&self,
range: impl RangeBounds<u64>,
predicate: impl FnMut(&SealedHeader<<Arc<T> as HeaderProvider>::Header>) -> bool,
) -> Result<Vec<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
fn sealed_headers_while( &self, range: impl RangeBounds<u64>, predicate: impl FnMut(&SealedHeader<<Arc<T> as HeaderProvider>::Header>) -> bool, ) -> Result<Vec<SealedHeader<<Arc<T> as HeaderProvider>::Header>>, ProviderError>
predicate
returns true
or the range is exhausted.§impl<T> HeaderSyncGapProvider for Arc<T>
impl<T> HeaderSyncGapProvider for Arc<T>
§fn local_tip_header(
&self,
highest_uninterrupted_block: u64,
) -> Result<SealedHeader<<Arc<T> as HeaderSyncGapProvider>::Header>, ProviderError>
fn local_tip_header( &self, highest_uninterrupted_block: u64, ) -> Result<SealedHeader<<Arc<T> as HeaderSyncGapProvider>::Header>, ProviderError>
§impl<H, T> HeaderValidator<H> for Arc<T>
impl<H, T> HeaderValidator<H> for Arc<T>
§fn validate_header(
&self,
header: &SealedHeader<H>,
) -> Result<(), ConsensusError>
fn validate_header( &self, header: &SealedHeader<H>, ) -> Result<(), ConsensusError>
§fn validate_header_against_parent(
&self,
header: &SealedHeader<H>,
parent: &SealedHeader<H>,
) -> Result<(), ConsensusError>
fn validate_header_against_parent( &self, header: &SealedHeader<H>, parent: &SealedHeader<H>, ) -> Result<(), ConsensusError>
§impl<T> HeadersClient for Arc<T>
impl<T> HeadersClient for Arc<T>
§fn get_headers(
&self,
request: HeadersRequest,
) -> <Arc<T> as HeadersClient>::Output ⓘ
fn get_headers( &self, request: HeadersRequest, ) -> <Arc<T> as HeadersClient>::Output ⓘ
§fn get_headers_with_priority(
&self,
request: HeadersRequest,
priority: Priority,
) -> <Arc<T> as HeadersClient>::Output ⓘ
fn get_headers_with_priority( &self, request: HeadersRequest, priority: Priority, ) -> <Arc<T> as HeadersClient>::Output ⓘ
§fn get_header(
&self,
start: HashOrNumber,
) -> SingleHeaderRequest<<Arc<T> as HeadersClient>::Output>
fn get_header( &self, start: HashOrNumber, ) -> SingleHeaderRequest<<Arc<T> as HeadersClient>::Output>
§fn get_header_with_priority(
&self,
start: HashOrNumber,
priority: Priority,
) -> SingleHeaderRequest<<Arc<T> as HeadersClient>::Output>
fn get_header_with_priority( &self, start: HashOrNumber, priority: Priority, ) -> SingleHeaderRequest<<Arc<T> as HeadersClient>::Output>
§impl<T> HistoryWriter for Arc<T>
impl<T> HistoryWriter for Arc<T>
§fn unwind_account_history_indices<'a>(
&self,
changesets: impl Iterator<Item = &'a (u64, AccountBeforeTx)>,
) -> Result<usize, ProviderError>
fn unwind_account_history_indices<'a>( &self, changesets: impl Iterator<Item = &'a (u64, AccountBeforeTx)>, ) -> Result<usize, ProviderError>
§fn unwind_account_history_indices_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<usize, ProviderError>
fn unwind_account_history_indices_range( &self, range: impl RangeBounds<u64>, ) -> Result<usize, ProviderError>
§fn insert_account_history_index(
&self,
index_updates: impl IntoIterator<Item = (Address, impl IntoIterator<Item = u64>)>,
) -> Result<(), ProviderError>
fn insert_account_history_index( &self, index_updates: impl IntoIterator<Item = (Address, impl IntoIterator<Item = u64>)>, ) -> Result<(), ProviderError>
§fn unwind_storage_history_indices(
&self,
changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>,
) -> Result<usize, ProviderError>
fn unwind_storage_history_indices( &self, changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>, ) -> Result<usize, ProviderError>
§fn unwind_storage_history_indices_range(
&self,
range: impl RangeBounds<BlockNumberAddress>,
) -> Result<usize, ProviderError>
fn unwind_storage_history_indices_range( &self, range: impl RangeBounds<BlockNumberAddress>, ) -> Result<usize, ProviderError>
§fn insert_storage_history_index(
&self,
storage_transitions: impl IntoIterator<Item = ((Address, FixedBytes<32>), impl IntoIterator<Item = u64>)>,
) -> Result<(), ProviderError>
fn insert_storage_history_index( &self, storage_transitions: impl IntoIterator<Item = ((Address, FixedBytes<32>), impl IntoIterator<Item = u64>)>, ) -> Result<(), ProviderError>
§fn update_history_indices(
&self,
range: RangeInclusive<u64>,
) -> Result<(), ProviderError>
fn update_history_indices( &self, range: RangeInclusive<u64>, ) -> Result<(), ProviderError>
§impl<T> InstructionProvider for Arc<T>where
T: InstructionProvider + ?Sized,
impl<T> InstructionProvider for Arc<T>where
T: InstructionProvider + ?Sized,
§type InterpreterTypes = <T as InstructionProvider>::InterpreterTypes
type InterpreterTypes = <T as InstructionProvider>::InterpreterTypes
§impl<'a, W> MakeWriter<'a> for Arc<W>
impl<'a, W> MakeWriter<'a> for Arc<W>
§type Writer = &'a W
type Writer = &'a W
io::Write
implementation returned by make_writer
.§fn make_writer(&'a self) -> <Arc<W> as MakeWriter<'a>>::Writer ⓘ
fn make_writer(&'a self) -> <Arc<W> as MakeWriter<'a>>::Writer ⓘ
§fn make_writer_for(&'a self, meta: &Metadata<'_>) -> Self::Writer
fn make_writer_for(&'a self, meta: &Metadata<'_>) -> Self::Writer
§impl<T> NetworkEventListenerProvider for Arc<T>
impl<T> NetworkEventListenerProvider for Arc<T>
§type Primitives = <T as NetworkEventListenerProvider>::Primitives
type Primitives = <T as NetworkEventListenerProvider>::Primitives
PeerRequest
used in the stream.§fn event_listener(
&self,
) -> EventStream<NetworkEvent<PeerRequest<<Arc<T> as NetworkEventListenerProvider>::Primitives>>>
fn event_listener( &self, ) -> EventStream<NetworkEvent<PeerRequest<<Arc<T> as NetworkEventListenerProvider>::Primitives>>>
NetworkEvent
] listener channel.§fn discovery_listener(&self) -> UnboundedReceiverStream<DiscoveryEvent>
fn discovery_listener(&self) -> UnboundedReceiverStream<DiscoveryEvent>
DiscoveryEvent
] stream. Read more§impl<T> NetworkInfo for Arc<T>
impl<T> NetworkInfo for Arc<T>
§fn local_addr(&self) -> SocketAddr
fn local_addr(&self) -> SocketAddr
SocketAddr
that listens for incoming connections.§fn network_status(
&self,
) -> impl Future<Output = Result<NetworkStatus, NetworkError>> + Send
fn network_status( &self, ) -> impl Future<Output = Result<NetworkStatus, NetworkError>> + Send
§fn is_syncing(&self) -> bool
fn is_syncing(&self) -> bool
true
if the network is undergoing sync.§fn is_initially_syncing(&self) -> bool
fn is_initially_syncing(&self) -> bool
true
when the node is undergoing the very first Pipeline sync.§impl<T> NetworkPeersEvents for Arc<T>
impl<T> NetworkPeersEvents for Arc<T>
§fn peer_events(&self) -> PeerEventStream
fn peer_events(&self) -> PeerEventStream
§impl<T> NetworkSyncUpdater for Arc<T>
impl<T> NetworkSyncUpdater for Arc<T>
§fn update_sync_state(&self, state: SyncState)
fn update_sync_state(&self, state: SyncState)
§fn update_status(&self, head: Head)
fn update_status(&self, head: Head)
§impl<N, T> NetworkWallet<N> for Arc<T>
impl<N, T> NetworkWallet<N> for Arc<T>
§fn default_signer_address(&self) -> Address
fn default_signer_address(&self) -> Address
NetworkWallet::sign_transaction_from
] when no specific signer is
specified.§fn has_signer_for(&self, address: &Address) -> bool
fn has_signer_for(&self, address: &Address) -> bool
§fn signer_addresses(&self) -> impl Iterator<Item = Address>
fn signer_addresses(&self) -> impl Iterator<Item = Address>
§fn sign_transaction_from(
&self,
sender: Address,
tx: <N as Network>::UnsignedTx,
) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
fn sign_transaction_from( &self, sender: Address, tx: <N as Network>::UnsignedTx, ) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
§fn sign_transaction(
&self,
tx: <N as Network>::UnsignedTx,
) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
fn sign_transaction( &self, tx: <N as Network>::UnsignedTx, ) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
§fn sign_request(
&self,
request: <N as Network>::TransactionRequest,
) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
fn sign_request( &self, request: <N as Network>::TransactionRequest, ) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
from
field.§impl<T> NodePrimitivesProvider for Arc<T>where
T: NodePrimitivesProvider + ?Sized,
impl<T> NodePrimitivesProvider for Arc<T>where
T: NodePrimitivesProvider + ?Sized,
§type Primitives = <T as NodePrimitivesProvider>::Primitives
type Primitives = <T as NodePrimitivesProvider>::Primitives
§impl<T> OpHardforks for Arc<T>
impl<T> OpHardforks for Arc<T>
§fn op_fork_activation(&self, fork: OpHardfork) -> ForkCondition
fn op_fork_activation(&self, fork: OpHardfork) -> ForkCondition
ForkCondition
] by an [OpHardfork
]. If fork
is not present, returns
[ForkCondition::Never
].§fn is_bedrock_active_at_block(&self, block_number: u64) -> bool
fn is_bedrock_active_at_block(&self, block_number: u64) -> bool
OpHardfork::Bedrock
] is active at a given block
number.§fn is_regolith_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_regolith_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Regolith
is active at given block
timestamp.§fn is_canyon_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_canyon_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Canyon
is active at given block timestamp.§fn is_ecotone_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_ecotone_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Ecotone
is active at given block timestamp.§fn is_fjord_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_fjord_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Fjord
is active at given block timestamp.§fn is_granite_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_granite_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Granite
is active at given block timestamp.§fn is_holocene_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_holocene_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Holocene
is active at given block
timestamp.§fn is_isthmus_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_isthmus_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Isthmus
is active at given block
timestamp.§fn is_interop_active_at_timestamp(&self, timestamp: u64) -> bool
fn is_interop_active_at_timestamp(&self, timestamp: u64) -> bool
true
if Interop
is active at given block
timestamp.§impl<T> OpTxTr for Arc<T>
impl<T> OpTxTr for Arc<T>
fn enveloped_tx(&self) -> Option<&Bytes>
§fn source_hash(&self) -> Option<FixedBytes<32>>
fn source_hash(&self) -> Option<FixedBytes<32>>
§fn is_system_transaction(&self) -> bool
fn is_system_transaction(&self) -> bool
§fn is_deposit(&self) -> bool
fn is_deposit(&self) -> bool
true
if transaction is of type [DEPOSIT_TRANSACTION_TYPE
].1.0.0 · Source§impl<T, A> Ord for Arc<T, A>
impl<T, A> Ord for Arc<T, A>
Source§fn cmp(&self, other: &Arc<T, A>) -> Ordering
fn cmp(&self, other: &Arc<T, A>) -> Ordering
Comparison for two Arc
s.
The two are compared by calling cmp()
on their inner values.
§Examples
use std::sync::Arc;
use std::cmp::Ordering;
let five = Arc::new(5);
assert_eq!(Ordering::Less, five.cmp(&Arc::new(6)));
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.0.0 · Source§impl<T, A> PartialEq for Arc<T, A>
impl<T, A> PartialEq for Arc<T, A>
Source§fn eq(&self, other: &Arc<T, A>) -> bool
fn eq(&self, other: &Arc<T, A>) -> bool
Equality for two Arc
s.
Two Arc
s are equal if their inner values are equal, even if they are
stored in different allocation.
If T
also implements Eq
(implying reflexivity of equality),
two Arc
s that point to the same allocation are always equal.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
assert!(five == Arc::new(5));
Source§fn ne(&self, other: &Arc<T, A>) -> bool
fn ne(&self, other: &Arc<T, A>) -> bool
Inequality for two Arc
s.
Two Arc
s are not equal if their inner values are not equal.
If T
also implements Eq
(implying reflexivity of equality),
two Arc
s that point to the same value are always equal.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
assert!(five != Arc::new(6));
1.0.0 · Source§impl<T, A> PartialOrd for Arc<T, A>
impl<T, A> PartialOrd for Arc<T, A>
Source§fn partial_cmp(&self, other: &Arc<T, A>) -> Option<Ordering>
fn partial_cmp(&self, other: &Arc<T, A>) -> Option<Ordering>
Partial comparison for two Arc
s.
The two are compared by calling partial_cmp()
on their inner values.
§Examples
use std::sync::Arc;
use std::cmp::Ordering;
let five = Arc::new(5);
assert_eq!(Some(Ordering::Less), five.partial_cmp(&Arc::new(6)));
Source§fn lt(&self, other: &Arc<T, A>) -> bool
fn lt(&self, other: &Arc<T, A>) -> bool
Less-than comparison for two Arc
s.
The two are compared by calling <
on their inner values.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
assert!(five < Arc::new(6));
Source§fn le(&self, other: &Arc<T, A>) -> bool
fn le(&self, other: &Arc<T, A>) -> bool
‘Less than or equal to’ comparison for two Arc
s.
The two are compared by calling <=
on their inner values.
§Examples
use std::sync::Arc;
let five = Arc::new(5);
assert!(five <= Arc::new(5));
Source§impl<T> PayloadValidator for Arc<T>
impl<T> PayloadValidator for Arc<T>
Source§type Block = <T as PayloadValidator>::Block
type Block = <T as PayloadValidator>::Block
Source§type ExecutionData = <T as PayloadValidator>::ExecutionData
type ExecutionData = <T as PayloadValidator>::ExecutionData
Source§fn ensure_well_formed_payload(
&self,
payload: <Arc<T> as PayloadValidator>::ExecutionData,
) -> Result<RecoveredBlock<<Arc<T> as PayloadValidator>::Block>, NewPayloadError>
fn ensure_well_formed_payload( &self, payload: <Arc<T> as PayloadValidator>::ExecutionData, ) -> Result<RecoveredBlock<<Arc<T> as PayloadValidator>::Block>, NewPayloadError>
Source§fn validate_block_post_execution_with_hashed_state(
&self,
_state_updates: &HashedPostState,
_block: &RecoveredBlock<<Arc<T> as PayloadValidator>::Block>,
) -> Result<(), ConsensusError>
fn validate_block_post_execution_with_hashed_state( &self, _state_updates: &HashedPostState, _block: &RecoveredBlock<<Arc<T> as PayloadValidator>::Block>, ) -> Result<(), ConsensusError>
§impl<T> Peers for Arc<T>
impl<T> Peers for Arc<T>
§fn add_peer(&self, peer: FixedBytes<64>, tcp_addr: SocketAddr)
fn add_peer(&self, peer: FixedBytes<64>, tcp_addr: SocketAddr)
SocketAddr
.§fn add_peer_with_udp(
&self,
peer: FixedBytes<64>,
tcp_addr: SocketAddr,
udp_addr: SocketAddr,
)
fn add_peer_with_udp( &self, peer: FixedBytes<64>, tcp_addr: SocketAddr, udp_addr: SocketAddr, )
SocketAddr
.§fn add_trusted_peer_id(&self, peer: FixedBytes<64>)
fn add_trusted_peer_id(&self, peer: FixedBytes<64>)
PeerId
] to the peer set. Read more§fn add_trusted_peer(&self, peer: FixedBytes<64>, tcp_addr: SocketAddr)
fn add_trusted_peer(&self, peer: FixedBytes<64>, tcp_addr: SocketAddr)
SocketAddr
.§fn add_trusted_peer_with_udp(
&self,
peer: FixedBytes<64>,
tcp_addr: SocketAddr,
udp_addr: SocketAddr,
)
fn add_trusted_peer_with_udp( &self, peer: FixedBytes<64>, tcp_addr: SocketAddr, udp_addr: SocketAddr, )
SocketAddr
to the peer set.§fn add_peer_kind(
&self,
peer: FixedBytes<64>,
kind: PeerKind,
tcp_addr: SocketAddr,
udp_addr: Option<SocketAddr>,
)
fn add_peer_kind( &self, peer: FixedBytes<64>, kind: PeerKind, tcp_addr: SocketAddr, udp_addr: Option<SocketAddr>, )
§fn get_trusted_peers(
&self,
) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
fn get_trusted_peers( &self, ) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
PeerInfo
] for all connected [PeerKind::Trusted
] peers.§fn get_basic_peers(
&self,
) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
fn get_basic_peers( &self, ) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
PeerInfo
] for all connected [PeerKind::Basic
] peers.§fn get_peers_by_kind(
&self,
kind: PeerKind,
) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
fn get_peers_by_kind( &self, kind: PeerKind, ) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
PeerInfo
] for all connected peers with the given kind.§fn get_all_peers(
&self,
) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
fn get_all_peers( &self, ) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
PeerInfo
] for all connected peers.§fn get_peer_by_id(
&self,
peer_id: FixedBytes<64>,
) -> impl Future<Output = Result<Option<PeerInfo>, NetworkError>> + Send
fn get_peer_by_id( &self, peer_id: FixedBytes<64>, ) -> impl Future<Output = Result<Option<PeerInfo>, NetworkError>> + Send
PeerInfo
] for the given peer id. Read more§fn get_peers_by_id(
&self,
peer_ids: Vec<FixedBytes<64>>,
) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
fn get_peers_by_id( &self, peer_ids: Vec<FixedBytes<64>>, ) -> impl Future<Output = Result<Vec<PeerInfo>, NetworkError>> + Send
PeerInfo
] for the given peers if they are connected. Read more§fn remove_peer(&self, peer: FixedBytes<64>, kind: PeerKind)
fn remove_peer(&self, peer: FixedBytes<64>, kind: PeerKind)
§fn disconnect_peer(&self, peer: FixedBytes<64>)
fn disconnect_peer(&self, peer: FixedBytes<64>)
§fn disconnect_peer_with_reason(
&self,
peer: FixedBytes<64>,
reason: DisconnectReason,
)
fn disconnect_peer_with_reason( &self, peer: FixedBytes<64>, reason: DisconnectReason, )
§fn connect_peer(&self, peer: FixedBytes<64>, tcp_addr: SocketAddr)
fn connect_peer(&self, peer: FixedBytes<64>, tcp_addr: SocketAddr)
reth_network::SessionManager::dial_outbound
.§fn connect_peer_kind(
&self,
peer: FixedBytes<64>,
kind: PeerKind,
tcp_addr: SocketAddr,
udp_addr: Option<SocketAddr>,
)
fn connect_peer_kind( &self, peer: FixedBytes<64>, kind: PeerKind, tcp_addr: SocketAddr, udp_addr: Option<SocketAddr>, )
§fn reputation_change(&self, peer_id: FixedBytes<64>, kind: ReputationChangeKind)
fn reputation_change(&self, peer_id: FixedBytes<64>, kind: ReputationChangeKind)
§impl<T> PeersHandleProvider for Arc<T>where
T: PeersHandleProvider + ?Sized,
impl<T> PeersHandleProvider for Arc<T>where
T: PeersHandleProvider + ?Sized,
§fn peers_handle(&self) -> &PeersHandle
fn peers_handle(&self) -> &PeersHandle
PeersHandle
] that can be cloned and shared. Read more§impl<T> PeersInfo for Arc<T>
impl<T> PeersInfo for Arc<T>
§fn num_connected_peers(&self) -> usize
fn num_connected_peers(&self) -> usize
§fn local_node_record(&self) -> NodeRecord
fn local_node_record(&self) -> NodeRecord
§impl<N, T> Provider<N> for Arc<T>
impl<N, T> Provider<N> for Arc<T>
§fn builder() -> ProviderBuilder<Identity, Identity, N>
fn builder() -> ProviderBuilder<Identity, Identity, N>
ProviderBuilder
to build on.§fn weak_client(&self) -> Weak<RpcClientInner>
fn weak_client(&self) -> Weak<RpcClientInner>
§fn get_accounts(&self) -> ProviderCall<[(); 0], Vec<Address>>
fn get_accounts(&self) -> ProviderCall<[(); 0], Vec<Address>>
§fn get_blob_base_fee(&self) -> ProviderCall<[(); 0], Uint<128, 2>, u128>
fn get_blob_base_fee(&self) -> ProviderCall<[(); 0], Uint<128, 2>, u128>
§fn get_block_number(&self) -> ProviderCall<[(); 0], Uint<64, 1>, u64>
fn get_block_number(&self) -> ProviderCall<[(); 0], Uint<64, 1>, u64>
§fn call(&self, tx: <N as Network>::TransactionRequest) -> EthCall<N, Bytes>
fn call(&self, tx: <N as Network>::TransactionRequest) -> EthCall<N, Bytes>
§fn call_many<'req>(
&self,
bundles: &'req [Bundle],
) -> EthCallMany<'req, N, Vec<Vec<EthCallResponse>>>
fn call_many<'req>( &self, bundles: &'req [Bundle], ) -> EthCallMany<'req, N, Vec<Vec<EthCallResponse>>>
Bundle
] against the provided StateContext
and StateOverride
,
without publishing a transaction. Read more§fn simulate<'req>(
&self,
payload: &'req SimulatePayload,
) -> RpcWithBlock<&'req SimulatePayload, Vec<SimulatedBlock<<N as Network>::BlockResponse>>>
fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<&'req SimulatePayload, Vec<SimulatedBlock<<N as Network>::BlockResponse>>>
§fn get_chain_id(&self) -> ProviderCall<[(); 0], Uint<64, 1>, u64>
fn get_chain_id(&self) -> ProviderCall<[(); 0], Uint<64, 1>, u64>
§fn create_access_list<'a>(
&self,
request: &'a <N as Network>::TransactionRequest,
) -> RpcWithBlock<&'a <N as Network>::TransactionRequest, AccessListResult>
fn create_access_list<'a>( &self, request: &'a <N as Network>::TransactionRequest, ) -> RpcWithBlock<&'a <N as Network>::TransactionRequest, AccessListResult>
§fn estimate_gas(
&self,
tx: <N as Network>::TransactionRequest,
) -> EthCall<N, Uint<64, 1>, u64>
fn estimate_gas( &self, tx: <N as Network>::TransactionRequest, ) -> EthCall<N, Uint<64, 1>, u64>
EthCall
] future to estimate the gas required for a
transaction. Read more§fn estimate_eip1559_fees_with<'life0, 'async_trait>(
&'life0 self,
estimator: Eip1559Estimator,
) -> Pin<Box<dyn Future<Output = Result<Eip1559Estimation, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn estimate_eip1559_fees_with<'life0, 'async_trait>(
&'life0 self,
estimator: Eip1559Estimator,
) -> Pin<Box<dyn Future<Output = Result<Eip1559Estimation, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Eip1559Estimation, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Eip1559Estimation, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_fee_history<'life0, 'life1, 'async_trait>(
&'life0 self,
block_count: u64,
last_block: BlockNumberOrTag,
reward_percentiles: &'life1 [f64],
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn get_fee_history<'life0, 'life1, 'async_trait>(
&'life0 self,
block_count: u64,
last_block: BlockNumberOrTag,
reward_percentiles: &'life1 [f64],
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
maxFeePerGas
and maxPriorityFeePerGas
.
block_count
can range from 1 to 1024 blocks in a single request.§fn get_gas_price(&self) -> ProviderCall<[(); 0], Uint<128, 2>, u128>
fn get_gas_price(&self) -> ProviderCall<[(); 0], Uint<128, 2>, u128>
§fn get_account(&self, address: Address) -> RpcWithBlock<Address, TrieAccount>
fn get_account(&self, address: Address) -> RpcWithBlock<Address, TrieAccount>
§fn get_balance(&self, address: Address) -> RpcWithBlock<Address, Uint<256, 4>>
fn get_balance(&self, address: Address) -> RpcWithBlock<Address, Uint<256, 4>>
§fn get_block(
&self,
block: BlockId,
) -> EthGetBlock<<N as Network>::BlockResponse>
fn get_block( &self, block: BlockId, ) -> EthGetBlock<<N as Network>::BlockResponse>
§fn get_block_by_hash(
&self,
hash: FixedBytes<32>,
) -> EthGetBlock<<N as Network>::BlockResponse>
fn get_block_by_hash( &self, hash: FixedBytes<32>, ) -> EthGetBlock<<N as Network>::BlockResponse>
§fn get_block_by_number(
&self,
number: BlockNumberOrTag,
) -> EthGetBlock<<N as Network>::BlockResponse>
fn get_block_by_number( &self, number: BlockNumberOrTag, ) -> EthGetBlock<<N as Network>::BlockResponse>
§fn get_block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn get_block_transaction_count_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
block_number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn get_block_transaction_count_by_number<'life0, 'async_trait>(
&'life0 self,
block_number: BlockNumberOrTag,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_block_receipts(
&self,
block: BlockId,
) -> ProviderCall<(BlockId,), Option<Vec<<N as Network>::ReceiptResponse>>>
fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<(BlockId,), Option<Vec<<N as Network>::ReceiptResponse>>>
§fn get_code_at(&self, address: Address) -> RpcWithBlock<Address, Bytes>
fn get_code_at(&self, address: Address) -> RpcWithBlock<Address, Bytes>
§fn watch_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn watch_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
eth_getFilterChanges
. Read more§fn watch_full_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WatchBlocks<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn watch_full_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WatchBlocks<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
eth_getFilterChanges
and transforming the returned block
hashes into full blocks bodies. Read more§fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
eth_getFilterChanges
. Read more§fn watch_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<Log>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn watch_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<Log>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
eth_getFilterChanges
. Read more§fn watch_full_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<<N as Network>::TransactionResponse>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn watch_full_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<(Uint<256, 4>,), Vec<<N as Network>::TransactionResponse>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
eth_getFilterChanges
. Read more§fn get_filter_changes_dyn<'life0, 'async_trait>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<FilterChanges, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn get_filter_changes_dyn<'life0, 'async_trait>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<FilterChanges, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_filter_logs<'life0, 'async_trait>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn get_filter_logs<'life0, 'async_trait>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
Vec<Log>
for the given filter ID.§fn uninstall_filter<'life0, 'async_trait>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn uninstall_filter<'life0, 'async_trait>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<bool, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn watch_pending_transaction<'life0, 'async_trait>(
&'life0 self,
config: PendingTransactionConfig,
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn watch_pending_transaction<'life0, 'async_trait>(
&'life0 self,
config: PendingTransactionConfig,
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
Vec<Log>
with the given [Filter].§fn get_proof(
&self,
address: Address,
keys: Vec<FixedBytes<32>>,
) -> RpcWithBlock<(Address, Vec<FixedBytes<32>>), EIP1186AccountProofResponse>
fn get_proof( &self, address: Address, keys: Vec<FixedBytes<32>>, ) -> RpcWithBlock<(Address, Vec<FixedBytes<32>>), EIP1186AccountProofResponse>
§fn get_storage_at(
&self,
address: Address,
key: Uint<256, 4>,
) -> RpcWithBlock<(Address, Uint<256, 4>), Uint<256, 4>>
fn get_storage_at( &self, address: Address, key: Uint<256, 4>, ) -> RpcWithBlock<(Address, Uint<256, 4>), Uint<256, 4>>
§fn get_transaction_by_sender_nonce(
&self,
sender: Address,
nonce: u64,
) -> ProviderCall<(Address, Uint<64, 1>), Option<<N as Network>::TransactionResponse>>
fn get_transaction_by_sender_nonce( &self, sender: Address, nonce: u64, ) -> ProviderCall<(Address, Uint<64, 1>), Option<<N as Network>::TransactionResponse>>
§fn get_transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> ProviderCall<(FixedBytes<32>,), Option<<N as Network>::TransactionResponse>>
fn get_transaction_by_hash( &self, hash: FixedBytes<32>, ) -> ProviderCall<(FixedBytes<32>,), Option<<N as Network>::TransactionResponse>>
§fn get_transaction_by_block_hash_and_index(
&self,
block_hash: FixedBytes<32>,
index: usize,
) -> ProviderCall<(FixedBytes<32>, Index), Option<<N as Network>::TransactionResponse>>
fn get_transaction_by_block_hash_and_index( &self, block_hash: FixedBytes<32>, index: usize, ) -> ProviderCall<(FixedBytes<32>, Index), Option<<N as Network>::TransactionResponse>>
§fn get_raw_transaction_by_block_hash_and_index(
&self,
block_hash: FixedBytes<32>,
index: usize,
) -> ProviderCall<(FixedBytes<32>, Index), Option<Bytes>>
fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: FixedBytes<32>, index: usize, ) -> ProviderCall<(FixedBytes<32>, Index), Option<Bytes>>
§fn get_transaction_by_block_number_and_index(
&self,
block_number: BlockNumberOrTag,
index: usize,
) -> ProviderCall<(BlockNumberOrTag, Index), Option<<N as Network>::TransactionResponse>>
fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<(BlockNumberOrTag, Index), Option<<N as Network>::TransactionResponse>>
§fn get_raw_transaction_by_block_number_and_index(
&self,
block_number: BlockNumberOrTag,
index: usize,
) -> ProviderCall<(BlockNumberOrTag, Index), Option<Bytes>>
fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<(BlockNumberOrTag, Index), Option<Bytes>>
§fn get_raw_transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> ProviderCall<(FixedBytes<32>,), Option<Bytes>>
fn get_raw_transaction_by_hash( &self, hash: FixedBytes<32>, ) -> ProviderCall<(FixedBytes<32>,), Option<Bytes>>
§fn get_transaction_count(
&self,
address: Address,
) -> RpcWithBlock<Address, Uint<64, 1>, u64>
fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<Address, Uint<64, 1>, u64>
§fn get_transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> ProviderCall<(FixedBytes<32>,), Option<<N as Network>::ReceiptResponse>>
fn get_transaction_receipt( &self, hash: FixedBytes<32>, ) -> ProviderCall<(FixedBytes<32>,), Option<<N as Network>::ReceiptResponse>>
§fn get_uncle<'life0, 'async_trait>(
&'life0 self,
tag: BlockId,
idx: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn get_uncle<'life0, 'async_trait>(
&'life0 self,
tag: BlockId,
idx: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_uncle_count<'life0, 'async_trait>(
&'life0 self,
tag: BlockId,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn get_uncle_count<'life0, 'async_trait>(
&'life0 self,
tag: BlockId,
) -> Pin<Box<dyn Future<Output = Result<u64, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_max_priority_fee_per_gas(
&self,
) -> ProviderCall<[(); 0], Uint<128, 2>, u128>
fn get_max_priority_fee_per_gas( &self, ) -> ProviderCall<[(); 0], Uint<128, 2>, u128>
maxPriorityFeePerGas
in wei.§fn new_block_filter<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn new_block_filter<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn new_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn new_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
§fn new_pending_transactions_filter<'life0, 'async_trait>(
&'life0 self,
full: bool,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn new_pending_transactions_filter<'life0, 'async_trait>(
&'life0 self,
full: bool,
) -> Pin<Box<dyn Future<Output = Result<Uint<256, 4>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn send_raw_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn send_raw_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
§fn send_raw_transaction_conditional<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_tx: &'life1 [u8],
conditional: TransactionConditional,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn send_raw_transaction_conditional<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_tx: &'life1 [u8],
conditional: TransactionConditional,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
TransactionConditional
] to the
network. Read more§fn send_transaction<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn send_tx_envelope<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TxEnvelope,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn send_tx_envelope<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TxEnvelope,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<Bytes, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn sign_transaction<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<Bytes, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
Provider::send_raw_transaction
]. Read more§fn subscribe_blocks(
&self,
) -> GetSubscription<(SubscriptionKind,), <N as Network>::HeaderResponse>
fn subscribe_blocks( &self, ) -> GetSubscription<(SubscriptionKind,), <N as Network>::HeaderResponse>
§fn subscribe_full_blocks(&self) -> SubFullBlocks<N>
fn subscribe_full_blocks(&self) -> SubFullBlocks<N>
§fn subscribe_pending_transactions(
&self,
) -> GetSubscription<(SubscriptionKind,), FixedBytes<32>>
fn subscribe_pending_transactions( &self, ) -> GetSubscription<(SubscriptionKind,), FixedBytes<32>>
§fn subscribe_full_pending_transactions(
&self,
) -> GetSubscription<(SubscriptionKind, Params), <N as Network>::TransactionResponse>
fn subscribe_full_pending_transactions( &self, ) -> GetSubscription<(SubscriptionKind, Params), <N as Network>::TransactionResponse>
§fn subscribe_logs(
&self,
filter: &Filter,
) -> GetSubscription<(SubscriptionKind, Params), Log>
fn subscribe_logs( &self, filter: &Filter, ) -> GetSubscription<(SubscriptionKind, Params), Log>
§fn unsubscribe<'life0, 'async_trait>(
&'life0 self,
id: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn unsubscribe<'life0, 'async_trait>(
&'life0 self,
id: FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<(), RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
§fn get_client_version(&self) -> ProviderCall<[(); 0], String>
fn get_client_version(&self) -> ProviderCall<[(); 0], String>
§fn get_sha3(&self, data: &[u8]) -> ProviderCall<(String,), FixedBytes<32>>
fn get_sha3(&self, data: &[u8]) -> ProviderCall<(String,), FixedBytes<32>>
Keccak-256
hash of the given data.§fn get_net_version(&self) -> ProviderCall<[(); 0], Uint<64, 1>, u64>
fn get_net_version(&self) -> ProviderCall<[(); 0], Uint<64, 1>, u64>
eth_chainId
.§fn raw_request<'life0, 'async_trait, P, R>(
&'life0 self,
method: Cow<'static, str>,
params: P,
) -> Pin<Box<dyn Future<Output = Result<R, RpcError<TransportErrorKind>>> + Send + 'async_trait>>
fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = Result<R, RpcError<TransportErrorKind>>> + Send + 'async_trait>>
§fn raw_request_dyn<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Cow<'static, str>,
params: &'life1 RawValue,
) -> Pin<Box<dyn Future<Output = Result<Box<RawValue>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn raw_request_dyn<'life0, 'life1, 'async_trait>(
&'life0 self,
method: Cow<'static, str>,
params: &'life1 RawValue,
) -> Pin<Box<dyn Future<Output = Result<Box<RawValue>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
§fn transaction_request(&self) -> <N as Network>::TransactionRequest
fn transaction_request(&self) -> <N as Network>::TransactionRequest
TransactionRequest
.§fn erased(self) -> DynProvider<N>where
Self: Sized + 'static,
fn erased(self) -> DynProvider<N>where
Self: Sized + 'static,
DynProvider
]. Read more§fn multicall(&self) -> MulticallBuilder<Empty, &Self, N>where
Self: Sized,
fn multicall(&self) -> MulticallBuilder<Empty, &Self, N>where
Self: Sized,
MulticallBuilder
]. Read more§fn get_filter_changes<'life0, 'async_trait, R>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sized + 'async_trait,
R: 'async_trait + RpcRecv,
fn get_filter_changes<'life0, 'async_trait, R>(
&'life0 self,
id: Uint<256, 4>,
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sized + 'async_trait,
R: 'async_trait + RpcRecv,
§impl<T> PruneCheckpointReader for Arc<T>
impl<T> PruneCheckpointReader for Arc<T>
§fn get_prune_checkpoint(
&self,
segment: PruneSegment,
) -> Result<Option<PruneCheckpoint>, ProviderError>
fn get_prune_checkpoint( &self, segment: PruneSegment, ) -> Result<Option<PruneCheckpoint>, ProviderError>
§fn get_prune_checkpoints(
&self,
) -> Result<Vec<(PruneSegment, PruneCheckpoint)>, ProviderError>
fn get_prune_checkpoints( &self, ) -> Result<Vec<(PruneSegment, PruneCheckpoint)>, ProviderError>
§impl<T> PruneCheckpointWriter for Arc<T>
impl<T> PruneCheckpointWriter for Arc<T>
§fn save_prune_checkpoint(
&self,
segment: PruneSegment,
checkpoint: PruneCheckpoint,
) -> Result<(), ProviderError>
fn save_prune_checkpoint( &self, segment: PruneSegment, checkpoint: PruneCheckpoint, ) -> Result<(), ProviderError>
§impl<T> ReceiptBuilder for Arc<T>where
T: ReceiptBuilder + ?Sized,
impl<T> ReceiptBuilder for Arc<T>where
T: ReceiptBuilder + ?Sized,
§type Transaction = <T as ReceiptBuilder>::Transaction
type Transaction = <T as ReceiptBuilder>::Transaction
§fn build_receipt<E>(
&self,
ctx: ReceiptBuilderCtx<'_, <Arc<T> as ReceiptBuilder>::Transaction, E>,
) -> <Arc<T> as ReceiptBuilder>::Receipt ⓘwhere
E: Evm,
fn build_receipt<E>(
&self,
ctx: ReceiptBuilderCtx<'_, <Arc<T> as ReceiptBuilder>::Transaction, E>,
) -> <Arc<T> as ReceiptBuilder>::Receipt ⓘwhere
E: Evm,
§impl<T> ReceiptProvider for Arc<T>
impl<T> ReceiptProvider for Arc<T>
§fn receipt(
&self,
id: u64,
) -> Result<Option<<Arc<T> as ReceiptProvider>::Receipt>, ProviderError>
fn receipt( &self, id: u64, ) -> Result<Option<<Arc<T> as ReceiptProvider>::Receipt>, ProviderError>
§fn receipt_by_hash(
&self,
hash: FixedBytes<32>,
) -> Result<Option<<Arc<T> as ReceiptProvider>::Receipt>, ProviderError>
fn receipt_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<<Arc<T> as ReceiptProvider>::Receipt>, ProviderError>
§fn receipts_by_block(
&self,
block: HashOrNumber,
) -> Result<Option<Vec<<Arc<T> as ReceiptProvider>::Receipt>>, ProviderError>
fn receipts_by_block( &self, block: HashOrNumber, ) -> Result<Option<Vec<<Arc<T> as ReceiptProvider>::Receipt>>, ProviderError>
§fn receipts_by_tx_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<Vec<<Arc<T> as ReceiptProvider>::Receipt>, ProviderError>
fn receipts_by_tx_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<<Arc<T> as ReceiptProvider>::Receipt>, ProviderError>
§impl<T> Recorder for Arc<T>where
T: Recorder + ?Sized,
impl<T> Recorder for Arc<T>where
T: Recorder + ?Sized,
§fn describe_counter(
&self,
key: KeyName,
unit: Option<Unit>,
description: Cow<'static, str>,
)
fn describe_counter( &self, key: KeyName, unit: Option<Unit>, description: Cow<'static, str>, )
§fn describe_gauge(
&self,
key: KeyName,
unit: Option<Unit>,
description: Cow<'static, str>,
)
fn describe_gauge( &self, key: KeyName, unit: Option<Unit>, description: Cow<'static, str>, )
§fn describe_histogram(
&self,
key: KeyName,
unit: Option<Unit>,
description: Cow<'static, str>,
)
fn describe_histogram( &self, key: KeyName, unit: Option<Unit>, description: Cow<'static, str>, )
§fn register_counter(&self, key: &Key, metadata: &Metadata<'_>) -> Counter
fn register_counter(&self, key: &Key, metadata: &Metadata<'_>) -> Counter
§fn register_gauge(&self, key: &Key, metadata: &Metadata<'_>) -> Gauge
fn register_gauge(&self, key: &Key, metadata: &Metadata<'_>) -> Gauge
§fn register_histogram(&self, key: &Key, metadata: &Metadata<'_>) -> Histogram
fn register_histogram(&self, key: &Key, metadata: &Metadata<'_>) -> Histogram
Source§impl<T> Serialize for Arc<T>
This impl requires the "rc"
Cargo feature of Serde.
impl<T> Serialize for Arc<T>
This impl requires the "rc"
Cargo feature of Serde.
Serializing a data structure containing Arc
will serialize a copy of
the contents of the Arc
each time the Arc
is referenced within the
data structure. Serialization will not attempt to deduplicate these
repeated data.
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl<T, U> SerializeAs<Arc<T>> for Arc<U>where
U: SerializeAs<T>,
impl<T, U> SerializeAs<Arc<T>> for Arc<U>where
U: SerializeAs<T>,
Source§fn serialize_as<S>(
source: &Arc<T>,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize_as<S>(
source: &Arc<T>,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§impl<T> SignedTransaction for Arc<T>
impl<T> SignedTransaction for Arc<T>
§fn is_broadcastable_in_full(&self) -> bool
fn is_broadcastable_in_full(&self) -> bool
§fn recover_signer(&self) -> Result<Address, RecoveryError>
fn recover_signer(&self) -> Result<Address, RecoveryError>
§fn try_recover(&self) -> Result<Address, RecoveryError>
fn try_recover(&self) -> Result<Address, RecoveryError>
§fn recover_signer_unchecked(&self) -> Result<Address, RecoveryError>
fn recover_signer_unchecked(&self) -> Result<Address, RecoveryError>
s
value. Read more§fn try_recover_unchecked(&self) -> Result<Address, RecoveryError>
fn try_recover_unchecked(&self) -> Result<Address, RecoveryError>
s
value. Read more§fn recover_signer_unchecked_with_buf(
&self,
buf: &mut Vec<u8>,
) -> Result<Address, RecoveryError>
fn recover_signer_unchecked_with_buf( &self, buf: &mut Vec<u8>, ) -> Result<Address, RecoveryError>
Self::recover_signer_unchecked
] but receives a buffer to operate on. This is used
during batch recovery to avoid allocating a new buffer for each transaction.§fn recalculate_hash(&self) -> FixedBytes<32>
fn recalculate_hash(&self) -> FixedBytes<32>
§fn try_clone_into_recovered(&self) -> Result<Recovered<Self>, RecoveryError>
fn try_clone_into_recovered(&self) -> Result<Recovered<Self>, RecoveryError>
Recovered
] by cloning the type.§fn try_into_recovered(self) -> Result<Recovered<Self>, Self>
fn try_into_recovered(self) -> Result<Recovered<Self>, Self>
Recovered
]. Read more§fn into_recovered_unchecked(self) -> Result<Recovered<Self>, RecoveryError>
fn into_recovered_unchecked(self) -> Result<Recovered<Self>, RecoveryError>
Recovered
] without
ensuring that the signature has a low s
value (EIP-2). Read more§fn with_signer(self, signer: Address) -> Recovered<Self>
fn with_signer(self, signer: Address) -> Recovered<Self>
Recovered
] transaction with the given sender. Read more§impl<Sig, U> SignerSync<Sig> for Arc<U>where
U: SignerSync<Sig> + ?Sized,
impl<Sig, U> SignerSync<Sig> for Arc<U>where
U: SignerSync<Sig> + ?Sized,
§fn sign_hash_sync(&self, hash: &FixedBytes<32>) -> Result<Sig, Error>
fn sign_hash_sync(&self, hash: &FixedBytes<32>) -> Result<Sig, Error>
§fn sign_message_sync(&self, message: &[u8]) -> Result<Sig, Error>
fn sign_message_sync(&self, message: &[u8]) -> Result<Sig, Error>
§fn chain_id_sync(&self) -> Option<u64>
fn chain_id_sync(&self) -> Option<u64>
§impl<T> SnapClient for Arc<T>
impl<T> SnapClient for Arc<T>
§fn get_account_range(
&self,
request: GetAccountRangeMessage,
) -> <Arc<T> as SnapClient>::Output ⓘ
fn get_account_range( &self, request: GetAccountRangeMessage, ) -> <Arc<T> as SnapClient>::Output ⓘ
§fn get_account_range_with_priority(
&self,
request: GetAccountRangeMessage,
priority: Priority,
) -> <Arc<T> as SnapClient>::Output ⓘ
fn get_account_range_with_priority( &self, request: GetAccountRangeMessage, priority: Priority, ) -> <Arc<T> as SnapClient>::Output ⓘ
§impl<T> StageCheckpointReader for Arc<T>
impl<T> StageCheckpointReader for Arc<T>
§fn get_stage_checkpoint(
&self,
id: StageId,
) -> Result<Option<StageCheckpoint>, ProviderError>
fn get_stage_checkpoint( &self, id: StageId, ) -> Result<Option<StageCheckpoint>, ProviderError>
§fn get_stage_checkpoint_progress(
&self,
id: StageId,
) -> Result<Option<Vec<u8>>, ProviderError>
fn get_stage_checkpoint_progress( &self, id: StageId, ) -> Result<Option<Vec<u8>>, ProviderError>
§fn get_all_checkpoints(
&self,
) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>
fn get_all_checkpoints( &self, ) -> Result<Vec<(String, StageCheckpoint)>, ProviderError>
§impl<T> StageCheckpointWriter for Arc<T>
impl<T> StageCheckpointWriter for Arc<T>
§fn save_stage_checkpoint(
&self,
id: StageId,
checkpoint: StageCheckpoint,
) -> Result<(), ProviderError>
fn save_stage_checkpoint( &self, id: StageId, checkpoint: StageCheckpoint, ) -> Result<(), ProviderError>
§impl<T> StateProofProvider for Arc<T>
impl<T> StateProofProvider for Arc<T>
§fn proof(
&self,
input: TrieInput,
address: Address,
slots: &[FixedBytes<32>],
) -> Result<AccountProof, ProviderError>
fn proof( &self, input: TrieInput, address: Address, slots: &[FixedBytes<32>], ) -> Result<AccountProof, ProviderError>
HashedPostState
on top of the current state.§fn multiproof(
&self,
input: TrieInput,
targets: MultiProofTargets,
) -> Result<MultiProof, ProviderError>
fn multiproof( &self, input: TrieInput, targets: MultiProofTargets, ) -> Result<MultiProof, ProviderError>
MultiProof
] for target hashed account and corresponding
hashed storage slot keys.§impl<T> StateProvider for Arc<T>
impl<T> StateProvider for Arc<T>
§fn storage(
&self,
account: Address,
storage_key: FixedBytes<32>,
) -> Result<Option<Uint<256, 4>>, ProviderError>
fn storage( &self, account: Address, storage_key: FixedBytes<32>, ) -> Result<Option<Uint<256, 4>>, ProviderError>
§fn bytecode_by_hash(
&self,
code_hash: &FixedBytes<32>,
) -> Result<Option<Bytecode>, ProviderError>
fn bytecode_by_hash( &self, code_hash: &FixedBytes<32>, ) -> Result<Option<Bytecode>, ProviderError>
§fn account_code(
&self,
addr: &Address,
) -> Result<Option<Bytecode>, ProviderError>
fn account_code( &self, addr: &Address, ) -> Result<Option<Bytecode>, ProviderError>
§fn account_balance(
&self,
addr: &Address,
) -> Result<Option<Uint<256, 4>>, ProviderError>
fn account_balance( &self, addr: &Address, ) -> Result<Option<Uint<256, 4>>, ProviderError>
§impl<T> StateProviderFactory for Arc<T>
impl<T> StateProviderFactory for Arc<T>
§fn latest(&self) -> Result<Box<dyn StateProvider>, ProviderError>
fn latest(&self) -> Result<Box<dyn StateProvider>, ProviderError>
§fn state_by_block_id(
&self,
block_id: BlockId,
) -> Result<Box<dyn StateProvider>, ProviderError>
fn state_by_block_id( &self, block_id: BlockId, ) -> Result<Box<dyn StateProvider>, ProviderError>
§fn state_by_block_number_or_tag(
&self,
number_or_tag: BlockNumberOrTag,
) -> Result<Box<dyn StateProvider>, ProviderError>
fn state_by_block_number_or_tag( &self, number_or_tag: BlockNumberOrTag, ) -> Result<Box<dyn StateProvider>, ProviderError>
§fn history_by_block_number(
&self,
block: u64,
) -> Result<Box<dyn StateProvider>, ProviderError>
fn history_by_block_number( &self, block: u64, ) -> Result<Box<dyn StateProvider>, ProviderError>
§fn history_by_block_hash(
&self,
block: FixedBytes<32>,
) -> Result<Box<dyn StateProvider>, ProviderError>
fn history_by_block_hash( &self, block: FixedBytes<32>, ) -> Result<Box<dyn StateProvider>, ProviderError>
§fn state_by_block_hash(
&self,
block: FixedBytes<32>,
) -> Result<Box<dyn StateProvider>, ProviderError>
fn state_by_block_hash( &self, block: FixedBytes<32>, ) -> Result<Box<dyn StateProvider>, ProviderError>
§impl<T> StateRootProvider for Arc<T>
impl<T> StateRootProvider for Arc<T>
§fn state_root(
&self,
hashed_state: HashedPostState,
) -> Result<FixedBytes<32>, ProviderError>
fn state_root( &self, hashed_state: HashedPostState, ) -> Result<FixedBytes<32>, ProviderError>
BundleState
on top of the current state. Read more§fn state_root_from_nodes(
&self,
input: TrieInput,
) -> Result<FixedBytes<32>, ProviderError>
fn state_root_from_nodes( &self, input: TrieInput, ) -> Result<FixedBytes<32>, ProviderError>
HashedPostState
on top of the current state but reuses the
intermediate nodes to speed up the computation. It’s up to the caller to construct the
prefix sets and inform the provider of the trie paths that have changes.§fn state_root_with_updates(
&self,
hashed_state: HashedPostState,
) -> Result<(FixedBytes<32>, TrieUpdates), ProviderError>
fn state_root_with_updates( &self, hashed_state: HashedPostState, ) -> Result<(FixedBytes<32>, TrieUpdates), ProviderError>
HashedPostState
on top of the current state with trie
updates to be committed to the database.§fn state_root_from_nodes_with_updates(
&self,
input: TrieInput,
) -> Result<(FixedBytes<32>, TrieUpdates), ProviderError>
fn state_root_from_nodes_with_updates( &self, input: TrieInput, ) -> Result<(FixedBytes<32>, TrieUpdates), ProviderError>
StateRootProvider::state_root_from_nodes
] for more info.§impl<U> StatsReader for Arc<U>
impl<U> StatsReader for Arc<U>
§fn count_entries<T>(&self) -> Result<usize, ProviderError>where
T: Table,
fn count_entries<T>(&self) -> Result<usize, ProviderError>where
T: Table,
§impl<T> StorageChangeSetReader for Arc<T>
impl<T> StorageChangeSetReader for Arc<T>
§fn storage_changeset(
&self,
block_number: u64,
) -> Result<Vec<(BlockNumberAddress, StorageEntry)>, ProviderError>
fn storage_changeset( &self, block_number: u64, ) -> Result<Vec<(BlockNumberAddress, StorageEntry)>, ProviderError>
§impl<T> StorageReader for Arc<T>
impl<T> StorageReader for Arc<T>
§fn plain_state_storages(
&self,
addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = FixedBytes<32>>)>,
) -> Result<Vec<(Address, Vec<StorageEntry>)>, ProviderError>
fn plain_state_storages( &self, addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = FixedBytes<32>>)>, ) -> Result<Vec<(Address, Vec<StorageEntry>)>, ProviderError>
§fn changed_storages_with_range(
&self,
range: RangeInclusive<u64>,
) -> Result<BTreeMap<Address, BTreeSet<FixedBytes<32>>>, ProviderError>
fn changed_storages_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<Address, BTreeSet<FixedBytes<32>>>, ProviderError>
§fn changed_storages_and_blocks_with_range(
&self,
range: RangeInclusive<u64>,
) -> Result<BTreeMap<(Address, FixedBytes<32>), Vec<u64>>, ProviderError>
fn changed_storages_and_blocks_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<(Address, FixedBytes<32>), Vec<u64>>, ProviderError>
§impl<T> StorageRootProvider for Arc<T>
impl<T> StorageRootProvider for Arc<T>
§fn storage_root(
&self,
address: Address,
hashed_storage: HashedStorage,
) -> Result<FixedBytes<32>, ProviderError>
fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> Result<FixedBytes<32>, ProviderError>
HashedStorage
for target address on top of the current
state.§fn storage_proof(
&self,
address: Address,
slot: FixedBytes<32>,
hashed_storage: HashedStorage,
) -> Result<StorageProof, ProviderError>
fn storage_proof( &self, address: Address, slot: FixedBytes<32>, hashed_storage: HashedStorage, ) -> Result<StorageProof, ProviderError>
HashedStorage
for target slot on top of the current
state.§fn storage_multiproof(
&self,
address: Address,
slots: &[FixedBytes<32>],
hashed_storage: HashedStorage,
) -> Result<StorageMultiProof, ProviderError>
fn storage_multiproof( &self, address: Address, slots: &[FixedBytes<32>], hashed_storage: HashedStorage, ) -> Result<StorageMultiProof, ProviderError>
§impl<T> StorageTrieWriter for Arc<T>
impl<T> StorageTrieWriter for Arc<T>
§fn write_storage_trie_updates(
&self,
storage_tries: &HashMap<FixedBytes<32>, StorageTrieUpdates, FbBuildHasher<32>>,
) -> Result<usize, ProviderError>
fn write_storage_trie_updates( &self, storage_tries: &HashMap<FixedBytes<32>, StorageTrieUpdates, FbBuildHasher<32>>, ) -> Result<usize, ProviderError>
§fn write_individual_storage_trie_updates(
&self,
hashed_address: FixedBytes<32>,
updates: &StorageTrieUpdates,
) -> Result<usize, ProviderError>
fn write_individual_storage_trie_updates( &self, hashed_address: FixedBytes<32>, updates: &StorageTrieUpdates, ) -> Result<usize, ProviderError>
§impl<S> Strategy for Arc<S>where
S: Strategy + ?Sized,
impl<S> Strategy for Arc<S>where
S: Strategy + ?Sized,
§type Value = <S as Strategy>::Value
type Value = <S as Strategy>::Value
§fn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Arc<S> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Arc<S> as Strategy>::Tree, Reason>
§fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read more§fn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
§fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read more§fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
§fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
§fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
prop_ind_flat_map()
, but produces 2-tuples with the input
generated 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>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read more§fn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read more§fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
§fn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read more§fn prop_shuffle(self) -> Shuffle<Self>where
Self: Sized,
Self::Value: Shuffleable,
fn prop_shuffle(self) -> Shuffle<Self>where
Self: Sized,
Self::Value: Shuffleable,
§fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read more§impl<S> Subscriber for Arc<S>where
S: Subscriber + ?Sized,
impl<S> Subscriber for Arc<S>where
S: Subscriber + ?Sized,
§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
§fn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
Subscriber
will
enable, or None
, if the subscriber does not implement level-based
filtering or chooses not to implement this method. Read more§fn record_follows_from(&self, span: &Id, follows: &Id)
fn record_follows_from(&self, span: &Id, follows: &Id)
§fn event_enabled(&self, event: &Event<'_>) -> bool
fn event_enabled(&self, event: &Event<'_>) -> bool
Event
] should be recorded. Read more§fn clone_span(&self, id: &Id) -> Id
fn clone_span(&self, id: &Id) -> Id
§fn drop_span(&self, id: Id)
fn drop_span(&self, id: Id)
Subscriber::try_close
instead§fn current_span(&self) -> Current
fn current_span(&self) -> Current
§unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
self
is the same type as the provided TypeId
, returns an untyped
*const
pointer to that type. Otherwise, returns None
. Read more§fn on_register_dispatch(&self, subscriber: &Dispatch)
fn on_register_dispatch(&self, subscriber: &Dispatch)
Dispatch
]. Read more§impl<T> SyncStateProvider for Arc<T>
impl<T> SyncStateProvider for Arc<T>
§fn is_syncing(&self) -> bool
fn is_syncing(&self) -> bool
true
if the network is undergoing sync.§fn is_initially_syncing(&self) -> bool
fn is_initially_syncing(&self) -> bool
true
if the network is undergoing an initial (pipeline) sync.§impl<T> TaskSpawner for Arc<T>
impl<T> TaskSpawner for Arc<T>
§fn spawn(&self, fut: Pin<Box<dyn Future<Output = ()> + Send>>) -> JoinHandle<()>
fn spawn(&self, fut: Pin<Box<dyn Future<Output = ()> + Send>>) -> JoinHandle<()>
Handle::spawn
].§fn spawn_critical(
&self,
name: &'static str,
fut: Pin<Box<dyn Future<Output = ()> + Send>>,
) -> JoinHandle<()>
fn spawn_critical( &self, name: &'static str, fut: Pin<Box<dyn Future<Output = ()> + Send>>, ) -> JoinHandle<()>
§impl<T> TaskSpawnerExt for Arc<T>
impl<T> TaskSpawnerExt for Arc<T>
§impl<T> Transaction for Arc<T>where
T: Transaction + ?Sized,
impl<T> Transaction for Arc<T>where
T: Transaction + ?Sized,
type AccessListItem = <T as Transaction>::AccessListItem
type Authorization = <T as Transaction>::Authorization
§fn value(&self) -> Uint<256, 4>
fn value(&self) -> Uint<256, 4>
TxKind::Call
][primitives::TxKind::Call]. Read more§fn gas_price(&self) -> u128
fn gas_price(&self) -> u128
§fn access_list(
&self,
) -> Option<impl Iterator<Item = &<Arc<T> as Transaction>::AccessListItem>>
fn access_list( &self, ) -> Option<impl Iterator<Item = &<Arc<T> as Transaction>::AccessListItem>>
§fn blob_versioned_hashes(&self) -> &[FixedBytes<32>]
fn blob_versioned_hashes(&self) -> &[FixedBytes<32>]
§fn max_fee_per_blob_gas(&self) -> u128
fn max_fee_per_blob_gas(&self) -> u128
§fn total_blob_gas(&self) -> u64
fn total_blob_gas(&self) -> u64
§fn calc_max_data_fee(&self) -> Uint<256, 4>
fn calc_max_data_fee(&self) -> Uint<256, 4>
data_fee
of the transaction. Read more§fn max_fee_per_gas(&self) -> u128
fn max_fee_per_gas(&self) -> u128
§fn max_priority_fee_per_gas(&self) -> Option<u128>
fn max_priority_fee_per_gas(&self) -> Option<u128>
§fn effective_gas_price(&self, base_fee: u128) -> u128
fn effective_gas_price(&self, base_fee: u128) -> u128
§impl<T> Transaction for Arc<T>
impl<T> Transaction for Arc<T>
§fn max_fee_per_gas(&self) -> u128
fn max_fee_per_gas(&self) -> u128
§fn max_priority_fee_per_gas(&self) -> Option<u128>
fn max_priority_fee_per_gas(&self) -> Option<u128>
§fn max_fee_per_blob_gas(&self) -> Option<u128>
fn max_fee_per_blob_gas(&self) -> Option<u128>
§fn priority_fee_or_price(&self) -> u128
fn priority_fee_or_price(&self) -> u128
§fn effective_gas_price(&self, base_fee: Option<u64>) -> u128
fn effective_gas_price(&self, base_fee: Option<u64>) -> u128
§fn effective_tip_per_gas(&self, base_fee: u64) -> Option<u128>
fn effective_tip_per_gas(&self, base_fee: u64) -> Option<u128>
§fn is_dynamic_fee(&self) -> bool
fn is_dynamic_fee(&self) -> bool
true
if the transaction supports dynamic fees.§fn is_create(&self) -> bool
fn is_create(&self) -> bool
kind
as it copies the 21-byte
[TxKind
] for this simple check. A proper implementation shouldn’t allocate.§fn to(&self) -> Option<Address>
fn to(&self) -> Option<Address>
§fn function_selector(&self) -> Option<&FixedBytes<4>>
fn function_selector(&self) -> Option<&FixedBytes<4>>
§fn access_list(&self) -> Option<&AccessList>
fn access_list(&self) -> Option<&AccessList>
access_list
for the particular transaction type. Returns None
for
older transaction types.§fn blob_versioned_hashes(&self) -> Option<&[FixedBytes<32>]>
fn blob_versioned_hashes(&self) -> Option<&[FixedBytes<32>]>
None
.§fn blob_count(&self) -> Option<u64>
fn blob_count(&self) -> Option<u64>
§fn blob_gas_used(&self) -> Option<u64>
fn blob_gas_used(&self) -> Option<u64>
SignedAuthorization
] list of the transaction. Read moreSignedAuthorization
] in this transactions Read moreSource§impl<T> TransactionPool for Arc<T>
impl<T> TransactionPool for Arc<T>
Source§type Transaction = <T as TransactionPool>::Transaction
type Transaction = <T as TransactionPool>::Transaction
Source§fn block_info(&self) -> BlockInfo
fn block_info(&self) -> BlockInfo
Source§fn add_external_transaction(
&self,
transaction: <Arc<T> as TransactionPool>::Transaction,
) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send
fn add_external_transaction( &self, transaction: <Arc<T> as TransactionPool>::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send
Source§fn add_external_transactions(
&self,
transactions: Vec<<Arc<T> as TransactionPool>::Transaction>,
) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send
fn add_external_transactions( &self, transactions: Vec<<Arc<T> as TransactionPool>::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send
Source§fn add_transaction_and_subscribe(
&self,
origin: TransactionOrigin,
transaction: <Arc<T> as TransactionPool>::Transaction,
) -> impl Future<Output = Result<TransactionEvents, PoolError>> + Send
fn add_transaction_and_subscribe( &self, origin: TransactionOrigin, transaction: <Arc<T> as TransactionPool>::Transaction, ) -> impl Future<Output = Result<TransactionEvents, PoolError>> + Send
Source§fn add_transaction(
&self,
origin: TransactionOrigin,
transaction: <Arc<T> as TransactionPool>::Transaction,
) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send
fn add_transaction( &self, origin: TransactionOrigin, transaction: <Arc<T> as TransactionPool>::Transaction, ) -> impl Future<Output = Result<FixedBytes<32>, PoolError>> + Send
Source§fn add_transactions(
&self,
origin: TransactionOrigin,
transactions: Vec<<Arc<T> as TransactionPool>::Transaction>,
) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send
fn add_transactions( &self, origin: TransactionOrigin, transactions: Vec<<Arc<T> as TransactionPool>::Transaction>, ) -> impl Future<Output = Vec<Result<FixedBytes<32>, PoolError>>> + Send
Source§fn transaction_event_listener(
&self,
tx_hash: FixedBytes<32>,
) -> Option<TransactionEvents>
fn transaction_event_listener( &self, tx_hash: FixedBytes<32>, ) -> Option<TransactionEvents>
Source§fn all_transactions_event_listener(
&self,
) -> AllTransactionsEvents<<Arc<T> as TransactionPool>::Transaction>
fn all_transactions_event_listener( &self, ) -> AllTransactionsEvents<<Arc<T> as TransactionPool>::Transaction>
Source§fn pending_transactions_listener(&self) -> Receiver<FixedBytes<32>>
fn pending_transactions_listener(&self) -> Receiver<FixedBytes<32>>
Source§fn pending_transactions_listener_for(
&self,
kind: TransactionListenerKind,
) -> Receiver<FixedBytes<32>>
fn pending_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<FixedBytes<32>>
Source§fn new_transactions_listener(
&self,
) -> Receiver<NewTransactionEvent<<Arc<T> as TransactionPool>::Transaction>>
fn new_transactions_listener( &self, ) -> Receiver<NewTransactionEvent<<Arc<T> as TransactionPool>::Transaction>>
Source§fn blob_transaction_sidecars_listener(&self) -> Receiver<NewBlobSidecar>
fn blob_transaction_sidecars_listener(&self) -> Receiver<NewBlobSidecar>
Source§fn new_transactions_listener_for(
&self,
kind: TransactionListenerKind,
) -> Receiver<NewTransactionEvent<<Arc<T> as TransactionPool>::Transaction>>
fn new_transactions_listener_for( &self, kind: TransactionListenerKind, ) -> Receiver<NewTransactionEvent<<Arc<T> as TransactionPool>::Transaction>>
Source§fn new_pending_pool_transactions_listener(
&self,
) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>
fn new_pending_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>
Source§fn new_basefee_pool_transactions_listener(
&self,
) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>
fn new_basefee_pool_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>
Source§fn new_queued_transactions_listener(
&self,
) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>
fn new_queued_transactions_listener( &self, ) -> NewSubpoolTransactionStream<<Arc<T> as TransactionPool>::Transaction>
Source§fn pooled_transaction_hashes(&self) -> Vec<FixedBytes<32>>
fn pooled_transaction_hashes(&self) -> Vec<FixedBytes<32>>
Source§fn pooled_transaction_hashes_max(&self, max: usize) -> Vec<FixedBytes<32>>
fn pooled_transaction_hashes_max(&self, max: usize) -> Vec<FixedBytes<32>>
max
hashes of transactions in the pool. Read moreSource§fn pooled_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn pooled_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn pooled_transactions_max(
&self,
max: usize,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn pooled_transactions_max( &self, max: usize, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
max
transactions in the pool. Read moreSource§fn get_pooled_transaction_elements(
&self,
tx_hashes: Vec<FixedBytes<32>>,
limit: GetPooledTransactionLimit,
) -> Vec<<<Arc<T> as TransactionPool>::Transaction as PoolTransaction>::Pooled>
fn get_pooled_transaction_elements( &self, tx_hashes: Vec<FixedBytes<32>>, limit: GetPooledTransactionLimit, ) -> Vec<<<Arc<T> as TransactionPool>::Transaction as PoolTransaction>::Pooled>
Source§fn get_pooled_transaction_element(
&self,
tx_hash: FixedBytes<32>,
) -> Option<Recovered<<<Arc<T> as TransactionPool>::Transaction as PoolTransaction>::Pooled>>
fn get_pooled_transaction_element( &self, tx_hash: FixedBytes<32>, ) -> Option<Recovered<<<Arc<T> as TransactionPool>::Transaction as PoolTransaction>::Pooled>>
Source§fn best_transactions(
&self,
) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>>
fn best_transactions( &self, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>>
Source§fn best_transactions_with_attributes(
&self,
best_transactions_attributes: BestTransactionsAttributes,
) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>>
fn best_transactions_with_attributes( &self, best_transactions_attributes: BestTransactionsAttributes, ) -> Box<dyn BestTransactions<Item = Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>>
Source§fn pending_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn pending_transactions_max(
&self,
max: usize,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn pending_transactions_max( &self, max: usize, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
max
transactions that can be included in the next block.
See https://github.com/paradigmxyz/reth/issues/12767#issuecomment-2493223579 Read moreSource§fn queued_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn queued_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn all_transactions(
&self,
) -> AllPoolTransactions<<Arc<T> as TransactionPool>::Transaction>
fn all_transactions( &self, ) -> AllPoolTransactions<<Arc<T> as TransactionPool>::Transaction>
Source§fn remove_transactions(
&self,
hashes: Vec<FixedBytes<32>>,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn remove_transactions( &self, hashes: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn remove_transactions_and_descendants(
&self,
hashes: Vec<FixedBytes<32>>,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn remove_transactions_and_descendants( &self, hashes: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn remove_transactions_by_sender(
&self,
sender: Address,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn remove_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn retain_unknown<A>(&self, announcement: &mut A)where
A: HandleMempoolData,
fn retain_unknown<A>(&self, announcement: &mut A)where
A: HandleMempoolData,
Source§fn contains(&self, tx_hash: &FixedBytes<32>) -> bool
fn contains(&self, tx_hash: &FixedBytes<32>) -> bool
Source§fn get(
&self,
tx_hash: &FixedBytes<32>,
) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get( &self, tx_hash: &FixedBytes<32>, ) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_all(
&self,
txs: Vec<FixedBytes<32>>,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_all( &self, txs: Vec<FixedBytes<32>>, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn on_propagated(&self, txs: PropagatedTransactions)
fn on_propagated(&self, txs: PropagatedTransactions)
Source§fn get_transactions_by_sender(
&self,
sender: Address,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_pending_transactions_with_predicate(
&self,
predicate: impl FnMut(&ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>) -> bool,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_pending_transactions_with_predicate( &self, predicate: impl FnMut(&ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>) -> bool, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_pending_transactions_by_sender(
&self,
sender: Address,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_pending_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_queued_transactions_by_sender(
&self,
sender: Address,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_queued_transactions_by_sender( &self, sender: Address, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_highest_transaction_by_sender(
&self,
sender: Address,
) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_highest_transaction_by_sender( &self, sender: Address, ) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_highest_consecutive_transaction_by_sender(
&self,
sender: Address,
on_chain_nonce: u64,
) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_highest_consecutive_transaction_by_sender( &self, sender: Address, on_chain_nonce: u64, ) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_transaction_by_sender_and_nonce(
&self,
sender: Address,
nonce: u64,
) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_transaction_by_sender_and_nonce( &self, sender: Address, nonce: u64, ) -> Option<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_transactions_by_origin(
&self,
origin: TransactionOrigin,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_transactions_by_origin( &self, origin: TransactionOrigin, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_pending_transactions_by_origin(
&self,
origin: TransactionOrigin,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_pending_transactions_by_origin( &self, origin: TransactionOrigin, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
TransactionOrigin
Source§fn get_local_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_local_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_private_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_private_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_external_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_external_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_local_pending_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_local_pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_private_pending_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_private_pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn get_external_pending_transactions(
&self,
) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
fn get_external_pending_transactions( &self, ) -> Vec<Arc<ValidPoolTransaction<<Arc<T> as TransactionPool>::Transaction>>>
Source§fn unique_senders(&self) -> HashSet<Address>
fn unique_senders(&self) -> HashSet<Address>
Source§fn get_blob(
&self,
tx_hash: FixedBytes<32>,
) -> Result<Option<Arc<BlobTransactionSidecar>>, BlobStoreError>
fn get_blob( &self, tx_hash: FixedBytes<32>, ) -> Result<Option<Arc<BlobTransactionSidecar>>, BlobStoreError>
Source§fn get_all_blobs(
&self,
tx_hashes: Vec<FixedBytes<32>>,
) -> Result<Vec<(FixedBytes<32>, Arc<BlobTransactionSidecar>)>, BlobStoreError>
fn get_all_blobs( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<(FixedBytes<32>, Arc<BlobTransactionSidecar>)>, BlobStoreError>
Source§fn get_all_blobs_exact(
&self,
tx_hashes: Vec<FixedBytes<32>>,
) -> Result<Vec<Arc<BlobTransactionSidecar>>, BlobStoreError>
fn get_all_blobs_exact( &self, tx_hashes: Vec<FixedBytes<32>>, ) -> Result<Vec<Arc<BlobTransactionSidecar>>, BlobStoreError>
Source§fn get_blobs_for_versioned_hashes(
&self,
versioned_hashes: &[FixedBytes<32>],
) -> Result<Vec<Option<BlobAndProofV1>>, BlobStoreError>
fn get_blobs_for_versioned_hashes( &self, versioned_hashes: &[FixedBytes<32>], ) -> Result<Vec<Option<BlobAndProofV1>>, BlobStoreError>
BlobTransactionSidecar
]s for a list of blob versioned hashes.Source§impl<T> TransactionPoolExt for Arc<T>
impl<T> TransactionPoolExt for Arc<T>
Source§fn set_block_info(&self, info: BlockInfo)
fn set_block_info(&self, info: BlockInfo)
Source§fn on_canonical_state_change<B>(&self, update: CanonicalStateUpdate<'_, B>)where
B: Block,
fn on_canonical_state_change<B>(&self, update: CanonicalStateUpdate<'_, B>)where
B: Block,
Source§fn update_accounts(&self, accounts: Vec<ChangedAccount>)
fn update_accounts(&self, accounts: Vec<ChangedAccount>)
Source§fn delete_blob(&self, tx: FixedBytes<32>)
fn delete_blob(&self, tx: FixedBytes<32>)
Source§fn delete_blobs(&self, txs: Vec<FixedBytes<32>>)
fn delete_blobs(&self, txs: Vec<FixedBytes<32>>)
Source§fn cleanup_blobs(&self)
fn cleanup_blobs(&self)
§impl<T> TransactionsProvider for Arc<T>
impl<T> TransactionsProvider for Arc<T>
§type Transaction = <T as TransactionsProvider>::Transaction
type Transaction = <T as TransactionsProvider>::Transaction
§fn transaction_id(
&self,
tx_hash: FixedBytes<32>,
) -> Result<Option<u64>, ProviderError>
fn transaction_id( &self, tx_hash: FixedBytes<32>, ) -> Result<Option<u64>, ProviderError>
§fn transaction_by_id(
&self,
id: u64,
) -> Result<Option<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
fn transaction_by_id( &self, id: u64, ) -> Result<Option<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
§fn transaction_by_id_unhashed(
&self,
id: u64,
) -> Result<Option<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
fn transaction_by_id_unhashed( &self, id: u64, ) -> Result<Option<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
§fn transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> Result<Option<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
fn transaction_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
§fn transaction_by_hash_with_meta(
&self,
hash: FixedBytes<32>,
) -> Result<Option<(<Arc<T> as TransactionsProvider>::Transaction, TransactionMeta)>, ProviderError>
fn transaction_by_hash_with_meta( &self, hash: FixedBytes<32>, ) -> Result<Option<(<Arc<T> as TransactionsProvider>::Transaction, TransactionMeta)>, ProviderError>
§fn transaction_block(&self, id: u64) -> Result<Option<u64>, ProviderError>
fn transaction_block(&self, id: u64) -> Result<Option<u64>, ProviderError>
§fn transactions_by_block(
&self,
block: HashOrNumber,
) -> Result<Option<Vec<<Arc<T> as TransactionsProvider>::Transaction>>, ProviderError>
fn transactions_by_block( &self, block: HashOrNumber, ) -> Result<Option<Vec<<Arc<T> as TransactionsProvider>::Transaction>>, ProviderError>
§fn transactions_by_block_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<Vec<Vec<<Arc<T> as TransactionsProvider>::Transaction>>, ProviderError>
fn transactions_by_block_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<Vec<<Arc<T> as TransactionsProvider>::Transaction>>, ProviderError>
§fn transactions_by_tx_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<Vec<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
fn transactions_by_tx_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<<Arc<T> as TransactionsProvider>::Transaction>, ProviderError>
§fn senders_by_tx_range(
&self,
range: impl RangeBounds<u64>,
) -> Result<Vec<Address>, ProviderError>
fn senders_by_tx_range( &self, range: impl RangeBounds<u64>, ) -> Result<Vec<Address>, ProviderError>
§impl<T> TransactionsProviderExt for Arc<T>
impl<T> TransactionsProviderExt for Arc<T>
§fn transaction_range_by_block_range(
&self,
block_range: RangeInclusive<u64>,
) -> Result<RangeInclusive<u64>, ProviderError>
fn transaction_range_by_block_range( &self, block_range: RangeInclusive<u64>, ) -> Result<RangeInclusive<u64>, ProviderError>
§impl<T> TreeHash for Arc<T>where
T: TreeHash,
impl<T> TreeHash for Arc<T>where
T: TreeHash,
fn tree_hash_type() -> TreeHashType
fn tree_hash_packed_encoding(&self) -> SmallVec<[u8; 32]>
fn tree_hash_packing_factor() -> usize
fn tree_hash_root(&self) -> FixedBytes<32>
§impl<T> TrieWriter for Arc<T>
impl<T> TrieWriter for Arc<T>
§fn write_trie_updates(
&self,
trie_updates: &TrieUpdates,
) -> Result<usize, ProviderError>
fn write_trie_updates( &self, trie_updates: &TrieUpdates, ) -> Result<usize, ProviderError>
§impl<T> TxReceipt for Arc<T>
impl<T> TxReceipt for Arc<T>
§fn status_or_post_state(&self) -> Eip658Value
fn status_or_post_state(&self) -> Eip658Value
§fn bloom(&self) -> Bloom
fn bloom(&self) -> Bloom
§fn bloom_cheap(&self) -> Option<Bloom>
fn bloom_cheap(&self) -> Option<Bloom>
§fn cumulative_gas_used(&self) -> u64
fn cumulative_gas_used(&self) -> u64
§fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
fn with_bloom_ref(&self) -> ReceiptWithBloom<&Self>
ReceiptWithBloom
] with the computed bloom filter [Self::bloom
] and a reference
to the receipt.§fn into_with_bloom(self) -> ReceiptWithBloom<Self>
fn into_with_bloom(self) -> ReceiptWithBloom<Self>
ReceiptWithBloom
] with the computed bloom filter
[Self::bloom
] and the receipt.§impl<Signature, T> TxSigner<Signature> for Arc<T>where
T: TxSigner<Signature> + ?Sized,
impl<Signature, T> TxSigner<Signature> for Arc<T>where
T: TxSigner<Signature> + ?Sized,
§fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut (dyn SignableTransaction<Signature> + 'static),
) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut (dyn SignableTransaction<Signature> + 'static),
) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<T>: 'async_trait,
§impl<Signature, T> TxSignerSync<Signature> for Arc<T>where
T: TxSignerSync<Signature> + ?Sized,
impl<Signature, T> TxSignerSync<Signature> for Arc<T>where
T: TxSignerSync<Signature> + ?Sized,
§fn sign_transaction_sync(
&self,
tx: &mut (dyn SignableTransaction<Signature> + 'static),
) -> Result<Signature, Error>
fn sign_transaction_sync( &self, tx: &mut (dyn SignableTransaction<Signature> + 'static), ) -> Result<Signature, Error>
§impl<T> WithdrawalsProvider for Arc<T>
impl<T> WithdrawalsProvider for Arc<T>
§fn withdrawals_by_block(
&self,
id: HashOrNumber,
timestamp: u64,
) -> Result<Option<Withdrawals>, ProviderError>
fn withdrawals_by_block( &self, id: HashOrNumber, timestamp: u64, ) -> Result<Option<Withdrawals>, ProviderError>
§impl<'a, T> Writeable for Arc<T>where
T: Writeable + ?Sized,
impl<'a, T> Writeable for Arc<T>where
T: Writeable + ?Sized,
§fn write_to<W>(&self, sink: &mut W) -> Result<(), Error>
fn write_to<W>(&self, sink: &mut W) -> Result<(), Error>
write_to_parts
, and discards any
Part
annotations.§fn write_to_parts<W>(&self, sink: &mut W) -> Result<(), Error>where
W: PartsWrite + ?Sized,
fn write_to_parts<W>(&self, sink: &mut W) -> Result<(), Error>where
W: PartsWrite + ?Sized,
Part
annotations to the given sink. Errors from the
sink are bubbled up. The default implementation delegates to write_to
,
and doesn’t produce any Part
annotations.§fn writeable_length_hint(&self) -> LengthHint
fn writeable_length_hint(&self) -> LengthHint
§fn write_to_string(&self) -> Cow<'_, str>
fn write_to_string(&self) -> Cow<'_, str>
String
with the data from this Writeable
. Like ToString
,
but smaller and faster. Read more§fn writeable_cmp_bytes(&self, other: &[u8]) -> Ordering
fn writeable_cmp_bytes(&self, other: &[u8]) -> Ordering
Writeable
to the given bytes
without allocating a String to hold the Writeable
contents. Read more