pub struct AuthorityState {
    pub name: AuthorityName,
    pub secret: StableSyncAuthoritySigner,
    pub indexes: Option<Arc<IndexStore>>,
    pub subscription_handler: Arc<SubscriptionHandler>,
    pub metrics: Arc<AuthorityMetrics>,
    pub overload_info: AuthorityOverloadInfo,
    /* private fields */
}

Fields§

§name: AuthorityName

The name of this authority.

§secret: StableSyncAuthoritySigner

The signature key of the authority.

§indexes: Option<Arc<IndexStore>>§subscription_handler: Arc<SubscriptionHandler>§metrics: Arc<AuthorityMetrics>§overload_info: AuthorityOverloadInfo

Current overload status in this authority. Updated periodically.

Implementations§

source§

impl AuthorityState

The authority state encapsulates all state, drives execution, and ensures safety.

Note the authority operations can be accessed through a read ref (&) and do not require &mut. Internally a database is synchronized through a mutex lock.

Repeating valid commands should produce no changes and return no error.

source

pub fn is_validator(&self, epoch_store: &AuthorityPerEpochStore) -> bool

source

pub fn is_fullnode(&self, epoch_store: &AuthorityPerEpochStore) -> bool

source

pub fn committee_store(&self) -> &Arc<CommitteeStore>

source

pub fn clone_committee_store(&self) -> Arc<CommitteeStore>

source

pub fn overload_config(&self) -> &AuthorityOverloadConfig

source

pub fn get_epoch_state_commitments( &self, epoch: EpochId ) -> SuiResult<Option<Vec<CheckpointCommitment>>>

source

pub async fn handle_transaction( &self, epoch_store: &Arc<AuthorityPerEpochStore>, transaction: VerifiedTransaction ) -> SuiResult<HandleTransactionResponse>

Initiate a new transaction.

source

pub fn check_system_overload_at_signing(&self) -> bool

source

pub fn check_system_overload_at_execution(&self) -> bool

source

pub async fn fullnode_execute_certificate_with_effects( &self, transaction: &VerifiedExecutableTransaction, effects: &VerifiedCertifiedTransactionEffects, epoch_store: &Arc<AuthorityPerEpochStore> ) -> SuiResult

Executes a transaction that’s known to have correct effects. For such transaction, we don’t have to wait for consensus to set shared object locks because we already know the shared object versions based on the effects. This function can be called by a fullnode only.

source

pub async fn execute_certificate( &self, certificate: &VerifiedCertificate, epoch_store: &Arc<AuthorityPerEpochStore> ) -> SuiResult<VerifiedSignedTransactionEffects>

Executes a certificate for its effects.

source

pub async fn try_execute_immediately( &self, certificate: &VerifiedExecutableTransaction, expected_effects_digest: Option<TransactionEffectsDigest>, epoch_store: &Arc<AuthorityPerEpochStore> ) -> SuiResult<(TransactionEffects, Option<ExecutionError>)>

Internal logic to execute a certificate.

Guarantees that

  • If input objects are available, return no permanent failure.
  • Execution and output commit are atomic. i.e. outputs are only written to storage, on successful execution; crashed execution has no observable effect and can be retried.

It is caller’s responsibility to ensure input objects are available and locks are set. If this cannot be satisfied by the caller, execute_certificate() should be called instead.

Should only be called within sui-core.

source

pub async fn read_objects_for_execution( &self, certificate: &VerifiedExecutableTransaction, epoch_store: &Arc<AuthorityPerEpochStore> ) -> SuiResult<InputObjects>

source

pub async fn try_execute_for_test( &self, certificate: &VerifiedCertificate ) -> SuiResult<(VerifiedSignedTransactionEffects, Option<ExecutionError>)>

Test only wrapper for try_execute_immediately() above, useful for checking errors if the pre-conditions are not satisfied, and executing change epoch transactions.

source

pub async fn notify_read_effects( &self, certificate: &VerifiedCertificate ) -> SuiResult<TransactionEffects>

source

pub fn prepare_certificate_for_benchmark( &self, certificate: &VerifiedExecutableTransaction, input_objects: InputObjects, epoch_store: &Arc<AuthorityPerEpochStore> ) -> SuiResult<(InnerTemporaryStore, TransactionEffects, Option<ExecutionError>)>

source

pub async fn dry_exec_transaction( &self, transaction: TransactionData, transaction_digest: TransactionDigest ) -> SuiResult<(DryRunTransactionBlockResponse, BTreeMap<ObjectID, (ObjectRef, Object, WriteKind)>, TransactionEffects, Option<ObjectID>)>

source

pub async fn dry_exec_transaction_for_benchmark( &self, transaction: TransactionData, transaction_digest: TransactionDigest ) -> SuiResult<(DryRunTransactionBlockResponse, BTreeMap<ObjectID, (ObjectRef, Object, WriteKind)>, TransactionEffects, Option<ObjectID>)>

source

pub async fn dev_inspect_transaction_block( &self, sender: SuiAddress, transaction_kind: TransactionKind, gas_price: Option<u64>, gas_budget: Option<u64>, gas_sponsor: Option<SuiAddress>, gas_objects: Option<Vec<ObjectRef>>, show_raw_txn_data_and_effects: Option<bool>, skip_checks: Option<bool> ) -> SuiResult<DevInspectResults>

The object ID for gas can be any object ID, even for an uncreated object

source

pub fn reference_gas_price_for_testing(&self) -> Result<u64, Error>

source

pub fn is_tx_already_executed( &self, digest: &TransactionDigest ) -> SuiResult<bool>

source

pub fn unixtime_now_ms() -> u64

source

pub async fn handle_transaction_info_request( &self, request: TransactionInfoRequest ) -> SuiResult<TransactionInfoResponse>

source

pub async fn handle_object_info_request( &self, request: ObjectInfoRequest ) -> SuiResult<ObjectInfoResponse>

source

pub fn handle_checkpoint_request( &self, request: &CheckpointRequest ) -> SuiResult<CheckpointResponse>

source

pub fn handle_checkpoint_request_v2( &self, request: &CheckpointRequestV2 ) -> SuiResult<CheckpointResponseV2>

source

pub async fn new( name: AuthorityName, secret: StableSyncAuthoritySigner, supported_protocol_versions: SupportedProtocolVersions, store: Arc<AuthorityStore>, execution_cache: Arc<ExecutionCache>, epoch_store: Arc<AuthorityPerEpochStore>, committee_store: Arc<CommitteeStore>, indexes: Option<Arc<IndexStore>>, checkpoint_store: Arc<CheckpointStore>, prometheus_registry: &Registry, genesis_objects: &[Object], db_checkpoint_config: &DBCheckpointConfig, config: NodeConfig, indirect_objects_threshold: usize, archive_readers: ArchiveReaderBalancer ) -> Arc<Self>

source

pub fn get_execution_cache(&self) -> Arc<ExecutionCache>

source

pub fn get_cache_reader(&self) -> &Arc<dyn ExecutionCacheRead>

source

pub fn get_backing_store(&self) -> &Arc<dyn BackingStore + Send + Sync>

source

pub fn get_backing_package_store( &self ) -> &Arc<dyn BackingPackageStore + Send + Sync>

source

pub fn get_effects_notify_read(&self) -> &NotifyReadWrapper<ExecutionCache>

source

pub fn get_object_store(&self) -> &Arc<dyn ObjectStore + Send + Sync>

source

pub fn get_reconfig_api(&self) -> &Arc<dyn ExecutionCacheReconfigAPI>

source

pub fn get_accumulator_store(&self) -> &Arc<dyn AccumulatorStore>

source

pub fn get_checkpoint_cache(&self) -> &Arc<dyn CheckpointCache>

source

pub fn get_state_sync_store(&self) -> &Arc<dyn StateSyncAPI>

source

pub fn get_cache_commit(&self) -> &Arc<dyn ExecutionCacheCommit>

source

pub fn database_for_testing(&self) -> &Arc<AuthorityStore>

source

pub async fn prune_checkpoints_for_eligible_epochs_for_testing( &self, config: NodeConfig, metrics: Arc<AuthorityStorePruningMetrics> ) -> Result<()>

source

pub fn transaction_manager(&self) -> &Arc<TransactionManager>

source

pub fn enqueue_certificates_for_execution( &self, certs: Vec<VerifiedCertificate>, epoch_store: &Arc<AuthorityPerEpochStore> )

Adds certificates to transaction manager for ordered execution. It is unnecessary to persist the certificates into the pending_execution table, because only Narwhal output needs to be persisted.

source

pub async fn execution_lock_for_executable_transaction( &self, transaction: &VerifiedExecutableTransaction ) -> SuiResult<RwLockReadGuard<'_, EpochId>>

Attempts to acquire execution lock for an executable transaction. Returns the lock if the transaction is matching current executed epoch Returns None otherwise

source

pub async fn execution_lock_for_reconfiguration( &self ) -> RwLockWriteGuard<'_, EpochId>

source

pub async fn reconfigure( &self, cur_epoch_store: &AuthorityPerEpochStore, supported_protocol_versions: SupportedProtocolVersions, new_committee: Committee, epoch_start_configuration: EpochStartConfiguration, checkpoint_executor: &CheckpointExecutor, accumulator: Arc<StateAccumulator>, expensive_safety_check_config: &ExpensiveSafetyCheckConfig ) -> SuiResult<Arc<AuthorityPerEpochStore>>

source

pub fn current_epoch_for_testing(&self) -> EpochId

source

pub fn checkpoint_all_dbs( &self, checkpoint_path: &Path, cur_epoch_store: &AuthorityPerEpochStore, checkpoint_indexes: bool ) -> SuiResult

source

pub fn load_epoch_store_one_call_per_task( &self ) -> Guard<Arc<AuthorityPerEpochStore>>

Load the current epoch store. This can change during reconfiguration. To ensure that we never end up accessing different epoch stores in a single task, we need to make sure that this is called once per task. Each call needs to be carefully audited to ensure it is the case. This also means we should minimize the number of call-sites. Only call it when there is no way to obtain it from somewhere else.

source

pub fn epoch_store_for_testing(&self) -> Guard<Arc<AuthorityPerEpochStore>>

source

pub fn clone_committee_for_testing(&self) -> Committee

source

pub async fn get_object( &self, object_id: &ObjectID ) -> SuiResult<Option<Object>>

source

pub async fn get_sui_system_package_object_ref(&self) -> SuiResult<ObjectRef>

source

pub fn get_sui_system_state_object_for_testing( &self ) -> SuiResult<SuiSystemState>

source

pub fn get_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber ) -> SuiResult<Option<VerifiedCheckpoint>>

source

pub fn get_transaction_checkpoint_for_tests( &self, digest: &TransactionDigest, epoch_store: &AuthorityPerEpochStore ) -> SuiResult<Option<VerifiedCheckpoint>>

source

pub fn get_object_read(&self, object_id: &ObjectID) -> SuiResult<ObjectRead>

source

pub fn get_chain_identifier(&self) -> Option<ChainIdentifier>

Chain Identifier is the digest of the genesis checkpoint.

source

pub fn get_move_object<T>(&self, object_id: &ObjectID) -> SuiResult<T>

source

pub fn get_past_object_read( &self, object_id: &ObjectID, version: SequenceNumber ) -> SuiResult<PastObjectRead>

This function aims to serve rpc reads on past objects and we don’t expect it to be called for other purposes. Depending on the object pruning policies that will be enforced in the future there is no software-level guarantee/SLA to retrieve an object with an old version even if it exists/existed.

source

pub fn get_owner_objects( &self, owner: SuiAddress, cursor: Option<ObjectID>, limit: usize, filter: Option<SuiObjectDataFilter> ) -> SuiResult<Vec<ObjectInfo>>

source

pub fn get_owned_coins_iterator_with_cursor( &self, owner: SuiAddress, cursor: (String, ObjectID), limit: usize, one_coin_type_only: bool ) -> SuiResult<impl Iterator<Item = (String, ObjectID, CoinInfo)> + '_>

source

pub fn get_owner_objects_iterator( &self, owner: SuiAddress, cursor: Option<ObjectID>, filter: Option<SuiObjectDataFilter> ) -> SuiResult<impl Iterator<Item = ObjectInfo> + '_>

source

pub async fn get_move_objects<T>( &self, owner: SuiAddress, type_: MoveObjectType ) -> SuiResult<Vec<T>>

source

pub fn get_dynamic_fields( &self, owner: ObjectID, cursor: Option<ObjectID>, limit: usize ) -> SuiResult<Vec<(ObjectID, DynamicFieldInfo)>>

source

pub fn get_dynamic_field_object_id( &self, owner: ObjectID, name_type: TypeTag, name_bcs_bytes: &[u8] ) -> SuiResult<Option<ObjectID>>

source

pub fn get_total_transaction_blocks(&self) -> SuiResult<u64>

source

pub async fn get_executed_transaction_and_effects( &self, digest: TransactionDigest, kv_store: Arc<TransactionKeyValueStore> ) -> SuiResult<(Transaction, TransactionEffects)>

source

pub fn multi_get_checkpoint_by_sequence_number( &self, sequence_numbers: &[CheckpointSequenceNumber] ) -> SuiResult<Vec<Option<VerifiedCheckpoint>>>

source

pub fn get_transaction_events( &self, digest: &TransactionEventsDigest ) -> SuiResult<TransactionEvents>

source

pub fn get_transaction_input_objects( &self, effects: &TransactionEffects ) -> Result<Vec<Object>>

source

pub fn get_transaction_output_objects( &self, effects: &TransactionEffects ) -> Result<Vec<Object>>

source

pub fn loaded_child_object_versions( &self, transaction_digest: &TransactionDigest ) -> SuiResult<Option<Vec<(ObjectID, SequenceNumber)>>>

source

pub async fn get_transactions_for_tests( self: &Arc<Self>, filter: Option<TransactionFilter>, cursor: Option<TransactionDigest>, limit: Option<usize>, reverse: bool ) -> SuiResult<Vec<TransactionDigest>>

source

pub async fn get_transactions( &self, kv_store: &Arc<TransactionKeyValueStore>, filter: Option<TransactionFilter>, cursor: Option<TransactionDigest>, limit: Option<usize>, reverse: bool ) -> SuiResult<Vec<TransactionDigest>>

source

pub fn get_checkpoint_store(&self) -> &Arc<CheckpointStore>

source

pub fn get_latest_checkpoint_sequence_number( &self ) -> SuiResult<CheckpointSequenceNumber>

source

pub fn get_checkpoint_summary_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber ) -> SuiResult<CheckpointSummary>

source

pub fn get_checkpoint_summary_by_digest( &self, digest: CheckpointDigest ) -> SuiResult<CheckpointSummary>

source

pub fn find_publish_txn_digest( &self, package_id: ObjectID ) -> SuiResult<TransactionDigest>

source

pub fn find_genesis_txn_digest(&self) -> SuiResult<TransactionDigest>

source

pub fn get_verified_checkpoint_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber ) -> SuiResult<VerifiedCheckpoint>

source

pub fn get_verified_checkpoint_summary_by_digest( &self, digest: CheckpointDigest ) -> SuiResult<VerifiedCheckpoint>

source

pub fn get_checkpoint_contents( &self, digest: CheckpointContentsDigest ) -> SuiResult<CheckpointContents>

source

pub fn get_checkpoint_contents_by_sequence_number( &self, sequence_number: CheckpointSequenceNumber ) -> SuiResult<CheckpointContents>

source

pub async fn query_events( &self, kv_store: &Arc<TransactionKeyValueStore>, query: EventFilter, cursor: Option<EventID>, limit: usize, descending: bool ) -> SuiResult<Vec<SuiEvent>>

source

pub async fn insert_genesis_object(&self, object: Object)

source

pub async fn insert_genesis_objects(&self, objects: &[Object])

source

pub fn get_transaction_status( &self, transaction_digest: &TransactionDigest, epoch_store: &Arc<AuthorityPerEpochStore> ) -> SuiResult<Option<(SenderSignedData, TransactionStatus)>>

Make a status response for a transaction

source

pub fn get_signed_effects_and_maybe_resign( &self, transaction_digest: &TransactionDigest, epoch_store: &Arc<AuthorityPerEpochStore> ) -> SuiResult<Option<VerifiedSignedTransactionEffects>>

Get the signed effects of the given transaction. If the effects was signed in a previous epoch, re-sign it so that the caller is able to form a cert of the effects in the current epoch.

source

pub async fn get_transaction_lock( &self, object_ref: &ObjectRef, epoch_store: &AuthorityPerEpochStore ) -> SuiResult<Option<VerifiedSignedTransaction>>

Get the TransactionEnvelope that currently locks the given object, if any. Since object locks are only valid for one epoch, we also need the epoch_id in the query. Returns UserInputError::ObjectNotFound if no lock records for the given object can be found. Returns UserInputError::ObjectVersionUnavailableForConsumption if the object record is at a different version. Returns Some(VerifiedEnvelope) if the given ObjectRef is locked by a certain transaction. Returns None if the a lock record is initialized for the given ObjectRef but not yet locked by any transaction, or cannot find the transaction in transaction table, because of data race etc.

source

pub async fn get_objects( &self, objects: &[ObjectID] ) -> SuiResult<Vec<Option<Object>>>

source

pub async fn get_object_or_tombstone( &self, object_id: ObjectID ) -> SuiResult<Option<ObjectRef>>

source

pub fn set_override_protocol_upgrade_buffer_stake( &self, expected_epoch: EpochId, buffer_stake_bps: u64 ) -> SuiResult

Ordinarily, protocol upgrades occur when 2f + 1 + (f * ProtocolConfig::buffer_stake_for_protocol_upgrade_bps) vote for the upgrade.

This method can be used to dynamic adjust the amount of buffer. If set to 0, the upgrade will go through with only 2f+1 votes.

IMPORTANT: If this is used, it must be used on >=2f+1 validators (all should have the same value), or you risk halting the chain.

source

pub fn clear_override_protocol_upgrade_buffer_stake( &self, expected_epoch: EpochId ) -> SuiResult

source

pub async fn get_available_system_packages( &self, binary_config: &BinaryConfig ) -> Vec<ObjectRef>

Get the set of system packages that are compiled in to this build, if those packages are compatible with the current versions of those packages on-chain.

source

pub async fn create_and_execute_advance_epoch_tx( &self, epoch_store: &Arc<AuthorityPerEpochStore>, gas_cost_summary: &GasCostSummary, checkpoint: CheckpointSequenceNumber, epoch_start_timestamp_ms: CheckpointTimestamp ) -> Result<(SuiSystemState, TransactionEffects)>

Creates and execute the advance epoch transaction to effects without committing it to the database. The effects of the change epoch tx are only written to the database after a certified checkpoint has been formed and executed by CheckpointExecutor.

When a framework upgraded has been decided on, but the validator does not have the new versions of the packages locally, the validator cannot form the ChangeEpochTx. In this case it returns Err, indicating that the checkpoint builder should give up trying to make the final checkpoint. As long as the network is able to create a certified checkpoint (which should be ensured by the capabilities vote), it will arrive via state sync and be executed by CheckpointExecutor.

source

pub async fn prune_objects_and_compact_for_testing(&self)

source

pub async fn insert_objects_unsafe_for_testing_only( &self, objects: &[Object] ) -> SuiResult

NOTE: this function is only to be used for fuzzing and testing. Never use in prod

Trait Implementations§

source§

impl TransactionKeyValueStoreTrait for AuthorityState

source§

fn multi_get<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, transactions: &'life1 [TransactionDigest], effects: &'life2 [TransactionDigest], events: &'life3 [TransactionEventsDigest] ) -> Pin<Box<dyn Future<Output = SuiResult<(Vec<Option<Transaction>>, Vec<Option<TransactionEffects>>, Vec<Option<TransactionEvents>>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Generic multi_get, allows implementors to get heterogenous values with a single round trip.
source§

fn multi_get_checkpoints<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, checkpoint_summaries: &'life1 [CheckpointSequenceNumber], checkpoint_contents: &'life2 [CheckpointSequenceNumber], checkpoint_summaries_by_digest: &'life3 [CheckpointDigest], checkpoint_contents_by_digest: &'life4 [CheckpointContentsDigest] ) -> Pin<Box<dyn Future<Output = SuiResult<(Vec<Option<CertifiedCheckpointSummary>>, Vec<Option<CheckpointContents>>, Vec<Option<CertifiedCheckpointSummary>>, Vec<Option<CheckpointContents>>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Generic multi_get to allow implementors to get heterogenous values with a single round trip.
source§

fn deprecated_get_transaction_checkpoint<'life0, 'async_trait>( &'life0 self, digest: TransactionDigest ) -> Pin<Box<dyn Future<Output = SuiResult<Option<CheckpointSequenceNumber>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_object<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, version: VersionNumber ) -> Pin<Box<dyn Future<Output = SuiResult<Option<Object>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn multi_get_transaction_checkpoint<'life0, 'life1, 'async_trait>( &'life0 self, digests: &'life1 [TransactionDigest] ) -> Pin<Box<dyn Future<Output = SuiResult<Vec<Option<CheckpointSequenceNumber>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Auto Trait Implementations§

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
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

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<T> Conv for T

§

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

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

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, 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.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a Request
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

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

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

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

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: 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: 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
source§

impl<T> Same for T

§

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.
§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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