Set tokio_xmpp::client::async_client::Config as public
This commit is contained in:
parent
0d0335898d
commit
88ab74c92f
2 changed files with 16 additions and 5 deletions
|
|
@ -35,21 +35,29 @@ pub struct Client {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// XMPP server connection configuration
|
/// XMPP server connection configuration
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum ServerConfig {
|
pub enum ServerConfig {
|
||||||
|
/// Use SRV record to find server host
|
||||||
UseSrv,
|
UseSrv,
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
/// Manually define server host and port
|
||||||
Manual {
|
Manual {
|
||||||
|
/// Server host name
|
||||||
host: String,
|
host: String,
|
||||||
|
/// Server port
|
||||||
port: u16,
|
port: u16,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/// XMMPP client configuration
|
/// XMMPP client configuration
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
jid: Jid,
|
/// jid of the account
|
||||||
password: String,
|
pub jid: Jid,
|
||||||
server: ServerConfig,
|
/// password of the account
|
||||||
|
pub password: String,
|
||||||
|
/// server configuration for the account
|
||||||
|
pub server: ServerConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
type XMPPStream = xmpp_stream::XMPPStream<TlsStream<TcpStream>>;
|
type XMPPStream = xmpp_stream::XMPPStream<TlsStream<TcpStream>>;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@ mod client;
|
||||||
mod happy_eyeballs;
|
mod happy_eyeballs;
|
||||||
pub mod stream_features;
|
pub mod stream_features;
|
||||||
pub mod xmpp_stream;
|
pub mod xmpp_stream;
|
||||||
pub use client::{async_client::Client as AsyncClient, simple_client::Client as SimpleClient};
|
pub use client::{
|
||||||
|
async_client::Client as AsyncClient, async_client::Config as AsyncConfig,
|
||||||
|
async_client::ServerConfig as AsyncServerConfig, simple_client::Client as SimpleClient,
|
||||||
|
};
|
||||||
mod component;
|
mod component;
|
||||||
pub use crate::component::Component;
|
pub use crate::component::Component;
|
||||||
mod error;
|
mod error;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue