pub struct EventSourceTask { /* private fields */ }
Expand description
A handle to control current event source connection. Implements Task
and could be canceled.
Implementations§
Source§impl EventSourceTask
impl EventSourceTask
Sourcepub fn add_event_listener<S, OUT>(
&mut self,
event_type: S,
callback: Callback<OUT>,
)
pub fn add_event_listener<S, OUT>( &mut self, event_type: S, callback: Callback<OUT>, )
Register a callback for events of a given type
This registers an event listener, which will fire callback
when an
event of event_type
occurs.
Sourcepub fn ready_state(&self) -> ReadyState
pub fn ready_state(&self) -> ReadyState
Query the ready state of the event source.
Trait Implementations§
Source§impl Debug for EventSourceTask
impl Debug for EventSourceTask
Source§impl Drop for EventSourceTask
impl Drop for EventSourceTask
Auto Trait Implementations§
impl Freeze for EventSourceTask
impl !RefUnwindSafe for EventSourceTask
impl !Send for EventSourceTask
impl !Sync for EventSourceTask
impl Unpin for EventSourceTask
impl !UnwindSafe for EventSourceTask
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
Source§impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
impl<T, V> IntoOptPropValue<V> for Twhere
T: IntoPropValue<Option<V>>,
Source§fn into_opt_prop_value(self) -> Option<V>
fn into_opt_prop_value(self) -> Option<V>
Convert
self
to an optional value of a Properties
struct.Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.