pub struct WsSessionFactory<O, S, F, E>where
O: Into<Option<WsMessage>> + Unpin + 'static,
S: MutService<Input = WsSessionEvent, Output = O> + Unpin + 'static,
F: Fn(&HttpRequest) -> Result<S, Error> + 'static,
E: Fn(&mut S, S::Error) -> Result<(), S::Error> + Unpin + 'static,{ /* private fields */ }Expand description
Implementations§
Source§impl<O, S, F, E> WsSessionFactory<O, S, F, E>
impl<O, S, F, E> WsSessionFactory<O, S, F, E>
Sourcepub fn new(factory: F, error_handler: E) -> Self
pub fn new(factory: F, error_handler: E) -> Self
Encapsulate the given sod::Service or sod::MutService factory and error handler,
making the service factory compatible with a native actix_web::Handler and underlying
session services compabile with a native actix::Handler and actix::StreamHandler.
Trait Implementations§
Source§impl<O, S, F, E> Clone for WsSessionFactory<O, S, F, E>
impl<O, S, F, E> Clone for WsSessionFactory<O, S, F, E>
Source§impl<O, S, F, E> Handler<(HttpRequest, Payload)> for WsSessionFactory<O, S, F, E>
impl<O, S, F, E> Handler<(HttpRequest, Payload)> for WsSessionFactory<O, S, F, E>
Auto Trait Implementations§
impl<O, S, F, E> Freeze for WsSessionFactory<O, S, F, E>
impl<O, S, F, E> RefUnwindSafe for WsSessionFactory<O, S, F, E>where
F: RefUnwindSafe,
E: RefUnwindSafe,
impl<O, S, F, E> Send for WsSessionFactory<O, S, F, E>
impl<O, S, F, E> Sync for WsSessionFactory<O, S, F, E>
impl<O, S, F, E> Unpin for WsSessionFactory<O, S, F, E>
impl<O, S, F, E> UnsafeUnpin for WsSessionFactory<O, S, F, E>
impl<O, S, F, E> UnwindSafe for WsSessionFactory<O, S, F, E>where
F: RefUnwindSafe,
E: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more