Skip to main content

OracleRuntime

Struct OracleRuntime 

Source
pub struct OracleRuntime<P> { /* private fields */ }
Expand description

High-level facade for registration, typed events, reads, and reconciliation.

Implementations§

Source§

impl<P> OracleRuntime<P>

Source

pub fn mock_price<F, M>( &self, overlay: &mut EvmOverlay, state: &dyn StateView, feed_id: F, mock: M, ) -> Result<OracleMockReport, OracleMockError>
where F: AsRef<str>, M: Into<OraclePriceMock>,

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>

Source

pub fn builder(provider: P) -> OracleRuntimeBuilder<P>

Start building a runtime around a provider.

Source

pub fn provider(&self) -> &P

Borrow the provider used for authoritative proxy reads and reconciliation.

Source

pub fn tracker(&self) -> &OracleTracker

Borrow the typed state store for snapshot, price, and registration reads.

Source

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

Source

pub fn feed_readiness(&self) -> Vec<OracleFeedReadinessReport>

Return feed/runtime readiness for all registered feeds.

Source

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.

Source

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.

Source

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.

Source

pub fn reactive_handler_ids(&self) -> Vec<HandlerId>

Return current reactive handler ids for this runtime.

Source

pub fn reactive_runtime(&self) -> Result<ReactiveRuntime<Ethereum>, OracleError>

Build a reactive runtime with this oracle runtime’s handlers already installed.

Source

pub fn install_handlers<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, ) -> Result<OracleReactiveInstallReport, OracleError>

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

Source

pub fn refresh_handlers<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, installed: &mut OracleReactiveInstallReport, ) -> Result<OracleReactiveRefreshReport, OracleError>

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.

Source

pub fn refresh_handlers_with_backfill<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, installed: &mut OracleReactiveInstallReport, backfill: SubscriberBackfill, ) -> Result<OracleReactiveRefreshReport, OracleError>

Refresh an existing engine install after mutation using explicit backfill.

Source

pub fn refresh_handlers_live_only<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, installed: &mut OracleReactiveInstallReport, ) -> Result<OracleReactiveRefreshReport, OracleError>

Refresh an existing engine install after mutation without backfill.

Source

pub fn uninstall_installed_handlers<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, installed: &mut OracleReactiveInstallReport, ) -> OracleReactiveUninstallReport

Unregister exactly the handlers recorded by a previous install/refresh report.

Source

pub fn install_handlers_with_backfill<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, backfill: SubscriberBackfill, ) -> Result<OracleReactiveInstallReport, OracleError>

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

Source

pub fn install_handlers_live_only<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, ) -> Result<OracleReactiveInstallReport, OracleError>

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

Source

pub fn uninstall_handlers<S>( &self, engine: &mut ReactiveEngine<S, Ethereum>, ) -> OracleReactiveUninstallReport

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.

Source

pub fn register_subscriber<S>( &self, subscriber: &mut S, ) -> Result<(), OracleError>

Register this runtime’s oracle interests with an event subscriber.

Source

pub async fn next_subscriber_events<S>( &mut self, cache: &mut EvmCache, runtime: &mut ReactiveRuntime<Ethereum>, subscriber: &mut S, ) -> Result<Option<OracleBatchReport>, OracleError>

Read one subscriber batch, apply it to the cache, and return the typed batch digest, or None when the subscriber has no batch ready.

Source

pub fn read_overlay(&self) -> OracleReadOverlay<'_>

Build a read overlay over the current tracker state.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn reconcile_pending( &mut self, ) -> Result<Vec<OracleHookEvent>, OracleError>

Reconcile all currently pending proxy-kind event updates.

Derived-source requests (crate::OracleReconciliationKind::DerivedProtocolRead) are left queued; satisfy those with OracleRuntime::reconcile_derived.

Source

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.

Source

pub fn reactive_interests(&self) -> Vec<ReactiveInterest<Ethereum>>

Return the complete log/event interest set for built-in and adapter handlers.

Source

pub fn storage_warmup_slots(&self) -> Vec<(Address, U256)>

Return the oracle storage slots this runtime can prewarm for direct event writes.

Source

pub fn prewarm_storage(&self, cache: &mut EvmCache) -> OracleStorageWarmupReport

Bulk-load direct-write oracle storage slots into the supplied cache.

Source

pub fn cold_start_storage( &self, cache: &mut EvmCache, ) -> OracleStorageWarmupReport

Verify direct-write oracle storage slots through EvmCache::run_cold_start.

Source§

impl OracleRuntime<()>

Source

pub fn cache_builder() -> OracleCacheRuntimeBuilder

Start building a cache-native runtime from oracle adapter plugins.

Source

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.

Source

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§

Source§

impl<P: Debug> Debug for OracleRuntime<P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
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
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Conv for T

Source§

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

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

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

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.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

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

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

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

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

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

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

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

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

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

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

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

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

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

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

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

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

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

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

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

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

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

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

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

impl<T> TryConv for T

Source§

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

Source§

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

Source§

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more