From bc6e62349c907f633377881f95fef69399fe8416 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 23 Oct 2018 21:44:20 -0700 Subject: [PATCH] update deps; export api --- Cargo.toml | 4 ++-- src/request.rs | 24 +++++++++++++----------- src/ws/client/error.rs | 3 --- src/ws/codec.rs | 1 + 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 87bd05b8..87e705f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,8 +36,8 @@ cell = ["actix-net/cell"] [dependencies] actix = "0.7.5" -actix-net = "0.1.1" -#actix-net = { git="https://github.com/actix/actix-net.git" } +#actix-net = "0.1.1" +actix-net = { git="https://github.com/actix/actix-net.git" } base64 = "0.9" bitflags = "1.0" diff --git a/src/request.rs b/src/request.rs index ad048639..07632bf0 100644 --- a/src/request.rs +++ b/src/request.rs @@ -23,16 +23,16 @@ pub struct Request { pub(crate) inner: Rc, } -pub(crate) struct Message { - pub(crate) version: Version, - pub(crate) status: StatusCode, - pub(crate) method: Method, - pub(crate) url: Url, - pub(crate) flags: Cell, - pub(crate) headers: HeaderMap, - pub(crate) extensions: RefCell, - pub(crate) payload: RefCell>, +pub struct Message { + pub version: Version, + pub status: StatusCode, + pub method: Method, + pub url: Url, + pub headers: HeaderMap, + pub extensions: RefCell, + pub payload: RefCell>, pub(crate) pool: &'static MessagePool, + pub(crate) flags: Cell, } impl Message { @@ -87,12 +87,14 @@ impl Request { } #[inline] - pub(crate) fn inner(&self) -> &Message { + #[doc(hidden)] + pub fn inner(&self) -> &Message { self.inner.as_ref() } #[inline] - pub(crate) fn inner_mut(&mut self) -> &mut Message { + #[doc(hidden)] + pub fn inner_mut(&mut self) -> &mut Message { Rc::get_mut(&mut self.inner).expect("Multiple copies exist") } diff --git a/src/ws/client/error.rs b/src/ws/client/error.rs index 62a8800a..951cd6ac 100644 --- a/src/ws/client/error.rs +++ b/src/ws/client/error.rs @@ -36,9 +36,6 @@ pub enum ClientError { /// Http parsing error #[fail(display = "Http parsing error")] Http(HttpError), - // /// Url parsing error - // #[fail(display = "Url parsing error")] - // Url(UrlParseError), /// Response parsing error #[fail(display = "Response parsing error")] ParseError(ParseError), diff --git a/src/ws/codec.rs b/src/ws/codec.rs index 7ba10672..5bdc5819 100644 --- a/src/ws/codec.rs +++ b/src/ws/codec.rs @@ -36,6 +36,7 @@ pub enum Frame { Close(Option), } +#[derive(Debug)] /// WebSockets protocol codec pub struct Codec { max_size: usize,