mirror of
https://github.com/actix/actix-extras.git
synced 2024-12-01 02:44:37 +01:00
add DefaultClient type alias
This commit is contained in:
parent
09c94cb06b
commit
4260692034
@ -4,7 +4,7 @@ mod service;
|
|||||||
|
|
||||||
pub use self::connect::Connect;
|
pub use self::connect::Connect;
|
||||||
pub use self::error::ClientError;
|
pub use self::error::ClientError;
|
||||||
pub use self::service::Client;
|
pub use self::service::{Client, DefaultClient};
|
||||||
|
|
||||||
#[derive(PartialEq, Hash, Debug, Clone, Copy)]
|
#[derive(PartialEq, Hash, Debug, Clone, Copy)]
|
||||||
pub(crate) enum Protocol {
|
pub(crate) enum Protocol {
|
||||||
|
@ -19,6 +19,9 @@ use ws::Codec;
|
|||||||
|
|
||||||
use super::{ClientError, Connect, Protocol};
|
use super::{ClientError, Connect, Protocol};
|
||||||
|
|
||||||
|
/// Default client, uses default connector.
|
||||||
|
pub type DefaultClient = Client<DefaultConnector<String>>;
|
||||||
|
|
||||||
/// WebSocket's client
|
/// WebSocket's client
|
||||||
pub struct Client<T>
|
pub struct Client<T>
|
||||||
where
|
where
|
||||||
|
@ -18,7 +18,7 @@ mod proto;
|
|||||||
mod service;
|
mod service;
|
||||||
mod transport;
|
mod transport;
|
||||||
|
|
||||||
pub use self::client::{Client, ClientError, Connect};
|
pub use self::client::{Client, ClientError, Connect, DefaultClient};
|
||||||
pub use self::codec::{Codec, Frame, Message};
|
pub use self::codec::{Codec, Frame, Message};
|
||||||
pub use self::frame::Parser;
|
pub use self::frame::Parser;
|
||||||
pub use self::proto::{CloseCode, CloseReason, OpCode};
|
pub use self::proto::{CloseCode, CloseReason, OpCode};
|
||||||
|
Loading…
Reference in New Issue
Block a user