pub struct InstrumentsCache {
instruments: Arc<RwLock<HashMap<String, Instrument>>>,
by_underlying: Arc<RwLock<HashMap<String, Vec<String>>>>,
by_underlying_expiry: Arc<RwLock<HashMap<(String, u64), Vec<String>>>>,
by_instrument_id: Arc<RwLock<HashMap<i32, String>>>,
last_market_update_seq: Arc<RwLock<i64>>,
last_snapshot_seq: Arc<RwLock<i64>>,
sync_status: Arc<SyncStatus>,
has_received_update: AtomicBool,
}Expand description
Cache for fast instrument lookups Provides O(1) access to instruments by symbol, underlying, expiry, and instrument id
Fields§
§instruments: Arc<RwLock<HashMap<String, Instrument>>>Primary storage: symbol -> Instrument
by_underlying: Arc<RwLock<HashMap<String, Vec<String>>>>Index: underlying -> Vec
by_underlying_expiry: Arc<RwLock<HashMap<(String, u64), Vec<String>>>>Index: (underlying, expiry) -> Vec
by_instrument_id: Arc<RwLock<HashMap<i32, String>>>Index: instrument id -> symbol
last_market_update_seq: Arc<RwLock<i64>>Last processed market update sequence number
last_snapshot_seq: Arc<RwLock<i64>>Sequence captured during last list_all() call for atomic snapshot consistency. This ensures snapshot_offsets() returns the same seq that was captured with the state.
sync_status: Arc<SyncStatus>Sync status for readiness tracking
has_received_update: AtomicBoolFlag to track if we’ve received at least one update (for readiness)
Implementations§
Source§impl InstrumentsCache
impl InstrumentsCache
Sourcepub fn sync_status(&self) -> Arc<SyncStatus>
pub fn sync_status(&self) -> Arc<SyncStatus>
Get the sync status for readiness checks.
Sourcepub fn snapshot_offsets(
&self,
) -> Result<HashMap<String, HashMap<i32, i64>>, SnapshotError>
pub fn snapshot_offsets( &self, ) -> Result<HashMap<String, HashMap<i32, i64>>, SnapshotError>
Get snapshot offsets for the market updates topic. Returns the last processed sequence number as an offset.
Sourcepub async fn apply_snapshot_offsets(
&self,
offsets: HashMap<String, HashMap<i32, i64>>,
) -> Result<(), SnapshotError>
pub async fn apply_snapshot_offsets( &self, offsets: HashMap<String, HashMap<i32, i64>>, ) -> Result<(), SnapshotError>
Apply snapshot offsets after restore.
Sourcepub async fn update_seq(&self, seq: i64)
pub async fn update_seq(&self, seq: i64)
Update the last processed sequence number.
Sourcepub async fn initialize(
self: Arc<Self>,
diesel_db: &Arc<dyn BootstrapReader>,
event_bus: Arc<dyn EventBusTrait>,
) -> Result<()>
pub async fn initialize( self: Arc<Self>, diesel_db: &Arc<dyn BootstrapReader>, event_bus: Arc<dyn EventBusTrait>, ) -> Result<()>
Initialize the cache by loading instruments from DB and starting event listener (legacy, no shutdown support).
For graceful shutdown support, use initialize_with_shutdown.
pub async fn initialize_with_shutdown( self: Arc<Self>, diesel_db: &Arc<dyn BootstrapReader>, _event_bus: Arc<dyn EventBusTrait>, shutdown_rx: Receiver<()>, ) -> Result<()>
async fn start_periodic_refresh( self: Arc<Self>, diesel_db: Arc<dyn BootstrapReader>, shutdown_rx: Receiver<()>, )
Sourcepub async fn initialize_with_snapshot<L>(
self: Arc<Self>,
diesel_db: &Arc<dyn BootstrapReader>,
event_bus: Arc<dyn EventBusTrait>,
loader: &L,
shutdown_rx: Receiver<()>,
) -> Result<Option<HashMap<String, HashMap<i32, i64>>>>
pub async fn initialize_with_snapshot<L>( self: Arc<Self>, diesel_db: &Arc<dyn BootstrapReader>, event_bus: Arc<dyn EventBusTrait>, loader: &L, shutdown_rx: Receiver<()>, ) -> Result<Option<HashMap<String, HashMap<i32, i64>>>>
Initialize the cache with snapshot support.
Flow:
- Try to load from snapshot (if available)
- If snapshot exists: restore state, catchup from offsets, mark as ready
- If no snapshot: load from DB as fallback, mark as ready
- Start event listener for live updates
async fn load_instruments_from_db( &self, diesel_db: &dyn BootstrapReader, ) -> Result<()>
Sourceasync fn start_event_listeners_with_shutdown(
self: Arc<Self>,
event_bus: Arc<dyn EventBusTrait>,
shutdown_rx: Receiver<()>,
) -> Result<()>
async fn start_event_listeners_with_shutdown( self: Arc<Self>, event_bus: Arc<dyn EventBusTrait>, shutdown_rx: Receiver<()>, ) -> Result<()>
Start event listeners for market updates with shutdown support.
Uses subscribe_with_offsets to track offsets for snapshot consistency.
Sourcepub async fn handle_market_update(
&self,
message: MarketUpdateMessage,
) -> Result<()>
pub async fn handle_market_update( &self, message: MarketUpdateMessage, ) -> Result<()>
Handle market update messages (create, delete, expire) Public to allow catchup replay from saved offsets.
Sourceasync fn add_instrument(&self, market: &Market) -> Result<()>
async fn add_instrument(&self, market: &Market) -> Result<()>
Add a new instrument to the cache
Sourceasync fn remove_instrument(&self, symbol: &str) -> Result<()>
async fn remove_instrument(&self, symbol: &str) -> Result<()>
Remove an instrument from the cache
Sourcepub async fn get_by_symbol(&self, symbol: &str) -> Option<Instrument>
pub async fn get_by_symbol(&self, symbol: &str) -> Option<Instrument>
Get instrument by symbol
Sourcepub fn allows_rfq(&self, symbol: &str) -> bool
pub fn allows_rfq(&self, symbol: &str) -> bool
Synchronously check whether an instrument’s trading mode includes RFQ. Returns false for unknown instruments so callers default to rejecting.
Sourcepub async fn get_by_underlying(&self, underlying: &str) -> Vec<Instrument>
pub async fn get_by_underlying(&self, underlying: &str) -> Vec<Instrument>
Get all instruments for a given underlying
Sourcepub async fn get_by_underlying_and_expiry(
&self,
underlying: &str,
expiry: u64,
) -> Vec<Instrument>
pub async fn get_by_underlying_and_expiry( &self, underlying: &str, expiry: u64, ) -> Vec<Instrument>
Get all instruments for a given underlying and expiry
Sourcepub async fn get_by_instrument_id(
&self,
instrument_id: i32,
) -> Option<Instrument>
pub async fn get_by_instrument_id( &self, instrument_id: i32, ) -> Option<Instrument>
Get instrument by instrument id
Sourcepub async fn get_all(&self) -> Vec<Instrument>
pub async fn get_all(&self) -> Vec<Instrument>
Get all instruments (for debugging/admin)
pub async fn reload_from_db( &self, diesel_db: &dyn BootstrapReader, ) -> Result<()>
Sourceasync fn add_instrument_direct(&self, instrument: Instrument) -> Result<()>
async fn add_instrument_direct(&self, instrument: Instrument) -> Result<()>
Add an instrument directly to the cache (used during snapshot restore).
Trait Implementations§
Source§impl Default for InstrumentsCache
impl Default for InstrumentsCache
Source§impl InstrumentsCacheReader for InstrumentsCache
impl InstrumentsCacheReader for InstrumentsCache
fn get_by_symbol<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Instrument>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn allows_rfq(&self, symbol: &str) -> bool
fn get_by_underlying_and_expiry<'life0, 'life1, 'async_trait>(
&'life0 self,
underlying: &'life1 str,
expiry: u64,
) -> Pin<Box<dyn Future<Output = Vec<Instrument>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_by_instrument_id<'life0, 'async_trait>(
&'life0 self,
instrument_id: i32,
) -> Pin<Box<dyn Future<Output = Option<Instrument>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<Instrument>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn len<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reload_from_db<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 dyn BootstrapReader,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Snapshotable for InstrumentsCache
impl Snapshotable for InstrumentsCache
Source§fn list_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<Self::Key, Self::State>, SnapshotError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<Self::Key, Self::State>, SnapshotError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns a cloned snapshot of all instrument entries.
CRITICAL: We must capture the state AND the sequence atomically. This ensures snapshot_offsets() returns the same seq that was captured with the state.
Source§type State = InstrumentSnapshotState
type State = InstrumentSnapshotState
Auto Trait Implementations§
impl !Freeze for InstrumentsCache
impl !RefUnwindSafe for InstrumentsCache
impl Send for InstrumentsCache
impl Sync for InstrumentsCache
impl Unpin for InstrumentsCache
impl UnsafeUnpin for InstrumentsCache
impl !UnwindSafe for InstrumentsCache
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.