pub struct CachedStorage<S> { /* private fields */ }
Expand description
This storage wraps another storage implementation to keep some in memory.
Implementations§
Source§impl<S> CachedStorage<S>
impl<S> CachedStorage<S>
pub fn new(capacity: usize, storage: S) -> CachedStorage<S>
Trait Implementations§
Source§impl<S> Storage for CachedStorage<S>where
S: Storage,
impl<S> Storage for CachedStorage<S>where
S: Storage,
fn get_resource(&self, at: Timestamp) -> Result<Arc<Resource>, StorageError>
fn get_span(&self, at: Timestamp) -> Result<Arc<Span>, StorageError>
fn get_span_event(&self, at: Timestamp) -> Result<Arc<SpanEvent>, StorageError>
fn get_event(&self, at: Timestamp) -> Result<Arc<Event>, StorageError>
fn get_all_resources( &self, ) -> Result<Box<dyn Iterator<Item = Result<Arc<Resource>, StorageError>> + '_>, StorageError>
fn get_all_spans( &self, ) -> Result<Box<dyn Iterator<Item = Result<Arc<Span>, StorageError>> + '_>, StorageError>
fn get_all_span_events( &self, ) -> Result<Box<dyn Iterator<Item = Result<Arc<SpanEvent>, StorageError>> + '_>, StorageError>
fn get_all_events( &self, ) -> Result<Box<dyn Iterator<Item = Result<Arc<Event>, StorageError>> + '_>, StorageError>
fn insert_resource(&mut self, resource: Resource) -> Result<(), StorageError>
fn insert_span(&mut self, span: Span) -> Result<(), StorageError>
fn insert_span_event( &mut self, span_event: SpanEvent, ) -> Result<(), StorageError>
fn insert_event(&mut self, event: Event) -> Result<(), StorageError>
fn update_span_closed( &mut self, at: Timestamp, closed: Timestamp, busy: Option<u64>, ) -> Result<(), StorageError>
fn update_span_attributes( &mut self, at: Timestamp, attributes: BTreeMap<String, Value>, ) -> Result<(), StorageError>
fn update_span_link( &mut self, at: Timestamp, link: FullSpanId, attributes: BTreeMap<String, Value>, ) -> Result<(), StorageError>
fn update_span_parents( &mut self, parent_key: SpanKey, spans: &[SpanKey], ) -> Result<(), StorageError>
fn update_event_parents( &mut self, parent_key: SpanKey, events: &[EventKey], ) -> Result<(), StorageError>
fn drop_resources( &mut self, resources: &[Timestamp], ) -> Result<(), StorageError>
fn drop_spans(&mut self, spans: &[Timestamp]) -> Result<(), StorageError>
fn drop_span_events( &mut self, span_events: &[Timestamp], ) -> Result<(), StorageError>
fn drop_events(&mut self, events: &[Timestamp]) -> Result<(), StorageError>
Auto Trait Implementations§
impl<S> !Freeze for CachedStorage<S>
impl<S> !RefUnwindSafe for CachedStorage<S>
impl<S> Send for CachedStorage<S>where
S: Send,
impl<S> !Sync for CachedStorage<S>
impl<S> Unpin for CachedStorage<S>where
S: Unpin,
impl<S> UnwindSafe for CachedStorage<S>where
S: UnwindSafe,
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