pub struct DependenciesBuilder {Show 41 fields
pub configuration: Configuration,
pub sqlite_connection: Option<Arc<SqliteConnection>>,
pub transaction_sqlite_connection: Option<Arc<SqliteConnection>>,
pub stake_store: Option<Arc<StakePoolStore>>,
pub snapshot_uploader: Option<Arc<dyn SnapshotUploader>>,
pub multi_signer: Option<Arc<RwLock<dyn MultiSigner>>>,
pub certificate_pending_store: Option<Arc<CertificatePendingStore>>,
pub certificate_repository: Option<Arc<CertificateRepository>>,
pub open_message_repository: Option<Arc<OpenMessageRepository>>,
pub verification_key_store: Option<Arc<dyn VerificationKeyStorer>>,
pub protocol_parameters_store: Option<Arc<dyn ProtocolParametersStorer>>,
pub cardano_cli_runner: Option<Box<CardanoCliRunner>>,
pub chain_observer: Option<Arc<dyn ChainObserver>>,
pub time_point_provider: Option<Arc<dyn TimePointProvider>>,
pub transaction_repository: Option<Arc<CardanoTransactionRepository>>,
pub transaction_store: Option<Arc<dyn TransactionStore>>,
pub block_scanner: Option<Arc<dyn BlockScanner>>,
pub immutable_digester: Option<Arc<dyn ImmutableDigester>>,
pub immutable_file_observer: Option<Arc<dyn ImmutableFileObserver>>,
pub immutable_cache_provider: Option<Arc<dyn ImmutableFileDigestCacheProvider>>,
pub digester: Option<Arc<dyn ImmutableDigester>>,
pub snapshotter: Option<Arc<dyn Snapshotter>>,
pub certificate_verifier: Option<Arc<dyn CertificateVerifier>>,
pub genesis_verifier: Option<Arc<ProtocolGenesisVerifier>>,
pub mithril_registerer: Option<Arc<MithrilSignerRegisterer>>,
pub era_checker: Option<Arc<EraChecker>>,
pub era_reader_adapter: Option<Arc<dyn EraReaderAdapter>>,
pub era_reader: Option<Arc<EraReader>>,
pub event_transmitter: Option<Arc<TransmitterService<EventMessage>>>,
pub event_transmitter_channel: (Option<UnboundedReceiver<EventMessage>>, Option<UnboundedSender<EventMessage>>),
pub api_version_provider: Option<Arc<APIVersionProvider>>,
pub stake_distribution_service: Option<Arc<dyn StakeDistributionService>>,
pub ticker_service: Option<Arc<dyn TickerService>>,
pub signer_store: Option<Arc<SignerStore>>,
pub signable_builder_service: Option<Arc<dyn SignableBuilderService>>,
pub signed_entity_service: Option<Arc<dyn SignedEntityService>>,
pub certifier_service: Option<Arc<dyn CertifierService>>,
pub epoch_service: Option<EpochServiceWrapper>,
pub signed_entity_storer: Option<Arc<dyn SignedEntityStorer>>,
pub message_service: Option<Arc<dyn MessageService>>,
pub prover_service: Option<Arc<dyn ProverService>>,
}
Expand description
§Dependencies container builder
This is meant to create SHARED DEPENDENCIES, ie: dependencies instances that must be shared amongst several Tokio tasks. For example, database repositories are NOT shared dependencies and therefor can be created ad hoc whereas the database connection is a shared dependency.
Each shared dependency must implement a build
and a get
function. The
build function creates the dependency, the get function creates the
dependency at first call then return a clone of the Arc containing the
dependency for all further calls.
Fields§
§configuration: Configuration
Configuration parameters
sqlite_connection: Option<Arc<SqliteConnection>>
SQLite database connection
transaction_sqlite_connection: Option<Arc<SqliteConnection>>
Cardano transactions SQLite database connection
stake_store: Option<Arc<StakePoolStore>>
Stake Store used by the StakeDistributionService It shall be a private dependency.
snapshot_uploader: Option<Arc<dyn SnapshotUploader>>
Snapshot uploader service.
multi_signer: Option<Arc<RwLock<dyn MultiSigner>>>
Multisigner service.
certificate_pending_store: Option<Arc<CertificatePendingStore>>
Certificate pending store.
certificate_repository: Option<Arc<CertificateRepository>>
Certificate repository.
open_message_repository: Option<Arc<OpenMessageRepository>>
Open message repository.
verification_key_store: Option<Arc<dyn VerificationKeyStorer>>
Verification key store.
protocol_parameters_store: Option<Arc<dyn ProtocolParametersStorer>>
Protocol parameter store.
cardano_cli_runner: Option<Box<CardanoCliRunner>>
Cardano CLI Runner for the ChainObserver
chain_observer: Option<Arc<dyn ChainObserver>>
Chain observer service.
time_point_provider: Option<Arc<dyn TimePointProvider>>
Time point provider service.
transaction_repository: Option<Arc<CardanoTransactionRepository>>
Cardano transactions repository.
transaction_store: Option<Arc<dyn TransactionStore>>
Cardano transactions store.
block_scanner: Option<Arc<dyn BlockScanner>>
Cardano block scanner.
immutable_digester: Option<Arc<dyn ImmutableDigester>>
Immutable file digester service.
immutable_file_observer: Option<Arc<dyn ImmutableFileObserver>>
Immutable file observer service.
immutable_cache_provider: Option<Arc<dyn ImmutableFileDigestCacheProvider>>
Immutable cache provider service.
digester: Option<Arc<dyn ImmutableDigester>>
Digester service.
snapshotter: Option<Arc<dyn Snapshotter>>
Snapshotter service.
certificate_verifier: Option<Arc<dyn CertificateVerifier>>
Certificate verifier service.
genesis_verifier: Option<Arc<ProtocolGenesisVerifier>>
Genesis signature verifier service.
mithril_registerer: Option<Arc<MithrilSignerRegisterer>>
Signer registerer service
era_checker: Option<Arc<EraChecker>>
Era checker service
era_reader_adapter: Option<Arc<dyn EraReaderAdapter>>
Adapter for EraReader
era_reader: Option<Arc<EraReader>>
Era reader service
event_transmitter: Option<Arc<TransmitterService<EventMessage>>>
Event Transmitter Service
event_transmitter_channel: (Option<UnboundedReceiver<EventMessage>>, Option<UnboundedSender<EventMessage>>)
Event transmitter Channel Sender endpoint
api_version_provider: Option<Arc<APIVersionProvider>>
API Version provider
stake_distribution_service: Option<Arc<dyn StakeDistributionService>>
Stake Distribution Service
ticker_service: Option<Arc<dyn TickerService>>
Ticker Service (TODO: remove TimePointProvider)
signer_store: Option<Arc<SignerStore>>
Signer Store
signable_builder_service: Option<Arc<dyn SignableBuilderService>>
Signable Builder Service
signed_entity_service: Option<Arc<dyn SignedEntityService>>
Signed Entity Service
certifier_service: Option<Arc<dyn CertifierService>>
Certifier service
epoch_service: Option<EpochServiceWrapper>
Epoch service.
signed_entity_storer: Option<Arc<dyn SignedEntityStorer>>
Signed Entity storer
message_service: Option<Arc<dyn MessageService>>
HTTP Message service
prover_service: Option<Arc<dyn ProverService>>
Prover service
Implementations§
source§impl DependenciesBuilder
impl DependenciesBuilder
sourcepub fn new(configuration: Configuration) -> Self
pub fn new(configuration: Configuration) -> Self
Create a new clean dependency builder
sourcepub async fn get_sqlite_connection(&mut self) -> Result<Arc<SqliteConnection>>
pub async fn get_sqlite_connection(&mut self) -> Result<Arc<SqliteConnection>>
Get SQLite connection
sourcepub async fn get_sqlite_connection_cardano_transaction(
&mut self
) -> Result<Arc<SqliteConnection>>
pub async fn get_sqlite_connection_cardano_transaction( &mut self ) -> Result<Arc<SqliteConnection>>
Get SQLite connection for the cardano transactions store
sourcepub async fn get_stake_store(&mut self) -> Result<Arc<StakePoolStore>>
pub async fn get_stake_store(&mut self) -> Result<Arc<StakePoolStore>>
Return a StakePoolStore
sourcepub async fn get_snapshot_uploader(
&mut self
) -> Result<Arc<dyn SnapshotUploader>>
pub async fn get_snapshot_uploader( &mut self ) -> Result<Arc<dyn SnapshotUploader>>
Get a SnapshotUploader
sourcepub async fn get_multi_signer(&mut self) -> Result<Arc<RwLock<dyn MultiSigner>>>
pub async fn get_multi_signer(&mut self) -> Result<Arc<RwLock<dyn MultiSigner>>>
Get a configured multi signer
sourcepub async fn get_certificate_pending_store(
&mut self
) -> Result<Arc<CertificatePendingStore>>
pub async fn get_certificate_pending_store( &mut self ) -> Result<Arc<CertificatePendingStore>>
Get a configured CertificatePendingStore.
sourcepub async fn get_certificate_repository(
&mut self
) -> Result<Arc<CertificateRepository>>
pub async fn get_certificate_repository( &mut self ) -> Result<Arc<CertificateRepository>>
Get a configured CertificateRepository.
sourcepub async fn get_open_message_repository(
&mut self
) -> Result<Arc<OpenMessageRepository>>
pub async fn get_open_message_repository( &mut self ) -> Result<Arc<OpenMessageRepository>>
Get a configured OpenMessageRepository.
sourcepub async fn get_verification_key_store(
&mut self
) -> Result<Arc<dyn VerificationKeyStorer>>
pub async fn get_verification_key_store( &mut self ) -> Result<Arc<dyn VerificationKeyStorer>>
Get a configured VerificationKeyStorer.
sourcepub async fn get_protocol_parameters_store(
&mut self
) -> Result<Arc<dyn ProtocolParametersStorer>>
pub async fn get_protocol_parameters_store( &mut self ) -> Result<Arc<dyn ProtocolParametersStorer>>
Get a configured ProtocolParametersStorer.
sourcepub async fn get_chain_observer(&mut self) -> Result<Arc<dyn ChainObserver>>
pub async fn get_chain_observer(&mut self) -> Result<Arc<dyn ChainObserver>>
Return a ChainObserver
sourcepub async fn get_cardano_cli_runner(&mut self) -> Result<Box<CardanoCliRunner>>
pub async fn get_cardano_cli_runner(&mut self) -> Result<Box<CardanoCliRunner>>
Return a CardanoCliRunner
sourcepub async fn get_time_point_provider(
&mut self
) -> Result<Arc<dyn TimePointProvider>>
pub async fn get_time_point_provider( &mut self ) -> Result<Arc<dyn TimePointProvider>>
Return a TimePointProvider instance.
sourcepub async fn get_immutable_file_observer(
&mut self
) -> Result<Arc<dyn ImmutableFileObserver>>
pub async fn get_immutable_file_observer( &mut self ) -> Result<Arc<dyn ImmutableFileObserver>>
Return a ImmutableFileObserver instance.
sourcepub async fn get_immutable_cache_provider(
&mut self
) -> Result<Arc<dyn ImmutableFileDigestCacheProvider>>
pub async fn get_immutable_cache_provider( &mut self ) -> Result<Arc<dyn ImmutableFileDigestCacheProvider>>
sourcepub async fn get_logger(&self) -> Result<Logger>
pub async fn get_logger(&self) -> Result<Logger>
This method does not cache the logger since it is managed internally by its own crate.
sourcepub async fn get_transaction_repository(
&mut self
) -> Result<Arc<CardanoTransactionRepository>>
pub async fn get_transaction_repository( &mut self ) -> Result<Arc<CardanoTransactionRepository>>
Transaction repository.
sourcepub async fn get_transaction_store(
&mut self
) -> Result<Arc<dyn TransactionStore>>
pub async fn get_transaction_store( &mut self ) -> Result<Arc<dyn TransactionStore>>
Transaction store.
sourcepub async fn get_block_scanner(&mut self) -> Result<Arc<dyn BlockScanner>>
pub async fn get_block_scanner(&mut self) -> Result<Arc<dyn BlockScanner>>
Block scanner
sourcepub async fn get_immutable_digester(
&mut self
) -> Result<Arc<dyn ImmutableDigester>>
pub async fn get_immutable_digester( &mut self ) -> Result<Arc<dyn ImmutableDigester>>
Immutable digester.
sourcepub async fn get_snapshotter(&mut self) -> Result<Arc<dyn Snapshotter>>
pub async fn get_snapshotter(&mut self) -> Result<Arc<dyn Snapshotter>>
Snapshotter service.
sourcepub async fn get_certificate_verifier(
&mut self
) -> Result<Arc<dyn CertificateVerifier>>
pub async fn get_certificate_verifier( &mut self ) -> Result<Arc<dyn CertificateVerifier>>
CertificateVerifier service.
sourcepub async fn get_genesis_verifier(
&mut self
) -> Result<Arc<ProtocolGenesisVerifier>>
pub async fn get_genesis_verifier( &mut self ) -> Result<Arc<ProtocolGenesisVerifier>>
Return a ProtocolGenesisVerifier
sourcepub async fn get_mithril_registerer(
&mut self
) -> Result<Arc<MithrilSignerRegisterer>>
pub async fn get_mithril_registerer( &mut self ) -> Result<Arc<MithrilSignerRegisterer>>
MithrilSignerRegisterer service
sourcepub async fn get_era_checker(&mut self) -> Result<Arc<EraChecker>>
pub async fn get_era_checker(&mut self) -> Result<Arc<EraChecker>>
EraReader service
sourcepub async fn get_event_transmitter_sender(
&mut self
) -> Result<UnboundedSender<EventMessage>>
pub async fn get_event_transmitter_sender( &mut self ) -> Result<UnboundedSender<EventMessage>>
Return the EventMessage channel sender.
sourcepub async fn get_event_transmitter_receiver(
&mut self
) -> Result<UnboundedReceiver<EventMessage>>
pub async fn get_event_transmitter_receiver( &mut self ) -> Result<UnboundedReceiver<EventMessage>>
Return the channel receiver setup for the EventStore. Since this receiver is not clonable, it must be called only once.
sourcepub async fn get_event_transmitter(
&mut self
) -> Result<Arc<TransmitterService<EventMessage>>>
pub async fn get_event_transmitter( &mut self ) -> Result<Arc<TransmitterService<EventMessage>>>
TransmitterService service
sourcepub async fn get_api_version_provider(
&mut self
) -> Result<Arc<APIVersionProvider>>
pub async fn get_api_version_provider( &mut self ) -> Result<Arc<APIVersionProvider>>
APIVersionProvider service
sourcepub async fn get_stake_distribution_service(
&mut self
) -> Result<Arc<dyn StakeDistributionService>>
pub async fn get_stake_distribution_service( &mut self ) -> Result<Arc<dyn StakeDistributionService>>
StakeDistributionService service
sourcepub async fn get_signer_store(&mut self) -> Result<Arc<SignerStore>>
pub async fn get_signer_store(&mut self) -> Result<Arc<SignerStore>>
SignerStore service
sourcepub async fn get_signable_builder_service(
&mut self
) -> Result<Arc<dyn SignableBuilderService>>
pub async fn get_signable_builder_service( &mut self ) -> Result<Arc<dyn SignableBuilderService>>
SignableBuilderService service
sourcepub async fn get_signed_entity_service(
&mut self
) -> Result<Arc<dyn SignedEntityService>>
pub async fn get_signed_entity_service( &mut self ) -> Result<Arc<dyn SignedEntityService>>
SignedEntityService service
sourcepub async fn get_epoch_service(&mut self) -> Result<EpochServiceWrapper>
pub async fn get_epoch_service(&mut self) -> Result<EpochServiceWrapper>
EpochService service
sourcepub async fn get_signed_entity_storer(
&mut self
) -> Result<Arc<dyn SignedEntityStorer>>
pub async fn get_signed_entity_storer( &mut self ) -> Result<Arc<dyn SignedEntityStorer>>
SignedEntityStorer service
sourcepub async fn build_dependency_container(
&mut self
) -> Result<DependencyContainer>
pub async fn build_dependency_container( &mut self ) -> Result<DependencyContainer>
Return an unconfigured DependencyContainer
sourcepub async fn create_event_store(&mut self) -> Result<EventStore>
pub async fn create_event_store(&mut self) -> Result<EventStore>
Create dependencies for the EventStore task.
sourcepub async fn create_aggregator_runner(&mut self) -> Result<AggregatorRuntime>
pub async fn create_aggregator_runner(&mut self) -> Result<AggregatorRuntime>
Create the AggregatorRunner
sourcepub async fn create_http_routes(
&mut self
) -> Result<impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone>
pub async fn create_http_routes( &mut self ) -> Result<impl Filter<Extract = (impl Reply,), Error = Rejection> + Clone>
Create the HTTP route instance
sourcepub async fn create_genesis_container(
&mut self
) -> Result<GenesisToolsDependency>
pub async fn create_genesis_container( &mut self ) -> Result<GenesisToolsDependency>
Create dependencies for genesis commands
sourcepub async fn create_signer_importer(
&mut self,
cexplorer_pools_url: &str
) -> Result<SignersImporter>
pub async fn create_signer_importer( &mut self, cexplorer_pools_url: &str ) -> Result<SignersImporter>
Create a SignersImporter instance.
sourcepub async fn build_ticker_service(&mut self) -> Result<Arc<dyn TickerService>>
pub async fn build_ticker_service(&mut self) -> Result<Arc<dyn TickerService>>
Create TickerService instance.
sourcepub async fn get_ticker_service(&mut self) -> Result<Arc<dyn TickerService>>
pub async fn get_ticker_service(&mut self) -> Result<Arc<dyn TickerService>>
StakeDistributionService service
sourcepub async fn build_certifier_service(
&mut self
) -> Result<Arc<dyn CertifierService>>
pub async fn build_certifier_service( &mut self ) -> Result<Arc<dyn CertifierService>>
Create CertifierService service
sourcepub async fn get_certifier_service(
&mut self
) -> Result<Arc<dyn CertifierService>>
pub async fn get_certifier_service( &mut self ) -> Result<Arc<dyn CertifierService>>
CertifierService service
sourcepub async fn build_message_service(&mut self) -> Result<Arc<dyn MessageService>>
pub async fn build_message_service(&mut self) -> Result<Arc<dyn MessageService>>
build HTTP message service
sourcepub async fn get_message_service(&mut self) -> Result<Arc<dyn MessageService>>
pub async fn get_message_service(&mut self) -> Result<Arc<dyn MessageService>>
MessageService service
sourcepub async fn build_prover_service(&mut self) -> Result<Arc<dyn ProverService>>
pub async fn build_prover_service(&mut self) -> Result<Arc<dyn ProverService>>
build Prover service
sourcepub async fn get_prover_service(&mut self) -> Result<Arc<dyn ProverService>>
pub async fn get_prover_service(&mut self) -> Result<Arc<dyn ProverService>>
ProverService service
Auto Trait Implementations§
impl Freeze for DependenciesBuilder
impl !RefUnwindSafe for DependenciesBuilder
impl Send for DependenciesBuilder
impl Sync for DependenciesBuilder
impl Unpin for DependenciesBuilder
impl !UnwindSafe for DependenciesBuilder
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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Conv for T
impl<T> Conv for T
§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> 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<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
§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
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
§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.