[][src]Struct eventsource_client::Client

pub struct Client { /* fields omitted */ }

Client that connects to a server using the Server-Sent Events protocol and consumes the event stream indefinitely.

Methods

impl Client[src]

pub fn for_url(url: &str) -> Result<ClientBuilder>[src]

Construct a new Client (via a ClientBuilder). This will not perform any network activity until .stream() is called.

pub fn stream(&mut self) -> EventStream[src]

Connect to the server and begin consuming the stream. Produces a Stream of Events.

Auto Trait Implementations

impl Sync for Client

impl Send for Client

impl Unpin for Client

impl RefUnwindSafe for Client

impl UnwindSafe for Client

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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