more of a ClientEvent api

This commit is contained in:
Astro 2017-07-13 01:47:05 +02:00
commit 7f667041d9
3 changed files with 52 additions and 29 deletions

View file

@ -19,6 +19,8 @@ mod auth;
use self::auth::*;
mod bind;
use self::bind::*;
mod event;
pub use self::event::Event as ClientEvent;
pub struct Client {
pub jid: Jid,
@ -99,13 +101,6 @@ impl Client {
}
}
#[derive(Debug)]
pub enum ClientEvent {
Online,
Disconnected,
Stanza(xml::Element),
}
impl Stream for Client {
type Item = ClientEvent;
type Error = String;