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:
parent
3cf54bc0fd
commit
92fe2e96de
@ -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>,
|
||||
|
11
src/de.rs
11
src/de.rs
@ -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
|
||||
/// }
|
||||
|
@ -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>,
|
||||
|
Loading…
Reference in New Issue
Block a user