pub struct OracleRuntime<P> { /* private fields */ }Expand description
High-level facade for registration, typed events, reads, and reconciliation.
Implementations§
Source§impl<P> OracleRuntime<P>
impl<P> OracleRuntime<P>
Sourcepub fn mock_price<F, M>(
&self,
overlay: &mut EvmOverlay,
state: &dyn StateView,
feed_id: F,
mock: M,
) -> Result<OracleMockReport, OracleMockError>
pub fn mock_price<F, M>( &self, overlay: &mut EvmOverlay, state: &dyn StateView, feed_id: F, mock: M, ) -> Result<OracleMockReport, OracleMockError>
Mock one registered oracle price in an EvmOverlay.
The cache/runtime are not mutated. For Chainlink OCR1/OCR2 feeds with a
detected layout and warmed hot slot, this writes the same storage slots a
live oracle event would update. If the feed cannot be direct-written, the
report returns applied = false.
Source§impl<P> OracleRuntime<P>
impl<P> OracleRuntime<P>
Sourcepub fn builder(provider: P) -> OracleRuntimeBuilder<P>
pub fn builder(provider: P) -> OracleRuntimeBuilder<P>
Start building a runtime around a provider.
Sourcepub fn provider(&self) -> &P
pub fn provider(&self) -> &P
Borrow the provider used for authoritative proxy reads and reconciliation.
Sourcepub fn tracker(&self) -> &OracleTracker
pub fn tracker(&self) -> &OracleTracker
Borrow the typed state store for snapshot, price, and registration reads.
Sourcepub fn tracker_mut(&mut self) -> &mut OracleTracker
pub fn tracker_mut(&mut self) -> &mut OracleTracker
Mutably borrow the tracker.
Warning: mutating the tracker directly (registering or removing
feeds through OracleTracker methods) desynchronizes this runtime’s
adapter bookkeeping: adapter_states still references removed feeds
(or misses added ones), so Self::reactive_handlers and the
refresh_handlers* methods rebuild handler routing from a stale feed
set. Use Self::register_seeded_feed, Self::register_adapter,
Self::unregister_feed_by_id, or Self::unregister_feed_by_proxy
instead — they keep typed state and handler routing in sync. Reserve
this accessor for operations that do not change the registration set
(for example OracleTracker::reconcile or
OracleTracker::apply_batch_report).
Sourcepub fn feed_readiness(&self) -> Vec<OracleFeedReadinessReport>
pub fn feed_readiness(&self) -> Vec<OracleFeedReadinessReport>
Return feed/runtime readiness for all registered feeds.
Sourcepub fn with_storage_sync(self, storage_sync: OracleStorageSync) -> Self
pub fn with_storage_sync(self, storage_sync: OracleStorageSync) -> Self
Replace the direct-storage registry used by subsequently constructed reactive handlers and storage warmup calls.
This is primarily useful after cache-native discovery returns an
OracleTracker that needs a deployment-specific storage adapter:
construct the facade with OracleRuntime::from_tracker, then retain
the custom registry here before calling Self::reactive_runtime,
Self::reactive_handler, or Self::prewarm_storage.
If this runtime’s handlers are already installed in a live reactive engine, replace the registry only as part of a handler refresh so the installed handlers cannot retain the old storage policy.
Sourcepub fn reactive_handler(&self) -> OracleReactiveHandler
pub fn reactive_handler(&self) -> OracleReactiveHandler
Build a fresh built-in Chainlink-compatible reactive handler from current registrations.
Adapter plugin handlers are not included. Use Self::reactive_handlers,
Self::reactive_runtime, or Self::register_subscriber when the runtime
was built with installed adapter plugins.
Sourcepub fn reactive_handlers(&self) -> Vec<Arc<dyn ReactiveHandler<Ethereum>>>
pub fn reactive_handlers(&self) -> Vec<Arc<dyn ReactiveHandler<Ethereum>>>
Build fresh reactive handlers for every source installed in this runtime.
The first handler is the built-in Chainlink-compatible handler. Any adapter plugin handlers discovered during cache-native startup follow it.
Handler ids must be unique across installed adapter plugins: when two
adapters return handlers with the same HandlerId, only the first
handler is kept and the second adapter’s event routing is silently
dropped (a tracing warning is emitted). An adapter handler that
reuses the built-in Chainlink handler id is fine — the built-in
handler is rebuilt from all current registrations, so it already
routes that adapter’s feeds.
Sourcepub fn reactive_handler_ids(&self) -> Vec<HandlerId>
pub fn reactive_handler_ids(&self) -> Vec<HandlerId>
Return current reactive handler ids for this runtime.
Sourcepub fn reactive_runtime(&self) -> Result<ReactiveRuntime<Ethereum>, OracleError>
pub fn reactive_runtime(&self) -> Result<ReactiveRuntime<Ethereum>, OracleError>
Build a reactive runtime with this oracle runtime’s handlers already installed.
Sourcepub fn install_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
) -> Result<OracleReactiveInstallReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
pub fn install_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
) -> Result<OracleReactiveInstallReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
Register this runtime’s handlers with an engine, using continuity-safe backfill.
§Errors
Returns OracleError::Reactive when the engine rejects a handler
registration (for example a handler id that is already installed).
Sourcepub fn refresh_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
) -> Result<OracleReactiveRefreshReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
pub fn refresh_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
) -> Result<OracleReactiveRefreshReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
Refresh an existing engine install after registering or unregistering feeds.
installed must be the report returned by a previous install/refresh.
The old handler ids in that report are removed first, then the runtime’s
current handlers are installed with continuity-safe backfill.
Sourcepub fn refresh_handlers_with_backfill<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
backfill: SubscriberBackfill,
) -> Result<OracleReactiveRefreshReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
pub fn refresh_handlers_with_backfill<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
backfill: SubscriberBackfill,
) -> Result<OracleReactiveRefreshReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
Refresh an existing engine install after mutation using explicit backfill.
Sourcepub fn refresh_handlers_live_only<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
) -> Result<OracleReactiveRefreshReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
pub fn refresh_handlers_live_only<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
) -> Result<OracleReactiveRefreshReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
Refresh an existing engine install after mutation without backfill.
Sourcepub fn uninstall_installed_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
) -> OracleReactiveUninstallReportwhere
S: InterestOwnerSubscriber<Ethereum>,
pub fn uninstall_installed_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
installed: &mut OracleReactiveInstallReport,
) -> OracleReactiveUninstallReportwhere
S: InterestOwnerSubscriber<Ethereum>,
Unregister exactly the handlers recorded by a previous install/refresh report.
Sourcepub fn install_handlers_with_backfill<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
backfill: SubscriberBackfill,
) -> Result<OracleReactiveInstallReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
pub fn install_handlers_with_backfill<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
backfill: SubscriberBackfill,
) -> Result<OracleReactiveInstallReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
Register this runtime’s handlers with explicit owner-scoped backfill.
§Errors
Returns OracleError::Reactive when the engine rejects a handler
registration (for example a handler id that is already installed).
Sourcepub fn install_handlers_live_only<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
) -> Result<OracleReactiveInstallReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
pub fn install_handlers_live_only<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
) -> Result<OracleReactiveInstallReport, OracleError>where
S: InterestOwnerSubscriber<Ethereum>,
Register this runtime’s handlers without any backfill.
§Errors
Returns OracleError::Reactive when the engine rejects a handler
registration (for example a handler id that is already installed).
Sourcepub fn uninstall_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
) -> OracleReactiveUninstallReportwhere
S: InterestOwnerSubscriber<Ethereum>,
pub fn uninstall_handlers<S>(
&self,
engine: &mut ReactiveEngine<S, Ethereum>,
) -> OracleReactiveUninstallReportwhere
S: InterestOwnerSubscriber<Ethereum>,
Unregister this runtime’s handlers from an engine.
Warning: this recomputes handler ids from the current
registration set. If the runtime’s registrations changed since the
handlers were installed (feeds registered or unregistered, adapters
added), the recomputed set can miss handlers that are still installed
in the engine, leaving them registered. Prefer
Self::uninstall_installed_handlers with the report returned by the
original install/refresh call — it removes exactly the handler ids
that were installed.
Sourcepub fn register_subscriber<S>(
&self,
subscriber: &mut S,
) -> Result<(), OracleError>where
S: EventSubscriber<Ethereum>,
pub fn register_subscriber<S>(
&self,
subscriber: &mut S,
) -> Result<(), OracleError>where
S: EventSubscriber<Ethereum>,
Register this runtime’s oracle interests with an event subscriber.
Sourcepub async fn next_subscriber_events<S>(
&mut self,
cache: &mut EvmCache,
runtime: &mut ReactiveRuntime<Ethereum>,
subscriber: &mut S,
) -> Result<Option<OracleBatchReport>, OracleError>where
S: EventSubscriber<Ethereum>,
pub async fn next_subscriber_events<S>(
&mut self,
cache: &mut EvmCache,
runtime: &mut ReactiveRuntime<Ethereum>,
subscriber: &mut S,
) -> Result<Option<OracleBatchReport>, OracleError>where
S: EventSubscriber<Ethereum>,
Read one subscriber batch, apply it to the cache, and return the typed
batch digest, or None when the subscriber has no batch ready.
Sourcepub fn read_overlay(&self) -> OracleReadOverlay<'_>
pub fn read_overlay(&self) -> OracleReadOverlay<'_>
Build a read overlay over the current tracker state.
Sourcepub fn register_seeded_feed(
&mut self,
registration: FeedRegistration,
round: RoundData,
) -> Result<OracleRuntimeMutationReport, OracleError>
pub fn register_seeded_feed( &mut self, registration: FeedRegistration, round: RoundData, ) -> Result<OracleRuntimeMutationReport, OracleError>
Register an already-discovered feed and seed its latest round.
This updates typed state immediately. If a reactive engine has already
installed this runtime’s handlers, call one of the refresh_handlers*
methods with the previous install report so the subscriber receives the
new event interests.
§Errors
Returns OracleError::DuplicateFeedId or
OracleError::DuplicateProxy when the registration collides with an
existing feed; typed state is unchanged in that case.
Sourcepub fn register_adapter_seeded_feed(
&mut self,
adapter_id: impl AsRef<str>,
registration: FeedRegistration,
round: RoundData,
) -> Result<OracleRuntimeMutationReport, OracleError>
pub fn register_adapter_seeded_feed( &mut self, adapter_id: impl AsRef<str>, registration: FeedRegistration, round: RoundData, ) -> Result<OracleRuntimeMutationReport, OracleError>
Register an already-discovered adapter-owned feed and seed its latest round.
The adapter must already be installed in this runtime. This is the low-level path for adapter code that discovers one additional feed and wants that feed included in the adapter handler rebuilt on refresh.
§Errors
Returns OracleError::Config when adapter_id is not installed in
this runtime, and OracleError::DuplicateFeedId/
OracleError::DuplicateProxy when the registration collides with an
existing feed.
Sourcepub fn unregister_feed_by_id(
&mut self,
id: FeedId,
) -> Result<OracleRuntimeMutationReport, OracleError>
pub fn unregister_feed_by_id( &mut self, id: FeedId, ) -> Result<OracleRuntimeMutationReport, OracleError>
Unregister a feed by id.
This removes typed state, pending reconciliation, and any adapter routing references for the feed. Refresh installed handlers afterward to apply the routing change to a live engine.
§Errors
Returns OracleError::FeedNotFound when no feed is registered under
id.
Sourcepub fn unregister_feed_by_proxy(
&mut self,
proxy: Address,
) -> Result<OracleRuntimeMutationReport, OracleError>
pub fn unregister_feed_by_proxy( &mut self, proxy: Address, ) -> Result<OracleRuntimeMutationReport, OracleError>
Unregister a feed by proxy.
§Errors
Returns OracleError::FeedNotFound when no feed is registered under
proxy.
Sourcepub fn price(&self, id: impl AsRef<str>) -> Result<OraclePrice, OracleError>
pub fn price(&self, id: impl AsRef<str>) -> Result<OraclePrice, OracleError>
Return the latest typed price by feed id string.
§Errors
Returns OracleError::FeedNotFound when no feed is registered under
id or the feed has no current snapshot.
Sourcepub fn price_by_proxy(&self, proxy: Address) -> Result<OraclePrice, OracleError>
pub fn price_by_proxy(&self, proxy: Address) -> Result<OraclePrice, OracleError>
Return the latest typed price by proxy address.
§Errors
Returns OracleError::FeedNotFound when no feed is registered under
proxy or the feed has no current snapshot.
Sourcepub fn latest_round(
&self,
id: impl AsRef<str>,
) -> Result<RoundData, OracleError>
pub fn latest_round( &self, id: impl AsRef<str>, ) -> Result<RoundData, OracleError>
Return the latest round by feed id string.
§Errors
Returns OracleError::FeedNotFound when no feed is registered under
id or the feed has no current snapshot.
Sourcepub fn apply_batch_report<N: Network>(
&mut self,
report: &ReactiveBatchReport<N>,
) -> Result<OracleBatchReport, OracleError>
pub fn apply_batch_report<N: Network>( &mut self, report: &ReactiveBatchReport<N>, ) -> Result<OracleBatchReport, OracleError>
Apply a committed reactive batch and return the typed batch digest.
The returned crate::OracleBatchReport carries the raw per-event
hooks (events, in emission order) plus the digested per-feed changes,
continuity incidents, and the requires_full_refresh routing flag —
the same consumer shape as evm-amm-state’s AmmSyncBatchReport.
Registered callbacks fire for every event before this returns.
Legacy oracle.answer_updated signals (emitted by custom handlers that
predate the rich OraclePriceUpdate payload) update typed tracker
state but are not decoded into OracleHookEvents, so on_event/
on_price_update callbacks do not fire for them. Emit the rich
oracle.price_update signal from custom handlers to get typed
callbacks.
Sourcepub async fn reconcile_pending(
&mut self,
) -> Result<Vec<OracleHookEvent>, OracleError>where
P: ChainlinkFeedProvider,
pub async fn reconcile_pending(
&mut self,
) -> Result<Vec<OracleHookEvent>, OracleError>where
P: ChainlinkFeedProvider,
Reconcile all currently pending proxy-kind event updates.
Derived-source requests
(crate::OracleReconciliationKind::DerivedProtocolRead) are left
queued; satisfy those with OracleRuntime::reconcile_derived.
Sourcepub fn reconcile_derived(
&mut self,
cache: &mut EvmCache,
) -> DerivedReconcileReport
pub fn reconcile_derived( &mut self, cache: &mut EvmCache, ) -> DerivedReconcileReport
Reconcile all currently pending derived-source updates through their
protocols’ own view calls (Morpho price(), Euler getQuote), read
through cache.
Successful reads promote EventPending snapshots to Confirmed or
Corrected and fire the registered hook callbacks; failed reads leave
their requests queued and are surfaced in
crate::DerivedReconcileReport::failed.
Sourcepub fn reactive_interests(&self) -> Vec<ReactiveInterest<Ethereum>>
pub fn reactive_interests(&self) -> Vec<ReactiveInterest<Ethereum>>
Return the complete log/event interest set for built-in and adapter handlers.
Sourcepub fn storage_warmup_slots(&self) -> Vec<(Address, U256)>
pub fn storage_warmup_slots(&self) -> Vec<(Address, U256)>
Return the oracle storage slots this runtime can prewarm for direct event writes.
Sourcepub fn prewarm_storage(&self, cache: &mut EvmCache) -> OracleStorageWarmupReport
pub fn prewarm_storage(&self, cache: &mut EvmCache) -> OracleStorageWarmupReport
Bulk-load direct-write oracle storage slots into the supplied cache.
Sourcepub fn cold_start_storage(
&self,
cache: &mut EvmCache,
) -> OracleStorageWarmupReport
pub fn cold_start_storage( &self, cache: &mut EvmCache, ) -> OracleStorageWarmupReport
Verify direct-write oracle storage slots through EvmCache::run_cold_start.
Source§impl OracleRuntime<()>
impl OracleRuntime<()>
Sourcepub fn cache_builder() -> OracleCacheRuntimeBuilder
pub fn cache_builder() -> OracleCacheRuntimeBuilder
Start building a cache-native runtime from oracle adapter plugins.
Sourcepub fn from_tracker(tracker: OracleTracker) -> Self
pub fn from_tracker(tracker: OracleTracker) -> Self
Build a runtime facade from a cache-native tracker.
The returned runtime starts with Chainlink-default storage sync and
no adapter-plugin routing, regardless of how the tracker’s feeds
were discovered: any custom OracleStorageSync configuration is
reset to OracleStorageSync::chainlink_defaults unless replaced with
OracleRuntime::with_storage_sync, and non-Chainlink
feeds already in the tracker (Pyth, RedStone, custom adapter families)
remain visible in typed state but receive no reactive events —
their adapter handlers are gone until the adapters are re-installed
via Self::register_adapter. Prefer keeping the runtime returned by
OracleCacheRuntimeBuilder::build when adapter plugins are in play.
Sourcepub async fn register_adapter<A>(
&mut self,
adapter: A,
cache: &mut EvmCache,
) -> Result<OracleRuntimeMutationReport, OracleError>where
A: OracleAdapterPlugin + 'static,
pub async fn register_adapter<A>(
&mut self,
adapter: A,
cache: &mut EvmCache,
) -> Result<OracleRuntimeMutationReport, OracleError>where
A: OracleAdapterPlugin + 'static,
Discover and register feeds from an adapter on an existing cache-native runtime.
This mutates typed state and retains the adapter for future handler
rebuilds. If handlers are already installed in an engine, call one of the
refresh_handlers* methods with the previous install report afterward.
§Errors
Returns OracleError::Provider when adapter discovery reads fail,
and OracleError::DuplicateFeedId/OracleError::DuplicateProxy
when a discovered feed collides with an existing registration. On
error the runtime is unchanged: feeds inserted earlier in the same
call are rolled back and the adapter is not retained.
Trait Implementations§
Auto Trait Implementations§
impl<P> !RefUnwindSafe for OracleRuntime<P>
impl<P> !UnwindSafe for OracleRuntime<P>
impl<P> Freeze for OracleRuntime<P>where
P: Freeze,
impl<P> Send for OracleRuntime<P>where
P: Send,
impl<P> Sync for OracleRuntime<P>where
P: Sync,
impl<P> Unpin for OracleRuntime<P>where
P: Unpin,
impl<P> UnsafeUnpin for OracleRuntime<P>where
P: UnsafeUnpin,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?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.