pub fn stream_new(&'a self) -> impl Stream<Item = listing_response::Data> + 'a {
    let mut responses_so_far = HashSet::new();
    stream! {
        loop {
            let response;

            match self.new(&Default::default()).await {
                Ok(whatever) => {response = whatever},
                Err(e) => {panic!("Error streaming: {}", e)},
            };

            for entry in response.data.children {
                // If it hasn't been seen yet
                if responses_so_far.insert(entry.data.id.clone()) {
                    yield entry.data;
                }
            }
            thread::sleep(time::Duration::from_secs(30));
        }
    }
  }
/// NOTE: This stream does not terminate!
/// Create a stream of any new posts. Continually emits new posts as they're posted for as long
/// as the program executes.
This stream does not terminate.
Create a stream of any new posts. Continually emits new posts as they're posted for as long
as the program executes.
This stream does not terminate . Create a stream of any new posts . Continually emits new posts as they ' re posted for as long as the program executes .
pub fn stream_new(&'a self) -> impl Stream<Item = listing_response::Data> + 'a {
    let mut responses_so_far = HashSet::new();
    stream! {
        loop {
            let response;
            match self.new(&Default::default()).await {
                Ok(whatever) => {response = whatever},
                Err(e) => {panic!("Error streaming: {}", e)},
            };
            for entry in response.data.children {
                // If it hasn't been seen yet
                if responses_so_far.insert(entry.data.id.clone()) {
                    yield entry.data;
                }
            }
            thread::sleep(time::Duration::from_secs(30));
        }
    }
  }
pub fn stream_new ( & ' a self ) -> impl Stream < Item = listing_response :: Data > + ' a { let mut responses_so_far = HashSet :: new ( ) ; stream ! { loop { let response match self new ( Default default ( ) ) await { Ok ( whatever ) { response whatever } Err ( e ) { panic ( " " e ) } } for entry in response data children { // If it hasn't been seen yet if responses_so_far insert ( entry data id clone ( ) ) { yield entry data } } thread sleep ( time Duration from_secs ( 30 ) ) } } }
NOTE: This stream does not terminate!
NOTE : This stream does not terminate!
&'a self
&'a self