mirror of
https://github.com/actix/actix-web.git
synced 2025-04-28 04:14:44 +00:00
Fix formatting.
This commit is contained in:
parent
ee9fe60ccb
commit
70ffab8368
1 changed files with 36 additions and 36 deletions
|
@ -27,7 +27,7 @@ use futures::{Async, Future, Poll, Stream};
|
|||
|
||||
/// Do websocket handshake and start ws actor.
|
||||
pub fn start<A, T>(actor: A, req: &HttpRequest, stream: T) -> Result<HttpResponse, Error>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = WebsocketContext<A>> + StreamHandler<Message, ProtocolError>,
|
||||
T: Stream<Item = Bytes, Error = PayloadError> + 'static,
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ pub fn handshake(req: &HttpRequest) -> Result<HttpResponseBuilder, HandshakeErro
|
|||
|
||||
/// Execution context for `WebSockets` actors
|
||||
pub struct WebsocketContext<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = WebsocketContext<A>>,
|
||||
{
|
||||
inner: ContextParts<A>,
|
||||
|
@ -109,7 +109,7 @@ pub struct WebsocketContext<A>
|
|||
}
|
||||
|
||||
impl<A> ActorContext for WebsocketContext<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = Self>,
|
||||
{
|
||||
fn stop(&mut self) {
|
||||
|
@ -126,7 +126,7 @@ impl<A> ActorContext for WebsocketContext<A>
|
|||
}
|
||||
|
||||
impl<A> AsyncContext<A> for WebsocketContext<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = Self>,
|
||||
{
|
||||
fn spawn<F>(&mut self, fut: F) -> SpawnHandle
|
||||
|
@ -162,7 +162,7 @@ impl<A> AsyncContext<A> for WebsocketContext<A>
|
|||
}
|
||||
|
||||
impl<A> WebsocketContext<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = Self>,
|
||||
{
|
||||
#[inline]
|
||||
|
@ -223,7 +223,7 @@ impl<A> WebsocketContext<A>
|
|||
}
|
||||
|
||||
impl<A> WebsocketContext<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = Self>,
|
||||
{
|
||||
/// Write payload
|
||||
|
@ -283,7 +283,7 @@ impl<A> WebsocketContext<A>
|
|||
}
|
||||
|
||||
impl<A> AsyncContextParts<A> for WebsocketContext<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = Self>,
|
||||
{
|
||||
fn parts(&mut self) -> &mut ContextParts<A> {
|
||||
|
@ -302,7 +302,7 @@ struct WebsocketContextFut<A>
|
|||
}
|
||||
|
||||
impl<A> WebsocketContextFut<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = WebsocketContext<A>>,
|
||||
{
|
||||
fn new(ctx: WebsocketContext<A>, act: A, mailbox: Mailbox<A>, codec: Codec) -> Self {
|
||||
|
@ -317,7 +317,7 @@ impl<A> WebsocketContextFut<A>
|
|||
}
|
||||
|
||||
impl<A> Stream for WebsocketContextFut<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = WebsocketContext<A>>,
|
||||
{
|
||||
type Item = Bytes;
|
||||
|
@ -349,7 +349,7 @@ impl<A> Stream for WebsocketContextFut<A>
|
|||
}
|
||||
|
||||
impl<A, M> ToEnvelope<A, M> for WebsocketContext<A>
|
||||
where
|
||||
where
|
||||
A: Actor<Context = WebsocketContext<A>> + Handler<M>,
|
||||
M: ActixMessage + Send + 'static,
|
||||
M::Result: Send,
|
||||
|
@ -367,7 +367,7 @@ struct WsStream<S> {
|
|||
}
|
||||
|
||||
impl<S> WsStream<S>
|
||||
where
|
||||
where
|
||||
S: Stream<Item = Bytes, Error = PayloadError>,
|
||||
{
|
||||
fn new(stream: S, codec: Codec) -> Self {
|
||||
|
@ -381,7 +381,7 @@ impl<S> WsStream<S>
|
|||
}
|
||||
|
||||
impl<S> Stream for WsStream<S>
|
||||
where
|
||||
where
|
||||
S: Stream<Item = Bytes, Error = PayloadError>,
|
||||
{
|
||||
type Item = Message;
|
||||
|
|
Loading…
Reference in a new issue