/// Returns a stream of this component's log messages.
///
/// # Dropped logs
///
/// When messages are evicted from our internal buffers before a client can read them, they
/// are surfaced here as an `LazyItem::ItemsDropped` variant. We report these as synthesized
/// messages with the timestamp populated as the most recent timestamp from the stream.
Returns a stream of this component's log messages.
Returns a stream of this component ' s log messages .
pub fn cursor(&self, mode: StreamMode) -> PinStream<Arc<Message>> {
        let identity = self.identity.clone();
        let earliest_timestamp =
            self.buffer.peek_front().map(|f| *f.metadata.timestamp as i64).unwrap_or(0);
        Box::pin(self.buffer.cursor(mode).scan(earliest_timestamp, move |last_timestamp, item| {
            futures::future::ready(Some(match item {
                LazyItem::Next(m) => {
                    *last_timestamp = m.metadata.timestamp.into();
                    m
                }
                LazyItem::ItemsDropped(n) => {
                    Arc::new(Message::for_dropped(n, &identity, *last_timestamp))
                }
            }))
        }))
    }
pub fn cursor ( & self , mode : StreamMode ) -> PinStream < Arc < Message > > { let identity = self . identity . clone ( ) ; let earliest_timestamp = self . buffer . peek_front ( ) . map ( | f | * f . metadata . timestamp as i64 ) . unwrap_or ( 0 ) ; Box :: pin ( self . buffer . cursor ( mode ) . scan ( earliest_timestamp , move | last_timestamp , item | { futures :: future :: ready ( Some ( match item { LazyItem :: Next ( m ) => { * last_timestamp = m . metadata . timestamp . into ( ) ; m } LazyItem :: ItemsDropped ( n ) => { Arc :: new ( Message :: for_dropped ( n , & identity , * last_timestamp ) ) } } ) ) } ) ) }
Returns a stream of this component's log messages.
Returns a stream of this component ' s log messages .
&self
mode
StreamMode
dropped logs
When messages are evicted from our internal buffers before a client can read them, they
are surfaced here as an `LazyItem::ItemsDropped` variant. We report these as synthesized
messages with the timestamp populated as the most recent timestamp from the stream.
When messages are evicted from our internal buffers before a client can read them they are surfaced here as an ` LazyItem :: ItemsDropped ` variant . We report these as synthesized messages with the timestamp populated as the most recent timestamp from the stream .