Trait kubewatch::Events
[−]
[src]
pub trait Events { fn events<Event>(
&self,
name: &str
) -> Result<Receiver<Result<Event, Error>>, Error>
where
Event: Deserialize + Send + 'static; fn generator<Event, Iter>(
&self,
iter: Iter
) -> Receiver<Result<Event, Error>>
where
Event: Deserialize + Send + 'static,
Iter: Iterator<Item = Result<u8>> + Send + 'static, { ... } }
This trait is used to deserialize input stream and return respective Rust structs.
Required Methods
fn events<Event>(
&self,
name: &str
) -> Result<Receiver<Result<Event, Error>>, Error> where
Event: Deserialize + Send + 'static,
&self,
name: &str
) -> Result<Receiver<Result<Event, Error>>, Error> where
Event: Deserialize + Send + 'static,
Read monitor of events with given name
and return them as given Event
structure.
Provided Methods
fn generator<Event, Iter>(&self, iter: Iter) -> Receiver<Result<Event, Error>> where
Event: Deserialize + Send + 'static,
Iter: Iterator<Item = Result<u8>> + Send + 'static,
Event: Deserialize + Send + 'static,
Iter: Iterator<Item = Result<u8>> + Send + 'static,
Helper which reads a byte iterator, deserializes it and return respective structures.
Implementors
impl Events for Cluster