1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

cookie session implementation

This commit is contained in:
Nikolay Kim
2017-11-26 17:30:35 -08:00
parent 53ce186294
commit 32483735ba
14 changed files with 247 additions and 70 deletions

View File

@@ -1,5 +1,4 @@
use std::rc::Rc;
use std::convert::From;
use std::marker::PhantomData;
use std::collections::HashMap;
@@ -60,8 +59,8 @@ impl<S> Resource<S> where S: 'static {
}
/// Set resource name
pub fn set_name<T: ToString>(&mut self, name: T) {
self.name = name.to_string();
pub fn set_name<T: Into<String>>(&mut self, name: T) {
self.name = name.into();
}
/// Register handler for specified method.
@@ -136,7 +135,6 @@ impl<S: 'static> RouteHandler<S> for Resource<S> {
}
}
#[cfg_attr(feature="cargo-clippy", allow(large_enum_variant))]
enum ReplyItem<A> where A: Actor + Route {
Message(HttpResponse),