more of a ClientEvent api
This commit is contained in:
parent
e2a4f609fb
commit
7f667041d9
3 changed files with 52 additions and 29 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue