1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 01:32:57 +01:00

update doc strings

This commit is contained in:
Nikolay Kim 2018-03-29 15:00:18 -07:00
parent 3cf54bc0fd
commit 92fe2e96de
3 changed files with 7 additions and 8 deletions

View File

@ -35,7 +35,7 @@ impl Frame {
}
}
/// Http actor execution context
/// Execution context for http actors
pub struct HttpContext<A, S=()> where A: Actor<Context=HttpContext<A, S>>,
{
inner: ContextImpl<A>,

View File

@ -24,16 +24,15 @@ use httprequest::HttpRequest;
/// # use actix_web::*;
/// use actix_web::Path;
///
/// /// Application state
/// struct State {}
///
/// /// extract path info using serde
/// fn index(info: Path<(String, u32), State>) -> Result<String> {
/// /// extract path info from "/{username}/{count}/?index.html" url
/// /// {username} - deserializes to a String
/// /// {count} - - deserializes to a u32
/// fn index(info: Path<(String, u32)>) -> Result<String> {
/// Ok(format!("Welcome {}! {}", info.0, info.1))
/// }
///
/// fn main() {
/// let app = Application::with_state(State{}).resource(
/// let app = Application::new().resource(
/// "/{username}/{count}/?index.html", // <- define path parameters
/// |r| r.method(Method::GET).with(index)); // <- use `with` extractor
/// }

View File

@ -18,7 +18,7 @@ use ws::frame::Frame;
use ws::proto::{OpCode, CloseCode};
/// `WebSockets` actor execution context
/// Execution context for `WebSockets` actors
pub struct WebsocketContext<A, S=()> where A: Actor<Context=WebsocketContext<A, S>>,
{
inner: ContextImpl<A>,