1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 16:55:08 +02:00

cleanup top level doc comments

This commit is contained in:
Rob Ede
2021-01-15 05:38:50 +00:00
parent b2a9ba2ee4
commit 0a506bf2e9
17 changed files with 57 additions and 82 deletions

View File

@ -149,7 +149,7 @@ where
}
}
/// Service to convert `Request` to a `ServiceRequest<S>`
/// Service that takes a [`Request`] and delegates to a service that take a [`ServiceRequest`].
pub struct AppInitService<T, B>
where
T: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
@ -159,7 +159,7 @@ where
app_state: Rc<AppInitServiceState>,
}
// a collection of AppInitService state that shared between HttpRequests.
/// A collection of [`AppInitService`] state that shared across `HttpRequest`s.
pub(crate) struct AppInitServiceState {
rmap: Rc<ResourceMap>,
config: AppConfig,

View File

@ -101,7 +101,7 @@ where
}
}
// HandlerService is both it's ServiceFactory and Service Type.
/// HandlerService is both it's ServiceFactory and Service Type.
impl<F, T, R> Service<ServiceRequest> for HandlerService<F, T, R>
where
F: Handler<T, R>,

View File

@ -110,8 +110,7 @@ where
}
}
// trait for convert ServiceResponse's ResponseBody<B> generic type
// to ResponseBody<Body>
/// Convert `ServiceResponse`'s `ResponseBody<B>` generic type to `ResponseBody<Body>`.
pub trait MapServiceResponseBody {
fn map_body(self) -> ServiceResponse;
}

View File

@ -269,7 +269,7 @@ impl JsonConfig {
}
}
// Allow shared refs to default.
/// Allow shared refs used as default.
const DEFAULT_CONFIG: JsonConfig = JsonConfig {
limit: 32_768, // 2^15 bytes, (~32kB)
err_handler: None,

View File

@ -247,7 +247,7 @@ impl PayloadConfig {
}
}
// Allow shared refs to default.
/// Allow shared refs used as defaults.
const DEFAULT_CONFIG: PayloadConfig = PayloadConfig {
limit: DEFAULT_CONFIG_LIMIT,
mimetype: None,