pub struct InMemoryFeedbackSink { /* private fields */ }Expand description
In-memory sink for testing.
Implementations§
Source§impl InMemoryFeedbackSink
impl InMemoryFeedbackSink
pub fn new(max: usize) -> Self
pub fn get_events(&self) -> Vec<FeedbackEvent>
pub fn get_events_by_request(&self, req_id: &str) -> Vec<FeedbackEvent>
pub fn clear(&self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl FeedbackSink for InMemoryFeedbackSink
impl FeedbackSink for InMemoryFeedbackSink
fn report<'life0, 'async_trait>(
&'life0 self,
event: FeedbackEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn report_batch<'life0, 'async_trait>(
&'life0 self,
events: Vec<FeedbackEvent>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for InMemoryFeedbackSink
impl RefUnwindSafe for InMemoryFeedbackSink
impl Send for InMemoryFeedbackSink
impl Sync for InMemoryFeedbackSink
impl Unpin for InMemoryFeedbackSink
impl UnwindSafe for InMemoryFeedbackSink
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