pub struct TierCache {
tiers: Arc<RwLock<HashMap<WalletAddress, UserTierRecord>>>,
db: Arc<dyn TierWriter>,
config: TierCacheConfig,
}Fields§
§tiers: Arc<RwLock<HashMap<WalletAddress, UserTierRecord>>>§db: Arc<dyn TierWriter>§config: TierCacheConfigImplementations§
Source§impl TierCache
impl TierCache
pub fn new(db: Arc<dyn TierWriter>) -> Result<Self>
pub fn new_with_config( db: Arc<dyn TierWriter>, config: TierCacheConfig, ) -> Result<Self>
Sourcepub async fn load_from_db(&self) -> Result<()>
pub async fn load_from_db(&self) -> Result<()>
Load all tier configurations from database
Sourcepub async fn get_tier(&self, wallet: &WalletAddress) -> Option<UserTierData>
pub async fn get_tier(&self, wallet: &WalletAddress) -> Option<UserTierData>
Get tier for wallet (returns default if not found)
pub async fn get_tier_record( &self, wallet: &WalletAddress, ) -> Result<Option<UserTier>>
pub async fn restore_tier_record( &self, wallet: &WalletAddress, previous_tier: Option<&UserTier>, ) -> Result<()>
Sourcepub fn get_tier_sync(&self, wallet: &WalletAddress) -> UserTierData
pub fn get_tier_sync(&self, wallet: &WalletAddress) -> UserTierData
Get tier synchronously (for use in unified_engine) This is non-blocking and returns default if cache is locked or tier not found
fn try_get_from_cache(&self, wallet: &WalletAddress) -> Option<UserTierData>
Sourcepub async fn set_tier(&self, update: UserTierUpdate) -> Result<()>
pub async fn set_tier(&self, update: UserTierUpdate) -> Result<()>
Set or update tier
Sourcepub async fn delete_tier(&self, wallet: &WalletAddress) -> Result<()>
pub async fn delete_tier(&self, wallet: &WalletAddress) -> Result<()>
Reset tier limits to defaults while preserving the explicit margin mode row.
Sourcepub fn is_tier1(&self, wallet: &WalletAddress) -> bool
pub fn is_tier1(&self, wallet: &WalletAddress) -> bool
Check if wallet is tier1 (restricted to long-only)
Sourcepub fn is_tier2(&self, wallet: &WalletAddress) -> bool
pub fn is_tier2(&self, wallet: &WalletAddress) -> bool
Check if wallet is tier2 (unrestricted)
Sourcepub async fn get_margin_mode(
&self,
wallet: &WalletAddress,
) -> Result<MarginMode>
pub async fn get_margin_mode( &self, wallet: &WalletAddress, ) -> Result<MarginMode>
Get margin mode for wallet.
This is the async version for use in handlers.
Sourcepub async fn get_existing_margin_mode(
&self,
wallet: &WalletAddress,
) -> Result<Option<MarginMode>>
pub async fn get_existing_margin_mode( &self, wallet: &WalletAddress, ) -> Result<Option<MarginMode>>
Get the existing margin mode for a wallet without fabricating a default.
Returns Ok(None) only when no tier row exists. Invalid stored values
still fail closed because the persisted margin mode is corrupted.
Sourcepub fn get_existing_margin_mode_sync(
&self,
wallet: &WalletAddress,
) -> Result<Option<MarginMode>>
pub fn get_existing_margin_mode_sync( &self, wallet: &WalletAddress, ) -> Result<Option<MarginMode>>
Get an existing margin mode synchronously without fabricating a default.
Sourcepub fn get_margin_mode_sync(&self, wallet: &WalletAddress) -> Result<MarginMode>
pub fn get_margin_mode_sync(&self, wallet: &WalletAddress) -> Result<MarginMode>
Get margin mode synchronously (for use in unified_engine).
Non-blocking and fail-closed if the cache is locked. Missing rows
intentionally resolve to Standard; see get_margin_mode.
Sourcepub async fn set_margin_mode(
&self,
wallet: &WalletAddress,
mode: MarginMode,
) -> Result<i64>
pub async fn set_margin_mode( &self, wallet: &WalletAddress, mode: MarginMode, ) -> Result<i64>
Set margin mode for a wallet.
Creates the tier entry if it doesn’t exist. Returns the new version for use in event messages.
Sourcepub async fn insert_margin_mode_if_missing(
&self,
wallet: &WalletAddress,
mode: MarginMode,
) -> Result<Option<i64>>
pub async fn insert_margin_mode_if_missing( &self, wallet: &WalletAddress, mode: MarginMode, ) -> Result<Option<i64>>
Create a margin mode row if one does not already exist.
Returns Some(version) when a row was inserted. Existing rows are left
unchanged so callers can safely use this for bootstrap paths.
Sourcepub fn get_all_margin_modes_sync(
&self,
) -> Result<HashMap<WalletAddress, MarginMode>>
pub fn get_all_margin_modes_sync( &self, ) -> Result<HashMap<WalletAddress, MarginMode>>
Extract all wallet margin modes from the cache.
Used at startup to seed engine-owned wallet_margin_modes so the engine never needs the fallback try_read() path.
Sourcepub fn get_all_trading_limits_sync(
&self,
) -> Result<HashMap<WalletAddress, TradingLimits>, String>
pub fn get_all_trading_limits_sync( &self, ) -> Result<HashMap<WalletAddress, TradingLimits>, String>
Extract all wallet trading limits from the cache.
Returns an error if the lock cannot be acquired (e.g. contention during engine seed). Callers must not silently default to empty.
Sourcepub fn get_all_tiers_sync(
&self,
) -> Result<HashMap<WalletAddress, String>, String>
pub fn get_all_tiers_sync( &self, ) -> Result<HashMap<WalletAddress, String>, String>
Extract all wallet tier strings from the cache.
Returns an error if the lock cannot be acquired.
Sourcepub fn is_standard_margin(&self, wallet: &WalletAddress) -> Result<bool>
pub fn is_standard_margin(&self, wallet: &WalletAddress) -> Result<bool>
Check if wallet is in Standard margin mode.
Sourcepub fn is_portfolio_margin(&self, wallet: &WalletAddress) -> Result<bool>
pub fn is_portfolio_margin(&self, wallet: &WalletAddress) -> Result<bool>
Check if wallet is in Portfolio margin mode.
Sourcepub async fn apply_margin_mode_update(
&self,
wallet: WalletAddress,
mode: MarginMode,
version: i64,
)
pub async fn apply_margin_mode_update( &self, wallet: WalletAddress, mode: MarginMode, version: i64, )
Apply a margin mode update from the event bus (for cross-process cache sync).
This is called when we receive a TierUpdate message. Only applies the update if the version is newer than the cached version.
Sourcepub async fn get_version(&self, wallet: &WalletAddress) -> i64
pub async fn get_version(&self, wallet: &WalletAddress) -> i64
Get the current version for a wallet’s tier configuration.
Sourcepub fn get_trading_limits(&self, wallet: &WalletAddress) -> TradingLimits
pub fn get_trading_limits(&self, wallet: &WalletAddress) -> TradingLimits
Get trading limits for a wallet.
Returns the wallet’s configured limits, or defaults if not found.
Sourcepub async fn get_trading_limits_async(
&self,
wallet: &WalletAddress,
) -> TradingLimits
pub async fn get_trading_limits_async( &self, wallet: &WalletAddress, ) -> TradingLimits
Get trading limits asynchronously.
Sourcepub fn exceeds_open_orders_limit(
&self,
wallet: &WalletAddress,
current_count: usize,
) -> bool
pub fn exceeds_open_orders_limit( &self, wallet: &WalletAddress, current_count: usize, ) -> bool
Check if the number of open orders exceeds the limit. Returns true if the limit is exceeded. Returns false if limit is negative (unlimited).
Sourcepub fn exceeds_positions_limit(
&self,
wallet: &WalletAddress,
current_count: usize,
) -> bool
pub fn exceeds_positions_limit( &self, wallet: &WalletAddress, current_count: usize, ) -> bool
Check if the number of positions exceeds the limit. Returns true if the limit is exceeded. Returns false if limit is -1 (unlimited).
pub fn default_trading_limits(&self) -> TradingLimits
fn trading_limits_from_tier(&self, tier: &UserTier) -> TradingLimits
Sourcepub async fn set_margin_mode_in_memory(
&self,
wallet: &WalletAddress,
mode: MarginMode,
)
pub async fn set_margin_mode_in_memory( &self, wallet: &WalletAddress, mode: MarginMode, )
Set the margin mode for a wallet in the in-memory cache only (no DB write). Use this in tests that need to simulate PM vs SM accounts.
Trait Implementations§
Source§impl TierCacheApi for TierCache
impl TierCacheApi for TierCache
fn get_tier<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Option<UserTierData>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tier_record<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<UserTierRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_existing_margin_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<Option<MarginMode>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn restore_tier_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
previous_tier: Option<&'life2 UserTierRecord>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_tier<'life0, 'async_trait>(
&'life0 self,
new_tier: UserTierUpdate,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_tier<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_margin_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = Result<MarginMode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_margin_mode_sync(&self, wallet: &WalletAddress) -> Result<MarginMode>
fn set_margin_mode<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
mode: MarginMode,
) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply_margin_mode_update<'life0, 'async_trait>(
&'life0 self,
wallet: WalletAddress,
margin_mode: MarginMode,
version: i64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_trading_limits(&self, wallet: &WalletAddress) -> TradingLimits
fn get_trading_limits_async<'life0, 'life1, 'async_trait>(
&'life0 self,
wallet: &'life1 WalletAddress,
) -> Pin<Box<dyn Future<Output = TradingLimits> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for TierCache
impl !RefUnwindSafe for TierCache
impl Send for TierCache
impl Sync for TierCache
impl Unpin for TierCache
impl UnsafeUnpin for TierCache
impl !UnwindSafe for TierCache
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.