pub struct Arc<T, A = Global>{ /* private fields */ }Expand description
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
The type Arc<T> provides shared ownership of a value of type T,
allocated in the heap. Invoking clone on Arc produces
a new Arc instance, which points to the same allocation on the heap as the
source Arc, while increasing a reference count. When the last Arc
pointer to a given allocation is destroyed, the value stored in that allocation (often
referred to as “inner value”) is also dropped.
Shared references in Rust disallow mutation by default, and Arc is no
exception: you cannot generally obtain a mutable reference to something
inside an Arc. If you need to mutate through an Arc, use
Mutex, RwLock, or one of the Atomic
types.
Note: This type is only available on platforms that support atomic
loads and stores of pointers, which includes all platforms that support
the std crate but not all those which only support alloc.
This may be detected at compile time using #[cfg(target_has_atomic = "ptr")].
§Thread Safety
Unlike Rc<T>, Arc<T> uses atomic operations for its reference
counting. This means that it is thread-safe. The disadvantage is that
atomic operations are more expensive than ordinary memory accesses. If you
are not sharing reference-counted allocations between threads, consider using
Rc<T> for lower overhead. Rc<T> is a safe default, because the
compiler will catch any attempt to send an Rc<T> between threads.
However, a library might choose Arc<T> in order to give library consumers
more flexibility.
Arc<T> will implement Send and Sync as long as the T implements
Send and Sync. Why can’t you put a non-thread-safe type T in an
Arc<T> to make it thread-safe? This may be a bit counter-intuitive at
first: after all, isn’t the point of Arc<T> thread safety? The key is
this: Arc<T> makes it thread safe to have multiple ownership of the same
data, but it doesn’t add thread safety to its data. Consider
Arc<RefCell<T>>. RefCell<T> isn’t Sync, and if Arc<T> was always
Send, Arc<RefCell<T>> would be as well. But then we’d have a problem:
RefCell<T> is not thread safe; it keeps track of the borrowing count using
non-atomic operations.
In the end, this means that you may need to pair Arc<T> with some sort of
std::sync type, usually Mutex<T>.
§Breaking cycles with Weak
The downgrade method can be used to create a non-owning
Weak pointer. A Weak pointer can be upgraded
to an Arc, but this will return None if the value stored in the allocation has
already been dropped. In other words, Weak pointers do not keep the value
inside the allocation alive; however, they do keep the allocation
(the backing store for the value) alive.
A cycle between Arc pointers will never be deallocated. For this reason,
Weak is used to break cycles. For example, a tree could have
strong Arc pointers from parent nodes to children, and Weak
pointers from children back to their parents.
§Cloning references
Creating a new reference from an existing reference-counted pointer is done using the
Clone trait implemented for Arc<T> and Weak<T>.
use std::sync::Arc;
let foo = Arc::new(vec![1.0, 2.0, 3.0]);
// The two syntaxes below are equivalent.
let a = foo.clone();
let b = Arc::clone(&foo);
// a, b, and foo are all Arcs that point to the same memory location§Deref behavior
Arc<T> automatically dereferences to T (via the Deref trait),
so you can call T’s methods on a value of type Arc<T>. To avoid name
clashes with T’s methods, the methods of Arc<T> itself are associated
functions, called using fully qualified syntax:
use std::sync::Arc;
let my_arc = Arc::new(());
let my_weak = Arc::downgrade(&my_arc);Arc<T>’s implementations of traits like Clone may also be called using
fully qualified syntax. Some people prefer to use fully qualified syntax,
while others prefer using method-call syntax.
use std::sync::Arc;
let arc = Arc::new(());
// Method-call syntax
let arc2 = arc.clone();
// Fully qualified syntax
let arc3 = Arc::clone(&arc);Weak<T> does not auto-dereference to T, because the inner value may have
already been dropped.
§Examples
Sharing some immutable data between threads:
use std::sync::Arc;
use std::thread;
let five = Arc::new(5);
for _ in 0..10 {
let five = Arc::clone(&five);
thread::spawn(move || {
println!("{five:?}");
});
}Sharing a mutable AtomicUsize:
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::thread;
let val = Arc::new(AtomicUsize::new(5));
for _ in 0..10 {
let val = Arc::clone(&val);
thread::spawn(move || {
let v = val.fetch_add(1, Ordering::Relaxed);
println!("{v:?}");
});
}See the rc documentation for more examples of reference
counting in general.
Implementations§
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)
pub fn new_zeroed() -> Arc<MaybeUninit<T>>
new_zeroed_alloc)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)
pub fn try_pin(data: T) -> Result<Pin<Arc<T>>, AllocError>
allocator_api)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)
pub fn try_new(data: T) -> Result<Arc<T>, AllocError>
allocator_api)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)
pub fn try_new_uninit() -> Result<Arc<MaybeUninit<T>>, AllocError>
allocator_api)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)
pub fn try_new_zeroed() -> Result<Arc<MaybeUninit<T>>, AllocError>
allocator_api)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>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)
pub fn new_in(data: T, alloc: A) -> Arc<T, A>
allocator_api)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)
pub fn new_uninit_in(alloc: A) -> Arc<MaybeUninit<T>, A>
allocator_api)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)
pub fn new_zeroed_in(alloc: A) -> Arc<MaybeUninit<T>, A>
allocator_api)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)
pub fn new_cyclic_in<F>(data_fn: F, alloc: A) -> Arc<T, A>
allocator_api)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)
pub fn pin_in(data: T, alloc: A) -> Pin<Arc<T, A>>where
A: 'static,
allocator_api)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)
pub fn try_pin_in(data: T, alloc: A) -> Result<Pin<Arc<T, A>>, AllocError>where
A: 'static,
allocator_api)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)
pub fn try_new_in(data: T, alloc: A) -> Result<Arc<T, A>, AllocError>
allocator_api)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)
pub fn try_new_uninit_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>
allocator_api)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)
pub fn try_new_zeroed_in(alloc: A) -> Result<Arc<MaybeUninit<T>, A>, AllocError>
allocator_api)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();Source§impl<T> Arc<[T]>
impl<T> Arc<[T]>
1.82.0 · Sourcepub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>]>
pub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>]>
Constructs a new atomically reference-counted slice with uninitialized contents.
§Examples
#![feature(get_mut_unchecked)]
use std::sync::Arc;
let mut values = Arc::<[u32]>::new_uninit_slice(3);
// Deferred initialization:
let data = Arc::get_mut(&mut values).unwrap();
data[0].write(1);
data[1].write(2);
data[2].write(3);
let values = unsafe { values.assume_init() };
assert_eq!(*values, [1, 2, 3])Sourcepub fn new_zeroed_slice(len: usize) -> Arc<[MaybeUninit<T>]>
🔬This is a nightly-only experimental API. (new_zeroed_alloc)
pub fn new_zeroed_slice(len: usize) -> Arc<[MaybeUninit<T>]>
new_zeroed_alloc)Constructs a new atomically reference-counted slice 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 values = Arc::<[u32]>::new_zeroed_slice(3);
let values = unsafe { values.assume_init() };
assert_eq!(*values, [0, 0, 0])Source§impl<T, A> Arc<[T], A>where
A: Allocator,
impl<T, A> Arc<[T], A>where
A: Allocator,
Sourcepub fn new_uninit_slice_in(len: usize, alloc: A) -> Arc<[MaybeUninit<T>], A>
🔬This is a nightly-only experimental API. (allocator_api)
pub fn new_uninit_slice_in(len: usize, alloc: A) -> Arc<[MaybeUninit<T>], A>
allocator_api)Constructs a new atomically reference-counted slice 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 values = Arc::<[u32], _>::new_uninit_slice_in(3, System);
let values = unsafe {
// Deferred initialization:
Arc::get_mut_unchecked(&mut values)[0].as_mut_ptr().write(1);
Arc::get_mut_unchecked(&mut values)[1].as_mut_ptr().write(2);
Arc::get_mut_unchecked(&mut values)[2].as_mut_ptr().write(3);
values.assume_init()
};
assert_eq!(*values, [1, 2, 3])Sourcepub fn new_zeroed_slice_in(len: usize, alloc: A) -> Arc<[MaybeUninit<T>], A>
🔬This is a nightly-only experimental API. (allocator_api)
pub fn new_zeroed_slice_in(len: usize, alloc: A) -> Arc<[MaybeUninit<T>], A>
allocator_api)Constructs a new atomically reference-counted slice 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 values = Arc::<[u32], _>::new_zeroed_slice_in(3, System);
let values = unsafe { values.assume_init() };
assert_eq!(*values, [0, 0, 0])Source§impl<T, A> Arc<MaybeUninit<T>, A>where
A: Allocator,
impl<T, A> Arc<MaybeUninit<T>, A>where
A: Allocator,
1.82.0 · Sourcepub unsafe fn assume_init(self) -> Arc<T, A>
pub unsafe fn assume_init(self) -> Arc<T, A>
Converts to Arc<T>.
§Safety
As with MaybeUninit::assume_init,
it is up to the caller to guarantee that the inner value
really is in an initialized state.
Calling this when the content is not yet fully initialized
causes immediate undefined behavior.
§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)Source§impl<T, A> Arc<[MaybeUninit<T>], A>where
A: Allocator,
impl<T, A> Arc<[MaybeUninit<T>], A>where
A: Allocator,
1.82.0 · Sourcepub unsafe fn assume_init(self) -> Arc<[T], A>
pub unsafe fn assume_init(self) -> Arc<[T], A>
Converts to Arc<[T]>.
§Safety
As with MaybeUninit::assume_init,
it is up to the caller to guarantee that the inner value
really is in an initialized state.
Calling this when the content is not yet fully initialized
causes immediate undefined behavior.
§Examples
#![feature(get_mut_unchecked)]
use std::sync::Arc;
let mut values = Arc::<[u32]>::new_uninit_slice(3);
// Deferred initialization:
let data = Arc::get_mut(&mut values).unwrap();
data[0].write(1);
data[1].write(2);
data[2].write(3);
let values = unsafe { values.assume_init() };
assert_eq!(*values, [1, 2, 3])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
Uis sized, it must have the same size and alignment asT. This is trivially true ifUisT. - If
Uis 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 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 the
associated Arc instance must be valid (i.e. the strong count must be at
least 1) for the duration of this method.
§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 the
associated Arc instance must be valid (i.e. the strong count must be at
least 1) when invoking this method. 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, 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)
pub fn allocator(this: &Arc<T, A>) -> &A
allocator_api)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)
pub fn into_raw_with_allocator(this: Arc<T, A>) -> (*const T, A)
allocator_api)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)
pub unsafe fn from_raw_in(ptr: *const T, alloc: A) -> Arc<T, A>
allocator_api)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
Uis sized, it must have the same size and alignment asT. This is trivially true ifUisT. - If
Uis 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)
pub unsafe fn increment_strong_count_in(ptr: *const T, alloc: A)where
A: Clone,
allocator_api)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 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)
pub unsafe fn decrement_strong_count_in(ptr: *const T, alloc: A)
allocator_api)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, 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 Arcs 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)
pub unsafe fn get_mut_unchecked(this: &mut Arc<T, A>) -> &mut T
get_mut_unchecked)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 strOther 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().into();
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-freeSource§impl<A> Arc<dyn Any + Send + Sync, A>where
A: Allocator,
impl<A> Arc<dyn Any + Send + Sync, A>where
A: Allocator,
1.29.0 · Sourcepub fn downcast<T>(self) -> Result<Arc<T, A>, Arc<dyn Any + Send + Sync, A>>
pub fn downcast<T>(self) -> Result<Arc<T, A>, Arc<dyn Any + Send + Sync, A>>
Attempts to downcast the Arc<dyn Any + Send + Sync> to a concrete type.
§Examples
use std::any::Any;
use std::sync::Arc;
fn print_if_string(value: Arc<dyn Any + Send + Sync>) {
if let Ok(string) = value.downcast::<String>() {
println!("String ({}): {}", string.len(), string);
}
}
let my_string = "Hello World".to_string();
print_if_string(Arc::new(my_string));
print_if_string(Arc::new(0i8));Sourcepub unsafe fn downcast_unchecked<T>(self) -> Arc<T, A>
🔬This is a nightly-only experimental API. (downcast_unchecked)
pub unsafe fn downcast_unchecked<T>(self) -> Arc<T, A>
downcast_unchecked)Downcasts the Arc<dyn Any + Send + Sync> to a concrete type.
For a safe alternative see downcast.
§Examples
#![feature(downcast_unchecked)]
use std::any::Any;
use std::sync::Arc;
let x: Arc<dyn Any + Send + Sync> = Arc::new(1_usize);
unsafe {
assert_eq!(*x.downcast_unchecked::<usize>(), 1);
}§Safety
The contained value must be of type T. Calling this method
with the incorrect type is undefined behavior.
Trait Implementations§
Source§impl<T> AnyProvider for Arc<T>where
T: AnyProvider + ?Sized,
impl<T> AnyProvider for Arc<T>where
T: AnyProvider + ?Sized,
Source§fn load_any(
&self,
key: DataKey,
req: DataRequest<'_>,
) -> Result<AnyResponse, DataError>
fn load_any( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<AnyResponse, DataError>
AnyPayload according to the key and request.1.64.0 · Source§impl<T> AsFd for Arc<T>
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,
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> {}Source§impl<T> AsyncSleep for Arc<T>where
T: AsyncSleep + ?Sized,
impl<T> AsyncSleep for Arc<T>where
T: AsyncSleep + ?Sized,
Source§impl<M, P> BoundDataProvider<M> for Arc<P>
impl<M, P> BoundDataProvider<M> for Arc<P>
Source§fn load_bound(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
fn load_bound(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Source§impl<T> BufferProvider for Arc<T>where
T: BufferProvider + ?Sized,
impl<T> BufferProvider for Arc<T>where
T: BufferProvider + ?Sized,
Source§fn load_buffer(
&self,
key: DataKey,
req: DataRequest<'_>,
) -> Result<DataResponse<BufferMarker>, DataError>
fn load_buffer( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<BufferMarker>, DataError>
Source§impl<T> CanonicalDeserialize for Arc<T>
impl<T> CanonicalDeserialize for Arc<T>
Source§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,
Source§impl<T> CanonicalSerialize for Arc<T>where
T: CanonicalSerialize + ToOwned,
impl<T> CanonicalSerialize for Arc<T>where
T: CanonicalSerialize + ToOwned,
Source§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
Source§impl<Event, T> Client<Event> for Arc<T>
impl<Event, T> Client<Event> for Arc<T>
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 moreSource§impl<M, P> DataProvider<M> for Arc<P>
impl<M, P> DataProvider<M> for Arc<P>
Source§fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
fn load(&self, req: DataRequest<'_>) -> Result<DataResponse<M>, DataError>
Source§impl<'de, T> Deserialize<'de> for Arc<T>
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>,
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!"Source§impl<M, P> DynamicDataProvider<M> for Arc<P>
impl<M, P> DynamicDataProvider<M> for Arc<P>
Source§fn load_data(
&self,
key: DataKey,
req: DataRequest<'_>,
) -> Result<DataResponse<M>, DataError>
fn load_data( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<M>, DataError>
Source§impl<T> EncodeAsFields for Arc<T>where
T: EncodeAsFields,
impl<T> EncodeAsFields for Arc<T>where
T: EncodeAsFields,
Source§fn encode_as_fields_to<R>(
&self,
fields: &mut dyn FieldIter<'_, <R as TypeResolver>::TypeId, Item = Field<'_, <R as TypeResolver>::TypeId>>,
types: &R,
out: &mut Vec<u8>,
) -> Result<(), Error>where
R: TypeResolver,
fn encode_as_fields_to<R>(
&self,
fields: &mut dyn FieldIter<'_, <R as TypeResolver>::TypeId, Item = Field<'_, <R as TypeResolver>::TypeId>>,
types: &R,
out: &mut Vec<u8>,
) -> Result<(), Error>where
R: TypeResolver,
Source§fn encode_as_fields<R>(
&self,
fields: &mut dyn FieldIter<'_, <R as TypeResolver>::TypeId, Item = Field<'_, <R as TypeResolver>::TypeId>>,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
fn encode_as_fields<R>(
&self,
fields: &mut dyn FieldIter<'_, <R as TypeResolver>::TypeId, Item = Field<'_, <R as TypeResolver>::TypeId>>,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
EncodeAsFields::encode_as_fields_to. Prefer to
implement that instead.Source§impl<T> EncodeAsType for Arc<T>where
T: EncodeAsType,
impl<T> EncodeAsType for Arc<T>where
T: EncodeAsType,
Source§fn encode_as_type_to<R>(
&self,
type_id: <R as TypeResolver>::TypeId,
types: &R,
out: &mut Vec<u8>,
) -> Result<(), Error>where
R: TypeResolver,
fn encode_as_type_to<R>(
&self,
type_id: <R as TypeResolver>::TypeId,
types: &R,
out: &mut Vec<u8>,
) -> Result<(), Error>where
R: TypeResolver,
type_id, types, a context and some output target for the SCALE encoded bytes,
attempt to SCALE encode the current value into the type given by type_id.Source§fn encode_as_type<R>(
&self,
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
fn encode_as_type<R>(
&self,
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
EncodeAsType::encode_as_type_to. Prefer to
implement that instead.Source§impl<T> EncodeLabelKey for Arc<T>where
&'a T: for<'a> EncodeLabelKey,
impl<T> EncodeLabelKey for Arc<T>where
&'a T: for<'a> EncodeLabelKey,
Source§impl<T> EncodeLabelValue for Arc<T>where
&'a T: for<'a> EncodeLabelValue,
impl<T> EncodeLabelValue for Arc<T>where
&'a T: for<'a> EncodeLabelValue,
1.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>
Source§impl<S> Filter<S> for Arc<dyn Filter<S> + Send + Sync>
impl<S> Filter<S> for Arc<dyn Filter<S> + Send + Sync>
Source§fn enabled(&self, meta: &Metadata<'_>, cx: &Context<'_, S>) -> bool
fn enabled(&self, meta: &Metadata<'_>, cx: &Context<'_, S>) -> bool
true if this layer is interested in a span or event with the
given Metadata in the current Context, similarly to
Subscriber::enabled. Read moreSource§fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
Source§fn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
Source§fn event_enabled(&self, event: &Event<'_>, cx: &Context<'_, S>) -> bool
fn event_enabled(&self, event: &Event<'_>, cx: &Context<'_, S>) -> bool
Layer]'s [on_event], to determine if on_event` should be called. Read moreSource§fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
Source§fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
Source§impl<S> Filter<S> for Arc<dyn Filter<S> + Send + Sync>
impl<S> Filter<S> for Arc<dyn Filter<S> + Send + Sync>
Source§fn enabled(&self, meta: &Metadata<'_>, cx: &Context<'_, S>) -> bool
fn enabled(&self, meta: &Metadata<'_>, cx: &Context<'_, S>) -> bool
true if this layer is interested in a span or event with the
given Metadata in the current Context, similarly to
Subscriber::enabled. Read moreSource§fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
Source§fn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
1.37.0 · Source§impl<T> FromIterator<T> for Arc<[T]>
impl<T> FromIterator<T> for Arc<[T]>
Source§fn from_iter<I>(iter: I) -> Arc<[T]>where
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> Arc<[T]>where
I: IntoIterator<Item = T>,
Takes each element in the Iterator and collects it into an Arc<[T]>.
§Performance characteristics
§The general case
In the general case, collecting into Arc<[T]> is done by first
collecting into a Vec<T>. That is, when writing the following:
let evens: Arc<[u8]> = (0..10).filter(|&x| x % 2 == 0).collect();this behaves as if we wrote:
let evens: Arc<[u8]> = (0..10).filter(|&x| x % 2 == 0)
.collect::<Vec<_>>() // The first set of allocations happens here.
.into(); // A second allocation for `Arc<[T]>` happens here.This will allocate as many times as needed for constructing the Vec<T>
and then it will allocate once for turning the Vec<T> into the Arc<[T]>.
§Iterators of known length
When your Iterator implements TrustedLen and is of an exact size,
a single allocation will be made for the Arc<[T]>. For example:
let evens: Arc<[u8]> = (0..10).collect(); // Just a single allocation happens here.Source§impl<T> FromParallelIterator<T> for Arc<[T]>where
T: Send,
impl<T> FromParallelIterator<T> for Arc<[T]>where
T: Send,
Collects items from a parallel iterator into an atomically-reference-counted slice.
Source§fn from_par_iter<I>(par_iter: I) -> Arc<[T]>where
I: IntoParallelIterator<Item = T>,
fn from_par_iter<I>(par_iter: I) -> Arc<[T]>where
I: IntoParallelIterator<Item = T>,
par_iter. Read moreSource§impl<T> GasOracle for Arc<T>
impl<T> GasOracle for Arc<T>
Source§fn fetch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U256, GasOracleError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn fetch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U256, GasOracleError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
Source§impl<T> HistogramFn for Arc<T>where
T: HistogramFn,
impl<T> HistogramFn for Arc<T>where
T: HistogramFn,
Source§impl<T> IntoVisitor for Arc<T>where
T: IntoVisitor,
impl<T> IntoVisitor for Arc<T>where
T: IntoVisitor,
Source§type AnyVisitor<R: TypeResolver> = BasicVisitor<Arc<T>, R>
type AnyVisitor<R: TypeResolver> = BasicVisitor<Arc<T>, R>
Self.Source§fn into_visitor<R>() -> <Arc<T> as IntoVisitor>::AnyVisitor<R> ⓘwhere
R: TypeResolver,
fn into_visitor<R>() -> <Arc<T> as IntoVisitor>::AnyVisitor<R> ⓘwhere
R: TypeResolver,
Source§impl<U> JsonRpcClient for Arc<U>
impl<U> JsonRpcClient for Arc<U>
Source§type Error = <U as JsonRpcClient>::Error
type Error = <U as JsonRpcClient>::Error
Source§impl<T> Keystore for Arc<T>
impl<T> Keystore for Arc<T>
Source§fn sr25519_public_keys(&self, key_type: KeyTypeId) -> Vec<Public>
fn sr25519_public_keys(&self, key_type: KeyTypeId) -> Vec<Public>
Source§fn sr25519_generate_new(
&self,
key_type: KeyTypeId,
seed: Option<&str>,
) -> Result<Public, Error>
fn sr25519_generate_new( &self, key_type: KeyTypeId, seed: Option<&str>, ) -> Result<Public, Error>
Source§fn sr25519_sign(
&self,
key_type: KeyTypeId,
public: &Public,
msg: &[u8],
) -> Result<Option<Signature>, Error>
fn sr25519_sign( &self, key_type: KeyTypeId, public: &Public, msg: &[u8], ) -> Result<Option<Signature>, Error>
Source§fn sr25519_vrf_sign(
&self,
key_type: KeyTypeId,
public: &Public,
data: &VrfSignData,
) -> Result<Option<VrfSignature>, Error>
fn sr25519_vrf_sign( &self, key_type: KeyTypeId, public: &Public, data: &VrfSignData, ) -> Result<Option<VrfSignature>, Error>
Source§fn sr25519_vrf_pre_output(
&self,
key_type: KeyTypeId,
public: &Public,
input: &VrfTranscript,
) -> Result<Option<VrfPreOutput>, Error>
fn sr25519_vrf_pre_output( &self, key_type: KeyTypeId, public: &Public, input: &VrfTranscript, ) -> Result<Option<VrfPreOutput>, Error>
Source§fn ed25519_public_keys(&self, key_type: KeyTypeId) -> Vec<Public>
fn ed25519_public_keys(&self, key_type: KeyTypeId) -> Vec<Public>
Source§fn ed25519_generate_new(
&self,
key_type: KeyTypeId,
seed: Option<&str>,
) -> Result<Public, Error>
fn ed25519_generate_new( &self, key_type: KeyTypeId, seed: Option<&str>, ) -> Result<Public, Error>
Source§fn ed25519_sign(
&self,
key_type: KeyTypeId,
public: &Public,
msg: &[u8],
) -> Result<Option<Signature>, Error>
fn ed25519_sign( &self, key_type: KeyTypeId, public: &Public, msg: &[u8], ) -> Result<Option<Signature>, Error>
Source§fn ecdsa_public_keys(&self, key_type: KeyTypeId) -> Vec<Public>
fn ecdsa_public_keys(&self, key_type: KeyTypeId) -> Vec<Public>
Source§fn ecdsa_generate_new(
&self,
key_type: KeyTypeId,
seed: Option<&str>,
) -> Result<Public, Error>
fn ecdsa_generate_new( &self, key_type: KeyTypeId, seed: Option<&str>, ) -> Result<Public, Error>
Source§fn ecdsa_sign(
&self,
key_type: KeyTypeId,
public: &Public,
msg: &[u8],
) -> Result<Option<Signature>, Error>
fn ecdsa_sign( &self, key_type: KeyTypeId, public: &Public, msg: &[u8], ) -> Result<Option<Signature>, Error>
Source§fn ecdsa_sign_prehashed(
&self,
key_type: KeyTypeId,
public: &Public,
msg: &[u8; 32],
) -> Result<Option<Signature>, Error>
fn ecdsa_sign_prehashed( &self, key_type: KeyTypeId, public: &Public, msg: &[u8; 32], ) -> Result<Option<Signature>, Error>
Source§fn insert(
&self,
key_type: KeyTypeId,
suri: &str,
public: &[u8],
) -> Result<(), ()>
fn insert( &self, key_type: KeyTypeId, suri: &str, public: &[u8], ) -> Result<(), ()>
Source§fn keys(&self, key_type: KeyTypeId) -> Result<Vec<Vec<u8>>, Error>
fn keys(&self, key_type: KeyTypeId) -> Result<Vec<Vec<u8>>, Error>
Source§impl<L, S> Layer<S> for Arc<L>where
L: Layer<S>,
S: Subscriber,
impl<L, S> Layer<S> for Arc<L>where
L: Layer<S>,
S: Subscriber,
Source§fn new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
Attributes and Id.Source§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
Subscriber::register_callsite. Read moreSource§fn enabled(&self, metadata: &Metadata<'_>, ctx: Context<'_, S>) -> bool
fn enabled(&self, metadata: &Metadata<'_>, ctx: Context<'_, S>) -> bool
true if this layer is interested in a span or event with the
given metadata in the current Context, similarly to
Subscriber::enabled. Read moreSource§fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>)
fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>)
Id recorded the given
values.Source§fn on_follows_from(&self, span: &Id, follows: &Id, ctx: Context<'_, S>)
fn on_follows_from(&self, span: &Id, follows: &Id, ctx: Context<'_, S>)
span recorded that it
follows from the span with the ID follows.Source§fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
Source§fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
Source§fn on_exit(&self, id: &Id, ctx: Context<'_, S>)
fn on_exit(&self, id: &Id, ctx: Context<'_, S>)
Source§fn on_close(&self, id: Id, ctx: Context<'_, S>)
fn on_close(&self, id: Id, ctx: Context<'_, S>)
Source§fn on_id_change(&self, old: &Id, new: &Id, ctx: Context<'_, S>)
fn on_id_change(&self, old: &Id, new: &Id, ctx: Context<'_, S>)
Source§fn and_then<L>(self, layer: L) -> Layered<L, Self, S>
fn and_then<L>(self, layer: L) -> Layered<L, Self, S>
Layer, returning a Layered
struct implementing Layer. Read moreSource§fn with_subscriber(self, inner: S) -> Layered<Self, S>where
Self: Sized,
fn with_subscriber(self, inner: S) -> Layered<Self, S>where
Self: Sized,
Layer with the given Subscriber, returning a
Layered struct that implements Subscriber. Read moreSource§impl<S> Layer<S> for Arc<dyn Layer<S> + Send + Sync>where
S: Subscriber,
impl<S> Layer<S> for Arc<dyn Layer<S> + Send + Sync>where
S: Subscriber,
Source§fn new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
Attributes and Id.Source§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
Subscriber::register_callsite. Read moreSource§fn enabled(&self, metadata: &Metadata<'_>, ctx: Context<'_, S>) -> bool
fn enabled(&self, metadata: &Metadata<'_>, ctx: Context<'_, S>) -> bool
true if this layer is interested in a span or event with the
given metadata in the current Context, similarly to
Subscriber::enabled. Read moreSource§fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>)
fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>)
Id recorded the given
values.Source§fn on_follows_from(&self, span: &Id, follows: &Id, ctx: Context<'_, S>)
fn on_follows_from(&self, span: &Id, follows: &Id, ctx: Context<'_, S>)
span recorded that it
follows from the span with the ID follows.Source§fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
Source§fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
Source§fn on_exit(&self, id: &Id, ctx: Context<'_, S>)
fn on_exit(&self, id: &Id, ctx: Context<'_, S>)
Source§fn on_close(&self, id: Id, ctx: Context<'_, S>)
fn on_close(&self, id: Id, ctx: Context<'_, S>)
Source§fn on_id_change(&self, old: &Id, new: &Id, ctx: Context<'_, S>)
fn on_id_change(&self, old: &Id, new: &Id, ctx: Context<'_, S>)
Source§fn and_then<L>(self, layer: L) -> Layered<L, Self, S>
fn and_then<L>(self, layer: L) -> Layered<L, Self, S>
Layer, returning a Layered
struct implementing Layer. Read moreSource§fn with_subscriber(self, inner: S) -> Layered<Self, S>where
Self: Sized,
fn with_subscriber(self, inner: S) -> Layered<Self, S>where
Self: Sized,
Layer with the given Subscriber, returning a
Layered struct that implements Subscriber. Read moreSource§impl<Sp> LocalSpawn for Arc<Sp>where
Sp: LocalSpawn + ?Sized,
impl<Sp> LocalSpawn for Arc<Sp>where
Sp: LocalSpawn + ?Sized,
Source§fn spawn_local_obj(
&self,
future: LocalFutureObj<'static, ()>,
) -> Result<(), SpawnError>
fn spawn_local_obj( &self, future: LocalFutureObj<'static, ()>, ) -> Result<(), SpawnError>
Source§fn status_local(&self) -> Result<(), SpawnError>
fn status_local(&self) -> Result<(), SpawnError>
Source§impl<'a, W> MakeWriter<'a> for Arc<W>
impl<'a, W> MakeWriter<'a> for Arc<W>
Source§fn make_writer(&'a self) -> <Arc<W> as MakeWriter<'a>>::Writer ⓘ
fn make_writer(&'a self) -> <Arc<W> as MakeWriter<'a>>::Writer ⓘ
Source§impl<W> MakeWriter for Arc<W>
impl<W> MakeWriter for Arc<W>
Source§fn make_writer(&self) -> <Arc<W> as MakeWriter>::Writer ⓘ
fn make_writer(&self) -> <Arc<W> as MakeWriter>::Writer ⓘ
Source§impl<T> MaxEncodedLen for Arc<T>where
T: MaxEncodedLen,
impl<T> MaxEncodedLen for Arc<T>where
T: MaxEncodedLen,
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Source§impl<U> Middleware for Arc<U>
impl<U> Middleware for Arc<U>
Source§type Error = <U as Middleware>::Error
type Error = <U as Middleware>::Error
Source§type Provider = <U as Middleware>::Provider
type Provider = <U as Middleware>::Provider
Source§type Inner = <U as Middleware>::Inner
type Inner = <U as Middleware>::Inner
Source§fn inner(&self) -> &<Arc<U> as Middleware>::Inner ⓘ
fn inner(&self) -> &<Arc<U> as Middleware>::Inner ⓘ
Source§fn convert_err(p: ProviderError) -> <Arc<U> as Middleware>::Error ⓘ
fn convert_err(p: ProviderError) -> <Arc<U> as Middleware>::Error ⓘ
Source§fn provider(&self) -> &Provider<<Arc<U> as Middleware>::Provider>
fn provider(&self) -> &Provider<<Arc<U> as Middleware>::Provider>
Source§fn default_sender(&self) -> Option<H160>
fn default_sender(&self) -> Option<H160>
Source§fn client_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn client_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
web3_clientVersion RPC.Source§fn fill_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<(), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn fill_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<(), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U64, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U64, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_header<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_header<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
Source§fn send_transaction<'life0, 'async_trait, T>(
&'life0 self,
tx: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'life0, <Arc<U> as Middleware>::Provider>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
fn send_transaction<'life0, 'async_trait, T>(
&'life0 self,
tx: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'life0, <Arc<U> as Middleware>::Provider>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn send_escalating<'a, 'life0, 'async_trait>(
&'a self,
tx: &'life0 TypedTransaction,
escalations: usize,
policy: Box<dyn Fn(U256, usize) -> U256 + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<EscalatingPending<'a, <Arc<U> as Middleware>::Provider>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn send_escalating<'a, 'life0, 'async_trait>(
&'a self,
tx: &'life0 TypedTransaction,
escalations: usize,
policy: Box<dyn Fn(U256, usize) -> U256 + Send + Sync>,
) -> Pin<Box<dyn Future<Output = Result<EscalatingPending<'a, <Arc<U> as Middleware>::Provider>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<H160, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<H160, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
ens_name resolves to (or None if not configured). Read moreSource§fn lookup_address<'life0, 'async_trait>(
&'life0 self,
address: H160,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn lookup_address<'life0, 'async_trait>(
&'life0 self,
address: H160,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
address resolves to (or None if not configured). Read moreSource§fn resolve_avatar<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Url, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn resolve_avatar<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Url, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
ens_name resolves to (or None
if not configured) Read moreSource§fn resolve_nft<'life0, 'async_trait>(
&'life0 self,
token: ERCNFT,
) -> Pin<Box<dyn Future<Output = Result<Url, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn resolve_nft<'life0, 'async_trait>(
&'life0 self,
token: ERCNFT,
) -> Pin<Box<dyn Future<Output = Result<Url, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
field: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Arc<U>: 'async_trait,
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
field: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Arc<U>: 'async_trait,
ens_name (no None if not configured). Read moreSource§fn get_block<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_block<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
block_hash_or_number (transaction hashes only)Source§fn get_block_with_txs<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_block_with_txs<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
block_hash_or_number (full transactions included)Source§fn get_uncle_count<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_uncle_count<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, ) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
block_hash_or_numberSource§fn get_uncle<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
idx: U64,
) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_uncle<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, idx: U64, ) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
block_hash_or_number and idxSource§fn get_transaction_count<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
fn get_transaction_count<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn estimate_gas<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn estimate_gas<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§fn syncing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncingStatus, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn syncing<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncingStatus, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_chainid<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_chainid<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_net_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_net_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_balance<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
fn get_balance<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn get_transaction<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T,
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_transaction<'life0, 'async_trait, T>( &'life0 self, transaction_hash: T, ) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
transaction_hashSource§fn get_transaction_by_block_and_index<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
idx: U64,
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_transaction_by_block_and_index<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, idx: U64, ) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
Source§fn get_transaction_receipt<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn get_transaction_receipt<'life0, 'async_trait, T>( &'life0 self, transaction_hash: T, ) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
transaction_hashSource§fn get_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockNumber> + Send + Sync,
Arc<U>: 'async_trait,
fn get_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockNumber> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn get_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<U256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
estimator: Option<fn(_: U256, _: Vec<Vec<U256>>) -> (U256, U256)>,
) -> Pin<Box<dyn Future<Output = Result<(U256, U256), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
estimator: Option<fn(_: U256, _: Vec<Vec<U256>>) -> (U256, U256)>,
) -> Pin<Box<dyn Future<Output = Result<(U256, U256), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<H160>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_accounts<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<H160>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn send_raw_transaction<'a, 'async_trait>(
&'a self,
tx: Bytes,
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, <Arc<U> as Middleware>::Provider>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
Arc<U>: 'async_trait,
fn send_raw_transaction<'a, 'async_trait>(
&'a self,
tx: Bytes,
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, <Arc<U> as Middleware>::Provider>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
Arc<U>: 'async_trait,
Source§fn is_signer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn is_signer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
SignerMiddleware, or the
JSON-RPC provider has an unlocked key that can sign using the eth_sign call. If none of
the above conditions are met, then the middleware stack is not capable of signing data.Source§fn sign<'life0, 'life1, 'async_trait, T>(
&'life0 self,
data: T,
from: &'life1 H160,
) -> Pin<Box<dyn Future<Output = Result<Signature, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn sign<'life0, 'life1, 'async_trait, T>( &'life0 self, data: T, from: &'life1 H160, ) -> Pin<Box<dyn Future<Output = Result<Signature, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
SignerMiddlewareSource§fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
from: H160,
) -> Pin<Box<dyn Future<Output = Result<Signature, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
from: H160,
) -> Pin<Box<dyn Future<Output = Result<Signature, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_logs_paginated<'a>(
&'a self,
filter: &Filter,
page_size: u64,
) -> LogQuery<'a, <Arc<U> as Middleware>::Provider>
fn get_logs_paginated<'a>( &'a self, filter: &Filter, page_size: u64, ) -> LogQuery<'a, <Arc<U> as Middleware>::Provider>
Source§fn watch<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter,
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, <Arc<U> as Middleware>::Provider, Log>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn watch<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter,
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, <Arc<U> as Middleware>::Provider, Log>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, <Arc<U> as Middleware>::Provider, H256>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, <Arc<U> as Middleware>::Provider, H256>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn watch_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, <Arc<U> as Middleware>::Provider, H256>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn watch_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, <Arc<U> as Middleware>::Provider, H256>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_code<'life0, 'async_trait, T>(
&'life0 self,
at: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
fn get_code<'life0, 'async_trait, T>(
&'life0 self,
at: T,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<Bytes, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn get_storage_at<'life0, 'async_trait, T>(
&'life0 self,
from: T,
location: H256,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<H256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
fn get_storage_at<'life0, 'async_trait, T>(
&'life0 self,
from: T,
location: H256,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<H256, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn get_proof<'life0, 'async_trait, T>(
&'life0 self,
from: T,
locations: Vec<H256>,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<EIP1186ProofResponse, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
fn get_proof<'life0, 'async_trait, T>(
&'life0 self,
from: T,
locations: Vec<H256>,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<EIP1186ProofResponse, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn import_raw_key<'life0, 'async_trait>(
&'life0 self,
private_key: Bytes,
passphrase: String,
) -> Pin<Box<dyn Future<Output = Result<H160, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn import_raw_key<'life0, 'async_trait>(
&'life0 self,
private_key: Bytes,
passphrase: String,
) -> Pin<Box<dyn Future<Output = Result<H160, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn unlock_account<'life0, 'async_trait, T>(
&'life0 self,
account: T,
passphrase: String,
duration: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn unlock_account<'life0, 'async_trait, T>( &'life0 self, account: T, passphrase: String, duration: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
Source§fn add_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn add_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn add_trusted_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn add_trusted_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn node_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NodeInfo, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn node_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<NodeInfo, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
eth, snap).Source§fn peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn remove_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn remove_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn remove_trusted_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn remove_trusted_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String,
) -> Pin<Box<dyn Future<Output = Result<bool, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
true does not necessarily mean that the
peer was disconnected.Source§fn start_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn start_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn stop_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn stop_mining<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn txpool_content<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn txpool_content<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn txpool_inspect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn txpool_inspect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn txpool_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn txpool_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn debug_trace_transaction<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
trace_options: GethDebugTracingOptions,
) -> Pin<Box<dyn Future<Output = Result<GethTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn debug_trace_transaction<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
trace_options: GethDebugTracingOptions,
) -> Pin<Box<dyn Future<Output = Result<GethTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn debug_trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
block: Option<BlockId>,
trace_options: GethDebugTracingCallOptions,
) -> Pin<Box<dyn Future<Output = Result<GethTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
fn debug_trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
block: Option<BlockId>,
trace_options: GethDebugTracingCallOptions,
) -> Pin<Box<dyn Future<Output = Result<GethTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn debug_trace_block_by_number<'life0, 'async_trait>(
&'life0 self,
block: Option<BlockNumber>,
trace_options: GethDebugTracingOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<GethTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn debug_trace_block_by_number<'life0, 'async_trait>(
&'life0 self,
block: Option<BlockNumber>,
trace_options: GethDebugTracingOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<GethTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn debug_trace_block_by_hash<'life0, 'async_trait>(
&'life0 self,
block: H256,
trace_options: GethDebugTracingOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<GethTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn debug_trace_block_by_hash<'life0, 'async_trait>(
&'life0 self,
block: H256,
trace_options: GethDebugTracingOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<GethTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
trace_type: Vec<TraceType>,
block: Option<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
fn trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
trace_type: Vec<TraceType>,
block: Option<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn trace_call_many<'life0, 'async_trait, T>(
&'life0 self,
req: Vec<(T, Vec<TraceType>)>,
block: Option<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
fn trace_call_many<'life0, 'async_trait, T>(
&'life0 self,
req: Vec<(T, Vec<TraceType>)>,
block: Option<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_type: Vec<TraceType>,
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_type: Vec<TraceType>,
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
eth_sendRawTransaction without making the call, returning the tracesSource§fn trace_replay_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
trace_type: Vec<TraceType>,
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn trace_replay_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
trace_type: Vec<TraceType>,
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn trace_replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber,
trace_type: Vec<TraceType>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn trace_replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber,
trace_type: Vec<TraceType>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn trace_block<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn trace_get<'life0, 'async_trait, T>(
&'life0 self,
hash: H256,
index: Vec<T>,
) -> Pin<Box<dyn Future<Output = Result<Trace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn trace_get<'life0, 'async_trait, T>( &'life0 self, hash: H256, index: Vec<T>, ) -> Pin<Box<dyn Future<Output = Result<Trace, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
Source§fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn parity_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockNumber> + Send + Sync,
Arc<U>: 'async_trait,
fn parity_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T,
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockNumber> + Send + Sync,
Arc<U>: 'async_trait,
Source§fn subscribe_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, <Arc<U> as Middleware>::Provider, Block<H256>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, <Arc<U> as Middleware>::Provider, Block<H256>>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
Source§fn subscribe_pending_txs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, <Arc<U> as Middleware>::Provider, H256>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn subscribe_pending_txs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, <Arc<U> as Middleware>::Provider, H256>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
Source§fn subscribe_full_pending_txs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, <Arc<U> as Middleware>::Provider, Transaction>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn subscribe_full_pending_txs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, <Arc<U> as Middleware>::Provider, Transaction>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
Source§fn subscribe_logs<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter,
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'a, <Arc<U> as Middleware>::Provider, Log>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
<Arc<U> as Middleware>::Provider: PubsubClient,
Arc<U>: 'async_trait,
fn subscribe_logs<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter,
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'a, <Arc<U> as Middleware>::Provider, Log>, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
<Arc<U> as Middleware>::Provider: PubsubClient,
Arc<U>: 'async_trait,
Source§fn fee_history<'life0, 'life1, 'async_trait, T>(
&'life0 self,
block_count: T,
last_block: BlockNumber,
reward_percentiles: &'life1 [f64],
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
fn fee_history<'life0, 'life1, 'async_trait, T>( &'life0 self, block_count: T, last_block: BlockNumber, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = Result<FeeHistory, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>
FeeHistory object. This objct contains
information about the EIP-1559 base fee in past blocks, as well as gas
utilization within those blocks. Read moreSource§fn create_access_list<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<AccessListWithGasUsed, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn create_access_list<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>,
) -> Pin<Box<dyn Future<Output = Result<AccessListWithGasUsed, <Arc<U> as Middleware>::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§impl<T> Network for Arc<T>
impl<T> Network for Arc<T>
fn next_message<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ProtocolMessage>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn send_message<'life0, 'async_trait>(
&'life0 self,
message: ProtocolMessage,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<T>: 'async_trait,
fn build_protocol_message<Payload>(
identifier_info: IdentifierInfo,
from: u16,
to: Option<u16>,
payload: &Payload,
from_account_id: Option<Public>,
to_network_id: Option<Public>,
) -> ProtocolMessagewhere
Payload: Serialize,
Source§impl<N, T> NetworkWallet<N> for Arc<T>
impl<N, T> NetworkWallet<N> for Arc<T>
Source§fn default_signer_address(&self) -> Address
fn default_signer_address(&self) -> Address
NetworkWallet::sign_transaction_from when no specific signer is
specified.Source§fn has_signer_for(&self, address: &Address) -> bool
fn has_signer_for(&self, address: &Address) -> bool
Source§fn signer_addresses(&self) -> impl Iterator<Item = Address>
fn signer_addresses(&self) -> impl Iterator<Item = Address>
Source§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>>
Source§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>>
Source§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.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 Arcs.
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 Arcs.
Two Arcs 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 Arcs 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 Arcs.
Two Arcs are not equal if their inner values are not equal.
If T also implements Eq (implying reflexivity of equality),
two Arcs 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 Arcs.
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 Arcs.
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 Arcs.
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 ProvideCredentials for Arc<dyn ProvideCredentials>
impl ProvideCredentials for Arc<dyn ProvideCredentials>
Source§fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>where
Arc<dyn ProvideCredentials>: 'a,
fn provide_credentials<'a>(&'a self) -> ProvideCredentials<'a>where
Arc<dyn ProvideCredentials>: 'a,
Source§fn fallback_on_interrupt(&self) -> Option<Credentials>
fn fallback_on_interrupt(&self) -> Option<Credentials>
Source§impl<T, N, U> Provider<T, N> for Arc<U>
impl<T, N, U> Provider<T, N> for Arc<U>
Source§fn root(&self) -> &RootProvider<T, N>
fn root(&self) -> &RootProvider<T, N>
Source§fn builder() -> ProviderBuilder<Identity, Identity, N>
fn builder() -> ProviderBuilder<Identity, Identity, N>
ProviderBuilder to build on.Source§fn client(&self) -> &RpcClientInner<T>
fn client(&self) -> &RpcClientInner<T>
Source§fn weak_client(&self) -> Weak<RpcClientInner<T>>
fn weak_client(&self) -> Weak<RpcClientInner<T>>
Source§fn get_accounts(&self) -> ProviderCall<T, [(); 0], Vec<Address>>
fn get_accounts(&self) -> ProviderCall<T, [(); 0], Vec<Address>>
Source§fn get_blob_base_fee(&self) -> ProviderCall<T, [(); 0], Uint<128, 2>, u128>
fn get_blob_base_fee(&self) -> ProviderCall<T, [(); 0], Uint<128, 2>, u128>
Source§fn get_block_number(&self) -> ProviderCall<T, [(); 0], Uint<64, 1>, u64>
fn get_block_number(&self) -> ProviderCall<T, [(); 0], Uint<64, 1>, u64>
Source§fn call<'req>(
&self,
tx: &'req <N as Network>::TransactionRequest,
) -> EthCall<'req, T, N, Bytes>
fn call<'req>( &self, tx: &'req <N as Network>::TransactionRequest, ) -> EthCall<'req, T, N, Bytes>
Source§fn simulate<'req>(
&self,
payload: &'req SimulatePayload,
) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<<N as Network>::BlockResponse>>>
fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<<N as Network>::BlockResponse>>>
Source§fn get_chain_id(&self) -> ProviderCall<T, [(); 0], Uint<64, 1>, u64>
fn get_chain_id(&self) -> ProviderCall<T, [(); 0], Uint<64, 1>, u64>
Source§fn create_access_list<'a>(
&self,
request: &'a <N as Network>::TransactionRequest,
) -> RpcWithBlock<T, &'a <N as Network>::TransactionRequest, AccessListResult>
fn create_access_list<'a>( &self, request: &'a <N as Network>::TransactionRequest, ) -> RpcWithBlock<T, &'a <N as Network>::TransactionRequest, AccessListResult>
Source§fn estimate_gas<'req>(
&self,
tx: &'req <N as Network>::TransactionRequest,
) -> EthCall<'req, T, N, Uint<64, 1>, u64>
fn estimate_gas<'req>( &self, tx: &'req <N as Network>::TransactionRequest, ) -> EthCall<'req, T, N, Uint<64, 1>, u64>
EthCall which can be used to get a gas estimate,
or to add StateOverride or a BlockId. If no overrides
or block ID is provided, the gas estimate will be computed for the latest block
with the current state. Read moreSource§fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
estimator: Option<fn(_: u128, _: &[Vec<u128>]) -> Eip1559Estimation>,
) -> Pin<Box<dyn Future<Output = Result<Eip1559Estimation, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
estimator: Option<fn(_: u128, _: &[Vec<u128>]) -> Eip1559Estimation>,
) -> Pin<Box<dyn Future<Output = Result<Eip1559Estimation, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§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<U>: '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<U>: 'async_trait,
maxFeePerGas and maxPriorityFeePerGas.
block_count can range from 1 to 1024 blocks in a single request.Source§fn get_gas_price(&self) -> ProviderCall<T, [(); 0], Uint<128, 2>, u128>
fn get_gas_price(&self) -> ProviderCall<T, [(); 0], Uint<128, 2>, u128>
Source§fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>
fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>
Source§fn get_balance(
&self,
address: Address,
) -> RpcWithBlock<T, Address, Uint<256, 4>>
fn get_balance( &self, address: Address, ) -> RpcWithBlock<T, Address, Uint<256, 4>>
Source§fn get_block<'life0, 'async_trait>(
&'life0 self,
block: BlockId,
kind: BlockTransactionsKind,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_block<'life0, 'async_trait>(
&'life0 self,
block: BlockId,
kind: BlockTransactionsKind,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
kind: BlockTransactionsKind,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
hash: FixedBytes<32>,
kind: BlockTransactionsKind,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
hydrate: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumberOrTag,
hydrate: bool,
) -> Pin<Box<dyn Future<Output = Result<Option<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn get_block_receipts(
&self,
block: BlockId,
) -> ProviderCall<T, (BlockId,), Option<Vec<<N as Network>::ReceiptResponse>>>
fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<<N as Network>::ReceiptResponse>>>
Source§fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>
fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>
Source§fn watch_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn watch_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
eth_getFilterChanges. Read moreSource§fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<FixedBytes<32>>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
eth_getFilterChanges. Read moreSource§fn watch_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<Log>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn watch_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<Log>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
eth_getFilterChanges. Read moreSource§fn watch_full_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<<N as Network>::TransactionResponse>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn watch_full_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PollerBuilder<T, (Uint<256, 4>,), Vec<<N as Network>::TransactionResponse>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
eth_getFilterChanges. Read moreSource§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<U>: '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<U>: 'async_trait,
Source§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<U>: '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<U>: 'async_trait,
Source§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<U>: '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<U>: 'async_trait,
Source§fn get_proof(
&self,
address: Address,
keys: Vec<FixedBytes<32>>,
) -> RpcWithBlock<T, (Address, Vec<FixedBytes<32>>), EIP1186AccountProofResponse>
fn get_proof( &self, address: Address, keys: Vec<FixedBytes<32>>, ) -> RpcWithBlock<T, (Address, Vec<FixedBytes<32>>), EIP1186AccountProofResponse>
Source§fn get_storage_at(
&self,
address: Address,
key: Uint<256, 4>,
) -> RpcWithBlock<T, (Address, Uint<256, 4>), Uint<256, 4>>
fn get_storage_at( &self, address: Address, key: Uint<256, 4>, ) -> RpcWithBlock<T, (Address, Uint<256, 4>), Uint<256, 4>>
Source§fn get_transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> ProviderCall<T, (FixedBytes<32>,), Option<<N as Network>::TransactionResponse>>
fn get_transaction_by_hash( &self, hash: FixedBytes<32>, ) -> ProviderCall<T, (FixedBytes<32>,), Option<<N as Network>::TransactionResponse>>
Source§fn get_transaction_by_block_hash_and_index(
&self,
block_hash: FixedBytes<32>,
index: usize,
) -> ProviderCall<T, (FixedBytes<32>, Index), Option<<N as Network>::TransactionResponse>>
fn get_transaction_by_block_hash_and_index( &self, block_hash: FixedBytes<32>, index: usize, ) -> ProviderCall<T, (FixedBytes<32>, Index), Option<<N as Network>::TransactionResponse>>
Source§fn get_raw_transaction_by_block_hash_and_index(
&self,
block_hash: FixedBytes<32>,
index: usize,
) -> ProviderCall<T, (FixedBytes<32>, Index), Option<Bytes>>
fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: FixedBytes<32>, index: usize, ) -> ProviderCall<T, (FixedBytes<32>, Index), Option<Bytes>>
Source§fn get_transaction_by_block_number_and_index(
&self,
block_number: BlockNumberOrTag,
index: usize,
) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<<N as Network>::TransactionResponse>>
fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<<N as Network>::TransactionResponse>>
Source§fn get_raw_transaction_by_block_number_and_index(
&self,
block_number: BlockNumberOrTag,
index: usize,
) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>
fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>
Source§fn get_raw_transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> ProviderCall<T, (FixedBytes<32>,), Option<Bytes>>
fn get_raw_transaction_by_hash( &self, hash: FixedBytes<32>, ) -> ProviderCall<T, (FixedBytes<32>,), Option<Bytes>>
Source§fn get_transaction_count(
&self,
address: Address,
) -> RpcWithBlock<T, Address, Uint<64, 1>, u64>
fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, Uint<64, 1>, u64>
Source§fn get_transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> ProviderCall<T, (FixedBytes<32>,), Option<<N as Network>::ReceiptResponse>>
fn get_transaction_receipt( &self, hash: FixedBytes<32>, ) -> ProviderCall<T, (FixedBytes<32>,), Option<<N as Network>::ReceiptResponse>>
Source§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<U>: '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<U>: 'async_trait,
Source§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<U>: '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<U>: 'async_trait,
Source§fn get_max_priority_fee_per_gas(
&self,
) -> ProviderCall<T, [(); 0], Uint<128, 2>, u128>
fn get_max_priority_fee_per_gas( &self, ) -> ProviderCall<T, [(); 0], Uint<128, 2>, u128>
maxPriorityFeePerGas in wei.Source§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<U>: '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<U>: 'async_trait,
Source§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<U>: '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<U>: 'async_trait,
Source§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<U>: '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<U>: 'async_trait,
Source§fn send_raw_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<T, N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn send_raw_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
encoded_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<T, N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§fn send_transaction<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<T, N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<T, N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn send_tx_envelope<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TxEnvelope,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<T, N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn send_tx_envelope<'life0, 'async_trait>(
&'life0 self,
tx: <N as Network>::TxEnvelope,
) -> Pin<Box<dyn Future<Output = Result<PendingTransactionBuilder<T, N>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn subscribe_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn subscribe_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<<N as Network>::BlockResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn subscribe_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<FixedBytes<32>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn subscribe_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<FixedBytes<32>>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn subscribe_full_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<<N as Network>::TransactionResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
fn subscribe_full_pending_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Subscription<<N as Network>::TransactionResponse>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Arc<U>: 'async_trait,
Source§fn subscribe_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Log>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
fn subscribe_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter,
) -> Pin<Box<dyn Future<Output = Result<Subscription<Log>, RpcError<TransportErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Arc<U>: 'async_trait,
Source§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<U>: '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<U>: 'async_trait,
Source§fn syncing(&self) -> ProviderCall<T, [(); 0], SyncStatus>
fn syncing(&self) -> ProviderCall<T, [(); 0], SyncStatus>
Source§fn get_client_version(&self) -> ProviderCall<T, [(); 0], String>
fn get_client_version(&self) -> ProviderCall<T, [(); 0], String>
Source§fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), FixedBytes<32>>
fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), FixedBytes<32>>
Keccak-256 hash of the given data.Source§fn get_net_version(&self) -> ProviderCall<T, [(); 0], Uint<64, 1>, u64>
fn get_net_version(&self) -> ProviderCall<T, [(); 0], Uint<64, 1>, u64>
eth_chainId.Source§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>>
Source§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<U>: '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<U>: 'async_trait,
Source§fn transaction_request(&self) -> <N as Network>::TransactionRequest
fn transaction_request(&self) -> <N as Network>::TransactionRequest
TransactionRequest.Source§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>>
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>>
1.73.0 · Source§impl Read for Arc<File>
impl Read for Arc<File>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
Source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
read, except that it reads into a slice of buffers. Read moreSource§fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)Source§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector)Source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
buf. Read moreSource§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
buf. Read more1.6.0 · Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
buf. Read moreSource§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
read_buf)cursor. Read more1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Read. Read moreSource§impl ReadRuntimeVersion for Arc<dyn ReadRuntimeVersion>
impl ReadRuntimeVersion for Arc<dyn ReadRuntimeVersion>
Source§fn read_runtime_version(
&self,
wasm_code: &[u8],
ext: &mut dyn Externalities,
) -> Result<Vec<u8>, String>
fn read_runtime_version( &self, wasm_code: &[u8], ext: &mut dyn Externalities, ) -> Result<Vec<u8>, String>
Source§impl<T> Recorder for Arc<T>
impl<T> Recorder for Arc<T>
Source§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>, )
Source§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>, )
Source§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>, )
Source§impl<T> RpcClientT for Arc<T>where
T: RpcClientT,
impl<T> RpcClientT for Arc<T>where
T: RpcClientT,
Source§fn request_raw<'a>(
&'a self,
method: &'a str,
params: Option<Box<RawValue>>,
) -> Pin<Box<dyn Future<Output = Result<Box<RawValue>, RpcError>> + Send + 'a>>
fn request_raw<'a>( &'a self, method: &'a str, params: Option<Box<RawValue>>, ) -> Pin<Box<dyn Future<Output = Result<Box<RawValue>, RpcError>> + Send + 'a>>
None, or be an already-serialized
JSON array of parameters. Read moreSource§fn subscribe_raw<'a>(
&'a self,
sub: &'a str,
params: Option<Box<RawValue>>,
unsub: &'a str,
) -> Pin<Box<dyn Future<Output = Result<RawRpcSubscription, RpcError>> + Send + 'a>>
fn subscribe_raw<'a>( &'a self, sub: &'a str, params: Option<Box<RawValue>>, unsub: &'a str, ) -> Pin<Box<dyn Future<Output = Result<RawRpcSubscription, RpcError>> + Send + 'a>>
None, or be an already-serialized JSON array of parameters. Read more1.73.0 · Source§impl Seek for Arc<File>
impl Seek for Arc<File>
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>
fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>
1.55.0 · Source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
seek_stream_len)Source§impl<T> Serialize for Arc<T>
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,
Source§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,
Source§fn sign_hash_sync(&self, hash: &FixedBytes<32>) -> Result<Sig, Error>
fn sign_hash_sync(&self, hash: &FixedBytes<32>) -> Result<Sig, Error>
Source§fn sign_message_sync(&self, message: &[u8]) -> Result<Sig, Error>
fn sign_message_sync(&self, message: &[u8]) -> Result<Sig, Error>
Source§fn chain_id_sync(&self) -> Option<u64>
fn chain_id_sync(&self) -> Option<u64>
Source§impl<T> Specifier<DynSolType> for Arc<T>
impl<T> Specifier<DynSolType> for Arc<T>
Source§impl<S> Subscriber for Arc<S>where
S: Subscriber + ?Sized,
impl<S> Subscriber for Arc<S>where
S: Subscriber + ?Sized,
Source§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
Source§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 moreSource§fn new_span(&self, span: &Attributes<'_>) -> Id
fn new_span(&self, span: &Attributes<'_>) -> Id
Source§fn record_follows_from(&self, span: &Id, follows: &Id)
fn record_follows_from(&self, span: &Id, follows: &Id)
Source§fn event_enabled(&self, event: &Event<'_>) -> bool
fn event_enabled(&self, event: &Event<'_>) -> bool
Source§fn clone_span(&self, id: &Id) -> Id
fn clone_span(&self, id: &Id) -> Id
Source§fn drop_span(&self, id: Id)
fn drop_span(&self, id: Id)
Subscriber::try_close insteadSource§fn current_span(&self) -> Current
fn current_span(&self) -> Current
1.43.0 · Source§impl<T, A, const N: usize> TryFrom<Arc<[T], A>> for Arc<[T; N], A>where
A: Allocator,
impl<T, A, const N: usize> TryFrom<Arc<[T], A>> for Arc<[T; N], A>where
A: Allocator,
Source§impl<T, U> TxReceipt<T> for Arc<U>
impl<T, U> TxReceipt<T> for Arc<U>
Source§fn status_or_post_state(&self) -> Eip658Value
fn status_or_post_state(&self) -> Eip658Value
Source§fn bloom(&self) -> Bloom
fn bloom(&self) -> Bloom
Source§fn bloom_cheap(&self) -> Option<Bloom>
fn bloom_cheap(&self) -> Option<Bloom>
Source§fn cumulative_gas_used(&self) -> u128
fn cumulative_gas_used(&self) -> u128
Source§impl<Signature, T> TxSigner<Signature> for Arc<T>
impl<Signature, T> TxSigner<Signature> for Arc<T>
Source§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,
Source§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,
Source§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>
Source§impl<T> ValueParserFactory for Arc<T>where
T: ValueParserFactory + Send + Sync + Clone,
<T as ValueParserFactory>::Parser: TypedValueParser<Value = T>,
impl<T> ValueParserFactory for Arc<T>where
T: ValueParserFactory + Send + Sync + Clone,
<T as ValueParserFactory>::Parser: TypedValueParser<Value = T>,
Source§type Parser = MapValueParser<<T as ValueParserFactory>::Parser, fn(_: T) -> Arc<T>>
type Parser = MapValueParser<<T as ValueParserFactory>::Parser, fn(_: T) -> Arc<T>>
ValueParser. Read moreSource§fn value_parser() -> <Arc<T> as ValueParserFactory>::Parser ⓘ
fn value_parser() -> <Arc<T> as ValueParserFactory>::Parser ⓘ
Self::ParserSource§impl<T> WasmModuleResources for Arc<T>where
T: WasmModuleResources,
impl<T> WasmModuleResources for Arc<T>where
T: WasmModuleResources,
Source§type FuncType = <T as WasmModuleResources>::FuncType
type FuncType = <T as WasmModuleResources>::FuncType
Source§fn tag_at(&self, at: u32) -> Option<&<Arc<T> as WasmModuleResources>::FuncType>
fn tag_at(&self, at: u32) -> Option<&<Arc<T> as WasmModuleResources>::FuncType>
Source§fn global_at(&self, at: u32) -> Option<GlobalType>
fn global_at(&self, at: u32) -> Option<GlobalType>
Source§fn func_type_at(
&self,
type_idx: u32,
) -> Option<&<Arc<T> as WasmModuleResources>::FuncType>
fn func_type_at( &self, type_idx: u32, ) -> Option<&<Arc<T> as WasmModuleResources>::FuncType>
FuncType associated with the given type index.Source§fn type_index_of_function(&self, func_idx: u32) -> Option<u32>
fn type_index_of_function(&self, func_idx: u32) -> Option<u32>
Source§fn type_of_function(
&self,
func_idx: u32,
) -> Option<&<Arc<T> as WasmModuleResources>::FuncType>
fn type_of_function( &self, func_idx: u32, ) -> Option<&<Arc<T> as WasmModuleResources>::FuncType>
FuncType associated with the given function index.Source§fn check_value_type(
&self,
t: ValType,
features: &WasmFeatures,
offset: usize,
) -> Result<(), BinaryReaderError>
fn check_value_type( &self, t: ValType, features: &WasmFeatures, offset: usize, ) -> Result<(), BinaryReaderError>
Source§fn element_type_at(&self, at: u32) -> Option<RefType>
fn element_type_at(&self, at: u32) -> Option<RefType>
Source§fn matches(&self, t1: ValType, t2: ValType) -> bool
fn matches(&self, t1: ValType, t2: ValType) -> bool
Source§fn element_count(&self) -> u32
fn element_count(&self) -> u32
Source§fn data_count(&self) -> Option<u32>
fn data_count(&self) -> Option<u32>
Source§fn is_function_referenced(&self, idx: u32) -> bool
fn is_function_referenced(&self, idx: u32) -> bool
Source§fn check_heap_type(
&self,
heap_type: HeapType,
features: &WasmFeatures,
offset: usize,
) -> Result<(), BinaryReaderError>
fn check_heap_type( &self, heap_type: HeapType, features: &WasmFeatures, offset: usize, ) -> Result<(), BinaryReaderError>
HeapType is valid, notably its function index if one is
used.1.73.0 · Source§impl Write for Arc<File>
impl Write for Arc<File>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector)Source§fn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored)Source§impl<'a, T> Writeable for Arc<T>
impl<'a, T> Writeable for Arc<T>
Source§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.Source§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.Source§fn writeable_length_hint(&self) -> LengthHint
fn writeable_length_hint(&self) -> LengthHint
impl<T> CartablePointerLike for Arc<T>
impl<T> CloneStableDeref for Arc<T>where
T: ?Sized,
impl<T> CloneableCart for Arc<T>where
T: ?Sized,
impl<T> CloneableCartablePointerLike for Arc<T>
impl<T, U, A> CoerceUnsized<Arc<U, A>> for Arc<T, A>
impl<T, A> DerefPure for Arc<T, A>
impl<T, U> DispatchFromDyn<Arc<U>> for Arc<T>
impl<T> EncodeLike<T> for Arc<T>where
T: Encode,
impl<T> EncodeLike for Arc<T>
impl<T, A> Eq for Arc<T, A>
impl<T, A> PinCoerceUnsized for Arc<T, A>
impl<T, A> Send for Arc<T, A>
impl<T> StableDeref for Arc<T>where
T: ?Sized,
impl<T, A> Sync for Arc<T, A>
impl<T, A> Unpin for Arc<T, A>
impl<T, A> UnwindSafe for Arc<T, A>
impl<T> WrapperTypeEncode for Arc<T>where
T: ?Sized,
Auto Trait Implementations§
Blanket Implementations§
Source§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
Source§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
Source§impl<P> AsDowncastingAnyProvider for Pwhere
P: AnyProvider + ?Sized,
impl<P> AsDowncastingAnyProvider for Pwhere
P: AnyProvider + ?Sized,
Source§fn as_downcasting(&self) -> DowncastingAnyProvider<'_, P>
fn as_downcasting(&self) -> DowncastingAnyProvider<'_, P>
DynamicDataProvider<M> when called on AnyProviderSource§impl<P> AsDynamicDataProviderAnyMarkerWrap for P
impl<P> AsDynamicDataProviderAnyMarkerWrap for P
Source§fn as_any_provider(&self) -> DynamicDataProviderAnyMarkerWrap<'_, P>
fn as_any_provider(&self) -> DynamicDataProviderAnyMarkerWrap<'_, P>
AnyProvider when called on DynamicDataProvider<AnyMarker>Source§impl<T> AsFilelike for Twhere
T: AsFd,
impl<T> AsFilelike for Twhere
T: AsFd,
Source§fn as_filelike(&self) -> BorrowedFd<'_>
fn as_filelike(&self) -> BorrowedFd<'_>
Source§fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
&Target. Read moreSource§impl<T> AsRawFilelike for Twhere
T: AsRawFd,
impl<T> AsRawFilelike for Twhere
T: AsRawFd,
Source§fn as_raw_filelike(&self) -> i32
fn as_raw_filelike(&self) -> i32
Source§impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
Source§fn as_raw_socketlike(&self) -> i32
fn as_raw_socketlike(&self) -> i32
Source§impl<U> AsSliceOf for U
impl<U> AsSliceOf for U
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
T: FromByteSlice,
Source§impl<T> AsSocketlike for Twhere
T: AsFd,
impl<T> AsSocketlike for Twhere
T: AsFd,
Source§fn as_socketlike(&self) -> BorrowedFd<'_>
fn as_socketlike(&self) -> BorrowedFd<'_>
Source§fn as_socketlike_view<Target>(&self) -> SocketlikeView<'_, Target>where
Target: SocketlikeViewType,
fn as_socketlike_view<Target>(&self) -> SocketlikeView<'_, Target>where
Target: SocketlikeViewType,
&Target. Read moreSource§impl<T> AsSource for Twhere
T: AsFd,
impl<T> AsSource for Twhere
T: AsFd,
Source§fn source(&self) -> BorrowedFd<'_>
fn source(&self) -> BorrowedFd<'_>
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> Base32Len for T
impl<T> Base32Len for T
Source§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
fn hash<H>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
fn hash_uncompressed<H>(
&self,
) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
Source§impl<T> CheckBase32<Vec<u5>> for T
impl<T> CheckBase32<Vec<u5>> for T
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T, X> Decode for X
impl<T, X> Decode for X
Source§fn decode<I>(input: &mut I) -> Result<X, Error>where
I: Input,
fn decode<I>(input: &mut I) -> Result<X, Error>where
I: Input,
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Source§impl<T> DecodeAsType for Twhere
T: IntoVisitor,
impl<T> DecodeAsType for Twhere
T: IntoVisitor,
fn decode_as_type_maybe_compact<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
is_compact: bool,
) -> Result<T, Error>where
R: TypeResolver,
Source§fn decode_as_type<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Self, Error>where
R: TypeResolver,
fn decode_as_type<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Self, Error>where
R: TypeResolver,
type_id, and type registry, attempt to decode said bytes into
Self. Implementations should modify the &mut reference to the bytes such that any bytes
not used in the course of decoding are still pointed to after decoding is complete.Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<T> DecodeWithMetadata for Twhere
T: DecodeAsType,
impl<T> DecodeWithMetadata for Twhere
T: DecodeAsType,
Source§impl<T, X> Encode for X
impl<T, X> Encode for X
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Source§fn encode_to<W>(&self, dest: &mut W)
fn encode_to<W>(&self, dest: &mut W)
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl<T> EncodeWithMetadata for Twhere
T: EncodeAsType,
impl<T> EncodeWithMetadata for Twhere
T: EncodeAsType,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<E> ErrorClone for E
impl<E> ErrorClone for E
Source§fn clone_box(&self) -> Box<dyn ErrorClone>
fn clone_box(&self) -> Box<dyn ErrorClone>
Source§impl<F, S> FilterExt<S> for Fwhere
F: Filter<S>,
impl<F, S> FilterExt<S> for Fwhere
F: Filter<S>,
Source§impl<T> FindExt for T
impl<T> FindExt for T
Source§fn find<'a>(&self, id: &oid, buffer: &'a mut Vec<u8>) -> Result<Data<'a>, Error>
fn find<'a>(&self, id: &oid, buffer: &'a mut Vec<u8>) -> Result<Data<'a>, Error>
try_find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error.Source§fn find_commit<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<CommitRef<'a>, Error>
fn find_commit<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<CommitRef<'a>, Error>
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_tree<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TreeRef<'a>, Error>
fn find_tree<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TreeRef<'a>, Error>
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_tag<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TagRef<'a>, Error>
fn find_tag<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TagRef<'a>, Error>
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_blob<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<BlobRef<'a>, Error>
fn find_blob<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<BlobRef<'a>, Error>
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired object type.Source§fn find_commit_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<CommitRefIter<'a>, Error>
fn find_commit_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<CommitRefIter<'a>, Error>
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired iterator type.Source§fn find_tree_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TreeRefIter<'a>, Error>
fn find_tree_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TreeRefIter<'a>, Error>
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired iterator type.Source§fn find_tag_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<TagRefIter<'a>, Error>
fn find_tag_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TagRefIter<'a>, Error>
find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error
while returning the desired iterator type.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> FromFd for T
impl<T> FromFd for T
Source§impl<T> FromFilelike for T
impl<T> FromFilelike for T
Source§fn from_filelike(owned: OwnedFd) -> T
fn from_filelike(owned: OwnedFd) -> T
Self from the given filelike object. Read moreSource§fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
fn from_into_filelike<Owned>(owned: Owned) -> Twhere
Owned: IntoFilelike,
Self from the given filelike object
converted from into_owned. Read moreSource§impl<T> FromSocketlike for T
impl<T> FromSocketlike for T
Source§fn from_socketlike(owned: OwnedFd) -> T
fn from_socketlike(owned: OwnedFd) -> T
Self from the given socketlike object.Source§fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
fn from_into_socketlike<Owned>(owned: Owned) -> Twhere
Owned: IntoSocketlike,
Self from the given socketlike object
converted from into_owned.Source§impl<T, B1, B2> HttpService<B1> for T
impl<T, B1, B2> HttpService<B1> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<E> InstrumentError for Ewhere
TracedError<E>: From<E>,
impl<E> InstrumentError for Ewhere
TracedError<E>: From<E>,
Source§type Instrumented = TracedError<E>
type Instrumented = TracedError<E>
Source§fn in_current_span(self) -> <E as InstrumentError>::Instrumented
fn in_current_span(self) -> <E as InstrumentError>::Instrumented
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<C> JsonRpcClientWrapper for Cwhere
C: JsonRpcClient,
impl<C> JsonRpcClientWrapper for Cwhere
C: JsonRpcClient,
Source§impl<T> KeystoreUriSanitizer for T
impl<T> KeystoreUriSanitizer for T
fn sanitize_file_path(&self) -> PathBuf
Source§impl<Sp> LocalSpawnExt for Spwhere
Sp: LocalSpawn + ?Sized,
impl<Sp> LocalSpawnExt for Spwhere
Sp: LocalSpawn + ?Sized,
Source§fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>
fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError>
() to
completion. Read moreSource§fn spawn_local_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where
Fut: Future + 'static,
fn spawn_local_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>where
Fut: Future + 'static,
Source§impl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
impl<'a, M> MakeWriterExt<'a> for Mwhere
M: MakeWriter<'a>,
Source§fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
self and returns a MakeWriter that will only write output
for events at or below the provided verbosity Level. For instance,
Level::TRACE is considered to be _more verbosethanLevel::INFO`. Read moreSource§fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
self and returns a MakeWriter that will only write output
for events at or above the provided verbosity Level. Read moreSource§fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
self with a predicate that takes a span or event’s Metadata
and returns a bool. The returned MakeWriter’s
MakeWriter::make_writer_for method will check the predicate to
determine if a writer should be produced for a given span or event. Read moreSource§fn and<B>(self, other: B) -> Tee<Self, B>where
Self: Sized,
B: MakeWriter<'a>,
fn and<B>(self, other: B) -> Tee<Self, B>where
Self: Sized,
B: MakeWriter<'a>,
self with another type implementing MakeWriter, returning
a new MakeWriter that produces writers that write to both
outputs. Read moreSource§fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
self with another type implementing MakeWriter, returning
a new MakeWriter that calls other’s make_writer if self’s
make_writer returns OptionalWriter::none. Read moreSource§impl<M> MakeWriterExt for Mwhere
M: MakeWriter,
impl<M> MakeWriterExt for Mwhere
M: MakeWriter,
Source§fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
fn with_max_level(self, level: Level) -> WithMaxLevel<Self>where
Self: Sized,
self and returns a MakeWriter that will only write output
for events at or below the provided verbosity Level. For instance,
Level::TRACE is considered to be _more verbosethanLevel::INFO`. Read moreSource§fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
fn with_min_level(self, level: Level) -> WithMinLevel<Self>where
Self: Sized,
self and returns a MakeWriter that will only write output
for events at or above the provided verbosity Level. Read moreSource§fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
fn with_filter<F>(self, filter: F) -> WithFilter<Self, F>
self with a predicate that takes a span or event’s Metadata
and returns a bool. The returned MakeWriter’s
MakeWriter::make_writer_for method will check the predicate to
determine if a writer should be produced for a given span or event. Read moreSource§fn and<B>(self, other: B) -> Tee<Self, B>where
Self: Sized,
B: MakeWriter,
fn and<B>(self, other: B) -> Tee<Self, B>where
Self: Sized,
B: MakeWriter,
self with another type implementing MakeWriter, returning
a new MakeWriter that produces writers that write to both
outputs. Read moreSource§fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
fn or_else<W, B>(self, other: B) -> OrElse<Self, B>
self with another type implementing MakeWriter, returning
a new MakeWriter that calls other’s make_writer if self’s
make_writer returns OptionalWriter::none. Read moreSource§impl<M> MiddlewareBuilder for Mwhere
M: Middleware + 'static,
impl<M> MiddlewareBuilder for Mwhere
M: Middleware + 'static,
Source§fn wrap_into<F, T>(self, f: F) -> Twhere
F: FnOnce(Self) -> T,
T: Middleware,
fn wrap_into<F, T>(self, f: F) -> Twhere
F: FnOnce(Self) -> T,
T: Middleware,
Source§fn with_signer<S>(self, s: S) -> SignerMiddleware<Self, S>where
S: Signer,
fn with_signer<S>(self, s: S) -> SignerMiddleware<Self, S>where
S: Signer,
self inside a SignerMiddleware.Source§fn nonce_manager(self, address: H160) -> NonceManagerMiddleware<Self>
fn nonce_manager(self, address: H160) -> NonceManagerMiddleware<Self>
self inside a NonceManagerMiddleware.Source§fn gas_oracle<G>(self, gas_oracle: G) -> GasOracleMiddleware<Self, G>where
G: GasOracle,
fn gas_oracle<G>(self, gas_oracle: G) -> GasOracleMiddleware<Self, G>where
G: GasOracle,
self inside a GasOracleMiddleware.Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
Source§fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
Source§fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
Source§fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
Source§fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
Source§fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
Source§fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
Source§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
Source§fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
Source§fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
Source§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Source§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Source§fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Source§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Source§fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
Source§fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
Source§fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
Source§fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
Source§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
Source§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
Source§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
Source§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
Source§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
Source§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
Source§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
Source§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
Source§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
Source§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
Source§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
Source§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
Source§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Source§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Source§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Source§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Source§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
Source§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
Source§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
Source§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
Source§fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
Source§fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
Source§fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
Source§fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
Source§fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
Source§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
Source§fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
Source§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<S> ParseFormatted for S
impl<S> ParseFormatted for S
Source§fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where
F: Format,
N: FromFormattedStr,
fn parse_formatted<F, N>(&self, format: &F) -> Result<N, Error>where
F: Format,
N: FromFormattedStr,
self (typically a formatted string) into a number (see Examples above).Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R> ReadBytesExt for R
impl<R> ReadBytesExt for R
Source§fn read_u8(&mut self) -> Result<u8, Error>
fn read_u8(&mut self) -> Result<u8, Error>
Source§fn read_i8(&mut self) -> Result<i8, Error>
fn read_i8(&mut self) -> Result<i8, Error>
Source§fn read_u16<T>(&mut self) -> Result<u16, Error>where
T: ByteOrder,
fn read_u16<T>(&mut self) -> Result<u16, Error>where
T: ByteOrder,
Source§fn read_i16<T>(&mut self) -> Result<i16, Error>where
T: ByteOrder,
fn read_i16<T>(&mut self) -> Result<i16, Error>where
T: ByteOrder,
Source§fn read_u24<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
fn read_u24<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
Source§fn read_i24<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
fn read_i24<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
Source§fn read_u32<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
fn read_u32<T>(&mut self) -> Result<u32, Error>where
T: ByteOrder,
Source§fn read_i32<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
fn read_i32<T>(&mut self) -> Result<i32, Error>where
T: ByteOrder,
Source§fn read_u48<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
fn read_u48<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
Source§fn read_i48<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
fn read_i48<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
Source§fn read_u64<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
fn read_u64<T>(&mut self) -> Result<u64, Error>where
T: ByteOrder,
Source§fn read_i64<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
fn read_i64<T>(&mut self) -> Result<i64, Error>where
T: ByteOrder,
Source§fn read_u128<T>(&mut self) -> Result<u128, Error>where
T: ByteOrder,
fn read_u128<T>(&mut self) -> Result<u128, Error>where
T: ByteOrder,
Source§fn read_i128<T>(&mut self) -> Result<i128, Error>where
T: ByteOrder,
fn read_i128<T>(&mut self) -> Result<i128, Error>where
T: ByteOrder,
Source§fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>where
T: ByteOrder,
fn read_uint<T>(&mut self, nbytes: usize) -> Result<u64, Error>where
T: ByteOrder,
Source§fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>where
T: ByteOrder,
fn read_int<T>(&mut self, nbytes: usize) -> Result<i64, Error>where
T: ByteOrder,
Source§fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>where
T: ByteOrder,
fn read_uint128<T>(&mut self, nbytes: usize) -> Result<u128, Error>where
T: ByteOrder,
Source§fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>where
T: ByteOrder,
fn read_int128<T>(&mut self, nbytes: usize) -> Result<i128, Error>where
T: ByteOrder,
Source§fn read_f32<T>(&mut self) -> Result<f32, Error>where
T: ByteOrder,
fn read_f32<T>(&mut self) -> Result<f32, Error>where
T: ByteOrder,
Source§fn read_f64<T>(&mut self) -> Result<f64, Error>where
T: ByteOrder,
fn read_f64<T>(&mut self) -> Result<f64, Error>where
T: ByteOrder,
Source§fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>where
T: ByteOrder,
fn read_u16_into<T>(&mut self, dst: &mut [u16]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>where
T: ByteOrder,
fn read_u32_into<T>(&mut self, dst: &mut [u32]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>where
T: ByteOrder,
fn read_u64_into<T>(&mut self, dst: &mut [u64]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>where
T: ByteOrder,
fn read_u128_into<T>(&mut self, dst: &mut [u128]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>
fn read_i8_into(&mut self, dst: &mut [i8]) -> Result<(), Error>
Source§fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>where
T: ByteOrder,
fn read_i16_into<T>(&mut self, dst: &mut [i16]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>where
T: ByteOrder,
fn read_i32_into<T>(&mut self, dst: &mut [i32]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>where
T: ByteOrder,
fn read_i64_into<T>(&mut self, dst: &mut [i64]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>where
T: ByteOrder,
fn read_i128_into<T>(&mut self, dst: &mut [i128]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
fn read_f32_into<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
Source§fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
fn read_f32_into_unchecked<T>(&mut self, dst: &mut [f32]) -> Result<(), Error>where
T: ByteOrder,
read_f32_into insteadSource§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T. Read moreSource§impl<T> SectionExt for T
impl<T> SectionExt for T
Source§impl<Sp> SpawnExt for Sp
impl<Sp> SpawnExt for Sp
Source§fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError>
() to
completion. Read moreSource§fn spawn_with_handle<Fut>(
&self,
future: Fut,
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
fn spawn_with_handle<Fut>( &self, future: Fut, ) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError>
Source§impl<S> SubscriberExt for Swhere
S: Subscriber,
impl<S> SubscriberExt for Swhere
S: Subscriber,
Source§impl<S> SubscriberExt for Swhere
S: Subscriber,
impl<S> SubscriberExt for Swhere
S: Subscriber,
Source§impl<T> SubscriberInitExt for T
impl<T> SubscriberInitExt for T
Source§fn set_default(self) -> DefaultGuard
fn set_default(self) -> DefaultGuard
self as the default subscriber in the current scope, returning a
guard that will unset it when dropped. Read moreSource§fn try_init(self) -> Result<(), TryInitError>
fn try_init(self) -> Result<(), TryInitError>
self as the global default subscriber in the current
scope, returning an error if one is already set. Read moreSource§fn init(self)
fn init(self)
self as the global default subscriber in the current
scope, panicking if this fails. Read moreSource§impl<T> SubscriberInitExt for T
impl<T> SubscriberInitExt for T
Source§fn set_default(self) -> DefaultGuard
fn set_default(self) -> DefaultGuard
self as the default subscriber in the current scope, returning a
guard that will unset it when dropped. Read moreSource§fn try_init(self) -> Result<(), TryInitError>
fn try_init(self) -> Result<(), TryInitError>
self as the global default subscriber in the current
scope, returning an error if one is already set. Read moreSource§fn init(self)
fn init(self)
self as the global default subscriber in the current
scope, panicking if this fails. Read moreSource§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> ToBase32 for T
impl<T> ToBase32 for T
Source§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Upper case
letters are used (e.g. F9B4CA)Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
ToHexExt insteadself into the result.
Lower case letters are used (e.g. f9b4ca).Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
ToHexExt insteadself into the result.
Upper case letters are used (e.g. F9B4CA).Source§impl<T> ToHexExt for T
impl<T> ToHexExt for T
Source§fn encode_hex(&self) -> String
fn encode_hex(&self) -> String
self into the result.
Lower case letters are used (e.g. f9b4ca).Source§fn encode_hex_upper(&self) -> String
fn encode_hex_upper(&self) -> String
self into the result.
Upper case letters are used (e.g. F9B4CA).Source§fn encode_hex_with_prefix(&self) -> String
fn encode_hex_with_prefix(&self) -> String
self into the result with prefix 0x.
Lower case letters are used (e.g. 0xf9b4ca).Source§fn encode_hex_upper_with_prefix(&self) -> String
fn encode_hex_upper_with_prefix(&self) -> String
self into the result with prefix 0X.
Upper case letters are used (e.g. 0xF9B4CA).Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T.