From f5f78d79e6cb8a2720345188faacad2131d4d197 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 20 Jan 2018 21:16:31 -0800 Subject: [PATCH] update doc strings --- src/error.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/error.rs b/src/error.rs index 39cf69295..7d8213076 100644 --- a/src/error.rs +++ b/src/error.rs @@ -573,67 +573,67 @@ impl Responder for InternalError } } -/// Helper type that can wrap any error and generate *BAD REQUEST* response. +/// Helper function that creates wrapper of any error and generate *BAD REQUEST* response. #[allow(non_snake_case)] pub fn ErrorBadRequest(err: T) -> InternalError { InternalError::new(err, StatusCode::BAD_REQUEST) } -/// Helper type that can wrap any error and generate *UNAUTHORIZED* response. +/// Helper function that creates wrapper of any error and generate *UNAUTHORIZED* response. #[allow(non_snake_case)] pub fn ErrorUnauthorized(err: T) -> InternalError { InternalError::new(err, StatusCode::UNAUTHORIZED) } -/// Helper type that can wrap any error and generate *FORBIDDEN* response. +/// Helper function that creates wrapper of any error and generate *FORBIDDEN* response. #[allow(non_snake_case)] pub fn ErrorForbidden(err: T) -> InternalError { InternalError::new(err, StatusCode::FORBIDDEN) } -/// Helper type that can wrap any error and generate *NOT FOUND* response. +/// Helper function that creates wrapper of any error and generate *NOT FOUND* response. #[allow(non_snake_case)] pub fn ErrorNotFound(err: T) -> InternalError { InternalError::new(err, StatusCode::NOT_FOUND) } -/// Helper type that can wrap any error and generate *METHOD NOT ALLOWED* response. +/// Helper function that creates wrapper of any error and generate *METHOD NOT ALLOWED* response. #[allow(non_snake_case)] pub fn ErrorMethodNotAllowed(err: T) -> InternalError { InternalError::new(err, StatusCode::METHOD_NOT_ALLOWED) } -/// Helper type that can wrap any error and generate *REQUEST TIMEOUT* response. +/// Helper function that creates wrapper of any error and generate *REQUEST TIMEOUT* response. #[allow(non_snake_case)] pub fn ErrorRequestTimeout(err: T) -> InternalError { InternalError::new(err, StatusCode::REQUEST_TIMEOUT) } -/// Helper type that can wrap any error and generate *CONFLICT* response. +/// Helper function that creates wrapper of any error and generate *CONFLICT* response. #[allow(non_snake_case)] pub fn ErrorConflict(err: T) -> InternalError { InternalError::new(err, StatusCode::CONFLICT) } -/// Helper type that can wrap any error and generate *GONE* response. +/// Helper function that creates wrapper of any error and generate *GONE* response. #[allow(non_snake_case)] pub fn ErrorGone(err: T) -> InternalError { InternalError::new(err, StatusCode::GONE) } -/// Helper type that can wrap any error and generate *PRECONDITION FAILED* response. +/// Helper function that creates wrapper of any error and generate *PRECONDITION FAILED* response. #[allow(non_snake_case)] pub fn ErrorPreconditionFailed(err: T) -> InternalError { InternalError::new(err, StatusCode::PRECONDITION_FAILED) } -/// Helper type that can wrap any error and generate *EXPECTATION FAILED* response. +/// Helper function that creates wrapper of any error and generate *EXPECTATION FAILED* response. #[allow(non_snake_case)] pub fn ErrorExpectationFailed(err: T) -> InternalError { InternalError::new(err, StatusCode::EXPECTATION_FAILED) } -/// Helper type that can wrap any error and generate *INTERNAL SERVER ERROR* response. +/// Helper function that creates wrapper of any error and generate *INTERNAL SERVER ERROR* response. #[allow(non_snake_case)] pub fn ErrorInternalServerError(err: T) -> InternalError { InternalError::new(err, StatusCode::INTERNAL_SERVER_ERROR)