pub struct ResolverCache { /* private fields */ }Expand description
Per-client caches backing symbol↔id resolution.
Contents are cloneable because all fields are reference-counted internally
(moka caches clone by bumping an atomic, OnceCell is shared via
Arc). Dropping the last clone releases the allocations.
§Policy
The cache stores only identity and metadata lookups that are effectively immutable over the server lifetime:
symbol → Instrument(equity metadata)uuid → symbol(reverse lookup for enrichment)symbol → IndexInstrumentsymbol → FuturesContract- The singleton futures account id
Financial data such as quotes, prices, candles, positions, orders, fundamentals, news, ratings are never stored here.
Implementations§
Source§impl ResolverCache
impl ResolverCache
Sourcepub fn from_config(config: &CacheConfig) -> Self
pub fn from_config(config: &CacheConfig) -> Self
Builds a cache from a configuration.
The returned value is cheap to clone and share across
RobinhoodClient clones: every field is
internally reference-counted.
Trait Implementations§
Source§impl Clone for ResolverCache
impl Clone for ResolverCache
Source§fn clone(&self) -> ResolverCache
fn clone(&self) -> ResolverCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ResolverCache
impl !UnwindSafe for ResolverCache
impl Freeze for ResolverCache
impl Send for ResolverCache
impl Sync for ResolverCache
impl Unpin for ResolverCache
impl UnsafeUnpin for ResolverCache
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
Mutably borrows from an owned value. Read more