pub struct ValidatorConfigV2 {
pub config: <Config as StorableType>::Handler,
pub validators: <Vec<ValidatorRecord> as StorableType>::Handler,
pub address_to_index: <Mapping<Address, u64> as StorableType>::Handler,
pub pubkey_to_index: <Mapping<B256, u64> as StorableType>::Handler,
pub next_network_identity_rotation_epoch: <u64 as StorableType>::Handler,
pub active_ingress_ips: <Mapping<B256, bool> as StorableType>::Handler,
pub active_indices: <Vec<u64> as StorableType>::Handler,
address: Address,
storage: StorageCtx,
}Fields§
§config: <Config as StorableType>::Handler§validators: <Vec<ValidatorRecord> as StorableType>::Handler§address_to_index: <Mapping<Address, u64> as StorableType>::Handler§pubkey_to_index: <Mapping<B256, u64> as StorableType>::Handler§next_network_identity_rotation_epoch: <u64 as StorableType>::Handler§active_ingress_ips: <Mapping<B256, bool> as StorableType>::Handler§active_indices: <Vec<u64> as StorableType>::Handler§address: Address§storage: StorageCtxImplementations§
Source§impl ValidatorConfigV2
impl ValidatorConfigV2
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an instance of the precompile.
Caution: This does not initialize the account, see Self::initialize.
fn __new(address: Address) -> Self
fn __initialize(&mut self) -> Result<()>
fn emit_event(&mut self, event: impl IntoLogData) -> Result<()>
pub fn emitted_events(&self) -> &Vec<LogData>
test-utils only.pub fn clear_emitted_events(&mut self)
test-utils only.pub fn assert_emitted_events(&self, expected: Vec<impl IntoLogData>)
test-utils only.Source§impl ValidatorConfigV2
impl ValidatorConfigV2
Sourcepub fn initialize(&mut self, owner: Address) -> Result<()>
pub fn initialize(&mut self, owner: Address) -> Result<()>
Initializes the validator config V2 precompile.
The contract is fully operational immediately: is_init is set to true and all mutating
functions (add_validator, rotate_validator, etc.) are unlocked.
For V1 migration, the contract is NOT initialized — instead migrate_validator manually
copies validators and initialize_if_migrated flips is_init once all have been migrated.
Sourcepub fn get_initialized_at_height(&self) -> Result<u64>
pub fn get_initialized_at_height(&self) -> Result<u64>
Returns the block height at which the contract was initialized.
Only meaningful when is_initialized returns true.
Sourcepub fn is_initialized(&self) -> Result<bool>
pub fn is_initialized(&self) -> Result<bool>
Returns whether V2 has been initialized (either directly or via migration).
When false, the CL reads from V1 and mutating operations (except
deactivate_validator and migration functions) are blocked.
Sourcepub fn validator_count(&self) -> Result<u64>
pub fn validator_count(&self) -> Result<u64>
Returns the total number of validators ever added, including deactivated entries and rotation snapshots.
Sourcefn get_active_validator(&self, idx: u64) -> Result<ValidatorRecord>
fn get_active_validator(&self, idx: u64) -> Result<ValidatorRecord>
Returns the validator at the given global index, or errors if the index is out of bounds or the validator has been deactivated.
fn read_validator_at(&self, index: u64) -> Result<Validator>
Sourcepub fn validator_by_index(&self, index: u64) -> Result<Validator>
pub fn validator_by_index(&self, index: u64) -> Result<Validator>
Returns the validator registry at the given global index in the validators array.
§Errors
ValidatorNotFound—indexis out of bounds
Sourcepub fn validator_by_address(&self, addr: Address) -> Result<Validator>
pub fn validator_by_address(&self, addr: Address) -> Result<Validator>
Looks up a validator registry by its address.
Returns the current entry for the address (after any rotations or transfers).
§Errors
ValidatorNotFound— the address has never been registered
Sourcepub fn validator_by_public_key(&self, pubkey: B256) -> Result<Validator>
pub fn validator_by_public_key(&self, pubkey: B256) -> Result<Validator>
Looks up a validator by its Ed25519 public key.
For rotated validators, the old public key resolves to the deactivated snapshot, while the new key resolves to the in-place active entry.
§Errors
ValidatorNotFound— the public key has never been registered
Sourcepub fn get_active_validators(&self) -> Result<Vec<Validator>>
pub fn get_active_validators(&self) -> Result<Vec<Validator>>
Returns only active validators (where deactivatedAtHeight == 0).
NOTE: the order of returned validator records is NOT stable and should NOT be relied upon.
Sourcepub fn get_next_network_identity_rotation_epoch(&self) -> Result<u64>
pub fn get_next_network_identity_rotation_epoch(&self) -> Result<u64>
Returns the epoch at which a network identity rotation will be triggered.
fn validate_endpoints(ingress: &str, egress: &str) -> Result<()>
Sourcefn ingress_key(ingress: &str) -> Result<B256>
fn ingress_key(ingress: &str) -> Result<B256>
Parses ingress as an <ip>:<port> pair and returns the hash of the
ingress’ binary representation.
For V4 addresses, that’s keccak256(octets(ip) || big_endian(port)).
For V6 addresses, that’s keccak256(octets(ip) || big_endian(scope_id) || big_endian(port)).
fn require_unique_ingress(&self, ingress: &str) -> Result<B256>
fn update_ingress_ip_tracking( &mut self, old_ingress: &str, new_ingress: &str, ) -> Result<()>
fn append_validator( &mut self, addr: Address, pubkey: B256, ingress: String, egress: String, fee_recipient: Address, added_at_height: u64, deactivated_at_height: u64, ) -> Result<u64>
Sourcefn require_new_address(&self, addr: Address) -> Result<()>
fn require_new_address(&self, addr: Address) -> Result<()>
Allows reusing addresses of deactivated validators.
fn require_new_pubkey(&self, pubkey: B256) -> Result<()>
Sourcefn verify_validator_signature(
&self,
kind: SignatureKind,
pubkey: &B256,
signature: &[u8],
validator_address: Address,
ingress: &str,
egress: &str,
) -> Result<()>
fn verify_validator_signature( &self, kind: SignatureKind, pubkey: &B256, signature: &[u8], validator_address: Address, ingress: &str, egress: &str, ) -> Result<()>
Verifies a validator signature for add or rotate operations.
Constructs the message according to the validator config v2 specification and verifies the Ed25519 signature using the appropriate namespace.
Sourcepub fn add_validator(
&mut self,
sender: Address,
call: addValidatorCall,
) -> Result<u64>
pub fn add_validator( &mut self, sender: Address, call: addValidatorCall, ) -> Result<u64>
Adds a new validator to the set (owner only).
Requires a valid Ed25519 signature, using the VALIDATOR_NS_ADD namespace, over
keccak256(chainId || contractAddr || validatorAddr || len(ingress) || ingress || len(egress) || egress || feeRecipient)
which proves that the caller controls the private key corresponding to publicKey.
§Errors
NotInitialized— the contract has not been initializedUnauthorized—senderis not the ownerInvalidPublicKey—publicKeyis zero or not a valid Ed25519 keyPublicKeyAlreadyExists— the public key is already registeredInvalidValidatorAddress—validatorAddressis zeroAddressAlreadyHasValidator— the address belongs to an active validatorNotIpPort/NotIp— endpoints fail validationIngressAlreadyExists— the new ingress is already in useInvalidSignature— signature verification fails
Sourcepub fn deactivate_validator(
&mut self,
sender: Address,
call: deactivateValidatorCall,
) -> Result<()>
pub fn deactivate_validator( &mut self, sender: Address, call: deactivateValidatorCall, ) -> Result<()>
Deactivates a validator by setting its deactivatedAtHeight to the current
block height (owner or the validator itself).
The validator’s entry remains in storage for historical queries and its public key stays reserved forever. The ingress IP is freed for reuse.
Does NOT require initialization — can be called during the migration window.
Uses swap-and-pop on active_indices for O(1) removal.
§Errors
ValidatorNotFound—idxis out of boundsValidatorAlreadyDeleted— the validator is already deactivatedUnauthorized—senderis neither the owner nor the validator
Sourcepub fn transfer_ownership(
&mut self,
sender: Address,
call: transferOwnershipCall,
) -> Result<()>
pub fn transfer_ownership( &mut self, sender: Address, call: transferOwnershipCall, ) -> Result<()>
Transfers ownership of the contract to a new address (owner only).
§Errors
InvalidOwner—newOwnerisaddress(0)Unauthorized—senderis not the ownerNotInitialized— the contract has not been initialized
Sourcepub fn set_network_identity_rotation_epoch(
&mut self,
sender: Address,
call: setNetworkIdentityRotationEpochCall,
) -> Result<()>
pub fn set_network_identity_rotation_epoch( &mut self, sender: Address, call: setNetworkIdentityRotationEpochCall, ) -> Result<()>
Sets the epoch at which a rotation of the network identity will be triggered.
If E is ahead of the network’s current epoch, the network will perform a
Distribute-Key-Generation (DKG) ceremony to rotate its identity at the new epoch E.
- If the DKG ceremony is successful, then epoch
E+1will run with a new network identity. - If
Eis not ahead of the network epoch this value is ignored.
Sourcepub fn rotate_validator(
&mut self,
sender: Address,
call: rotateValidatorCall,
) -> Result<()>
pub fn rotate_validator( &mut self, sender: Address, call: rotateValidatorCall, ) -> Result<()>
Rotates a validator to a new identity (owner or the validator itself).
Atomically:
- Appends a deactivated snapshot of the old identity to the tail of
validators - Overwrites the slot in-place with new pubkey, endpoints, and
addedAtHeight = now
The validator’s global index, active_idx, address_to_index pointer, and
position in active_indices are all preserved — only pubkey_to_index is
updated (old key -> snapshot, new key -> original slot).
Requires a valid Ed25519 signature, using the VALIDATOR_NS_ROTATE namespace, over
keccak256(chainId || contractAddr || validatorAddr || len(ingress) || ingress || len(egress) || egress)
which proves that the caller controls the private key corresponding to publicKey.
§Errors
ValidatorNotFound/ValidatorAlreadyDeleted—idxis invalidNotInitialized/Unauthorized— auth failureInvalidPublicKey/PublicKeyAlreadyExists— the new key is invalidNotIpPort/NotIp/IngressAlreadyExists— endpoint validation failureInvalidSignature— signature verification fails
Sourcepub fn set_fee_recipient(
&mut self,
sender: Address,
call: setFeeRecipientCall,
) -> Result<()>
pub fn set_fee_recipient( &mut self, sender: Address, call: setFeeRecipientCall, ) -> Result<()>
Updates the fee recipient address for a validator (owner or the validator itself).
§Errors
NotInitialized— the contract has not been initializedValidatorNotFound/ValidatorAlreadyDeleted—idxis invalidUnauthorized—senderis neither the owner nor the validator
Sourcepub fn set_ip_addresses(
&mut self,
sender: Address,
call: setIpAddressesCall,
) -> Result<()>
pub fn set_ip_addresses( &mut self, sender: Address, call: setIpAddressesCall, ) -> Result<()>
Updates a validator’s ingress and egress addresses (owner or the validator itself).
§Errors
NotInitialized— the contract has not been initializedValidatorNotFound/ValidatorAlreadyDeleted—idxis invalidUnauthorized—senderis neither the owner nor the validatorNotIpPort/NotIp— the new endpoints fail validationIngressAlreadyExists— the new ingress is already in use.
Sourcepub fn transfer_validator_ownership(
&mut self,
sender: Address,
call: transferValidatorOwnershipCall,
) -> Result<()>
pub fn transfer_validator_ownership( &mut self, sender: Address, call: transferValidatorOwnershipCall, ) -> Result<()>
Transfers a validator entry to a new address (owner or the validator itself).
Updates the validator’s address in the lookup maps: deletes the old address_to_index
entry and creates a new one pointing to the same slot.
§Errors
ValidatorNotFound/ValidatorAlreadyDeleted—idxis invalidNotInitialized/Unauthorized— auth failureInvalidValidatorAddress—newAddressis zeroAddressAlreadyHasValidator—newAddressbelongs to an active validator
Sourcefn require_migration_owner(&mut self, caller: Address) -> Result<Config>
fn require_migration_owner(&mut self, caller: Address) -> Result<Config>
On the very first migration call the V2 owner is still zero, so we copy it from V1 before checking authorization. Returns the (potentially updated) config for reuse.
§Errors
AlreadyInitialized— V2 is already initializedUnauthorized—calleris not the owner (after copying from V1 if needed)
Sourcepub fn migrate_validator(
&mut self,
sender: Address,
call: migrateValidatorCall,
) -> Result<()>
pub fn migrate_validator( &mut self, sender: Address, call: migrateValidatorCall, ) -> Result<()>
Migrates a single validator from V1 to V2 (owner only).
Must be called once per V1 validator, in reverse index order.
On the first call, copies the owner from V1 if V2’s owner is address(0).
Validators are skipped (not reverted) when:
- The public key is not a valid Ed25519 key
- The egress address cannot be parsed as a
SocketAddr - The public key or ingress IP is a duplicate of an already-migrated entry
Active V1 validators get deactivatedAtHeight = 0; inactive ones get
deactivatedAtHeight = block.number.
§Errors
Unauthorized—senderis not the ownerAlreadyInitialized— V2 is already initializedInvalidMigrationIndex—idxis out of order
Sourcepub fn initialize_if_migrated(&mut self, sender: Address) -> Result<()>
pub fn initialize_if_migrated(&mut self, sender: Address) -> Result<()>
Finalizes V1 -> V2 migration by setting is_init = true.
Should only be called after all V1 validators have been migrated via
migrate_validator. Copies nextDkgCeremony
from V1. After this call, the CL reads from V2 instead of V1 and all
mutating functions are unlocked.
§Errors
Unauthorized—senderis not the ownerAlreadyInitialized— V2 is already initializedMigrationNotComplete—validator_count + skipped < v1.validator_count
Source§impl ValidatorConfigV2
impl ValidatorConfigV2
Sourcepub fn create_precompile(cfg: &CfgEnv<TempoHardfork>) -> DynPrecompile
pub fn create_precompile(cfg: &CfgEnv<TempoHardfork>) -> DynPrecompile
Creates the EVM precompile for this type.
Trait Implementations§
Source§impl ContractStorage for ValidatorConfigV2
impl ContractStorage for ValidatorConfigV2
Source§fn storage(&self) -> &StorageCtx
fn storage(&self) -> &StorageCtx
Source§fn storage_mut(&mut self) -> &mut StorageCtx
fn storage_mut(&mut self) -> &mut StorageCtx
Source§fn is_initialized(&self) -> Result<bool>
fn is_initialized(&self) -> Result<bool>
Source§impl Default for ValidatorConfigV2
impl Default for ValidatorConfigV2
Source§impl Precompile for ValidatorConfigV2
impl Precompile for ValidatorConfigV2
Auto Trait Implementations§
impl !Freeze for ValidatorConfigV2
impl !RefUnwindSafe for ValidatorConfigV2
impl Send for ValidatorConfigV2
impl !Sync for ValidatorConfigV2
impl Unpin for ValidatorConfigV2
impl UnsafeUnpin for ValidatorConfigV2
impl UnwindSafe for ValidatorConfigV2
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
§fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
TxEnv] from a transaction and a sender address.§impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
impl<TxEnv, T> FromTxWithEncoded<&T> for TxEnvwhere
TxEnv: FromTxWithEncoded<T>,
§fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
fn from_encoded_tx(tx: &&T, sender: Address, encoded: Bytes) -> TxEnv
TxEnv] from a transaction, its sender, and encoded transaction bytes.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
propagate-header only.§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,
add-extension only.§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,
map-request-body only.§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,
map-response-body only.§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
compression-br or compression-deflate or compression-gzip or compression-zstd only.§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
trace only.§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
trace only.§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
follow-redirect only.§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,
sensitive-headers only.§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,
sensitive-headers only.§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,
sensitive-headers only.§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,
set-header only.§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,
set-header only.§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,
set-header only.§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,
set-header only.§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,
set-header only.§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,
set-header only.§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,
request-id only.§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,
request-id only.x-request-id as the header name. Read more§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,
request-id only.§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
request-id only.x-request-id as the header name. Read more§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
catch-panic only.500 Internal Server responses. Read more§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
limit only.413 Payload Too Large responses. Read more§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
normalize-path only.§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
normalize-path only.§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
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: 1024 bytes