Skip to main content

DebugApi

Struct DebugApi 

Source
pub struct DebugApi<Eth>
where Eth: RpcNodeCore,
{ /* private fields */ }
Available on crate feature rpc only.
Expand description

debug API implementation.

This type provides the functionality for handling debug related requests.

Implementations§

Source§

impl<Eth> DebugApi<Eth>
where Eth: RpcNodeCore,

Source

pub fn new( eth_api: Eth, blocking_task_guard: BlockingTaskGuard, executor: &Runtime, stream: impl Stream<Item = ConsensusEngineEvent<<Eth as RpcNodeCore>::Primitives>> + Send + Unpin + 'static, ) -> DebugApi<Eth>

Create a new instance of the DebugApi

Source

pub fn eth_api(&self) -> &Eth

Access the underlying Eth API.

Source

pub fn provider(&self) -> &<Eth as RpcNodeCore>::Provider

Access the underlying provider.

Source§

impl<Eth> DebugApi<Eth>
where Eth: TraceExt,

Source

pub async fn debug_trace_raw_block( &self, rlp_block: Bytes, opts: GethDebugTracingOptions, ) -> Result<Vec<TraceResult<GethTrace, String>>, <Eth as EthApiTypes>::Error>

Replays the given block and returns the trace of each transaction.

This expects a rlp encoded block

Note, the parent of this block must be present, or it will fail.

The block is supplied by the caller, so its replay is bounded by a timeout of 30 seconds: no transaction starts after it expires, the request then fails with EthApiError::ExecutionTimedOut. The replay retains its tracing permit until the running transaction finishes.

Source

pub async fn debug_trace_block( &self, block_id: BlockId, opts: GethDebugTracingOptions, ) -> Result<Vec<TraceResult<GethTrace, String>>, <Eth as EthApiTypes>::Error>

Replays a block and returns the trace of each transaction.

Source

pub async fn debug_trace_transaction( &self, tx_hash: FixedBytes<32>, opts: GethDebugTracingOptions, ) -> Result<GethTrace, <Eth as EthApiTypes>::Error>

Trace the transaction according to the provided options.

Ref: https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers

Source

pub async fn debug_trace_call( &self, call: <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, block_id: Option<BlockId>, opts: GethDebugTracingCallOptions, ) -> Result<GethTrace, <Eth as EthApiTypes>::Error>

The debug_traceCall method lets you run an eth_call within the context of the given block execution using the final state of parent block as the base.

If tx_index is provided in opts, the call will be traced at the state after executing transactions up to the specified index within the block (0-indexed). If not provided, then uses the post-state (default behavior).

Differences compare to eth_call:

Source

pub async fn debug_trace_call_many( &self, bundles: Vec<Bundle<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest>>, state_context: Option<StateContext>, opts: Option<GethDebugTracingCallOptions>, ) -> Result<Vec<Vec<GethTrace>>, <Eth as EthApiTypes>::Error>

The debug_traceCallMany method lets you run an eth_callMany within the context of the given block execution using the first n transactions in the given block as base. Each following bundle increments block number by 1 and block timestamp by 12 seconds

Source

pub async fn debug_execution_witness_by_block_hash( &self, hash: FixedBytes<32>, mode: Option<ExecutionWitnessMode>, ) -> Result<ExecutionWitness, <Eth as EthApiTypes>::Error>

Generates an execution witness for the given block hash. see Self::debug_execution_witness for more info.

Source

pub async fn debug_execution_witness( &self, block_id: BlockId, mode: Option<ExecutionWitnessMode>, ) -> Result<ExecutionWitness, <Eth as EthApiTypes>::Error>

The debug_executionWitness method allows for re-execution of a block with the purpose of generating an execution witness. The witness comprises of a map of all hashed trie nodes to their preimages that were required during the execution of the block, including during state root recomputation.

Source

pub async fn debug_execution_witness_for_block( &self, block: Arc<RecoveredBlock<<<Eth as RpcNodeCore>::Provider as BlockReader>::Block>>, mode: ExecutionWitnessMode, ) -> Result<ExecutionWitness, <Eth as EthApiTypes>::Error>

Generates an execution witness, using the given recovered block.

Source

pub async fn debug_account_at( &self, block_id: BlockId, tx_index: Index, address: Address, ) -> Result<Option<TrieAccount>, <Eth as EthApiTypes>::Error>

Returns account information, including the storage root, after replaying the block through the transaction at the given index.

Source

pub async fn debug_account_info_at( &self, block_id: BlockId, tx_index: Index, address: Address, ) -> Result<Option<AccountInfo>, <Eth as EthApiTypes>::Error>

Returns account information after replaying the block through the transaction at the given index.

Source

pub async fn debug_code_by_hash( &self, hash: FixedBytes<32>, block_id: Option<BlockId>, ) -> Result<Option<Bytes>, <Eth as EthApiTypes>::Error>

Returns the code associated with a given hash at the specified block ID. If no code is found, it returns None. If no block ID is provided, it defaults to the latest block.

Source

pub async fn intermediate_roots( &self, block_hash: FixedBytes<32>, ) -> Result<Vec<FixedBytes<32>>, <Eth as EthApiTypes>::Error>

Executes a block and returns the state root after each transaction.

The block is either canonical or a bad block the engine rejected. Execution stops at the first transaction that is invalid on top of its predecessors, so the result for a bad block holds the roots before that transaction.

Trait Implementations§

Source§

impl<Eth> Clone for DebugApi<Eth>
where Eth: RpcNodeCore,

Source§

fn clone(&self) -> DebugApi<Eth>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<Eth> Debug for DebugApi<Eth>
where Eth: RpcNodeCore,

Source§

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

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

impl<Eth> DebugApiServer<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest> for DebugApi<Eth>

Source§

async fn raw_header( &self, block_id: BlockId, ) -> Result<Bytes, ErrorObject<'static>>

Handler for debug_getRawHeader

Source§

async fn raw_block( &self, block_id: BlockId, ) -> Result<Bytes, ErrorObject<'static>>

Handler for debug_getRawBlock

Source§

async fn raw_block_access_list( &self, block_id: BlockId, ) -> Result<Bytes, ErrorObject<'static>>

Handler for debug_getRawBlockAccessList

Source§

async fn raw_transaction( &self, hash: FixedBytes<32>, ) -> Result<Option<Bytes>, ErrorObject<'static>>

Handler for debug_getRawTransaction

If this is a pooled EIP-4844 transaction, the blob sidecar is included.

Returns the bytes of the transaction for the given hash.

Source§

async fn raw_transactions( &self, block_id: BlockId, ) -> Result<Vec<Bytes>, ErrorObject<'static>>

Handler for debug_getRawTransactions Returns the bytes of the transaction for the given hash.

Source§

async fn raw_receipts( &self, block_id: BlockId, ) -> Result<Vec<Bytes>, ErrorObject<'static>>

Handler for debug_getRawReceipts

Source§

async fn bad_blocks(&self) -> Result<Vec<Value>, ErrorObject<'static>>

Handler for debug_getBadBlocks

Source§

async fn debug_clear_txpool(&self) -> Result<(), ErrorObject<'static>>

Handler for debug_clearTxpool

Source§

async fn debug_subscribe( &self, pending: PendingSubscriptionSink, subscription: String, start_exclusive: BlockNumberOrTag, end_inclusive: BlockNumberOrTag, opts: Option<GethDebugTracingOptions>, ) -> Result<(), SubscriptionError>

Handler for debug_subscribe("traceChain", ...).

Source§

async fn debug_trace_block( &self, rlp_block: Bytes, opts: Option<GethDebugTracingOptions>, ) -> Result<Vec<TraceResult<GethTrace, String>>, ErrorObject<'static>>

Handler for debug_traceBlock

Source§

async fn debug_trace_block_by_hash( &self, block: FixedBytes<32>, opts: Option<GethDebugTracingOptions>, ) -> Result<Vec<TraceResult<GethTrace, String>>, ErrorObject<'static>>

Handler for debug_traceBlockByHash

Source§

async fn debug_trace_block_by_number( &self, block: BlockNumberOrTag, opts: Option<GethDebugTracingOptions>, ) -> Result<Vec<TraceResult<GethTrace, String>>, ErrorObject<'static>>

Handler for debug_traceBlockByNumber

Source§

async fn debug_trace_transaction( &self, tx_hash: FixedBytes<32>, opts: Option<GethDebugTracingOptions>, ) -> Result<GethTrace, ErrorObject<'static>>

Handler for debug_traceTransaction

Source§

async fn debug_trace_call( &self, request: <<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, block_id: Option<BlockId>, opts: Option<GethDebugTracingCallOptions>, ) -> Result<GethTrace, ErrorObject<'static>>

Handler for debug_traceCall

Source§

async fn debug_execution_witness( &self, block: BlockId, mode: Option<ExecutionWitnessMode>, ) -> Result<ExecutionWitness, ErrorObject<'static>>

Handler for debug_executionWitness

Source§

async fn debug_execution_witness_by_block_hash( &self, hash: FixedBytes<32>, mode: Option<ExecutionWitnessMode>, ) -> Result<ExecutionWitness, ErrorObject<'static>>

Handler for debug_executionWitnessByBlockHash

Source§

async fn debug_account_at( &self, block_id: BlockId, tx_index: Index, address: Address, ) -> Result<Option<TrieAccount>, ErrorObject<'static>>

Handler for debug_accountAt

Source§

async fn debug_account_info_at( &self, block_id: BlockId, tx_index: Index, address: Address, ) -> Result<Option<AccountInfo>, ErrorObject<'static>>

Handler for debug_accountInfoAt

Source§

async fn debug_db_get( &self, key: String, ) -> Result<Option<Bytes>, ErrorObject<'static>>

debug_db_get - database key lookup

Currently supported:

Source§

async fn debug_trace_call_many( &self, bundles: Vec<Bundle<<<Eth as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest>>, state_context: Option<StateContext>, opts: Option<GethDebugTracingCallOptions>, ) -> Result<Vec<Vec<GethTrace>>, ErrorObject<'static>>

The debug_traceCallMany method lets you run an eth_callMany within the context of the given block execution using the final state of parent block as the base followed by n transactions. Read more
Source§

async fn debug_account_range( &self, _block_number: BlockNumberOrTag, _start: Bytes, _max_results: u64, _nocode: bool, _nostorage: bool, _incompletes: bool, ) -> Result<(), ErrorObject<'static>>

Enumerates all accounts at a given block with paging capability. maxResults are returned in the page and the items have keys that come after the start key (hashed address). Read more
Source§

async fn debug_chaindb_compact(&self) -> Result<(), ErrorObject<'static>>

Flattens the entire key-value database into a single level, removing all unused slots and merging all keys.
Source§

async fn debug_chain_config(&self) -> Result<ChainConfig, ErrorObject<'static>>

Returns the current chain config.
Source§

async fn debug_chaindb_property( &self, _property: String, ) -> Result<(), ErrorObject<'static>>

Returns leveldb properties of the key-value database.
Source§

async fn debug_code_by_hash( &self, hash: FixedBytes<32>, block_id: Option<BlockId>, ) -> Result<Option<Bytes>, ErrorObject<'static>>

Returns the code associated with a given hash at the specified block ID. If no block ID is provided, it defaults to the latest block.
Source§

async fn debug_db_ancient( &self, _kind: String, _number: u64, ) -> Result<(), ErrorObject<'static>>

Retrieves an ancient binary blob from the freezer. The freezer is a collection of append-only immutable files. The first argument kind specifies which table to look up data from. The list of all table kinds are as follows:
Source§

async fn debug_db_ancients(&self) -> Result<(), ErrorObject<'static>>

Returns the number of ancient items in the ancient store.
Source§

async fn debug_dump_block( &self, _number: BlockId, ) -> Result<(), ErrorObject<'static>>

Retrieves the state that corresponds to the block number and returns a list of accounts (including storage and code).
Source§

async fn debug_free_os_memory(&self) -> Result<(), ErrorObject<'static>>

Forces garbage collection.
Source§

async fn debug_gc_stats(&self) -> Result<(), ErrorObject<'static>>

Returns garbage collection statistics.
Source§

async fn debug_get_accessible_state( &self, _from: BlockNumberOrTag, _to: BlockNumberOrTag, ) -> Result<(), ErrorObject<'static>>

Returns the first number where the node has accessible state on disk. This is the post-state of that block and the pre-state of the next block. The (from, to) parameters are the sequence of blocks to search, which can go either forwards or backwards. Read more
Source§

async fn debug_get_modified_accounts_by_hash( &self, _start_hash: FixedBytes<32>, _end_hash: FixedBytes<32>, ) -> Result<(), ErrorObject<'static>>

Returns all accounts that have changed between the two blocks specified. A change is defined as a difference in nonce, balance, code hash, or storage hash. With one parameter, returns the list of accounts modified in the specified block.
Source§

async fn debug_get_modified_accounts_by_number( &self, _start_number: u64, _end_number: u64, ) -> Result<(), ErrorObject<'static>>

Returns all accounts that have changed between the two blocks specified. A change is defined as a difference in nonce, balance, code hash or storage hash.
Source§

async fn debug_intermediate_roots( &self, block_hash: FixedBytes<32>, _opts: Option<GethDebugTracingCallOptions>, ) -> Result<Vec<FixedBytes<32>>, ErrorObject<'static>>

Executes a canonical or bad block, and returns a list of intermediate roots: the stateroot after each transaction up to the first invalid one.
Source§

async fn debug_mem_stats(&self) -> Result<(), ErrorObject<'static>>

Returns detailed runtime memory statistics.
Source§

async fn debug_preimage( &self, _hash: FixedBytes<32>, ) -> Result<(), ErrorObject<'static>>

Returns the preimage for a sha3 hash, if known.
Source§

async fn debug_print_block( &self, _number: u64, ) -> Result<(), ErrorObject<'static>>

Retrieves a block and returns its pretty printed form.
Source§

async fn debug_seed_hash( &self, _number: u64, ) -> Result<FixedBytes<32>, ErrorObject<'static>>

Fetches and retrieves the seed hash of the block by number.
Source§

async fn debug_set_gc_percent( &self, _v: i32, ) -> Result<(), ErrorObject<'static>>

Sets the garbage collection target percentage. A negative value disables garbage collection.
Source§

async fn debug_set_head( &self, _number: Uint<64, 1>, ) -> Result<(), ErrorObject<'static>>

Sets the current head of the local chain by block number. Note, this is a destructive action and may severely damage your chain. Use with extreme caution.
Source§

async fn debug_set_trie_flush_interval( &self, _interval: String, ) -> Result<(), ErrorObject<'static>>

Configures how often in-memory state tries are persisted to disk. The interval needs to be in a format parsable by a time.Duration. Note that the interval is not wall-clock time. Rather it is accumulated block processing time after which the state should be flushed.
Source§

async fn debug_standard_trace_bad_block_to_file( &self, _block: BlockNumberOrTag, _opts: Option<GethDebugTracingCallOptions>, ) -> Result<(), ErrorObject<'static>>

Used to obtain info about a block.
Source§

async fn debug_standard_trace_block_to_file( &self, _block: BlockNumberOrTag, _opts: Option<GethDebugTracingCallOptions>, ) -> Result<(), ErrorObject<'static>>

This method is similar to debug_standardTraceBlockToFile, but can be used to obtain info about a block which has been rejected as invalid (for some reason).
Source§

async fn debug_state_root_with_updates( &self, hashed_state: HashedPostState, block_id: Option<BlockId>, ) -> Result<(FixedBytes<32>, TrieUpdates), ErrorObject<'static>>

Returns the state root of the HashedPostState on top of the state for the given block with trie updates.
Source§

async fn debug_storage_range_at( &self, _block_hash: FixedBytes<32>, _tx_idx: usize, _contract_address: Address, _key_start: FixedBytes<32>, _max_result: u64, ) -> Result<(), ErrorObject<'static>>

Returns the storage at the given block height and transaction index. The result can be paged by providing a maxResult to cap the number of storage slots returned as well as specifying the offset via keyStart (hash of storage key).
Source§

async fn debug_trace_bad_block( &self, block_hash: FixedBytes<32>, opts: Option<GethDebugTracingCallOptions>, ) -> Result<Vec<TraceResult<GethTrace, String>>, ErrorObject<'static>>

Returns the structured logs created during the execution of EVM against a block pulled from the pool of bad ones and returns them as a JSON object. For the second parameter see TraceConfig reference.
Source§

fn into_rpc(self) -> RpcModule<Self>
where TxReq: Send + Sync + 'static + DeserializeOwned,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Auto Trait Implementations§

§

impl<Eth> !RefUnwindSafe for DebugApi<Eth>

§

impl<Eth> !UnwindSafe for DebugApi<Eth>

§

impl<Eth> Freeze for DebugApi<Eth>
where Arc<DebugApiInner<Eth>>: Freeze,

§

impl<Eth> Send for DebugApi<Eth>
where Arc<DebugApiInner<Eth>>: Send,

§

impl<Eth> Sync for DebugApi<Eth>
where Arc<DebugApiInner<Eth>>: Sync,

§

impl<Eth> Unpin for DebugApi<Eth>
where Arc<DebugApiInner<Eth>>: Unpin,

§

impl<Eth> UnsafeUnpin for DebugApi<Eth>
where Arc<DebugApiInner<Eth>>: UnsafeUnpin,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> MaybeDebug for T
where T: Debug,

§

impl<T> NonStaticAny for T
where T: ?Sized,

§

fn type_id(&self) -> TypeId

Returns the lifetime-erased type ID of self.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

impl<T> TryClone for T
where T: Clone,

§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 8 bytes