[][src]Struct twitter_stream::TwitterStream

pub struct TwitterStream<B: Body> { /* fields omitted */ }

A listener for Twitter Streaming API, yielding JSON strings returned from the API.

Implementations

impl<B: Body> TwitterStream<B>[src]

pub fn builder<'a, C, A>(token: Token<C, A>) -> Builder<'a, Token<C, A>> where
    C: AsRef<str>,
    A: AsRef<str>, 
[src]

Creates a Builder for TwitterStream.

impl TwitterStream<Body>[src]

pub fn follow<C, A>(follow: &[u64], token: &Token<C, A>) -> FutureTwitterStream where
    C: AsRef<str>,
    A: AsRef<str>, 
[src]

Connect to the filter stream, yielding Tweets from the users specified by follow argument.

This is a shorthand for twitter_stream::Builder::new(token).follow(follow).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

Panics

This will panic if the underlying HTTPS connector failed to initialize.

pub fn track<C, A>(track: &str, token: &Token<C, A>) -> FutureTwitterStream where
    C: AsRef<str>,
    A: AsRef<str>, 
[src]

Connect to the filter stream, yielding Tweets that matches the query specified by track argument.

This is a shorthand for twitter_stream::Builder::new(token).track(track).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

Panics

This will panic if the underlying HTTPS connector failed to initialize.

pub fn locations<C, A>(
    locations: &[BoundingBox],
    token: &Token<C, A>
) -> FutureTwitterStream where
    C: AsRef<str>,
    A: AsRef<str>, 
[src]

Connect to the filter stream, yielding geolocated Tweets falling within the specified bounding boxes.

This is a shorthand for twitter_stream::Builder::new(token).locations(locations).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

Panics

This will panic if the underlying HTTPS connector failed to initialize.

pub fn sample<C, A>(token: &Token<C, A>) -> FutureTwitterStream where
    C: AsRef<str>,
    A: AsRef<str>, 
[src]

Connect to the sample stream, yielding a "small random sample" of all public Tweets.

This is a shorthand for twitter_stream::Builder::new(token).listen(). For more specific configurations, use TwitterStream::builder or Builder::new.

Panics

This will panic if the underlying HTTPS connector failed to initialize.

Trait Implementations

impl<B> Stream for TwitterStream<B> where
    B: Body
[src]

type Item = Result<String<Bytes>, Error<B::Error>>

Values yielded by the stream.

impl<'__pin, B: Body> Unpin for TwitterStream<B> where
    __Origin<'__pin, B>: Unpin
[src]

Auto Trait Implementations

impl<B> !RefUnwindSafe for TwitterStream<B>[src]

impl<B> Send for TwitterStream<B> where
    B: Send,
    <B as Body>::Error: Send
[src]

impl<B> Sync for TwitterStream<B> where
    B: Sync,
    <B as Body>::Error: Sync
[src]

impl<B> !UnwindSafe for TwitterStream<B>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<St> StreamExt for St where
    St: Stream + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,