pub struct HyperliquidMarkPriceOracle {
config: HyperliquidOracleConfig,
client: Client,
state: Arc<RwLock<OracleState>>,
sync_status: Arc<SyncStatus>,
hydromancer_client: Option<Arc<HydromancerClient>>,
fallback_cache: Arc<RwLock<HashMap<(String, i64), CachedFallbackResult>>>,
}Expand description
The main Hyperliquid Mark Price Oracle.
This oracle fetches oracle/index prices from Hyperliquid and computes forward prices for options settlement.
Fields§
§config: HyperliquidOracleConfig§client: Client§state: Arc<RwLock<OracleState>>§sync_status: Arc<SyncStatus>Sync status for readiness tracking
hydromancer_client: Option<Arc<HydromancerClient>>Hydromancer fallback client (None if not configured)
fallback_cache: Arc<RwLock<HashMap<(String, i64), CachedFallbackResult>>>Cache of Hydromancer fallback results keyed by (symbol, expiry_timestamp)
Implementations§
Source§impl HyperliquidMarkPriceOracle
impl HyperliquidMarkPriceOracle
Sourcepub fn new(config: HyperliquidOracleConfig) -> Result<Self>
pub fn new(config: HyperliquidOracleConfig) -> Result<Self>
Create a new oracle with the given configuration.
Returns an error if the configuration is invalid (e.g., missing symbol).
Sourcepub fn risk_free_rate(&self) -> f64
pub fn risk_free_rate(&self) -> f64
Risk-free rate used by this oracle when converting spot to forward.
Sourcepub async fn new_with_init(config: HyperliquidOracleConfig) -> Result<Self>
pub async fn new_with_init(config: HyperliquidOracleConfig) -> Result<Self>
Create with async initialization (fetches initial price).
If a WebSocket feed is configured, waits for it to deliver a price first. Falls back to HTTP if WS doesn’t deliver within a few seconds. Sets sync status to Ready after successful initial price fetch.
Sourcepub fn sync_status(&self) -> Arc<SyncStatus>
pub fn sync_status(&self) -> Arc<SyncStatus>
Get the sync status for readiness checks.
Sourcepub fn config(&self) -> &HyperliquidOracleConfig
pub fn config(&self) -> &HyperliquidOracleConfig
Get the oracle configuration.
Sourcepub async fn is_healthy(&self) -> bool
pub async fn is_healthy(&self) -> bool
Check if the oracle is healthy (receiving updates).
Sourcepub async fn get_last_fetch_timestamp_ms(&self) -> Option<i64>
pub async fn get_last_fetch_timestamp_ms(&self) -> Option<i64>
Get the last fetch timestamp in milliseconds (if any). Returns None if no price has been fetched yet.
Sourcepub async fn get_staleness_seconds(&self) -> Option<f64>
pub async fn get_staleness_seconds(&self) -> Option<f64>
Get the staleness of the price in seconds. Returns None if no price has been fetched yet.
Sourcepub async fn fetch_oracle_price(&self) -> Result<OracleFetchResult>
pub async fn fetch_oracle_price(&self) -> Result<OracleFetchResult>
Fetch oracle price (and prev day price) from Hyperliquid metaAndAssetCtxs endpoint.
Sourcepub fn start_polling(self: &Arc<Self>) -> JoinHandle<()>
pub fn start_polling(self: &Arc<Self>) -> JoinHandle<()>
Start the background polling task (legacy, no shutdown support).
Returns a JoinHandle that can be awaited or aborted.
For graceful shutdown support, use start_polling_with_shutdown instead.
Sourcepub fn start_polling_with_shutdown(
self: &Arc<Self>,
shutdown_rx: Receiver<()>,
) -> JoinHandle<()>
pub fn start_polling_with_shutdown( self: &Arc<Self>, shutdown_rx: Receiver<()>, ) -> JoinHandle<()>
Start the background polling task with shutdown support.
Reads prices exclusively from the WebSocket feed. If the WS price is stale or unavailable (during reconnect), marks the oracle unhealthy and skips the tick — the WS feed’s own reconnect loop handles recovery. Returns a JoinHandle that can be awaited or added to a TaskGroup.
Sourceasync fn process_settlement_samples(
&self,
state: &mut OracleState,
price: f64,
now_ms: i64,
now_secs: i64,
)
async fn process_settlement_samples( &self, state: &mut OracleState, price: f64, now_ms: i64, now_secs: i64, )
Process settlement samples for active windows.
Sourcepub fn compute_forward_price(
spot: f64,
expiry_timestamp: i64,
risk_free_rate: f64,
) -> Result<f64>
pub fn compute_forward_price( spot: f64, expiry_timestamp: i64, risk_free_rate: f64, ) -> Result<f64>
Compute forward price: spot * e^(r * t).
spot: Current spot/oracle priceexpiry_timestamp: Unix timestamp (seconds) of expiryrisk_free_rate: Annual risk-free rate (e.g., 0.05 for 5%)
Returns error if expiry is in the past.
Sourcepub fn compute_twap_median_of_means(
samples: &[PriceSample],
trim_pct: f64,
) -> f64
pub fn compute_twap_median_of_means( samples: &[PriceSample], trim_pct: f64, ) -> f64
Compute TWAP using median-of-means with trimming.
Algorithm:
- Sort all samples by price
- Trim
trim_pctfrom each tail (removes outliers/manipulation) - Divide remaining samples into sqrt(n) buckets
- Compute mean of each bucket
- Return median of bucket means
This is more robust than simple mean for manipulation resistance.
Sourcefn persist_samples_via_writer(
writer: &dyn OracleWriter,
symbol: &str,
expiry_timestamp: i64,
samples: &[PriceSample],
) -> Result<()>
fn persist_samples_via_writer( writer: &dyn OracleWriter, symbol: &str, expiry_timestamp: i64, samples: &[PriceSample], ) -> Result<()>
Persist price samples to database via the OracleWriter trait.
Sourcepub fn set_hydromancer_client(&mut self, client: Arc<HydromancerClient>)
pub fn set_hydromancer_client(&mut self, client: Arc<HydromancerClient>)
Set the Hydromancer fallback client.
Sourcefn persist_hydromancer_settlement_via_writer(
writer: &dyn OracleWriter,
symbol: &str,
expiry_timestamp: i64,
settlement_price: f64,
sample_count: usize,
window_start: i64,
window_end: i64,
) -> Result<()>
fn persist_hydromancer_settlement_via_writer( writer: &dyn OracleWriter, symbol: &str, expiry_timestamp: i64, settlement_price: f64, sample_count: usize, window_start: i64, window_end: i64, ) -> Result<()>
Persist a Hydromancer-computed settlement price via the OracleWriter trait.
Sourcepub async fn attempt_hydromancer_fallback(
&self,
expiry_timestamp: i64,
) -> Option<f64>
pub async fn attempt_hydromancer_fallback( &self, expiry_timestamp: i64, ) -> Option<f64>
Attempt to settle an expiry using Hydromancer as a fallback oracle source.
Returns Some(price) on success, None if Hydromancer cannot provide sufficient data. Results are cached to avoid repeated API calls.
Sourcepub async fn set_spot_price_for_testing(&self, price: f64)
pub async fn set_spot_price_for_testing(&self, price: f64)
Set spot price directly (for testing only).
This allows tests to inject spot prices without making network requests. ONLY use this in test environments.
Trait Implementations§
Source§impl MarkPriceOracle for HyperliquidMarkPriceOracle
impl MarkPriceOracle for HyperliquidMarkPriceOracle
Source§fn get_spot_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_spot_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_prev_day_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_prev_day_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_mark_price<'life0, 'async_trait>(
&'life0 self,
expiry_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_mark_price<'life0, 'async_trait>(
&'life0 self,
expiry_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Result<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn register_settlement<'life0, 'async_trait>(
&'life0 self,
expiry_timestamp: i64,
twap_seconds: u32,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_settlement<'life0, 'async_trait>(
&'life0 self,
expiry_timestamp: i64,
twap_seconds: u32,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_settlement_price<'life0, 'async_trait>(
&'life0 self,
expiry_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_settlement_price<'life0, 'async_trait>(
&'life0 self,
expiry_timestamp: i64,
) -> Pin<Box<dyn Future<Output = Option<f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for HyperliquidMarkPriceOracle
impl !RefUnwindSafe for HyperliquidMarkPriceOracle
impl Send for HyperliquidMarkPriceOracle
impl Sync for HyperliquidMarkPriceOracle
impl Unpin for HyperliquidMarkPriceOracle
impl UnsafeUnpin for HyperliquidMarkPriceOracle
impl !UnwindSafe for HyperliquidMarkPriceOracle
Blanket Implementations§
§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read more§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read more§fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
fn aggregate_filter<P>(self, f: P) -> Self::Outputwhere
P: AsExpression<Bool>,
Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,
§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoSql for T
impl<T> IntoSql for T
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>where
Conn: AsyncConnectionCore + Send,
Self: ExecuteDsl<Conn> + 'query,
fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnectionCore>::ExecuteFuture<'conn, 'query>where
Conn: AsyncConnectionCore + Send,
Self: ExecuteDsl<Conn> + 'query,
§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnectionCore,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnectionCore,
Self: LoadQuery<'query, Conn, U> + 'query,
§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnectionCore,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Stream] with the returned rows. Read more§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>where
U: Send + 'conn,
Conn: AsyncConnectionCore,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, LoadNext<Pin<Box<Self::Stream<'conn>>>>>where
U: Send + 'conn,
Conn: AsyncConnectionCore,
Self: LoadQuery<'query, Conn, U> + 'query,
§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnectionCore,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>>where
U: Send,
Conn: AsyncConnectionCore,
Self: LoadQuery<'query, Conn, U> + 'query,
Vec with the affected rows. Read more§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.