pub struct DataLocalizer { /* private fields */ }
Expand description
data localizer - fetch all export data at once to avoid repeated access to global state
Implementations§
Source§impl DataLocalizer
impl DataLocalizer
Sourcepub fn with_cache_ttl(cache_ttl: Duration) -> Self
pub fn with_cache_ttl(cache_ttl: Duration) -> Self
create data localizer with custom cache ttl
Sourcepub fn gather_all_export_data(
&mut self,
) -> TrackingResult<(LocalizedExportData, DataGatheringStats)>
pub fn gather_all_export_data( &mut self, ) -> TrackingResult<(LocalizedExportData, DataGatheringStats)>
gather all export data at once to avoid repeated access to global state
Sourcepub fn refresh_cache(
&mut self,
) -> TrackingResult<(LocalizedExportData, DataGatheringStats)>
pub fn refresh_cache( &mut self, ) -> TrackingResult<(LocalizedExportData, DataGatheringStats)>
refresh cache and gather all export data
Sourcepub fn invalidate_cache(&mut self)
pub fn invalidate_cache(&mut self)
invalidate cache
Sourcepub fn get_cache_stats(&self) -> CacheStats
pub fn get_cache_stats(&self) -> CacheStats
get cache stats
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataLocalizer
impl RefUnwindSafe for DataLocalizer
impl Send for DataLocalizer
impl Sync for DataLocalizer
impl Unpin for DataLocalizer
impl UnwindSafe for DataLocalizer
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
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>
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 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>
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