pub type StateProviderBox = Box<dyn StateProvider>;
Expand description
Type alias of boxed StateProvider
.
Aliased Type§
struct StateProviderBox(/* private fields */);
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
Implementations
Source§impl<T> Box<T>
impl<T> Box<T>
1.0.0 · Sourcepub fn new(x: T) -> Box<T>
Available on non-no_global_oom_handling
only.
pub fn new(x: T) -> Box<T>
no_global_oom_handling
only.Allocates memory on the heap and then places x
into it.
This doesn’t actually allocate if T
is zero-sized.
§Examples
let five = Box::new(5);
1.82.0 · Sourcepub fn new_uninit() -> Box<MaybeUninit<T>>
Available on non-no_global_oom_handling
only.
pub fn new_uninit() -> Box<MaybeUninit<T>>
no_global_oom_handling
only.Constructs a new box with uninitialized contents.
§Examples
let mut five = Box::<u32>::new_uninit();
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };
assert_eq!(*five, 5)
Sourcepub fn new_zeroed() -> Box<MaybeUninit<T>>
🔬This is a nightly-only experimental API. (new_zeroed_alloc
#129396)Available on non-no_global_oom_handling
only.
pub fn new_zeroed() -> Box<MaybeUninit<T>>
new_zeroed_alloc
#129396)no_global_oom_handling
only.Constructs a new Box
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)]
let zero = Box::<u32>::new_zeroed();
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0)
1.33.0 · Sourcepub fn pin(x: T) -> Pin<Box<T>>
Available on non-no_global_oom_handling
only.
pub fn pin(x: T) -> Pin<Box<T>>
no_global_oom_handling
only.Constructs a new Pin<Box<T>>
. If T
does not implement Unpin
, then
x
will be pinned in memory and unable to be moved.
Constructing and pinning of the Box
can also be done in two steps: Box::pin(x)
does the same as Box::into_pin(Box::new(x))
. Consider using
into_pin
if you already have a Box<T>
, or if you want to
construct a (pinned) Box
in a different way than with Box::new
.
Sourcepub fn try_new(x: T) -> Result<Box<T>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new(x: T) -> Result<Box<T>, AllocError>
allocator_api
#32838)Allocates memory on the heap then places x
into it,
returning an error if the allocation fails
This doesn’t actually allocate if T
is zero-sized.
§Examples
#![feature(allocator_api)]
let five = Box::try_new(5)?;
Sourcepub fn try_new_uninit() -> Result<Box<MaybeUninit<T>>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_uninit() -> Result<Box<MaybeUninit<T>>, AllocError>
allocator_api
#32838)Constructs a new box with uninitialized contents on the heap, returning an error if the allocation fails
§Examples
#![feature(allocator_api)]
let mut five = Box::<u32>::try_new_uninit()?;
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };
assert_eq!(*five, 5);
Sourcepub fn try_new_zeroed() -> Result<Box<MaybeUninit<T>>, AllocError>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_zeroed() -> Result<Box<MaybeUninit<T>>, AllocError>
allocator_api
#32838)Constructs a new Box
with uninitialized contents, with the memory
being filled with 0
bytes on the heap
See MaybeUninit::zeroed
for examples of correct and incorrect usage
of this method.
§Examples
#![feature(allocator_api)]
let zero = Box::<u32>::try_new_zeroed()?;
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0);
Source§impl<T> Box<T>where
T: ?Sized,
impl<T> Box<T>where
T: ?Sized,
1.4.0 · Sourcepub unsafe fn from_raw(raw: *mut T) -> Box<T>
pub unsafe fn from_raw(raw: *mut T) -> Box<T>
Constructs a box from a raw pointer.
After calling this function, the raw pointer is owned by the
resulting Box
. Specifically, the Box
destructor will call
the destructor of T
and free the allocated memory. For this
to be safe, the memory must have been allocated in accordance
with the memory layout used by Box
.
§Safety
This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.
The raw pointer must point to a block of memory allocated by the global allocator.
The safety conditions are described in the memory layout section.
§Examples
Recreate a Box
which was previously converted to a raw pointer
using Box::into_raw
:
let x = Box::new(5);
let ptr = Box::into_raw(x);
let x = unsafe { Box::from_raw(ptr) };
Manually create a Box
from scratch by using the global allocator:
use std::alloc::{alloc, Layout};
unsafe {
let ptr = alloc(Layout::new::<i32>()) as *mut i32;
// In general .write is required to avoid attempting to destruct
// the (uninitialized) previous contents of `ptr`, though for this
// simple example `*ptr = 5` would have worked as well.
ptr.write(5);
let x = Box::from_raw(ptr);
}
Sourcepub unsafe fn from_non_null(ptr: NonNull<T>) -> Box<T>
🔬This is a nightly-only experimental API. (box_vec_non_null
#130364)
pub unsafe fn from_non_null(ptr: NonNull<T>) -> Box<T>
box_vec_non_null
#130364)Constructs a box from a NonNull
pointer.
After calling this function, the NonNull
pointer is owned by
the resulting Box
. Specifically, the Box
destructor will call
the destructor of T
and free the allocated memory. For this
to be safe, the memory must have been allocated in accordance
with the memory layout used by Box
.
§Safety
This function is unsafe because improper use may lead to
memory problems. For example, a double-free may occur if the
function is called twice on the same NonNull
pointer.
The non-null pointer must point to a block of memory allocated by the global allocator.
The safety conditions are described in the memory layout section.
§Examples
Recreate a Box
which was previously converted to a NonNull
pointer using Box::into_non_null
:
#![feature(box_vec_non_null)]
let x = Box::new(5);
let non_null = Box::into_non_null(x);
let x = unsafe { Box::from_non_null(non_null) };
Manually create a Box
from scratch by using the global allocator:
#![feature(box_vec_non_null)]
use std::alloc::{alloc, Layout};
use std::ptr::NonNull;
unsafe {
let non_null = NonNull::new(alloc(Layout::new::<i32>()).cast::<i32>())
.expect("allocation failed");
// In general .write is required to avoid attempting to destruct
// the (uninitialized) previous contents of `non_null`.
non_null.write(5);
let x = Box::from_non_null(non_null);
}
Source§impl<T, A> Box<T, A>
impl<T, A> Box<T, A>
Sourcepub const unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Box<T, A>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub const unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Box<T, A>
allocator_api
#32838)Constructs a box from a raw pointer in the given allocator.
After calling this function, the raw pointer is owned by the
resulting Box
. Specifically, the Box
destructor will call
the destructor of T
and free the allocated memory. For this
to be safe, the memory must have been allocated in accordance
with the memory layout used by Box
.
§Safety
This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.
The raw pointer must point to a block of memory allocated by alloc
.
§Examples
Recreate a Box
which was previously converted to a raw pointer
using Box::into_raw_with_allocator
:
#![feature(allocator_api)]
use std::alloc::System;
let x = Box::new_in(5, System);
let (ptr, alloc) = Box::into_raw_with_allocator(x);
let x = unsafe { Box::from_raw_in(ptr, alloc) };
Manually create a Box
from scratch by using the system allocator:
#![feature(allocator_api, slice_ptr_get)]
use std::alloc::{Allocator, Layout, System};
unsafe {
let ptr = System.allocate(Layout::new::<i32>())?.as_mut_ptr() as *mut i32;
// In general .write is required to avoid attempting to destruct
// the (uninitialized) previous contents of `ptr`, though for this
// simple example `*ptr = 5` would have worked as well.
ptr.write(5);
let x = Box::from_raw_in(ptr, System);
}
Sourcepub const unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Box<T, A>
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub const unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Box<T, A>
allocator_api
#32838)Constructs a box from a NonNull
pointer in the given allocator.
After calling this function, the NonNull
pointer is owned by
the resulting Box
. Specifically, the Box
destructor will call
the destructor of T
and free the allocated memory. For this
to be safe, the memory must have been allocated in accordance
with the memory layout used by Box
.
§Safety
This function is unsafe because improper use may lead to memory problems. For example, a double-free may occur if the function is called twice on the same raw pointer.
The non-null pointer must point to a block of memory allocated by alloc
.
§Examples
Recreate a Box
which was previously converted to a NonNull
pointer
using Box::into_non_null_with_allocator
:
#![feature(allocator_api, box_vec_non_null)]
use std::alloc::System;
let x = Box::new_in(5, System);
let (non_null, alloc) = Box::into_non_null_with_allocator(x);
let x = unsafe { Box::from_non_null_in(non_null, alloc) };
Manually create a Box
from scratch by using the system allocator:
#![feature(allocator_api, box_vec_non_null, slice_ptr_get)]
use std::alloc::{Allocator, Layout, System};
unsafe {
let non_null = System.allocate(Layout::new::<i32>())?.cast::<i32>();
// In general .write is required to avoid attempting to destruct
// the (uninitialized) previous contents of `non_null`.
non_null.write(5);
let x = Box::from_non_null_in(non_null, System);
}
1.4.0 · Sourcepub fn into_raw(b: Box<T, A>) -> *mut T
pub fn into_raw(b: Box<T, A>) -> *mut T
Consumes the Box
, returning a wrapped raw pointer.
The pointer will be properly aligned and non-null.
After calling this function, the caller is responsible for the
memory previously managed by the Box
. In particular, the
caller should properly destroy T
and release the memory, taking
into account the memory layout used by Box
. The easiest way to
do this is to convert the raw pointer back into a Box
with the
Box::from_raw
function, allowing the Box
destructor to perform
the cleanup.
Note: this is an associated function, which means that you have
to call it as Box::into_raw(b)
instead of b.into_raw()
. This
is so that there is no conflict with a method on the inner type.
§Examples
Converting the raw pointer back into a Box
with Box::from_raw
for automatic cleanup:
let x = Box::new(String::from("Hello"));
let ptr = Box::into_raw(x);
let x = unsafe { Box::from_raw(ptr) };
Manual cleanup by explicitly running the destructor and deallocating the memory:
use std::alloc::{dealloc, Layout};
use std::ptr;
let x = Box::new(String::from("Hello"));
let ptr = Box::into_raw(x);
unsafe {
ptr::drop_in_place(ptr);
dealloc(ptr as *mut u8, Layout::new::<String>());
}
Note: This is equivalent to the following:
let x = Box::new(String::from("Hello"));
let ptr = Box::into_raw(x);
unsafe {
drop(Box::from_raw(ptr));
}
Sourcepub fn into_non_null(b: Box<T, A>) -> NonNull<T>
🔬This is a nightly-only experimental API. (box_vec_non_null
#130364)
pub fn into_non_null(b: Box<T, A>) -> NonNull<T>
box_vec_non_null
#130364)Consumes the Box
, returning a wrapped NonNull
pointer.
The pointer will be properly aligned.
After calling this function, the caller is responsible for the
memory previously managed by the Box
. In particular, the
caller should properly destroy T
and release the memory, taking
into account the memory layout used by Box
. The easiest way to
do this is to convert the NonNull
pointer back into a Box
with the
Box::from_non_null
function, allowing the Box
destructor to
perform the cleanup.
Note: this is an associated function, which means that you have
to call it as Box::into_non_null(b)
instead of b.into_non_null()
.
This is so that there is no conflict with a method on the inner type.
§Examples
Converting the NonNull
pointer back into a Box
with Box::from_non_null
for automatic cleanup:
#![feature(box_vec_non_null)]
let x = Box::new(String::from("Hello"));
let non_null = Box::into_non_null(x);
let x = unsafe { Box::from_non_null(non_null) };
Manual cleanup by explicitly running the destructor and deallocating the memory:
#![feature(box_vec_non_null)]
use std::alloc::{dealloc, Layout};
let x = Box::new(String::from("Hello"));
let non_null = Box::into_non_null(x);
unsafe {
non_null.drop_in_place();
dealloc(non_null.as_ptr().cast::<u8>(), Layout::new::<String>());
}
Note: This is equivalent to the following:
#![feature(box_vec_non_null)]
let x = Box::new(String::from("Hello"));
let non_null = Box::into_non_null(x);
unsafe {
drop(Box::from_non_null(non_null));
}
Sourcepub fn into_raw_with_allocator(b: Box<T, A>) -> (*mut T, A)
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn into_raw_with_allocator(b: Box<T, A>) -> (*mut T, A)
allocator_api
#32838)Consumes the Box
, returning a wrapped raw pointer and the allocator.
The pointer will be properly aligned and non-null.
After calling this function, the caller is responsible for the
memory previously managed by the Box
. In particular, the
caller should properly destroy T
and release the memory, taking
into account the memory layout used by Box
. The easiest way to
do this is to convert the raw pointer back into a Box
with the
Box::from_raw_in
function, allowing the Box
destructor to perform
the cleanup.
Note: this is an associated function, which means that you have
to call it as Box::into_raw_with_allocator(b)
instead of b.into_raw_with_allocator()
. This
is so that there is no conflict with a method on the inner type.
§Examples
Converting the raw pointer back into a Box
with Box::from_raw_in
for automatic cleanup:
#![feature(allocator_api)]
use std::alloc::System;
let x = Box::new_in(String::from("Hello"), System);
let (ptr, alloc) = Box::into_raw_with_allocator(x);
let x = unsafe { Box::from_raw_in(ptr, alloc) };
Manual cleanup by explicitly running the destructor and deallocating the memory:
#![feature(allocator_api)]
use std::alloc::{Allocator, Layout, System};
use std::ptr::{self, NonNull};
let x = Box::new_in(String::from("Hello"), System);
let (ptr, alloc) = Box::into_raw_with_allocator(x);
unsafe {
ptr::drop_in_place(ptr);
let non_null = NonNull::new_unchecked(ptr);
alloc.deallocate(non_null.cast(), Layout::new::<String>());
}
Sourcepub fn into_non_null_with_allocator(b: Box<T, A>) -> (NonNull<T>, A)
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn into_non_null_with_allocator(b: Box<T, A>) -> (NonNull<T>, A)
allocator_api
#32838)Consumes the Box
, returning a wrapped NonNull
pointer and the allocator.
The pointer will be properly aligned.
After calling this function, the caller is responsible for the
memory previously managed by the Box
. In particular, the
caller should properly destroy T
and release the memory, taking
into account the memory layout used by Box
. The easiest way to
do this is to convert the NonNull
pointer back into a Box
with the
Box::from_non_null_in
function, allowing the Box
destructor to
perform the cleanup.
Note: this is an associated function, which means that you have
to call it as Box::into_non_null_with_allocator(b)
instead of
b.into_non_null_with_allocator()
. This is so that there is no
conflict with a method on the inner type.
§Examples
Converting the NonNull
pointer back into a Box
with
Box::from_non_null_in
for automatic cleanup:
#![feature(allocator_api, box_vec_non_null)]
use std::alloc::System;
let x = Box::new_in(String::from("Hello"), System);
let (non_null, alloc) = Box::into_non_null_with_allocator(x);
let x = unsafe { Box::from_non_null_in(non_null, alloc) };
Manual cleanup by explicitly running the destructor and deallocating the memory:
#![feature(allocator_api, box_vec_non_null)]
use std::alloc::{Allocator, Layout, System};
let x = Box::new_in(String::from("Hello"), System);
let (non_null, alloc) = Box::into_non_null_with_allocator(x);
unsafe {
non_null.drop_in_place();
alloc.deallocate(non_null.cast::<u8>(), Layout::new::<String>());
}
Sourcepub fn as_mut_ptr(b: &mut Box<T, A>) -> *mut T
🔬This is a nightly-only experimental API. (box_as_ptr
#129090)
pub fn as_mut_ptr(b: &mut Box<T, A>) -> *mut T
box_as_ptr
#129090)Returns a raw mutable pointer to the Box
’s contents.
The caller must ensure that the Box
outlives the pointer this
function returns, or else it will end up dangling.
This method guarantees that for the purpose of the aliasing model, this method
does not materialize a reference to the underlying memory, and thus the returned pointer
will remain valid when mixed with other calls to as_ptr
and as_mut_ptr
.
Note that calling other methods that materialize references to the memory
may still invalidate this pointer.
See the example below for how this guarantee can be used.
§Examples
Due to the aliasing guarantee, the following code is legal:
#![feature(box_as_ptr)]
unsafe {
let mut b = Box::new(0);
let ptr1 = Box::as_mut_ptr(&mut b);
ptr1.write(1);
let ptr2 = Box::as_mut_ptr(&mut b);
ptr2.write(2);
// Notably, the write to `ptr2` did *not* invalidate `ptr1`:
ptr1.write(3);
}
Sourcepub fn as_ptr(b: &Box<T, A>) -> *const T
🔬This is a nightly-only experimental API. (box_as_ptr
#129090)
pub fn as_ptr(b: &Box<T, A>) -> *const T
box_as_ptr
#129090)Returns a raw pointer to the Box
’s contents.
The caller must ensure that the Box
outlives the pointer this
function returns, or else it will end up dangling.
The caller must also ensure that the memory the pointer (non-transitively) points to
is never written to (except inside an UnsafeCell
) using this pointer or any pointer
derived from it. If you need to mutate the contents of the Box
, use as_mut_ptr
.
This method guarantees that for the purpose of the aliasing model, this method
does not materialize a reference to the underlying memory, and thus the returned pointer
will remain valid when mixed with other calls to as_ptr
and as_mut_ptr
.
Note that calling other methods that materialize mutable references to the memory,
as well as writing to this memory, may still invalidate this pointer.
See the example below for how this guarantee can be used.
§Examples
Due to the aliasing guarantee, the following code is legal:
#![feature(box_as_ptr)]
unsafe {
let mut v = Box::new(0);
let ptr1 = Box::as_ptr(&v);
let ptr2 = Box::as_mut_ptr(&mut v);
let _val = ptr2.read();
// No write to this memory has happened yet, so `ptr1` is still valid.
let _val = ptr1.read();
// However, once we do a write...
ptr2.write(1);
// ... `ptr1` is no longer valid.
// This would be UB: let _val = ptr1.read();
}
Sourcepub const fn allocator(b: &Box<T, A>) -> &A
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub const fn allocator(b: &Box<T, A>) -> &A
allocator_api
#32838)Returns a reference to the underlying allocator.
Note: this is an associated function, which means that you have
to call it as Box::allocator(&b)
instead of b.allocator()
. This
is so that there is no conflict with a method on the inner type.
1.26.0 · Sourcepub fn leak<'a>(b: Box<T, A>) -> &'a mut Twhere
A: 'a,
pub fn leak<'a>(b: Box<T, A>) -> &'a mut Twhere
A: 'a,
Consumes and leaks the Box
, returning a mutable reference,
&'a mut T
.
Note that the type T
must outlive the chosen lifetime 'a
. If the type
has only static references, or none at all, then this may be chosen to be
'static
.
This function is mainly useful for data that lives for the remainder of
the program’s life. Dropping the returned reference will cause a memory
leak. If this is not acceptable, the reference should first be wrapped
with the Box::from_raw
function producing a Box
. This Box
can
then be dropped which will properly destroy T
and release the
allocated memory.
Note: this is an associated function, which means that you have
to call it as Box::leak(b)
instead of b.leak()
. This
is so that there is no conflict with a method on the inner type.
§Examples
Simple usage:
let x = Box::new(41);
let static_ref: &'static mut usize = Box::leak(x);
*static_ref += 1;
assert_eq!(*static_ref, 42);
Unsized data:
let x = vec![1, 2, 3].into_boxed_slice();
let static_ref = Box::leak(x);
static_ref[0] = 4;
assert_eq!(*static_ref, [4, 2, 3]);
1.63.0 (const: unstable) · Sourcepub fn into_pin(boxed: Box<T, A>) -> Pin<Box<T, A>>where
A: 'static,
pub fn into_pin(boxed: Box<T, A>) -> Pin<Box<T, A>>where
A: 'static,
Converts a Box<T>
into a Pin<Box<T>>
. If T
does not implement Unpin
, then
*boxed
will be pinned in memory and unable to be moved.
This conversion does not allocate on the heap and happens in place.
This is also available via From
.
Constructing and pinning a Box
with Box::into_pin(Box::new(x))
can also be written more concisely using Box::pin(x)
.
This into_pin
method is useful if you already have a Box<T>
, or you are
constructing a (pinned) Box
in a different way than with Box::new
.
§Notes
It’s not recommended that crates add an impl like From<Box<T>> for Pin<T>
,
as it’ll introduce an ambiguity when calling Pin::from
.
A demonstration of such a poor impl is shown below.
struct Foo; // A type defined in this crate.
impl From<Box<()>> for Pin<Foo> {
fn from(_: Box<()>) -> Pin<Foo> {
Pin::new(Foo)
}
}
let foo = Box::new(());
let bar = Pin::from(foo);
Source§impl<T, A> Box<T, A>where
A: Allocator,
impl<T, A> Box<T, A>where
A: Allocator,
Sourcepub fn new_in(x: T, alloc: A) -> Box<T, A>where
A: Allocator,
🔬This is a nightly-only experimental API. (allocator_api
#32838)Available on non-no_global_oom_handling
only.
pub fn new_in(x: T, alloc: A) -> Box<T, A>where
A: Allocator,
allocator_api
#32838)no_global_oom_handling
only.Allocates memory in the given allocator then places x
into it.
This doesn’t actually allocate if T
is zero-sized.
§Examples
#![feature(allocator_api)]
use std::alloc::System;
let five = Box::new_in(5, System);
Sourcepub fn try_new_in(x: T, alloc: A) -> Result<Box<T, A>, AllocError>where
A: Allocator,
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_in(x: T, alloc: A) -> Result<Box<T, A>, AllocError>where
A: Allocator,
allocator_api
#32838)Allocates memory in the given allocator then places x
into it,
returning an error if the allocation fails
This doesn’t actually allocate if T
is zero-sized.
§Examples
#![feature(allocator_api)]
use std::alloc::System;
let five = Box::try_new_in(5, System)?;
Sourcepub fn new_uninit_in(alloc: A) -> Box<MaybeUninit<T>, A>where
A: Allocator,
🔬This is a nightly-only experimental API. (allocator_api
#32838)Available on non-no_global_oom_handling
only.
pub fn new_uninit_in(alloc: A) -> Box<MaybeUninit<T>, A>where
A: Allocator,
allocator_api
#32838)no_global_oom_handling
only.Constructs a new box with uninitialized contents in the provided allocator.
§Examples
#![feature(allocator_api)]
use std::alloc::System;
let mut five = Box::<u32, _>::new_uninit_in(System);
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };
assert_eq!(*five, 5)
Sourcepub fn try_new_uninit_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>where
A: Allocator,
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_uninit_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>where
A: Allocator,
allocator_api
#32838)Constructs a new box with uninitialized contents in the provided allocator, returning an error if the allocation fails
§Examples
#![feature(allocator_api)]
use std::alloc::System;
let mut five = Box::<u32, _>::try_new_uninit_in(System)?;
// Deferred initialization:
five.write(5);
let five = unsafe { five.assume_init() };
assert_eq!(*five, 5);
Sourcepub fn new_zeroed_in(alloc: A) -> Box<MaybeUninit<T>, A>where
A: Allocator,
🔬This is a nightly-only experimental API. (allocator_api
#32838)Available on non-no_global_oom_handling
only.
pub fn new_zeroed_in(alloc: A) -> Box<MaybeUninit<T>, A>where
A: Allocator,
allocator_api
#32838)no_global_oom_handling
only.Constructs a new Box
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::alloc::System;
let zero = Box::<u32, _>::new_zeroed_in(System);
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0)
Sourcepub fn try_new_zeroed_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>where
A: Allocator,
🔬This is a nightly-only experimental API. (allocator_api
#32838)
pub fn try_new_zeroed_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>where
A: Allocator,
allocator_api
#32838)Constructs a new Box
with uninitialized contents, with the memory
being filled with 0
bytes in the provided allocator,
returning an error if the allocation fails,
See MaybeUninit::zeroed
for examples of correct and incorrect usage
of this method.
§Examples
#![feature(allocator_api)]
use std::alloc::System;
let zero = Box::<u32, _>::try_new_zeroed_in(System)?;
let zero = unsafe { zero.assume_init() };
assert_eq!(*zero, 0);
Sourcepub fn pin_in(x: T, alloc: A) -> Pin<Box<T, A>>where
A: 'static + Allocator,
🔬This is a nightly-only experimental API. (allocator_api
#32838)Available on non-no_global_oom_handling
only.
pub fn pin_in(x: T, alloc: A) -> Pin<Box<T, A>>where
A: 'static + Allocator,
allocator_api
#32838)no_global_oom_handling
only.Constructs a new Pin<Box<T, A>>
. If T
does not implement Unpin
, then
x
will be pinned in memory and unable to be moved.
Constructing and pinning of the Box
can also be done in two steps: Box::pin_in(x, alloc)
does the same as Box::into_pin(Box::new_in(x, alloc))
. Consider using
into_pin
if you already have a Box<T, A>
, or if you want to
construct a (pinned) Box
in a different way than with Box::new_in
.
Sourcepub fn into_boxed_slice(boxed: Box<T, A>) -> Box<[T], A>
🔬This is a nightly-only experimental API. (box_into_boxed_slice
#71582)
pub fn into_boxed_slice(boxed: Box<T, A>) -> Box<[T], A>
box_into_boxed_slice
#71582)Converts a Box<T>
into a Box<[T]>
This conversion does not allocate on the heap and happens in place.
Sourcepub fn into_inner(boxed: Box<T, A>) -> T
🔬This is a nightly-only experimental API. (box_into_inner
#80437)
pub fn into_inner(boxed: Box<T, A>) -> T
box_into_inner
#80437)Consumes the Box
, returning the wrapped value.
§Examples
#![feature(box_into_inner)]
let c = Box::new(5);
assert_eq!(Box::into_inner(c), 5);
Trait Implementations
§impl<T> AccessListTr for Box<T>where
T: AccessListTr + ?Sized,
impl<T> AccessListTr for Box<T>where
T: AccessListTr + ?Sized,
§fn access_list(
&self,
) -> impl Iterator<Item = (Address, impl Iterator<Item = FixedBytes<32>>)>
fn access_list( &self, ) -> impl Iterator<Item = (Address, impl Iterator<Item = FixedBytes<32>>)>
§fn access_list_nums(&self) -> (usize, usize)
fn access_list_nums(&self) -> (usize, usize)
Source§impl<T: AccountExtReader + ?Sized> AccountExtReader for Box<T>
impl<T: AccountExtReader + ?Sized> AccountExtReader for Box<T>
Source§fn changed_accounts_with_range(
&self,
_range: impl RangeBounds<BlockNumber>,
) -> ProviderResult<BTreeSet<Address>>
fn changed_accounts_with_range( &self, _range: impl RangeBounds<BlockNumber>, ) -> ProviderResult<BTreeSet<Address>>
Source§fn basic_accounts(
&self,
_iter: impl IntoIterator<Item = Address>,
) -> ProviderResult<Vec<(Address, Option<Account>)>>
fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> ProviderResult<Vec<(Address, Option<Account>)>>
AccountReader::basic_account
repeatedly. Read moreSource§fn changed_accounts_and_blocks_with_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<BTreeMap<Address, Vec<BlockNumber>>>
fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<Address, Vec<BlockNumber>>>
Source§impl<T: AccountReader + ?Sized> AccountReader for Box<T>
impl<T: AccountReader + ?Sized> AccountReader for Box<T>
Source§fn basic_account(&self, address: &Address) -> ProviderResult<Option<Account>>
fn basic_account(&self, address: &Address) -> ProviderResult<Option<Account>>
§impl<'a, A> Arbitrary<'a> for Box<A>where
A: Arbitrary<'a>,
impl<'a, A> Arbitrary<'a> for Box<A>where
A: Arbitrary<'a>,
§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Box<A>, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Box<A>, Error>
Self
from the given unstructured data. Read more§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read more§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read more§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read more§impl<A> Arbitrary for Box<A>where
A: Arbitrary,
impl<A> Arbitrary for Box<A>where
A: Arbitrary,
§type Parameters = <A as Arbitrary>::Parameters
type Parameters = <A as Arbitrary>::Parameters
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = MapInto<<A as Arbitrary>::Strategy, Box<A>>
type Strategy = MapInto<<A as Arbitrary>::Strategy, Box<A>>
Strategy
used to generate values of type Self
.§fn arbitrary_with(
args: <Box<A> as Arbitrary>::Parameters,
) -> <Box<A> as Arbitrary>::Strategy
fn arbitrary_with( args: <Box<A> as Arbitrary>::Parameters, ) -> <Box<A> as Arbitrary>::Strategy
§impl<A> ArbitraryF1<A> for Box<A>where
A: Debug + 'static,
impl<A> ArbitraryF1<A> for Box<A>where
A: Debug + 'static,
§type Parameters = ()
type Parameters = ()
lift1_with
accepts for
configuration of the lifted and generated Strategy
. Parameters
must implement Default
.§fn lift1_with<S>(
base: S,
_args: <Box<A> as ArbitraryF1<A>>::Parameters,
) -> BoxedStrategy<Box<A>>where
S: Strategy<Value = A> + 'static,
fn lift1_with<S>(
base: S,
_args: <Box<A> as ArbitraryF1<A>>::Parameters,
) -> BoxedStrategy<Box<A>>where
S: Strategy<Value = A> + 'static,
§impl<T> Args for Box<T>where
T: Args,
impl<T> Args for Box<T>where
T: Args,
§fn augment_args(cmd: Command) -> Command
fn augment_args(cmd: Command) -> Command
§fn augment_args_for_update(cmd: Command) -> Command
fn augment_args_for_update(cmd: Command) -> Command
Command
] so it can instantiate self
via
[FromArgMatches::update_from_arg_matches_mut
] Read more1.64.0 · Source§impl<T> AsFd for Box<T>
impl<T> AsFd for Box<T>
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
§impl<T> AsyncBufRead for Box<T>
impl<T> AsyncBufRead for Box<T>
§impl<T> AsyncBufRead for Box<T>
impl<T> AsyncBufRead for Box<T>
1.85.0 · Source§impl<Args, F, A> AsyncFn<Args> for Box<F, A>
impl<Args, F, A> AsyncFn<Args> for Box<F, A>
Source§extern "rust-call" fn async_call(
&self,
args: Args,
) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>
extern "rust-call" fn async_call( &self, args: Args, ) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>
async_fn_traits
)AsyncFn
, returning a future which may borrow from the called closure.1.85.0 · Source§impl<Args, F, A> AsyncFnMut<Args> for Box<F, A>
impl<Args, F, A> AsyncFnMut<Args> for Box<F, A>
Source§type CallRefFuture<'a> = <F as AsyncFnMut<Args>>::CallRefFuture<'a>
where
Box<F, A>: 'a
type CallRefFuture<'a> = <F as AsyncFnMut<Args>>::CallRefFuture<'a> where Box<F, A>: 'a
async_fn_traits
)AsyncFnMut::async_call_mut
and AsyncFn::async_call
.Source§extern "rust-call" fn async_call_mut(
&mut self,
args: Args,
) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>
extern "rust-call" fn async_call_mut( &mut self, args: Args, ) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>
async_fn_traits
)AsyncFnMut
, returning a future which may borrow from the called closure.1.85.0 · Source§impl<Args, F, A> AsyncFnOnce<Args> for Box<F, A>
impl<Args, F, A> AsyncFnOnce<Args> for Box<F, A>
Source§type Output = <F as AsyncFnOnce<Args>>::Output
type Output = <F as AsyncFnOnce<Args>>::Output
async_fn_traits
)Source§type CallOnceFuture = <F as AsyncFnOnce<Args>>::CallOnceFuture
type CallOnceFuture = <F as AsyncFnOnce<Args>>::CallOnceFuture
async_fn_traits
)AsyncFnOnce::async_call_once
.Source§extern "rust-call" fn async_call_once(
self,
args: Args,
) -> <Box<F, A> as AsyncFnOnce<Args>>::CallOnceFuture
extern "rust-call" fn async_call_once( self, args: Args, ) -> <Box<F, A> as AsyncFnOnce<Args>>::CallOnceFuture
async_fn_traits
)AsyncFnOnce
, returning a future which may move out of the called closure.Source§impl<S> AsyncIterator for Box<S>
impl<S> AsyncIterator for Box<S>
Source§type Item = <S as AsyncIterator>::Item
type Item = <S as AsyncIterator>::Item
async_iterator
#79024)Source§fn poll_next(
self: Pin<&mut Box<S>>,
cx: &mut Context<'_>,
) -> Poll<Option<<Box<S> as AsyncIterator>::Item>>
fn poll_next( self: Pin<&mut Box<S>>, cx: &mut Context<'_>, ) -> Poll<Option<<Box<S> as AsyncIterator>::Item>>
async_iterator
#79024)None
if the async iterator is exhausted. Read more§impl<T> AsyncRead for Box<T>
impl<T> AsyncRead for Box<T>
§impl<T> AsyncWrite for Box<T>
impl<T> AsyncWrite for Box<T>
§fn poll_write(
self: Pin<&mut Box<T>>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
buf
into the object. Read more§fn poll_write_vectored(
self: Pin<&mut Box<T>>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize, Error>>
fn poll_write_vectored( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>
bufs
into the object using vectored
IO operations. Read more§impl<T> AsyncWrite for Box<T>
impl<T> AsyncWrite for Box<T>
§fn poll_write(
self: Pin<&mut Box<T>>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
buf
into the object. Read more§fn poll_write_vectored(
self: Pin<&mut Box<T>>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize, Error>>
fn poll_write_vectored( self: Pin<&mut Box<T>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>
poll_write
, except that it writes from a slice of buffers. Read more§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
poll_write_vectored
implementation. Read more§impl<T> Block for Box<T>where
T: Block + ?Sized,
impl<T> Block for Box<T>where
T: Block + ?Sized,
§fn beneficiary(&self) -> Address
fn beneficiary(&self) -> Address
§fn difficulty(&self) -> Uint<256, 4>
fn difficulty(&self) -> Uint<256, 4>
§fn prevrandao(&self) -> Option<FixedBytes<32>>
fn prevrandao(&self) -> Option<FixedBytes<32>>
§fn blob_excess_gas_and_price(&self) -> Option<BlobExcessGasAndPrice>
fn blob_excess_gas_and_price(&self) -> Option<BlobExcessGasAndPrice>
calc_excess_blob_gas
]
and [calc_blob_gasprice
]. Read moreSource§impl<T: BlockExecutionForkProvider + ?Sized> BlockExecutionForkProvider for Box<T>
impl<T: BlockExecutionForkProvider + ?Sized> BlockExecutionForkProvider for Box<T>
Source§fn canonical_fork(&self) -> BlockNumHash
fn canonical_fork(&self) -> BlockNumHash
Source§impl<T: BlockHashReader + ?Sized> BlockHashReader for Box<T>
impl<T: BlockHashReader + ?Sized> BlockHashReader for Box<T>
Source§fn block_hash(&self, number: BlockNumber) -> ProviderResult<Option<B256>>
fn block_hash(&self, number: BlockNumber) -> ProviderResult<Option<B256>>
None
if no block with this number
exists.Source§fn convert_block_hash(
&self,
hash_or_number: BlockHashOrNumber,
) -> ProviderResult<Option<B256>>
fn convert_block_hash( &self, hash_or_number: BlockHashOrNumber, ) -> ProviderResult<Option<B256>>
None
if no block with this number
exists.Source§fn canonical_hashes_range(
&self,
start: BlockNumber,
end: BlockNumber,
) -> ProviderResult<Vec<B256>>
fn canonical_hashes_range( &self, start: BlockNumber, end: BlockNumber, ) -> ProviderResult<Vec<B256>>
1.1.0 · Source§impl<T, A> BorrowMut<T> for Box<T, A>
impl<T, A> BorrowMut<T> for Box<T, A>
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Buf for Box<T>where
T: Buf + ?Sized,
impl<T> Buf for Box<T>where
T: Buf + ?Sized,
§fn remaining(&self) -> usize
fn remaining(&self) -> usize
§fn chunk(&self) -> &[u8] ⓘ
fn chunk(&self) -> &[u8] ⓘ
Buf::remaining()
. Note that this can return a shorter slice (this
allows non-continuous internal representation). Read more§fn chunks_vectored<'b>(&'b self, dst: &mut [IoSlice<'b>]) -> usize
fn chunks_vectored<'b>(&'b self, dst: &mut [IoSlice<'b>]) -> usize
std
only.§fn has_remaining(&self) -> bool
fn has_remaining(&self) -> bool
§fn copy_to_slice(&mut self, dst: &mut [u8])
fn copy_to_slice(&mut self, dst: &mut [u8])
§fn get_u16(&mut self) -> u16
fn get_u16(&mut self) -> u16
self
in big-endian byte order. Read more§fn get_u16_le(&mut self) -> u16
fn get_u16_le(&mut self) -> u16
self
in little-endian byte order. Read more§fn get_u16_ne(&mut self) -> u16
fn get_u16_ne(&mut self) -> u16
self
in native-endian byte order. Read more§fn get_i16(&mut self) -> i16
fn get_i16(&mut self) -> i16
self
in big-endian byte order. Read more§fn get_i16_le(&mut self) -> i16
fn get_i16_le(&mut self) -> i16
self
in little-endian byte order. Read more§fn get_i16_ne(&mut self) -> i16
fn get_i16_ne(&mut self) -> i16
self
in native-endian byte order. Read more§fn get_u32(&mut self) -> u32
fn get_u32(&mut self) -> u32
self
in the big-endian byte order. Read more§fn get_u32_le(&mut self) -> u32
fn get_u32_le(&mut self) -> u32
self
in the little-endian byte order. Read more§fn get_u32_ne(&mut self) -> u32
fn get_u32_ne(&mut self) -> u32
self
in native-endian byte order. Read more§fn get_i32(&mut self) -> i32
fn get_i32(&mut self) -> i32
self
in big-endian byte order. Read more§fn get_i32_le(&mut self) -> i32
fn get_i32_le(&mut self) -> i32
self
in little-endian byte order. Read more§fn get_i32_ne(&mut self) -> i32
fn get_i32_ne(&mut self) -> i32
self
in native-endian byte order. Read more§fn get_u64(&mut self) -> u64
fn get_u64(&mut self) -> u64
self
in big-endian byte order. Read more§fn get_u64_le(&mut self) -> u64
fn get_u64_le(&mut self) -> u64
self
in little-endian byte order. Read more§fn get_u64_ne(&mut self) -> u64
fn get_u64_ne(&mut self) -> u64
self
in native-endian byte order. Read more§fn get_i64(&mut self) -> i64
fn get_i64(&mut self) -> i64
self
in big-endian byte order. Read more§fn get_i64_le(&mut self) -> i64
fn get_i64_le(&mut self) -> i64
self
in little-endian byte order. Read more§fn get_i64_ne(&mut self) -> i64
fn get_i64_ne(&mut self) -> i64
self
in native-endian byte order. Read more§fn get_u128(&mut self) -> u128
fn get_u128(&mut self) -> u128
self
in big-endian byte order. Read more§fn get_u128_le(&mut self) -> u128
fn get_u128_le(&mut self) -> u128
self
in little-endian byte order. Read more§fn get_u128_ne(&mut self) -> u128
fn get_u128_ne(&mut self) -> u128
self
in native-endian byte order. Read more§fn get_i128(&mut self) -> i128
fn get_i128(&mut self) -> i128
self
in big-endian byte order. Read more§fn get_i128_le(&mut self) -> i128
fn get_i128_le(&mut self) -> i128
self
in little-endian byte order. Read more§fn get_i128_ne(&mut self) -> i128
fn get_i128_ne(&mut self) -> i128
self
in native-endian byte order. Read more§fn get_uint(&mut self, nbytes: usize) -> u64
fn get_uint(&mut self, nbytes: usize) -> u64
self
in big-endian byte order. Read more§fn get_uint_le(&mut self, nbytes: usize) -> u64
fn get_uint_le(&mut self, nbytes: usize) -> u64
self
in little-endian byte order. Read more§fn get_uint_ne(&mut self, nbytes: usize) -> u64
fn get_uint_ne(&mut self, nbytes: usize) -> u64
self
in native-endian byte order. Read more§fn get_int(&mut self, nbytes: usize) -> i64
fn get_int(&mut self, nbytes: usize) -> i64
self
in big-endian byte order. Read more§fn get_int_le(&mut self, nbytes: usize) -> i64
fn get_int_le(&mut self, nbytes: usize) -> i64
self
in little-endian byte order. Read more§fn get_int_ne(&mut self, nbytes: usize) -> i64
fn get_int_ne(&mut self, nbytes: usize) -> i64
self
in native-endian byte order. Read more§fn get_f32(&mut self) -> f32
fn get_f32(&mut self) -> f32
self
in big-endian byte order. Read more§fn get_f32_le(&mut self) -> f32
fn get_f32_le(&mut self) -> f32
self
in little-endian byte order. Read more§fn get_f32_ne(&mut self) -> f32
fn get_f32_ne(&mut self) -> f32
self
in native-endian byte order. Read more§fn get_f64(&mut self) -> f64
fn get_f64(&mut self) -> f64
self
in big-endian byte order. Read more§fn get_f64_le(&mut self) -> f64
fn get_f64_le(&mut self) -> f64
self
in little-endian byte order. Read more§fn get_f64_ne(&mut self) -> f64
fn get_f64_ne(&mut self) -> f64
self
in native-endian byte order. Read more§fn try_copy_to_slice(&mut self, dst: &mut [u8]) -> Result<(), TryGetError>
fn try_copy_to_slice(&mut self, dst: &mut [u8]) -> Result<(), TryGetError>
§fn try_get_u8(&mut self) -> Result<u8, TryGetError>
fn try_get_u8(&mut self) -> Result<u8, TryGetError>
self
. Read more§fn try_get_i8(&mut self) -> Result<i8, TryGetError>
fn try_get_i8(&mut self) -> Result<i8, TryGetError>
self
. Read more§fn try_get_u16(&mut self) -> Result<u16, TryGetError>
fn try_get_u16(&mut self) -> Result<u16, TryGetError>
self
in big-endian byte order. Read more§fn try_get_u16_le(&mut self) -> Result<u16, TryGetError>
fn try_get_u16_le(&mut self) -> Result<u16, TryGetError>
self
in little-endian byte order. Read more§fn try_get_u16_ne(&mut self) -> Result<u16, TryGetError>
fn try_get_u16_ne(&mut self) -> Result<u16, TryGetError>
self
in native-endian byte order. Read more§fn try_get_i16(&mut self) -> Result<i16, TryGetError>
fn try_get_i16(&mut self) -> Result<i16, TryGetError>
self
in big-endian byte order. Read more§fn try_get_i16_le(&mut self) -> Result<i16, TryGetError>
fn try_get_i16_le(&mut self) -> Result<i16, TryGetError>
self
in little-endian byte order. Read more§fn try_get_i16_ne(&mut self) -> Result<i16, TryGetError>
fn try_get_i16_ne(&mut self) -> Result<i16, TryGetError>
self
in native-endian byte order. Read more§fn try_get_u32(&mut self) -> Result<u32, TryGetError>
fn try_get_u32(&mut self) -> Result<u32, TryGetError>
self
in big-endian byte order. Read more§fn try_get_u32_le(&mut self) -> Result<u32, TryGetError>
fn try_get_u32_le(&mut self) -> Result<u32, TryGetError>
self
in little-endian byte order. Read more§fn try_get_u32_ne(&mut self) -> Result<u32, TryGetError>
fn try_get_u32_ne(&mut self) -> Result<u32, TryGetError>
self
in native-endian byte order. Read more§fn try_get_i32(&mut self) -> Result<i32, TryGetError>
fn try_get_i32(&mut self) -> Result<i32, TryGetError>
self
in big-endian byte order. Read more§fn try_get_i32_le(&mut self) -> Result<i32, TryGetError>
fn try_get_i32_le(&mut self) -> Result<i32, TryGetError>
self
in little-endian byte order. Read more§fn try_get_i32_ne(&mut self) -> Result<i32, TryGetError>
fn try_get_i32_ne(&mut self) -> Result<i32, TryGetError>
self
in native-endian byte order. Read more§fn try_get_u64(&mut self) -> Result<u64, TryGetError>
fn try_get_u64(&mut self) -> Result<u64, TryGetError>
self
in big-endian byte order. Read more§fn try_get_u64_le(&mut self) -> Result<u64, TryGetError>
fn try_get_u64_le(&mut self) -> Result<u64, TryGetError>
self
in little-endian byte order. Read more§fn try_get_u64_ne(&mut self) -> Result<u64, TryGetError>
fn try_get_u64_ne(&mut self) -> Result<u64, TryGetError>
self
in native-endian byte order. Read more§fn try_get_i64(&mut self) -> Result<i64, TryGetError>
fn try_get_i64(&mut self) -> Result<i64, TryGetError>
self
in big-endian byte order. Read more§fn try_get_i64_le(&mut self) -> Result<i64, TryGetError>
fn try_get_i64_le(&mut self) -> Result<i64, TryGetError>
self
in little-endian byte order. Read more§fn try_get_i64_ne(&mut self) -> Result<i64, TryGetError>
fn try_get_i64_ne(&mut self) -> Result<i64, TryGetError>
self
in native-endian byte order. Read more§fn try_get_u128(&mut self) -> Result<u128, TryGetError>
fn try_get_u128(&mut self) -> Result<u128, TryGetError>
self
in big-endian byte order. Read more§fn try_get_u128_le(&mut self) -> Result<u128, TryGetError>
fn try_get_u128_le(&mut self) -> Result<u128, TryGetError>
self
in little-endian byte order. Read more§fn try_get_u128_ne(&mut self) -> Result<u128, TryGetError>
fn try_get_u128_ne(&mut self) -> Result<u128, TryGetError>
self
in native-endian byte order. Read more§fn try_get_i128(&mut self) -> Result<i128, TryGetError>
fn try_get_i128(&mut self) -> Result<i128, TryGetError>
self
in big-endian byte order. Read more§fn try_get_i128_le(&mut self) -> Result<i128, TryGetError>
fn try_get_i128_le(&mut self) -> Result<i128, TryGetError>
self
in little-endian byte order. Read more§fn try_get_i128_ne(&mut self) -> Result<i128, TryGetError>
fn try_get_i128_ne(&mut self) -> Result<i128, TryGetError>
self
in native-endian byte order. Read more§fn try_get_uint(&mut self, nbytes: usize) -> Result<u64, TryGetError>
fn try_get_uint(&mut self, nbytes: usize) -> Result<u64, TryGetError>
self
in big-endian byte order. Read more§fn try_get_uint_le(&mut self, nbytes: usize) -> Result<u64, TryGetError>
fn try_get_uint_le(&mut self, nbytes: usize) -> Result<u64, TryGetError>
self
in little-endian byte order. Read more§fn try_get_uint_ne(&mut self, nbytes: usize) -> Result<u64, TryGetError>
fn try_get_uint_ne(&mut self, nbytes: usize) -> Result<u64, TryGetError>
self
in native-endian byte order. Read more§fn try_get_int(&mut self, nbytes: usize) -> Result<i64, TryGetError>
fn try_get_int(&mut self, nbytes: usize) -> Result<i64, TryGetError>
self
in big-endian byte order. Read more§fn try_get_int_le(&mut self, nbytes: usize) -> Result<i64, TryGetError>
fn try_get_int_le(&mut self, nbytes: usize) -> Result<i64, TryGetError>
self
in little-endian byte order. Read more§fn try_get_int_ne(&mut self, nbytes: usize) -> Result<i64, TryGetError>
fn try_get_int_ne(&mut self, nbytes: usize) -> Result<i64, TryGetError>
self
in native-endian byte order. Read more§fn try_get_f32(&mut self) -> Result<f32, TryGetError>
fn try_get_f32(&mut self) -> Result<f32, TryGetError>
self
in big-endian byte order. Read more§fn try_get_f32_le(&mut self) -> Result<f32, TryGetError>
fn try_get_f32_le(&mut self) -> Result<f32, TryGetError>
self
in little-endian byte order. Read more§fn try_get_f32_ne(&mut self) -> Result<f32, TryGetError>
fn try_get_f32_ne(&mut self) -> Result<f32, TryGetError>
self
in native-endian byte order. Read more§fn try_get_f64(&mut self) -> Result<f64, TryGetError>
fn try_get_f64(&mut self) -> Result<f64, TryGetError>
self
in big-endian byte order. Read more§fn try_get_f64_le(&mut self) -> Result<f64, TryGetError>
fn try_get_f64_le(&mut self) -> Result<f64, TryGetError>
self
in little-endian byte order. Read more§fn try_get_f64_ne(&mut self) -> Result<f64, TryGetError>
fn try_get_f64_ne(&mut self) -> Result<f64, TryGetError>
self
in native-endian byte order. Read more§fn copy_to_bytes(&mut self, len: usize) -> Bytes
fn copy_to_bytes(&mut self, len: usize) -> Bytes
§impl<T> BufMut for Box<T>where
T: BufMut + ?Sized,
impl<T> BufMut for Box<T>where
T: BufMut + ?Sized,
§fn remaining_mut(&self) -> usize
fn remaining_mut(&self) -> usize
§fn chunk_mut(&mut self) -> &mut UninitSlice
fn chunk_mut(&mut self) -> &mut UninitSlice
BufMut::remaining_mut()
. Note that this can be shorter than the
whole remainder of the buffer (this allows non-continuous implementation). Read more§unsafe fn advance_mut(&mut self, cnt: usize)
unsafe fn advance_mut(&mut self, cnt: usize)
§fn put_u16(&mut self, n: u16)
fn put_u16(&mut self, n: u16)
self
in big-endian byte order. Read more§fn put_u16_le(&mut self, n: u16)
fn put_u16_le(&mut self, n: u16)
self
in little-endian byte order. Read more§fn put_u16_ne(&mut self, n: u16)
fn put_u16_ne(&mut self, n: u16)
self
in native-endian byte order. Read more§fn put_i16(&mut self, n: i16)
fn put_i16(&mut self, n: i16)
self
in big-endian byte order. Read more§fn put_i16_le(&mut self, n: i16)
fn put_i16_le(&mut self, n: i16)
self
in little-endian byte order. Read more§fn put_i16_ne(&mut self, n: i16)
fn put_i16_ne(&mut self, n: i16)
self
in native-endian byte order. Read more§fn put_u32(&mut self, n: u32)
fn put_u32(&mut self, n: u32)
self
in big-endian byte order. Read more§fn put_u32_le(&mut self, n: u32)
fn put_u32_le(&mut self, n: u32)
self
in little-endian byte order. Read more§fn put_u32_ne(&mut self, n: u32)
fn put_u32_ne(&mut self, n: u32)
self
in native-endian byte order. Read more§fn put_i32(&mut self, n: i32)
fn put_i32(&mut self, n: i32)
self
in big-endian byte order. Read more§fn put_i32_le(&mut self, n: i32)
fn put_i32_le(&mut self, n: i32)
self
in little-endian byte order. Read more§fn put_i32_ne(&mut self, n: i32)
fn put_i32_ne(&mut self, n: i32)
self
in native-endian byte order. Read more§fn put_u64(&mut self, n: u64)
fn put_u64(&mut self, n: u64)
self
in the big-endian byte order. Read more§fn put_u64_le(&mut self, n: u64)
fn put_u64_le(&mut self, n: u64)
self
in little-endian byte order. Read more§fn put_u64_ne(&mut self, n: u64)
fn put_u64_ne(&mut self, n: u64)
self
in native-endian byte order. Read more§fn put_i64(&mut self, n: i64)
fn put_i64(&mut self, n: i64)
self
in the big-endian byte order. Read more§fn put_i64_le(&mut self, n: i64)
fn put_i64_le(&mut self, n: i64)
self
in little-endian byte order. Read more§fn put_i64_ne(&mut self, n: i64)
fn put_i64_ne(&mut self, n: i64)
self
in native-endian byte order. Read more§fn has_remaining_mut(&self) -> bool
fn has_remaining_mut(&self) -> bool
self
for more bytes. Read more§fn put_u128(&mut self, n: u128)
fn put_u128(&mut self, n: u128)
self
in the big-endian byte order. Read more§fn put_u128_le(&mut self, n: u128)
fn put_u128_le(&mut self, n: u128)
self
in little-endian byte order. Read more§fn put_u128_ne(&mut self, n: u128)
fn put_u128_ne(&mut self, n: u128)
self
in native-endian byte order. Read more§fn put_i128(&mut self, n: i128)
fn put_i128(&mut self, n: i128)
self
in the big-endian byte order. Read more§fn put_i128_le(&mut self, n: i128)
fn put_i128_le(&mut self, n: i128)
self
in little-endian byte order. Read more§fn put_i128_ne(&mut self, n: i128)
fn put_i128_ne(&mut self, n: i128)
self
in native-endian byte order. Read more§fn put_uint(&mut self, n: u64, nbytes: usize)
fn put_uint(&mut self, n: u64, nbytes: usize)
self
in big-endian byte order. Read more§fn put_uint_le(&mut self, n: u64, nbytes: usize)
fn put_uint_le(&mut self, n: u64, nbytes: usize)
self
in the little-endian byte order. Read more§fn put_uint_ne(&mut self, n: u64, nbytes: usize)
fn put_uint_ne(&mut self, n: u64, nbytes: usize)
self
in the native-endian byte order. Read more§fn put_int_le(&mut self, n: i64, nbytes: usize)
fn put_int_le(&mut self, n: i64, nbytes: usize)
§fn put_int_ne(&mut self, n: i64, nbytes: usize)
fn put_int_ne(&mut self, n: i64, nbytes: usize)
§fn put_f32(&mut self, n: f32)
fn put_f32(&mut self, n: f32)
self
in big-endian byte order. Read more§fn put_f32_le(&mut self, n: f32)
fn put_f32_le(&mut self, n: f32)
self
in little-endian byte order. Read more§fn put_f32_ne(&mut self, n: f32)
fn put_f32_ne(&mut self, n: f32)
self
in native-endian byte order. Read more§fn put_f64(&mut self, n: f64)
fn put_f64(&mut self, n: f64)
self
in big-endian byte order. Read more§fn put_f64_le(&mut self, n: f64)
fn put_f64_le(&mut self, n: f64)
self
in little-endian byte order. Read more§fn put_f64_ne(&mut self, n: f64)
fn put_f64_ne(&mut self, n: f64)
self
in native-endian byte order. Read more1.0.0 · Source§impl<B> BufRead for Box<B>
impl<B> BufRead for Box<B>
Source§fn fill_buf(&mut self) -> Result<&[u8], Error>
fn fill_buf(&mut self) -> Result<&[u8], Error>
Source§fn consume(&mut self, amt: usize)
fn consume(&mut self, amt: usize)
amt
bytes have been consumed from the buffer,
so they should no longer be returned in calls to read
. Read moreSource§fn has_data_left(&mut self) -> Result<bool, Error>
fn has_data_left(&mut self) -> Result<bool, Error>
buf_read_has_data_left
#86423)Read
has any data left to be read. Read moreSource§fn skip_until(&mut self, byte: u8) -> Result<usize, Error>
fn skip_until(&mut self, byte: u8) -> Result<usize, Error>
byte
or EOF is reached. Read moreSource§fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>
0xA
byte) is reached, and append
them to the provided String
buffer. Read more§impl<T> BufferProvider for Box<T>where
T: BufferProvider + ?Sized,
impl<T> BufferProvider for Box<T>where
T: BufferProvider + ?Sized,
§fn load_buffer(
&self,
key: DataKey,
req: DataRequest<'_>,
) -> Result<DataResponse<BufferMarker>, DataError>
fn load_buffer( &self, key: DataKey, req: DataRequest<'_>, ) -> Result<DataResponse<BufferMarker>, DataError>
DataPayload
]<
[BufferMarker
]>
according to the key and request.§impl<T> Cfg for Box<T>where
T: Cfg + ?Sized,
impl<T> Cfg for Box<T>where
T: Cfg + ?Sized,
type Spec = <T as Cfg>::Spec
fn chain_id(&self) -> u64
fn spec(&self) -> <Box<T> as Cfg>::Spec
§fn blob_max_count(&self, spec_id: SpecId) -> u8
fn blob_max_count(&self, spec_id: SpecId) -> u8
fn max_code_size(&self) -> usize
fn is_eip3607_disabled(&self) -> bool
fn is_balance_check_disabled(&self) -> bool
fn is_block_gas_limit_disabled(&self) -> bool
fn is_nonce_check_disabled(&self) -> bool
fn is_base_fee_check_disabled(&self) -> bool
Source§impl<T: ChangeSetReader + ?Sized> ChangeSetReader for Box<T>
impl<T: ChangeSetReader + ?Sized> ChangeSetReader for Box<T>
Source§fn account_block_changeset(
&self,
block_number: BlockNumber,
) -> ProviderResult<Vec<AccountBeforeTx>>
fn account_block_changeset( &self, block_number: BlockNumber, ) -> ProviderResult<Vec<AccountBeforeTx>>
1.0.0 · Source§impl<T, A> Clone for Box<T, A>
Available on non-no_global_oom_handling
only.
impl<T, A> Clone for Box<T, A>
no_global_oom_handling
only.Source§fn clone(&self) -> Box<T, A>
fn clone(&self) -> Box<T, A>
Returns a new box with a clone()
of this box’s contents.
§Examples
let x = Box::new(5);
let y = x.clone();
// The value is the same
assert_eq!(x, y);
// But they are unique objects
assert_ne!(&*x as *const i32, &*y as *const i32);
Source§fn clone_from(&mut self, source: &Box<T, A>)
fn clone_from(&mut self, source: &Box<T, A>)
Copies source
’s contents into self
without creating a new allocation.
§Examples
let x = Box::new(5);
let mut y = Box::new(10);
let yp: *const i32 = &*y;
y.clone_from(&x);
// The value is the same
assert_eq!(x, y);
// And no allocation occurred
assert_eq!(yp, &*y);
§impl<T> ContextTr for Box<T>where
T: ContextTr + ?Sized,
impl<T> ContextTr for Box<T>where
T: ContextTr + ?Sized,
type Block = <T as ContextTr>::Block
type Tx = <T as ContextTr>::Tx
type Cfg = <T as ContextTr>::Cfg
type Db = <T as ContextTr>::Db
type Journal = <T as ContextTr>::Journal
type Chain = <T as ContextTr>::Chain
fn tx(&self) -> &<Box<T> as ContextTr>::Tx
fn block(&self) -> &<Box<T> as ContextTr>::Block
fn cfg(&self) -> &<Box<T> as ContextTr>::Cfg
fn journal(&mut self) -> &mut <Box<T> as ContextTr>::Journal
fn journal_ref(&self) -> &<Box<T> as ContextTr>::Journal
fn db(&mut self) -> &mut <Box<T> as ContextTr>::Db
fn db_ref(&self) -> &<Box<T> as ContextTr>::Db
fn chain(&mut self) -> &mut <Box<T> as ContextTr>::Chain
fn error( &mut self, ) -> &mut Result<(), ContextError<<<Box<T> as ContextTr>::Db as Database>::Error>>
fn tx_journal( &mut self, ) -> (&mut <Box<T> as ContextTr>::Tx, &mut <Box<T> as ContextTr>::Journal)
Source§impl<G, R, A> Coroutine<R> for Box<G, A>
impl<G, R, A> Coroutine<R> for Box<G, A>
Source§type Yield = <G as Coroutine<R>>::Yield
type Yield = <G as Coroutine<R>>::Yield
coroutine_trait
#43122)§impl<T> Database for Box<T>where
T: Database + ?Sized,
impl<T> Database for Box<T>where
T: Database + ?Sized,
§fn basic(
&mut self,
address: Address,
) -> Result<Option<AccountInfo>, <Box<T> as Database>::Error>
fn basic( &mut self, address: Address, ) -> Result<Option<AccountInfo>, <Box<T> as Database>::Error>
§fn code_by_hash(
&mut self,
code_hash: FixedBytes<32>,
) -> Result<Bytecode, <Box<T> as Database>::Error>
fn code_by_hash( &mut self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <Box<T> as Database>::Error>
§fn storage(
&mut self,
address: Address,
index: Uint<256, 4>,
) -> Result<Uint<256, 4>, <Box<T> as Database>::Error>
fn storage( &mut self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <Box<T> as Database>::Error>
§fn block_hash(
&mut self,
number: u64,
) -> Result<FixedBytes<32>, <Box<T> as Database>::Error>
fn block_hash( &mut self, number: u64, ) -> Result<FixedBytes<32>, <Box<T> as Database>::Error>
§impl<T> DatabaseRef for Box<T>where
T: DatabaseRef + ?Sized,
impl<T> DatabaseRef for Box<T>where
T: DatabaseRef + ?Sized,
§fn basic_ref(
&self,
address: Address,
) -> Result<Option<AccountInfo>, <Box<T> as DatabaseRef>::Error>
fn basic_ref( &self, address: Address, ) -> Result<Option<AccountInfo>, <Box<T> as DatabaseRef>::Error>
§fn code_by_hash_ref(
&self,
code_hash: FixedBytes<32>,
) -> Result<Bytecode, <Box<T> as DatabaseRef>::Error>
fn code_by_hash_ref( &self, code_hash: FixedBytes<32>, ) -> Result<Bytecode, <Box<T> as DatabaseRef>::Error>
§fn storage_ref(
&self,
address: Address,
index: Uint<256, 4>,
) -> Result<Uint<256, 4>, <Box<T> as DatabaseRef>::Error>
fn storage_ref( &self, address: Address, index: Uint<256, 4>, ) -> Result<Uint<256, 4>, <Box<T> as DatabaseRef>::Error>
§fn block_hash_ref(
&self,
number: u64,
) -> Result<FixedBytes<32>, <Box<T> as DatabaseRef>::Error>
fn block_hash_ref( &self, number: u64, ) -> Result<FixedBytes<32>, <Box<T> as DatabaseRef>::Error>
§impl<'a, T> DecodeValue<'a> for Box<T>where
T: DecodeValue<'a>,
Available on crate feature alloc
only.
impl<'a, T> DecodeValue<'a> for Box<T>where
T: DecodeValue<'a>,
alloc
only.§fn decode_value<R>(reader: &mut R, header: Header) -> Result<Box<T>, Error>where
R: Reader<'a>,
fn decode_value<R>(reader: &mut R, header: Header) -> Result<Box<T>, Error>where
R: Reader<'a>,
Reader
].1.0.0 · Source§impl<T> Default for Box<T>where
T: Default,
Available on non-no_global_oom_handling
only.
impl<T> Default for Box<T>where
T: Default,
no_global_oom_handling
only.Source§impl<'de, T> Deserialize<'de> for Box<T>where
T: Deserialize<'de>,
Available on crate features std
or alloc
only.
impl<'de, T> Deserialize<'de> for Box<T>where
T: Deserialize<'de>,
std
or alloc
only.Source§fn deserialize<D>(
deserializer: D,
) -> Result<Box<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Box<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<'de, T, U> DeserializeAs<'de, Box<T>> for Box<U>where
U: DeserializeAs<'de, T>,
Available on crate feature alloc
only.
impl<'de, T, U> DeserializeAs<'de, Box<T>> for Box<U>where
U: DeserializeAs<'de, T>,
alloc
only.Source§fn deserialize_as<D>(
deserializer: D,
) -> Result<Box<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize_as<D>(
deserializer: D,
) -> Result<Box<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
1.0.0 · Source§impl<I, A> DoubleEndedIterator for Box<I, A>
impl<I, A> DoubleEndedIterator for Box<I, A>
Source§fn next_back(&mut self) -> Option<<I as Iterator>::Item>
fn next_back(&mut self) -> Option<<I as Iterator>::Item>
Source§fn nth_back(&mut self, n: usize) -> Option<<I as Iterator>::Item>
fn nth_back(&mut self, n: usize) -> Option<<I as Iterator>::Item>
n
th element from the end of the iterator. Read moreSource§fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by
#77404)n
elements. Read more1.27.0 · Source§fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
Iterator::try_fold()
: it takes
elements starting from the back of the iterator. Read more§impl<M, P> DynamicDataProvider<M> for Box<P>where
M: DataMarker,
P: DynamicDataProvider<M> + ?Sized,
impl<M, P> DynamicDataProvider<M> for Box<P>where
M: DataMarker,
P: DynamicDataProvider<M> + ?Sized,
§impl<T> Encodable for Box<T>where
T: Encodable + ?Sized,
impl<T> Encodable for Box<T>where
T: Encodable + ?Sized,
§fn rlp_append(&self, s: &mut RlpStream)
fn rlp_append(&self, s: &mut RlpStream)
§impl<T> EncodeAsVarULE<T> for Box<T>where
T: VarULE + ?Sized,
impl<T> EncodeAsVarULE<T> for Box<T>where
T: VarULE + ?Sized,
§fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R
cb
with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T
. Read more§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
VarULE
] type§fn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
VarULE
] type to the dst
buffer. dst
should
be the size of [Self::encode_var_ule_len()
]§impl<T> EncodeValue for Box<T>where
T: EncodeValue,
Available on crate feature alloc
only.
impl<T> EncodeValue for Box<T>where
T: EncodeValue,
alloc
only.1.8.0 · Source§impl<E> Error for Box<E>where
E: Error,
impl<E> Error for Box<E>where
E: Error,
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
§impl<T> EvmTr for Box<T>where
T: EvmTr + ?Sized,
impl<T> EvmTr for Box<T>where
T: EvmTr + ?Sized,
type Context = <T as EvmTr>::Context
type Instructions = <T as EvmTr>::Instructions
type Precompiles = <T as EvmTr>::Precompiles
§fn run_interpreter(
&mut self,
interpreter: &mut Interpreter<<<Box<T> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes>,
) -> <<<Box<T> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes as InterpreterTypes>::Output
fn run_interpreter( &mut self, interpreter: &mut Interpreter<<<Box<T> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes>, ) -> <<<Box<T> as EvmTr>::Instructions as InstructionProvider>::InterpreterTypes as InterpreterTypes>::Output
§fn ctx_instructions(
&mut self,
) -> (&mut <Box<T> as EvmTr>::Context, &mut <Box<T> as EvmTr>::Instructions)
fn ctx_instructions( &mut self, ) -> (&mut <Box<T> as EvmTr>::Context, &mut <Box<T> as EvmTr>::Instructions)
§fn ctx_precompiles(
&mut self,
) -> (&mut <Box<T> as EvmTr>::Context, &mut <Box<T> as EvmTr>::Precompiles)
fn ctx_precompiles( &mut self, ) -> (&mut <Box<T> as EvmTr>::Context, &mut <Box<T> as EvmTr>::Precompiles)
1.0.0 · Source§impl<I, A> ExactSizeIterator for Box<I, A>
impl<I, A> ExactSizeIterator for Box<I, A>
Source§impl<T: ExecutionDataProvider + ?Sized> ExecutionDataProvider for Box<T>
impl<T: ExecutionDataProvider + ?Sized> ExecutionDataProvider for Box<T>
Source§fn execution_outcome(&self) -> &ExecutionOutcome
fn execution_outcome(&self) -> &ExecutionOutcome
Source§fn block_hash(&self, block_number: BlockNumber) -> Option<BlockHash>
fn block_hash(&self, block_number: BlockNumber) -> Option<BlockHash>
§impl<T> FromArgMatches for Box<T>where
T: FromArgMatches,
impl<T> FromArgMatches for Box<T>where
T: FromArgMatches,
§fn from_arg_matches(matches: &ArgMatches) -> Result<Box<T>, Error>
fn from_arg_matches(matches: &ArgMatches) -> Result<Box<T>, Error>
§fn from_arg_matches_mut(matches: &mut ArgMatches) -> Result<Box<T>, Error>
fn from_arg_matches_mut(matches: &mut ArgMatches) -> Result<Box<T>, Error>
§fn update_from_arg_matches(&mut self, matches: &ArgMatches) -> Result<(), Error>
fn update_from_arg_matches(&mut self, matches: &ArgMatches) -> Result<(), Error>
ArgMatches
to self
.§fn update_from_arg_matches_mut(
&mut self,
matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.§impl<F> FusedFuture for Box<F>
impl<F> FusedFuture for Box<F>
§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true
if the underlying future should no longer be polled.§impl<S> FusedStream for Box<S>
impl<S> FusedStream for Box<S>
§fn is_terminated(&self) -> bool
fn is_terminated(&self) -> bool
true
if the stream should no longer be polled.Source§impl<T: HashedPostStateProvider + ?Sized> HashedPostStateProvider for Box<T>
impl<T: HashedPostStateProvider + ?Sized> HashedPostStateProvider for Box<T>
Source§fn hashed_post_state(&self, bundle_state: &BundleState) -> HashedPostState
fn hashed_post_state(&self, bundle_state: &BundleState) -> HashedPostState
HashedPostState
of the provided [BundleState
].1.22.0 · Source§impl<T, A> Hasher for Box<T, A>
impl<T, A> Hasher for Box<T, A>
Source§fn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
u128
into this hasher.Source§fn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
usize
into this hasher.Source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
i128
into this hasher.Source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
isize
into this hasher.Source§impl<T: HashingWriter + ?Sized> HashingWriter for Box<T>
Available on crate feature db-api
only.
impl<T: HashingWriter + ?Sized> HashingWriter for Box<T>
db-api
only.Source§fn unwind_account_hashing<'a>(
&self,
changesets: impl Iterator<Item = &'a (BlockNumber, AccountBeforeTx)>,
) -> ProviderResult<BTreeMap<B256, Option<Account>>>
fn unwind_account_hashing<'a>( &self, changesets: impl Iterator<Item = &'a (BlockNumber, AccountBeforeTx)>, ) -> ProviderResult<BTreeMap<B256, Option<Account>>>
Source§fn unwind_account_hashing_range(
&self,
range: impl RangeBounds<BlockNumber>,
) -> ProviderResult<BTreeMap<B256, Option<Account>>>
fn unwind_account_hashing_range( &self, range: impl RangeBounds<BlockNumber>, ) -> ProviderResult<BTreeMap<B256, Option<Account>>>
Source§fn insert_account_for_hashing(
&self,
accounts: impl IntoIterator<Item = (Address, Option<Account>)>,
) -> ProviderResult<BTreeMap<B256, Option<Account>>>
fn insert_account_for_hashing( &self, accounts: impl IntoIterator<Item = (Address, Option<Account>)>, ) -> ProviderResult<BTreeMap<B256, Option<Account>>>
AccountsHistory
][reth_db_api::tables::AccountsHistory] table. Read moreSource§fn unwind_storage_hashing(
&self,
changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>,
) -> ProviderResult<HashMap<B256, BTreeSet<B256>>>
fn unwind_storage_hashing( &self, changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>, ) -> ProviderResult<HashMap<B256, BTreeSet<B256>>>
Source§fn unwind_storage_hashing_range(
&self,
range: impl RangeBounds<BlockNumberAddress>,
) -> ProviderResult<HashMap<B256, BTreeSet<B256>>>
fn unwind_storage_hashing_range( &self, range: impl RangeBounds<BlockNumberAddress>, ) -> ProviderResult<HashMap<B256, BTreeSet<B256>>>
Source§fn insert_storage_for_hashing(
&self,
storages: impl IntoIterator<Item = (Address, impl IntoIterator<Item = StorageEntry>)>,
) -> ProviderResult<HashMap<B256, BTreeSet<B256>>>
fn insert_storage_for_hashing( &self, storages: impl IntoIterator<Item = (Address, impl IntoIterator<Item = StorageEntry>)>, ) -> ProviderResult<HashMap<B256, BTreeSet<B256>>>
Source§fn insert_hashes(
&self,
range: RangeInclusive<BlockNumber>,
end_block_hash: B256,
expected_state_root: B256,
) -> ProviderResult<()>
fn insert_hashes( &self, range: RangeInclusive<BlockNumber>, end_block_hash: B256, expected_state_root: B256, ) -> ProviderResult<()>
Source§impl<T: HistoryWriter + ?Sized> HistoryWriter for Box<T>
Available on crate feature db-api
only.
impl<T: HistoryWriter + ?Sized> HistoryWriter for Box<T>
db-api
only.Source§fn unwind_account_history_indices<'a>(
&self,
changesets: impl Iterator<Item = &'a (BlockNumber, AccountBeforeTx)>,
) -> ProviderResult<usize>
fn unwind_account_history_indices<'a>( &self, changesets: impl Iterator<Item = &'a (BlockNumber, AccountBeforeTx)>, ) -> ProviderResult<usize>
Source§fn unwind_account_history_indices_range(
&self,
range: impl RangeBounds<BlockNumber>,
) -> ProviderResult<usize>
fn unwind_account_history_indices_range( &self, range: impl RangeBounds<BlockNumber>, ) -> ProviderResult<usize>
Source§fn insert_account_history_index(
&self,
index_updates: impl IntoIterator<Item = (Address, impl IntoIterator<Item = u64>)>,
) -> ProviderResult<()>
fn insert_account_history_index( &self, index_updates: impl IntoIterator<Item = (Address, impl IntoIterator<Item = u64>)>, ) -> ProviderResult<()>
Source§fn unwind_storage_history_indices(
&self,
changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>,
) -> ProviderResult<usize>
fn unwind_storage_history_indices( &self, changesets: impl Iterator<Item = (BlockNumberAddress, StorageEntry)>, ) -> ProviderResult<usize>
Source§fn unwind_storage_history_indices_range(
&self,
range: impl RangeBounds<BlockNumberAddress>,
) -> ProviderResult<usize>
fn unwind_storage_history_indices_range( &self, range: impl RangeBounds<BlockNumberAddress>, ) -> ProviderResult<usize>
Source§fn insert_storage_history_index(
&self,
storage_transitions: impl IntoIterator<Item = ((Address, B256), impl IntoIterator<Item = u64>)>,
) -> ProviderResult<()>
fn insert_storage_history_index( &self, storage_transitions: impl IntoIterator<Item = ((Address, B256), impl IntoIterator<Item = u64>)>, ) -> ProviderResult<()>
Source§fn update_history_indices(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<()>
fn update_history_indices( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<()>
§impl<CTX, INTR, T> Inspector<CTX, INTR> for Box<T>where
INTR: InterpreterTypes,
T: Inspector<CTX, INTR> + ?Sized,
impl<CTX, INTR, T> Inspector<CTX, INTR> for Box<T>where
INTR: InterpreterTypes,
T: Inspector<CTX, INTR> + ?Sized,
§fn initialize_interp(
&mut self,
interp: &mut Interpreter<INTR>,
context: &mut CTX,
)
fn initialize_interp( &mut self, interp: &mut Interpreter<INTR>, context: &mut CTX, )
§fn step(&mut self, interp: &mut Interpreter<INTR>, context: &mut CTX)
fn step(&mut self, interp: &mut Interpreter<INTR>, context: &mut CTX)
§fn step_end(&mut self, interp: &mut Interpreter<INTR>, context: &mut CTX)
fn step_end(&mut self, interp: &mut Interpreter<INTR>, context: &mut CTX)
step
when the instruction has been executed. Read more§fn log(&mut self, interp: &mut Interpreter<INTR>, context: &mut CTX, log: Log)
fn log(&mut self, interp: &mut Interpreter<INTR>, context: &mut CTX, log: Log)
§fn call(
&mut self,
context: &mut CTX,
inputs: &mut CallInputs,
) -> Option<CallOutcome>
fn call( &mut self, context: &mut CTX, inputs: &mut CallInputs, ) -> Option<CallOutcome>
§fn call_end(
&mut self,
context: &mut CTX,
inputs: &CallInputs,
outcome: &mut CallOutcome,
)
fn call_end( &mut self, context: &mut CTX, inputs: &CallInputs, outcome: &mut CallOutcome, )
§fn create(
&mut self,
context: &mut CTX,
inputs: &mut CreateInputs,
) -> Option<CreateOutcome>
fn create( &mut self, context: &mut CTX, inputs: &mut CreateInputs, ) -> Option<CreateOutcome>
§fn create_end(
&mut self,
context: &mut CTX,
inputs: &CreateInputs,
outcome: &mut CreateOutcome,
)
fn create_end( &mut self, context: &mut CTX, inputs: &CreateInputs, outcome: &mut CreateOutcome, )
§fn eofcreate(
&mut self,
context: &mut CTX,
inputs: &mut EOFCreateInputs,
) -> Option<CreateOutcome>
fn eofcreate( &mut self, context: &mut CTX, inputs: &mut EOFCreateInputs, ) -> Option<CreateOutcome>
§fn eofcreate_end(
&mut self,
context: &mut CTX,
inputs: &EOFCreateInputs,
outcome: &mut CreateOutcome,
)
fn eofcreate_end( &mut self, context: &mut CTX, inputs: &EOFCreateInputs, outcome: &mut CreateOutcome, )
§fn selfdestruct(
&mut self,
contract: Address,
target: Address,
value: Uint<256, 4>,
)
fn selfdestruct( &mut self, contract: Address, target: Address, value: Uint<256, 4>, )
§impl<T> IsTerminal for Box<T>where
T: IsTerminal + ?Sized,
impl<T> IsTerminal for Box<T>where
T: IsTerminal + ?Sized,
§fn is_terminal(&self) -> bool
fn is_terminal(&self) -> bool
true
if the descriptor/handle refers to a terminal/tty.1.0.0 · Source§impl<I, A> Iterator for Box<I, A>
impl<I, A> Iterator for Box<I, A>
Source§fn next(&mut self) -> Option<<I as Iterator>::Item>
fn next(&mut self) -> Option<<I as Iterator>::Item>
Source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Source§fn nth(&mut self, n: usize) -> Option<<I as Iterator>::Item>
fn nth(&mut self, n: usize) -> Option<<I as Iterator>::Item>
n
th element of the iterator. Read moreSource§fn last(self) -> Option<<I as Iterator>::Item>
fn last(self) -> Option<<I as Iterator>::Item>
Source§fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
iter_next_chunk
#98326)N
values. Read more1.0.0 · Source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
Source§fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by
#77404)n
elements. Read more1.28.0 · Source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
1.0.0 · Source§fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
1.0.0 · Source§fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
Source§fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
iter_intersperse
#79524)separator
between adjacent
items of the original iterator. Read moreSource§fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
iter_intersperse
#79524)separator
between adjacent items of the original iterator. Read more1.0.0 · Source§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
1.0.0 · Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
1.0.0 · Source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
1.0.0 · Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
1.0.0 · Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
1.0.0 · Source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
1.57.0 · Source§fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
1.0.0 · Source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n
elements. Read more1.0.0 · Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n
elements, or fewer
if the underlying iterator ends sooner. Read more1.0.0 · Source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
1.29.0 · Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Source§fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
iter_map_windows
#87155)f
for each contiguous window of size N
over
self
and returns an iterator over the outputs of f
. Like slice::windows()
,
the windows during mapping overlap as well. Read more1.0.0 · Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Iterator
. Read moreSource§fn try_collect<B>(
&mut self,
) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
iterator_try_collect
#94047)Source§fn collect_into<E>(self, collection: &mut E) -> &mut E
fn collect_into<E>(self, collection: &mut E) -> &mut E
iter_collect_into
#94780)1.0.0 · Source§fn partition<B, F>(self, f: F) -> (B, B)
fn partition<B, F>(self, f: F) -> (B, B)
Source§fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
iter_partition_in_place
#62543)true
precede all those that return false
.
Returns the number of true
elements found. Read moreSource§fn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
iter_is_partitioned
#62544)true
precede all those that return false
. Read more1.27.0 · Source§fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
1.27.0 · Source§fn try_for_each<F, R>(&mut self, f: F) -> R
fn try_for_each<F, R>(&mut self, f: F) -> R
1.0.0 · Source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
1.51.0 · Source§fn reduce<F>(self, f: F) -> Option<Self::Item>
fn reduce<F>(self, f: F) -> Option<Self::Item>
Source§fn try_reduce<R>(
&mut self,
f: impl FnMut(Self::Item, Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
iterator_try_reduce
#87053)1.0.0 · Source§fn all<F>(&mut self, f: F) -> bool
fn all<F>(&mut self, f: F) -> bool
1.0.0 · Source§fn any<F>(&mut self, f: F) -> bool
fn any<F>(&mut self, f: F) -> bool
1.0.0 · Source§fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
1.30.0 · Source§fn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
Source§fn try_find<R>(
&mut self,
f: impl FnMut(&Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
try_find
#63178)1.0.0 · Source§fn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 · Source§fn rposition<P>(&mut self, predicate: P) -> Option<usize>
fn rposition<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 · Source§fn max(self) -> Option<Self::Item>
fn max(self) -> Option<Self::Item>
1.0.0 · Source§fn min(self) -> Option<Self::Item>
fn min(self) -> Option<Self::Item>
1.6.0 · Source§fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · Source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
1.6.0 · Source§fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · Source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
1.0.0 · Source§fn rev(self) -> Rev<Self>where
Self: Sized + DoubleEndedIterator,
fn rev(self) -> Rev<Self>where
Self: Sized + DoubleEndedIterator,
1.0.0 · Source§fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
1.36.0 · Source§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
Source§fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
iter_array_chunks
#100450)N
elements of the iterator at a time. Read more1.11.0 · Source§fn product<P>(self) -> P
fn product<P>(self) -> P
Source§fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
iter_order_by
#64295)Iterator
with those
of another with respect to the specified comparison function. Read more1.5.0 · Source§fn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
PartialOrd
elements of
this Iterator
with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned. Read moreSource§fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
iter_order_by
#64295)Iterator
with those
of another with respect to the specified comparison function. Read moreSource§fn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
iter_order_by
#64295)1.5.0 · Source§fn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Iterator
are lexicographically
less than those of another. Read more1.5.0 · Source§fn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Iterator
are lexicographically
less or equal to those of another. Read more1.5.0 · Source§fn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than those of another. Read more1.5.0 · Source§fn ge<I>(self, other: I) -> bool
fn ge<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than or equal to those of another. Read more1.82.0 · Source§fn is_sorted(self) -> bool
fn is_sorted(self) -> bool
1.82.0 · Source§fn is_sorted_by<F>(self, compare: F) -> bool
fn is_sorted_by<F>(self, compare: F) -> bool
1.82.0 · Source§fn is_sorted_by_key<F, K>(self, f: F) -> bool
fn is_sorted_by_key<F, K>(self, f: F) -> bool
§impl<T> JournalExt for Box<T>where
T: JournalExt + ?Sized,
impl<T> JournalExt for Box<T>where
T: JournalExt + ?Sized,
fn logs(&self) -> &[Log]
fn last_journal(&self) -> &[JournalEntry]
fn evm_state(&self) -> &HashMap<Address, Account, RandomState>
fn evm_state_mut(&mut self) -> &mut HashMap<Address, Account, RandomState>
§impl<L, S> Layer<S> for Box<L>where
L: Layer<S>,
S: Subscriber,
Available on crate features std
or alloc
only.
impl<L, S> Layer<S> for Box<L>where
L: Layer<S>,
S: Subscriber,
std
or alloc
only.§fn on_register_dispatch(&self, subscriber: &Dispatch)
fn on_register_dispatch(&self, subscriber: &Dispatch)
Subscriber
. Read more§fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
Attributes
and Id
.§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
Subscriber::register_callsite
. Read more§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 more§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
.§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
.§fn event_enabled(&self, event: &Event<'_>, ctx: Context<'_, S>) -> bool
fn event_enabled(&self, event: &Event<'_>, ctx: Context<'_, S>) -> bool
§fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)
§fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
§fn on_exit(&self, id: &Id, ctx: Context<'_, S>)
fn on_exit(&self, id: &Id, ctx: Context<'_, S>)
§fn on_close(&self, id: Id, ctx: Context<'_, S>)
fn on_close(&self, id: Id, ctx: Context<'_, S>)
§fn on_id_change(&self, old: &Id, new: &Id, ctx: Context<'_, S>)
fn on_id_change(&self, old: &Id, new: &Id, ctx: Context<'_, S>)
§fn and_then<L>(self, layer: L) -> Layered<L, Self, S>where
L: Layer<S>,
Self: Sized,
fn and_then<L>(self, layer: L) -> Layered<L, Self, S>where
L: Layer<S>,
Self: Sized,
Layer
, returning a Layered
struct implementing Layer
. Read more§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 more§fn with_filter<F>(self, filter: F) -> Filtered<Self, F, S>where
Self: Sized,
F: Filter<S>,
fn with_filter<F>(self, filter: F) -> Filtered<Self, F, S>where
Self: Sized,
F: Filter<S>,
registry
and std
only.§impl<N, T> NetworkWallet<N> for Box<T>
impl<N, T> NetworkWallet<N> for Box<T>
§fn default_signer_address(&self) -> Address
fn default_signer_address(&self) -> Address
NetworkWallet::sign_transaction_from
] when no specific signer is
specified.§fn has_signer_for(&self, address: &Address) -> bool
fn has_signer_for(&self, address: &Address) -> bool
§fn signer_addresses(&self) -> impl Iterator<Item = Address>
fn signer_addresses(&self) -> impl Iterator<Item = Address>
§fn sign_transaction_from(
&self,
sender: Address,
tx: <N as Network>::UnsignedTx,
) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
fn sign_transaction_from( &self, sender: Address, tx: <N as Network>::UnsignedTx, ) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
§fn sign_transaction(
&self,
tx: <N as Network>::UnsignedTx,
) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
fn sign_transaction( &self, tx: <N as Network>::UnsignedTx, ) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
§fn sign_request(
&self,
request: <N as Network>::TransactionRequest,
) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
fn sign_request( &self, request: <N as Network>::TransactionRequest, ) -> impl Send + Future<Output = Result<<N as Network>::TxEnvelope, Error>>
from
field.Source§impl<T: NodePrimitivesProvider + ?Sized> NodePrimitivesProvider for Box<T>
impl<T: NodePrimitivesProvider + ?Sized> NodePrimitivesProvider for Box<T>
Source§type Primitives = <T as NodePrimitivesProvider>::Primitives
type Primitives = <T as NodePrimitivesProvider>::Primitives
§impl<T> OpTxTr for Box<T>
impl<T> OpTxTr for Box<T>
fn enveloped_tx(&self) -> Option<&Bytes>
1.0.0 · Source§impl<T, A> Ord for Box<T, A>
impl<T, A> Ord for Box<T, A>
§impl<T> Parser for Box<T>where
T: Parser,
impl<T> Parser for Box<T>where
T: Parser,
§fn parse_from<I, It>(itr: I) -> Box<T>
fn parse_from<I, It>(itr: I) -> Box<T>
§fn try_parse_from<I, It>(itr: I) -> Result<Box<T>, Error>
fn try_parse_from<I, It>(itr: I) -> Result<Box<T>, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
1.0.0 · Source§impl<T, A> PartialOrd for Box<T, A>
impl<T, A> PartialOrd for Box<T, A>
§impl<CTX, T> PrecompileProvider<CTX> for Box<T>where
CTX: ContextTr,
T: PrecompileProvider<CTX> + ?Sized,
impl<CTX, T> PrecompileProvider<CTX> for Box<T>where
CTX: ContextTr,
T: PrecompileProvider<CTX> + ?Sized,
type Output = <T as PrecompileProvider<CTX>>::Output
fn set_spec(&mut self, spec: <<CTX as ContextTr>::Cfg as Cfg>::Spec)
§fn run(
&mut self,
context: &mut CTX,
address: &Address,
bytes: &Bytes,
gas_limit: u64,
) -> Result<Option<<Box<T> as PrecompileProvider<CTX>>::Output>, PrecompileError>
fn run( &mut self, context: &mut CTX, address: &Address, bytes: &Bytes, gas_limit: u64, ) -> Result<Option<<Box<T> as PrecompileProvider<CTX>>::Output>, PrecompileError>
§fn warm_addresses(&self) -> Box<impl Iterator<Item = Address>>
fn warm_addresses(&self) -> Box<impl Iterator<Item = Address>>
1.0.0 · Source§impl<R> Read for Box<R>
impl<R> Read for Box<R>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>
Source§fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
read_buf
#78485)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 is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
can_vector
#69941)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 moreSource§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
#78485)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 more§impl<T> Recorder for Box<T>where
T: Recorder + ?Sized,
impl<T> Recorder for Box<T>where
T: Recorder + ?Sized,
§fn describe_counter(
&self,
key: KeyName,
unit: Option<Unit>,
description: Cow<'static, str>,
)
fn describe_counter( &self, key: KeyName, unit: Option<Unit>, description: Cow<'static, str>, )
§fn describe_gauge(
&self,
key: KeyName,
unit: Option<Unit>,
description: Cow<'static, str>,
)
fn describe_gauge( &self, key: KeyName, unit: Option<Unit>, description: Cow<'static, str>, )
§fn describe_histogram(
&self,
key: KeyName,
unit: Option<Unit>,
description: Cow<'static, str>,
)
fn describe_histogram( &self, key: KeyName, unit: Option<Unit>, description: Cow<'static, str>, )
§fn register_counter(&self, key: &Key, metadata: &Metadata<'_>) -> Counter
fn register_counter(&self, key: &Key, metadata: &Metadata<'_>) -> Counter
§fn register_gauge(&self, key: &Key, metadata: &Metadata<'_>) -> Gauge
fn register_gauge(&self, key: &Key, metadata: &Metadata<'_>) -> Gauge
§fn register_histogram(&self, key: &Key, metadata: &Metadata<'_>) -> Histogram
fn register_histogram(&self, key: &Key, metadata: &Metadata<'_>) -> Histogram
Source§impl<R> RngCore for Box<R>
Available on crate feature alloc
only.
impl<R> RngCore for Box<R>
alloc
only.Source§fn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
dest
with random data. Read more1.0.0 · Source§impl<S> Seek for Box<S>
impl<S> Seek for Box<S>
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>
fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
seek_stream_len
#59359)Source§impl<T> Serialize for Box<T>
Available on crate features std
or alloc
only.
impl<T> Serialize for Box<T>
std
or alloc
only.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<Box<T>> for Box<U>where
U: SerializeAs<T>,
Available on crate feature alloc
only.
impl<T, U> SerializeAs<Box<T>> for Box<U>where
U: SerializeAs<T>,
alloc
only.Source§fn serialize_as<S>(
source: &Box<T>,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize_as<S>(
source: &Box<T>,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
§impl<Sig, U> Signer<Sig> for Box<U>
impl<Sig, U> Signer<Sig> for Box<U>
§fn sign_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Sig, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Box<U>: 'async_trait,
fn sign_hash<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 FixedBytes<32>,
) -> Pin<Box<dyn Future<Output = Result<Sig, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Box<U>: 'async_trait,
§fn sign_message<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Sig, Error>> + Send + 'async_trait>>
fn sign_message<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<Sig, Error>> + Send + 'async_trait>>
§fn set_chain_id(&mut self, chain_id: Option<u64>)
fn set_chain_id(&mut self, chain_id: Option<u64>)
§fn with_chain_id(self, chain_id: Option<u64>) -> Selfwhere
Self: Sized,
fn with_chain_id(self, chain_id: Option<u64>) -> Selfwhere
Self: Sized,
self
.§impl<Sig, U> SignerSync<Sig> for Box<U>where
U: SignerSync<Sig> + ?Sized,
impl<Sig, U> SignerSync<Sig> for Box<U>where
U: SignerSync<Sig> + ?Sized,
§fn sign_hash_sync(&self, hash: &FixedBytes<32>) -> Result<Sig, Error>
fn sign_hash_sync(&self, hash: &FixedBytes<32>) -> Result<Sig, Error>
§fn sign_message_sync(&self, message: &[u8]) -> Result<Sig, Error>
fn sign_message_sync(&self, message: &[u8]) -> Result<Sig, Error>
§fn chain_id_sync(&self) -> Option<u64>
fn chain_id_sync(&self) -> Option<u64>
§impl<S, Item> Sink<Item> for Box<S>
impl<S, Item> Sink<Item> for Box<S>
§fn poll_ready(
self: Pin<&mut Box<S>>,
cx: &mut Context<'_>,
) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>
fn poll_ready( self: Pin<&mut Box<S>>, cx: &mut Context<'_>, ) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>
Sink
to receive a value. Read more§fn start_send(
self: Pin<&mut Box<S>>,
item: Item,
) -> Result<(), <Box<S> as Sink<Item>>::Error>
fn start_send( self: Pin<&mut Box<S>>, item: Item, ) -> Result<(), <Box<S> as Sink<Item>>::Error>
poll_ready
which returned Poll::Ready(Ok(()))
. Read more§impl<T> Source for Box<T>where
T: Source + ?Sized,
impl<T> Source for Box<T>where
T: Source + ?Sized,
Source§impl<T: StateProofProvider + ?Sized> StateProofProvider for Box<T>
impl<T: StateProofProvider + ?Sized> StateProofProvider for Box<T>
Source§fn proof(
&self,
input: TrieInput,
address: Address,
slots: &[B256],
) -> ProviderResult<AccountProof>
fn proof( &self, input: TrieInput, address: Address, slots: &[B256], ) -> ProviderResult<AccountProof>
HashedPostState
on top of the current state.Source§fn multiproof(
&self,
input: TrieInput,
targets: MultiProofTargets,
) -> ProviderResult<MultiProof>
fn multiproof( &self, input: TrieInput, targets: MultiProofTargets, ) -> ProviderResult<MultiProof>
MultiProof
] for target hashed account and corresponding
hashed storage slot keys.Source§impl<T: StateProvider + ?Sized> StateProvider for Box<T>where
Box<T>: BlockHashReader + AccountReader + StateRootProvider + StorageRootProvider + StateProofProvider + HashedPostStateProvider + Send + Sync,
impl<T: StateProvider + ?Sized> StateProvider for Box<T>where
Box<T>: BlockHashReader + AccountReader + StateRootProvider + StorageRootProvider + StateProofProvider + HashedPostStateProvider + Send + Sync,
Source§fn storage(
&self,
account: Address,
storage_key: StorageKey,
) -> ProviderResult<Option<StorageValue>>
fn storage( &self, account: Address, storage_key: StorageKey, ) -> ProviderResult<Option<StorageValue>>
Source§fn bytecode_by_hash(&self, code_hash: &B256) -> ProviderResult<Option<Bytecode>>
fn bytecode_by_hash(&self, code_hash: &B256) -> ProviderResult<Option<Bytecode>>
Source§fn account_code(&self, addr: &Address) -> ProviderResult<Option<Bytecode>>
fn account_code(&self, addr: &Address) -> ProviderResult<Option<Bytecode>>
Source§fn account_balance(&self, addr: &Address) -> ProviderResult<Option<U256>>
fn account_balance(&self, addr: &Address) -> ProviderResult<Option<U256>>
Source§impl<T: StateProviderFactory + ?Sized> StateProviderFactory for Box<T>
impl<T: StateProviderFactory + ?Sized> StateProviderFactory for Box<T>
Source§fn latest(&self) -> ProviderResult<StateProviderBox>
fn latest(&self) -> ProviderResult<StateProviderBox>
Source§fn state_by_block_id(
&self,
block_id: BlockId,
) -> ProviderResult<StateProviderBox>
fn state_by_block_id( &self, block_id: BlockId, ) -> ProviderResult<StateProviderBox>
Source§fn state_by_block_number_or_tag(
&self,
number_or_tag: BlockNumberOrTag,
) -> ProviderResult<StateProviderBox>
fn state_by_block_number_or_tag( &self, number_or_tag: BlockNumberOrTag, ) -> ProviderResult<StateProviderBox>
Source§fn history_by_block_number(
&self,
block: BlockNumber,
) -> ProviderResult<StateProviderBox>
fn history_by_block_number( &self, block: BlockNumber, ) -> ProviderResult<StateProviderBox>
Source§fn history_by_block_hash(
&self,
block: BlockHash,
) -> ProviderResult<StateProviderBox>
fn history_by_block_hash( &self, block: BlockHash, ) -> ProviderResult<StateProviderBox>
Source§fn state_by_block_hash(
&self,
block: BlockHash,
) -> ProviderResult<StateProviderBox>
fn state_by_block_hash( &self, block: BlockHash, ) -> ProviderResult<StateProviderBox>
Source§fn pending(&self) -> ProviderResult<StateProviderBox>
fn pending(&self) -> ProviderResult<StateProviderBox>
Source§fn pending_state_by_hash(
&self,
block_hash: B256,
) -> ProviderResult<Option<StateProviderBox>>
fn pending_state_by_hash( &self, block_hash: B256, ) -> ProviderResult<Option<StateProviderBox>>
Source§impl<T: StateRootProvider + ?Sized> StateRootProvider for Box<T>
impl<T: StateRootProvider + ?Sized> StateRootProvider for Box<T>
Source§fn state_root(&self, hashed_state: HashedPostState) -> ProviderResult<B256>
fn state_root(&self, hashed_state: HashedPostState) -> ProviderResult<B256>
BundleState
on top of the current state. Read moreSource§fn state_root_from_nodes(&self, input: TrieInput) -> ProviderResult<B256>
fn state_root_from_nodes(&self, input: TrieInput) -> ProviderResult<B256>
HashedPostState
on top of the current state but reuses the
intermediate nodes to speed up the computation. It’s up to the caller to construct the
prefix sets and inform the provider of the trie paths that have changes.Source§fn state_root_with_updates(
&self,
hashed_state: HashedPostState,
) -> ProviderResult<(B256, TrieUpdates)>
fn state_root_with_updates( &self, hashed_state: HashedPostState, ) -> ProviderResult<(B256, TrieUpdates)>
HashedPostState
on top of the current state with trie
updates to be committed to the database.Source§fn state_root_from_nodes_with_updates(
&self,
input: TrieInput,
) -> ProviderResult<(B256, TrieUpdates)>
fn state_root_from_nodes_with_updates( &self, input: TrieInput, ) -> ProviderResult<(B256, TrieUpdates)>
StateRootProvider::state_root_from_nodes
for more info.Source§impl<T: StorageChangeSetReader + ?Sized> StorageChangeSetReader for Box<T>
impl<T: StorageChangeSetReader + ?Sized> StorageChangeSetReader for Box<T>
Source§fn storage_changeset(
&self,
block_number: BlockNumber,
) -> ProviderResult<Vec<(BlockNumberAddress, StorageEntry)>>
fn storage_changeset( &self, block_number: BlockNumber, ) -> ProviderResult<Vec<(BlockNumberAddress, StorageEntry)>>
db-api
only.Source§impl<T: StorageReader + ?Sized> StorageReader for Box<T>
impl<T: StorageReader + ?Sized> StorageReader for Box<T>
Source§fn plain_state_storages(
&self,
addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = B256>)>,
) -> ProviderResult<Vec<(Address, Vec<StorageEntry>)>>
fn plain_state_storages( &self, addresses_with_keys: impl IntoIterator<Item = (Address, impl IntoIterator<Item = B256>)>, ) -> ProviderResult<Vec<(Address, Vec<StorageEntry>)>>
Source§fn changed_storages_with_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<BTreeMap<Address, BTreeSet<B256>>>
fn changed_storages_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<Address, BTreeSet<B256>>>
Source§fn changed_storages_and_blocks_with_range(
&self,
range: RangeInclusive<BlockNumber>,
) -> ProviderResult<BTreeMap<(Address, B256), Vec<u64>>>
fn changed_storages_and_blocks_with_range( &self, range: RangeInclusive<BlockNumber>, ) -> ProviderResult<BTreeMap<(Address, B256), Vec<u64>>>
Source§impl<T: StorageRootProvider + ?Sized> StorageRootProvider for Box<T>
impl<T: StorageRootProvider + ?Sized> StorageRootProvider for Box<T>
Source§fn storage_root(
&self,
address: Address,
hashed_storage: HashedStorage,
) -> ProviderResult<B256>
fn storage_root( &self, address: Address, hashed_storage: HashedStorage, ) -> ProviderResult<B256>
HashedStorage
for target address on top of the current
state.Source§fn storage_proof(
&self,
address: Address,
slot: B256,
hashed_storage: HashedStorage,
) -> ProviderResult<StorageProof>
fn storage_proof( &self, address: Address, slot: B256, hashed_storage: HashedStorage, ) -> ProviderResult<StorageProof>
HashedStorage
for target slot on top of the current
state.Source§fn storage_multiproof(
&self,
address: Address,
slots: &[B256],
hashed_storage: HashedStorage,
) -> ProviderResult<StorageMultiProof>
fn storage_multiproof( &self, address: Address, slots: &[B256], hashed_storage: HashedStorage, ) -> ProviderResult<StorageMultiProof>
Source§impl<T: StorageTrieWriter + ?Sized> StorageTrieWriter for Box<T>
impl<T: StorageTrieWriter + ?Sized> StorageTrieWriter for Box<T>
Source§fn write_storage_trie_updates(
&self,
storage_tries: &B256Map<StorageTrieUpdates>,
) -> ProviderResult<usize>
fn write_storage_trie_updates( &self, storage_tries: &B256Map<StorageTrieUpdates>, ) -> ProviderResult<usize>
Source§fn write_individual_storage_trie_updates(
&self,
hashed_address: B256,
updates: &StorageTrieUpdates,
) -> ProviderResult<usize>
fn write_individual_storage_trie_updates( &self, hashed_address: B256, updates: &StorageTrieUpdates, ) -> ProviderResult<usize>
§impl<S> Strategy for Box<S>where
S: Strategy + ?Sized,
impl<S> Strategy for Box<S>where
S: Strategy + ?Sized,
§type Value = <S as Strategy>::Value
type Value = <S as Strategy>::Value
§fn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Box<S> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Box<S> as Strategy>::Tree, Reason>
§fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read more§fn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
§fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read more§fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
§fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
§fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
prop_ind_flat_map()
, but produces 2-tuples with the input
generated from self
in slot 0 and the derived strategy in slot 1. Read more§fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read more§fn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read more§fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
§fn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read more§fn prop_shuffle(self) -> Shuffle<Self>where
Self: Sized,
Self::Value: Shuffleable,
fn prop_shuffle(self) -> Shuffle<Self>where
Self: Sized,
Self::Value: Shuffleable,
§fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read more§impl<S> Stream for Box<S>
impl<S> Stream for Box<S>
§impl<T> Subcommand for Box<T>where
T: Subcommand,
impl<T> Subcommand for Box<T>where
T: Subcommand,
§fn augment_subcommands(cmd: Command) -> Command
fn augment_subcommands(cmd: Command) -> Command
§fn augment_subcommands_for_update(cmd: Command) -> Command
fn augment_subcommands_for_update(cmd: Command) -> Command
Command
] so it can instantiate self
via
[FromArgMatches::update_from_arg_matches_mut
] Read more§fn has_subcommand(name: &str) -> bool
fn has_subcommand(name: &str) -> bool
Self
can parse a specific subcommand§impl<S> Subscriber for Box<S>where
S: Subscriber + ?Sized,
impl<S> Subscriber for Box<S>where
S: Subscriber + ?Sized,
§fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
§fn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
Subscriber
will
enable, or None
, if the subscriber does not implement level-based
filtering or chooses not to implement this method. Read more§fn record_follows_from(&self, span: &Id, follows: &Id)
fn record_follows_from(&self, span: &Id, follows: &Id)
§fn event_enabled(&self, event: &Event<'_>) -> bool
fn event_enabled(&self, event: &Event<'_>) -> bool
Event
] should be recorded. Read more§fn clone_span(&self, id: &Id) -> Id
fn clone_span(&self, id: &Id) -> Id
§fn drop_span(&self, id: Id)
fn drop_span(&self, id: Id)
Subscriber::try_close
instead§fn current_span(&self) -> Current
fn current_span(&self) -> Current
§unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
self
is the same type as the provided TypeId
, returns an untyped
*const
pointer to that type. Otherwise, returns None
. Read more§fn on_register_dispatch(&self, subscriber: &Dispatch)
fn on_register_dispatch(&self, subscriber: &Dispatch)
Dispatch
]. Read more§impl<T> Transaction for Box<T>where
T: Transaction + ?Sized,
impl<T> Transaction for Box<T>where
T: Transaction + ?Sized,
type AccessList = <T as Transaction>::AccessList
type Authorization = <T as Transaction>::Authorization
§fn value(&self) -> Uint<256, 4>
fn value(&self) -> Uint<256, 4>
TxKind::Call
][primitives::TxKind::Call]. Read more§fn gas_price(&self) -> u128
fn gas_price(&self) -> u128
§fn access_list(&self) -> Option<&<Box<T> as Transaction>::AccessList>
fn access_list(&self) -> Option<&<Box<T> as Transaction>::AccessList>
§fn blob_versioned_hashes(&self) -> &[FixedBytes<32>]
fn blob_versioned_hashes(&self) -> &[FixedBytes<32>]
§fn max_fee_per_blob_gas(&self) -> u128
fn max_fee_per_blob_gas(&self) -> u128
§fn total_blob_gas(&self) -> u64
fn total_blob_gas(&self) -> u64
§fn calc_max_data_fee(&self) -> Uint<256, 4>
fn calc_max_data_fee(&self) -> Uint<256, 4>
data_fee
of the transaction. Read more§fn max_fee_per_gas(&self) -> u128
fn max_fee_per_gas(&self) -> u128
§fn max_priority_fee_per_gas(&self) -> Option<u128>
fn max_priority_fee_per_gas(&self) -> Option<u128>
§fn effective_gas_price(&self, base_fee: u128) -> u128
fn effective_gas_price(&self, base_fee: u128) -> u128
§impl<T> TransactionGetter for Box<T>where
T: TransactionGetter + ?Sized,
impl<T> TransactionGetter for Box<T>where
T: TransactionGetter + ?Sized,
type Transaction = <T as TransactionGetter>::Transaction
fn tx(&self) -> &<Box<T> as TransactionGetter>::Transaction
§impl<T> TrieCursor for Box<T>
impl<T> TrieCursor for Box<T>
§fn seek_exact(
&mut self,
key: Nibbles,
) -> Result<Option<(Nibbles, BranchNodeCompact)>, DatabaseError>
fn seek_exact( &mut self, key: Nibbles, ) -> Result<Option<(Nibbles, BranchNodeCompact)>, DatabaseError>
§fn seek(
&mut self,
key: Nibbles,
) -> Result<Option<(Nibbles, BranchNodeCompact)>, DatabaseError>
fn seek( &mut self, key: Nibbles, ) -> Result<Option<(Nibbles, BranchNodeCompact)>, DatabaseError>
Source§impl<T: TrieWriter + ?Sized> TrieWriter for Box<T>
impl<T: TrieWriter + ?Sized> TrieWriter for Box<T>
Source§fn write_trie_updates(
&self,
trie_updates: &TrieUpdates,
) -> ProviderResult<usize>
fn write_trie_updates( &self, trie_updates: &TrieUpdates, ) -> ProviderResult<usize>
§impl<Signature, T> TxSigner<Signature> for Box<T>where
T: TxSigner<Signature> + ?Sized,
impl<Signature, T> TxSigner<Signature> for Box<T>where
T: TxSigner<Signature> + ?Sized,
§fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut (dyn SignableTransaction<Signature> + 'static),
) -> Pin<Box<dyn Future<Output = Result<Signature, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Box<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,
Box<T>: 'async_trait,
§impl<Signature, T> TxSignerSync<Signature> for Box<T>where
T: TxSignerSync<Signature> + ?Sized,
impl<Signature, T> TxSignerSync<Signature> for Box<T>where
T: TxSignerSync<Signature> + ?Sized,
§fn sign_transaction_sync(
&self,
tx: &mut (dyn SignableTransaction<Signature> + 'static),
) -> Result<Signature, Error>
fn sign_transaction_sync( &self, tx: &mut (dyn SignableTransaction<Signature> + 'static), ) -> Result<Signature, Error>
§impl<T> ValueTree for Box<T>where
T: ValueTree + ?Sized,
impl<T> ValueTree for Box<T>where
T: ValueTree + ?Sized,
§fn simplify(&mut self) -> bool
fn simplify(&mut self) -> bool
§fn complicate(&mut self) -> bool
fn complicate(&mut self) -> bool
1.0.0 · Source§impl<W> Write for Box<W>
impl<W> Write for Box<W>
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
#69941)Source§fn flush(&mut self) -> Result<(), Error>
fn flush(&mut self) -> Result<(), Error>
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
#70436)§impl<'a, T> Writeable for Box<T>where
T: Writeable + ?Sized,
impl<'a, T> Writeable for Box<T>where
T: Writeable + ?Sized,
§fn write_to<W>(&self, sink: &mut W) -> Result<(), Error>
fn write_to<W>(&self, sink: &mut W) -> Result<(), Error>
write_to_parts
, and discards any
Part
annotations.§fn write_to_parts<W>(&self, sink: &mut W) -> Result<(), Error>where
W: PartsWrite + ?Sized,
fn write_to_parts<W>(&self, sink: &mut W) -> Result<(), Error>where
W: PartsWrite + ?Sized,
Part
annotations to the given sink. Errors from the
sink are bubbled up. The default implementation delegates to write_to
,
and doesn’t produce any Part
annotations.§fn writeable_length_hint(&self) -> LengthHint
fn writeable_length_hint(&self) -> LengthHint
§fn write_to_string(&self) -> Cow<'_, str>
fn write_to_string(&self) -> Cow<'_, str>
String
with the data from this Writeable
. Like ToString
,
but smaller and faster. Read more§fn writeable_cmp_bytes(&self, other: &[u8]) -> Ordering
fn writeable_cmp_bytes(&self, other: &[u8]) -> Ordering
Writeable
to the given bytes
without allocating a String to hold the Writeable
contents. Read moreimpl<T> CartablePointerLike for Box<T>
alloc
only.impl<T, U, A> CoerceUnsized<Box<U, A>> for Box<T, A>
impl<R> CryptoRng for Box<R>
alloc
only.impl<T> DecodeWithMemTracking for Box<T>where
T: DecodeWithMemTracking,
impl<T, A> DerefPure for Box<T, A>
impl<T, U> DispatchFromDyn<Box<U>> for Box<T>
impl<T> EncodeLike<Box<T>> for Twhere
T: Encode,
impl<T> EncodeLike<T> for Box<T>where
T: Encode,
impl<T> EncodeLike for Box<T>where
T: Encode + ?Sized,
impl<T, A> Eq for Box<T, A>
impl<I, A> FusedIterator for Box<I, A>
impl<T, A> PinCoerceUnsized for Box<T, A>
impl<T> PointerLike for Box<T>
impl<T> RawStream for Box<T>where
T: RawStream + ?Sized,
impl<'a, T> Sequence<'a> for Box<T>where
T: Sequence<'a>,
alloc
only.impl<T> StableDeref for Box<T>where
T: ?Sized,
alloc
only.