pub struct JsonRpcHandler {
pub api: Api,
pub origin_caller: Option<OriginForwarder>,
}Expand description
This object will be used as a shared state between HTTP calls. Is similar to the HttpApiHandler but is with extended functionality and is used for JSON-RPC methods
Fields§
§api: Api§origin_caller: Option<OriginForwarder>Implementations§
Source§impl JsonRpcHandler
The definitions of JSON-RPC read endpoints defined in starknet_api_openrpc.json
impl JsonRpcHandler
The definitions of JSON-RPC read endpoints defined in starknet_api_openrpc.json
Sourcepub fn spec_version(&self) -> StrictRpcResult
pub fn spec_version(&self) -> StrictRpcResult
starknet_specVersion
Sourcepub async fn get_block_with_tx_hashes(
&self,
block_id: BlockId,
) -> StrictRpcResult
pub async fn get_block_with_tx_hashes( &self, block_id: BlockId, ) -> StrictRpcResult
starknet_getBlockWithTxHashes
Sourcepub async fn get_block_with_txs(&self, block_id: BlockId) -> StrictRpcResult
pub async fn get_block_with_txs(&self, block_id: BlockId) -> StrictRpcResult
starknet_getBlockWithTxs
Sourcepub async fn get_block_with_receipts(
&self,
block_id: BlockId,
) -> StrictRpcResult
pub async fn get_block_with_receipts( &self, block_id: BlockId, ) -> StrictRpcResult
starknet_getBlockWithReceipts
Sourcepub async fn get_state_update(&self, block_id: BlockId) -> StrictRpcResult
pub async fn get_state_update(&self, block_id: BlockId) -> StrictRpcResult
starknet_getStateUpdate
Sourcepub async fn get_storage_at(
&self,
contract_address: ContractAddress,
key: PatriciaKey,
block_id: BlockId,
) -> StrictRpcResult
pub async fn get_storage_at( &self, contract_address: ContractAddress, key: PatriciaKey, block_id: BlockId, ) -> StrictRpcResult
starknet_getStorageAt
Sourcepub async fn get_storage_proof(
&self,
data: GetStorageProofInput,
) -> StrictRpcResult
pub async fn get_storage_proof( &self, data: GetStorageProofInput, ) -> StrictRpcResult
starknet_getStorageProof
Sourcepub async fn get_transaction_by_hash(
&self,
transaction_hash: TransactionHash,
) -> StrictRpcResult
pub async fn get_transaction_by_hash( &self, transaction_hash: TransactionHash, ) -> StrictRpcResult
starknet_getTransactionByHash
Sourcepub async fn get_transaction_status_by_hash(
&self,
transaction_hash: TransactionHash,
) -> StrictRpcResult
pub async fn get_transaction_status_by_hash( &self, transaction_hash: TransactionHash, ) -> StrictRpcResult
starknet_getTransactionStatus
Sourcepub async fn get_transaction_by_block_id_and_index(
&self,
block_id: BlockId,
index: u64,
) -> StrictRpcResult
pub async fn get_transaction_by_block_id_and_index( &self, block_id: BlockId, index: u64, ) -> StrictRpcResult
starknet_getTransactionByBlockIdAndIndex
Sourcepub async fn get_transaction_receipt_by_hash(
&self,
transaction_hash: TransactionHash,
) -> StrictRpcResult
pub async fn get_transaction_receipt_by_hash( &self, transaction_hash: TransactionHash, ) -> StrictRpcResult
starknet_getTransactionReceipt
Sourcepub async fn get_class(
&self,
block_id: BlockId,
class_hash: ClassHash,
) -> StrictRpcResult
pub async fn get_class( &self, block_id: BlockId, class_hash: ClassHash, ) -> StrictRpcResult
starknet_getClass
Sourcepub async fn get_compiled_casm(&self, class_hash: ClassHash) -> StrictRpcResult
pub async fn get_compiled_casm(&self, class_hash: ClassHash) -> StrictRpcResult
starknet_getCompiledCasm
Sourcepub async fn get_class_at(
&self,
block_id: BlockId,
contract_address: ContractAddress,
) -> StrictRpcResult
pub async fn get_class_at( &self, block_id: BlockId, contract_address: ContractAddress, ) -> StrictRpcResult
starknet_getClassAt
Sourcepub async fn get_class_hash_at(
&self,
block_id: BlockId,
contract_address: ContractAddress,
) -> StrictRpcResult
pub async fn get_class_hash_at( &self, block_id: BlockId, contract_address: ContractAddress, ) -> StrictRpcResult
starknet_getClassHashAt
Sourcepub async fn get_block_txs_count(&self, block_id: BlockId) -> StrictRpcResult
pub async fn get_block_txs_count(&self, block_id: BlockId) -> StrictRpcResult
starknet_getBlockTransactionCount
Sourcepub async fn call(
&self,
block_id: BlockId,
request: FunctionCall,
) -> StrictRpcResult
pub async fn call( &self, block_id: BlockId, request: FunctionCall, ) -> StrictRpcResult
starknet_call
Sourcepub async fn estimate_fee(
&self,
block_id: BlockId,
request: Vec<BroadcastedTransaction>,
simulation_flags: Vec<SimulationFlag>,
) -> StrictRpcResult
pub async fn estimate_fee( &self, block_id: BlockId, request: Vec<BroadcastedTransaction>, simulation_flags: Vec<SimulationFlag>, ) -> StrictRpcResult
starknet_estimateFee
pub async fn estimate_message_fee( &self, block_id: &BlockId, message: MsgFromL1, ) -> StrictRpcResult
Sourcepub async fn block_number(&self) -> StrictRpcResult
pub async fn block_number(&self) -> StrictRpcResult
starknet_blockNumber
Sourcepub async fn block_hash_and_number(&self) -> StrictRpcResult
pub async fn block_hash_and_number(&self) -> StrictRpcResult
starknet_blockHashAndNumber
Sourcepub async fn chain_id(&self) -> StrictRpcResult
pub async fn chain_id(&self) -> StrictRpcResult
starknet_chainId
Sourcepub async fn syncing(&self) -> StrictRpcResult
pub async fn syncing(&self) -> StrictRpcResult
starknet_syncing
Sourcepub async fn get_events(&self, filter: EventFilter) -> StrictRpcResult
pub async fn get_events(&self, filter: EventFilter) -> StrictRpcResult
starknet_getEvents
Sourcepub async fn get_nonce(
&self,
block_id: BlockId,
contract_address: ContractAddress,
) -> StrictRpcResult
pub async fn get_nonce( &self, block_id: BlockId, contract_address: ContractAddress, ) -> StrictRpcResult
starknet_getNonce
Sourcepub async fn simulate_transactions(
&self,
block_id: BlockId,
transactions: Vec<BroadcastedTransaction>,
simulation_flags: Vec<SimulationFlag>,
) -> StrictRpcResult
pub async fn simulate_transactions( &self, block_id: BlockId, transactions: Vec<BroadcastedTransaction>, simulation_flags: Vec<SimulationFlag>, ) -> StrictRpcResult
starknet_simulateTransactions
Sourcepub async fn get_trace_transaction(
&self,
transaction_hash: TransactionHash,
) -> StrictRpcResult
pub async fn get_trace_transaction( &self, transaction_hash: TransactionHash, ) -> StrictRpcResult
starknet_traceTransaction
Sourcepub async fn get_trace_block_transactions(
&self,
block_id: BlockId,
) -> StrictRpcResult
pub async fn get_trace_block_transactions( &self, block_id: BlockId, ) -> StrictRpcResult
starknet_traceBlockTransactions
Sourcepub async fn get_messages_status(
&self,
__arg1: L1TransactionHashInput,
) -> StrictRpcResult
pub async fn get_messages_status( &self, __arg1: L1TransactionHashInput, ) -> StrictRpcResult
starknet_getMessagesStatus
Sourcepub async fn get_predeployed_accounts(
&self,
params: Option<PredeployedAccountsQuery>,
) -> StrictRpcResult
pub async fn get_predeployed_accounts( &self, params: Option<PredeployedAccountsQuery>, ) -> StrictRpcResult
devnet_getPredeployedAccounts
Sourcepub async fn get_account_balance(&self, params: BalanceQuery) -> StrictRpcResult
pub async fn get_account_balance(&self, params: BalanceQuery) -> StrictRpcResult
devnet_getAccountBalance
Sourcepub async fn get_devnet_config(&self) -> StrictRpcResult
pub async fn get_devnet_config(&self) -> StrictRpcResult
devnet_getConfig
Source§impl JsonRpcHandler
The definitions of JSON-RPC read endpoints defined in starknet_ws_api.json
impl JsonRpcHandler
The definitions of JSON-RPC read endpoints defined in starknet_ws_api.json
pub async fn execute_ws_subscription( &self, request: JsonRpcSubscriptionRequest, rpc_request_id: Id, socket_id: SocketId, ) -> Result<(), ApiError>
Sourcepub async fn subscribe_new_txs(
&self,
maybe_subscription_input: Option<TransactionSubscriptionInput>,
rpc_request_id: Id,
socket_id: SocketId,
) -> Result<(), ApiError>
pub async fn subscribe_new_txs( &self, maybe_subscription_input: Option<TransactionSubscriptionInput>, rpc_request_id: Id, socket_id: SocketId, ) -> Result<(), ApiError>
Does not return TOO_MANY_ADDRESSES_IN_FILTER
Sourcepub async fn subscribe_new_tx_receipts(
&self,
maybe_subscription_input: Option<TransactionReceiptSubscriptionInput>,
rpc_request_id: Id,
socket_id: SocketId,
) -> Result<(), ApiError>
pub async fn subscribe_new_tx_receipts( &self, maybe_subscription_input: Option<TransactionReceiptSubscriptionInput>, rpc_request_id: Id, socket_id: SocketId, ) -> Result<(), ApiError>
Does not return TOO_MANY_ADDRESSES_IN_FILTER
Source§impl JsonRpcHandler
impl JsonRpcHandler
pub fn new(api: Api) -> JsonRpcHandler
pub async fn re_execute(&self, events: &[RpcMethodCall]) -> Result<(), RpcError>
Source§impl JsonRpcHandler
impl JsonRpcHandler
pub async fn add_declare_transaction( &self, request: BroadcastedDeclareTransaction, ) -> StrictRpcResult
pub async fn add_deploy_account_transaction( &self, request: BroadcastedDeployAccountTransaction, ) -> StrictRpcResult
pub async fn add_invoke_transaction( &self, request: BroadcastedInvokeTransaction, ) -> StrictRpcResult
Sourcepub async fn impersonate_account(
&self,
address: ContractAddress,
) -> StrictRpcResult
pub async fn impersonate_account( &self, address: ContractAddress, ) -> StrictRpcResult
devnet_impersonateAccount
Sourcepub async fn stop_impersonating_account(
&self,
address: ContractAddress,
) -> StrictRpcResult
pub async fn stop_impersonating_account( &self, address: ContractAddress, ) -> StrictRpcResult
devnet_stopImpersonateAccount
Sourcepub async fn set_auto_impersonate(
&self,
auto_impersonation: bool,
) -> StrictRpcResult
pub async fn set_auto_impersonate( &self, auto_impersonation: bool, ) -> StrictRpcResult
devnet_autoImpersonate | devnet_stopAutoImpersonate
Sourcepub async fn dump(&self, path: Option<DumpPath>) -> StrictRpcResult
pub async fn dump(&self, path: Option<DumpPath>) -> StrictRpcResult
devnet_dump
Sourcepub async fn load(&self, path: String) -> StrictRpcResult
pub async fn load(&self, path: String) -> StrictRpcResult
devnet_load
Sourcepub async fn postman_load(
&self,
data: PostmanLoadL1MessagingContract,
) -> StrictRpcResult
pub async fn postman_load( &self, data: PostmanLoadL1MessagingContract, ) -> StrictRpcResult
devnet_postmanLoad
Sourcepub async fn postman_flush(
&self,
data: Option<FlushParameters>,
) -> StrictRpcResult
pub async fn postman_flush( &self, data: Option<FlushParameters>, ) -> StrictRpcResult
devnet_postmanFlush
Sourcepub async fn postman_send_message_to_l2(
&self,
message: MessageToL2,
) -> StrictRpcResult
pub async fn postman_send_message_to_l2( &self, message: MessageToL2, ) -> StrictRpcResult
devnet_postmanSendMessageToL2
Sourcepub async fn postman_consume_message_from_l2(
&self,
message: MessageToL1,
) -> StrictRpcResult
pub async fn postman_consume_message_from_l2( &self, message: MessageToL1, ) -> StrictRpcResult
devnet_postmanConsumeMessageFromL2
Sourcepub async fn create_block(&self) -> StrictRpcResult
pub async fn create_block(&self) -> StrictRpcResult
devnet_createBlock
Sourcepub async fn abort_blocks(&self, data: AbortingBlocks) -> StrictRpcResult
pub async fn abort_blocks(&self, data: AbortingBlocks) -> StrictRpcResult
devnet_abortBlocks
Sourcepub async fn accept_on_l1(&self, data: AcceptOnL1Request) -> StrictRpcResult
pub async fn accept_on_l1(&self, data: AcceptOnL1Request) -> StrictRpcResult
devnet_acceptOnL1
Sourcepub async fn set_gas_price(
&self,
data: GasModificationRequest,
) -> StrictRpcResult
pub async fn set_gas_price( &self, data: GasModificationRequest, ) -> StrictRpcResult
devnet_setGasPrice
Sourcepub async fn restart(&self, data: Option<RestartParameters>) -> StrictRpcResult
pub async fn restart(&self, data: Option<RestartParameters>) -> StrictRpcResult
devnet_restart
Sourcepub async fn set_time(&self, data: SetTime) -> StrictRpcResult
pub async fn set_time(&self, data: SetTime) -> StrictRpcResult
devnet_setTime
Sourcepub async fn increase_time(&self, data: IncreaseTime) -> StrictRpcResult
pub async fn increase_time(&self, data: IncreaseTime) -> StrictRpcResult
devnet_increaseTime
Sourcepub async fn mint(&self, request: MintTokensRequest) -> StrictRpcResult
pub async fn mint(&self, request: MintTokensRequest) -> StrictRpcResult
devnet_mint
Trait Implementations§
Source§impl Clone for JsonRpcHandler
impl Clone for JsonRpcHandler
Source§fn clone(&self) -> JsonRpcHandler
fn clone(&self) -> JsonRpcHandler
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl RpcHandler for JsonRpcHandler
impl RpcHandler for JsonRpcHandler
Source§type Request = JsonRpcRequest
type Request = JsonRpcRequest
Source§fn on_request<'life0, 'async_trait>(
&'life0 self,
request: Self::Request,
original_call: RpcMethodCall,
) -> Pin<Box<dyn Future<Output = ResponseResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_request<'life0, 'async_trait>(
&'life0 self,
request: Self::Request,
original_call: RpcMethodCall,
) -> Pin<Box<dyn Future<Output = ResponseResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn on_call<'life0, 'async_trait>(
&'life0 self,
call: RpcMethodCall,
) -> Pin<Box<dyn Future<Output = RpcResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_call<'life0, 'async_trait>(
&'life0 self,
call: RpcMethodCall,
) -> Pin<Box<dyn Future<Output = RpcResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
RpcMethodCall Read moreAuto Trait Implementations§
impl Freeze for JsonRpcHandler
impl !RefUnwindSafe for JsonRpcHandler
impl Send for JsonRpcHandler
impl Sync for JsonRpcHandler
impl Unpin for JsonRpcHandler
impl !UnwindSafe for JsonRpcHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
fn internal_rewrite(&mut self, value: &mut (T0, T1)) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
impl<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere
TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite(&mut self, value: &mut Box<T>) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Box<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite( &mut self, value: &mut Option<T>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
Source§impl<K, V, E, TRewriter> SemanticRewriter<OrderedHashMap<K, V>, E> for TRewriter
impl<K, V, E, TRewriter> SemanticRewriter<OrderedHashMap<K, V>, E> for TRewriter
fn internal_rewrite( &mut self, value: &mut OrderedHashMap<K, V>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite( &mut self, value: &mut Result<T, E2>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
T: Clone,
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite(&mut self, value: &mut Vec<T>) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<Vec<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
Source§impl<T, E, TRewriter> SemanticRewriter<VecDeque<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
impl<T, E, TRewriter> SemanticRewriter<VecDeque<T>, E> for TRewriterwhere
TRewriter: SemanticRewriter<T, E>,
fn internal_rewrite( &mut self, value: &mut VecDeque<T>, ) -> Result<RewriteResult, E>
fn rewrite(&mut self, value: T) -> Result<T, Error>
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
Source§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
Source§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Source§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
Source§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
Source§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
Source§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Source§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
x-request-id as the header name. Read moreSource§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Source§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
x-request-id as the header name. Read moreSource§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read moreSource§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read moreSource§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
Source§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.