diff --git a/actix-headers.html b/actix-headers.html index 7e30e6465..8d2aa2647 100644 --- a/actix-headers.html +++ b/actix-headers.html @@ -357,7 +357,7 @@
#[api_v2_errors]
Marker attribute for indicating that the marked object can represent non-2xx (error) +
#[api_v2_errors]
Marker attribute for indicating that the marked object can represent non-2xx (error) status codes with optional descriptions.
#[api_v2_errors_overlay]
Marker attribute for indicating that the marked object can filter error responses from the +
#[api_v2_errors_overlay]
Marker attribute for indicating that the marked object can filter error responses from the
the #[api_v2_errors]
macro.
#[api_v2_operation]
Marker attribute for indicating that a function is an OpenAPI v2 compatible operation.
+#[api_v2_operation]
Marker attribute for indicating that a function is an OpenAPI v2 compatible operation.
#[delete]
Creates route handler with paperclip::actix::web::Resource
.
+
#[delete]
Creates route handler with paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder.
#[delete("path"[, attributes])]
"path"
- Raw literal string with path for which to register handler."path"
- Raw literal string with path for which to register handler./// use paperclip::actix::web::Json; diff --git a/paperclip/actix/attr.get.html b/paperclip/actix/attr.get.html index fc6e85f99..cadf62545 100644 --- a/paperclip/actix/attr.get.html +++ b/paperclip/actix/attr.get.html @@ -1,10 +1,10 @@ -
#[get]
Creates route handler with paperclip::actix::web::Resource
.
+
#[get]
Creates route handler with paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder.
#[get("path"[, attributes])]
"path"
- Raw literal string with path for which to register handler."path"
- Raw literal string with path for which to register handler./// use paperclip::actix::web::Json; diff --git a/paperclip/actix/attr.head.html b/paperclip/actix/attr.head.html index c5e9d2030..07a053957 100644 --- a/paperclip/actix/attr.head.html +++ b/paperclip/actix/attr.head.html @@ -1,10 +1,10 @@ -
#[head]
Creates route handler with paperclip::actix::web::Resource
.
+
#[head]
Creates route handler with paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder.
#[head("path"[, attributes])]
"path"
- Raw literal string with path for which to register handler."path"
- Raw literal string with path for which to register handler./// use paperclip::actix::web::Json; diff --git a/paperclip/actix/attr.patch.html b/paperclip/actix/attr.patch.html index d64be4c30..51e6bd099 100644 --- a/paperclip/actix/attr.patch.html +++ b/paperclip/actix/attr.patch.html @@ -1,10 +1,10 @@ -
#[patch]
Creates route handler with paperclip::actix::web::Resource
.
+
#[patch]
Creates route handler with paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder.
#[patch("path"[, attributes])]
"path"
- Raw literal string with path for which to register handler."path"
- Raw literal string with path for which to register handler./// use paperclip::actix::web::Json; diff --git a/paperclip/actix/attr.post.html b/paperclip/actix/attr.post.html index f0bb86b5c..9ff498b61 100644 --- a/paperclip/actix/attr.post.html +++ b/paperclip/actix/attr.post.html @@ -1,10 +1,10 @@ -
#[post]
Creates route handler with paperclip::actix::web::Resource
.
+
#[post]
Creates route handler with paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder.
#[post("path"[, attributes])]
"path"
- Raw literal string with path for which to register handler."path"
- Raw literal string with path for which to register handler./// use paperclip::actix::web::Json; diff --git a/paperclip/actix/attr.put.html b/paperclip/actix/attr.put.html index 08584de4b..7b4ba774a 100644 --- a/paperclip/actix/attr.put.html +++ b/paperclip/actix/attr.put.html @@ -1,10 +1,10 @@ -
#[put]
Creates route handler with paperclip::actix::web::Resource
.
+
#[put]
Creates route handler with paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder.
#[put("path"[, attributes])]
"path"
- Raw literal string with path for which to register handler."path"
- Raw literal string with path for which to register handler./// use paperclip::actix::web::Json; diff --git a/paperclip/actix/derive.Apiv2Header.html b/paperclip/actix/derive.Apiv2Header.html index 9dfdbc9fe..134d70961 100644 --- a/paperclip/actix/derive.Apiv2Header.html +++ b/paperclip/actix/derive.Apiv2Header.html @@ -1,4 +1,4 @@ -
#[derive(Apiv2Header)]
+Apiv2Header in paperclip::actix - Rust Derive Macro paperclip::actix::Apiv2Header
source · #[derive(Apiv2Header)]
{
// Attributes available to this derive:
#[openapi]
diff --git a/paperclip/actix/derive.Apiv2Schema.html b/paperclip/actix/derive.Apiv2Schema.html
index 5c1d7e0c5..acf7c2635 100644
--- a/paperclip/actix/derive.Apiv2Schema.html
+++ b/paperclip/actix/derive.Apiv2Schema.html
@@ -1,4 +1,4 @@
-Apiv2Schema in paperclip::actix - Rust Derive Macro paperclip::actix::Apiv2Schema
source · #[derive(Apiv2Schema)]
+Apiv2Schema in paperclip::actix - Rust Derive Macro paperclip::actix::Apiv2Schema
source · #[derive(Apiv2Schema)]
{
// Attributes available to this derive:
#[openapi]
diff --git a/paperclip/actix/derive.Apiv2Security.html b/paperclip/actix/derive.Apiv2Security.html
index 1c8f5457a..df9108c97 100644
--- a/paperclip/actix/derive.Apiv2Security.html
+++ b/paperclip/actix/derive.Apiv2Security.html
@@ -1,4 +1,4 @@
-Apiv2Security in paperclip::actix - Rust Derive Macro paperclip::actix::Apiv2Security
source · #[derive(Apiv2Security)]
+Apiv2Security in paperclip::actix - Rust Derive Macro paperclip::actix::Apiv2Security
source · #[derive(Apiv2Security)]
{
// Attributes available to this derive:
#[openapi]
diff --git a/paperclip/actix/index.html b/paperclip/actix/index.html
index 7b078b725..76202949a 100644
--- a/paperclip/actix/index.html
+++ b/paperclip/actix/index.html
@@ -1,8 +1,8 @@
-paperclip::actix - Rust Expand description
Plugin types, traits and macros for actix-web framework.
-Modules§
- Proxy module for
actix_web::web
.
Structs§
- Wrapper for
actix_web::App
. - Workaround for possibility to directly return HttpResponse from closure handler.
- Wrapper for wrapping over
impl Responder
thingies (to avoid breakage).
Traits§
- Indicates that this thingmabob has a path and a bunch of definitions and operations.
- Extension trait for actix-web applications.
- Actix-specific trait for indicating that this entity can modify an operation
-and/or update the global map of definitions.
Attribute Macros§
- Marker attribute for indicating that the marked object can represent non-2xx (error)
-status codes with optional descriptions.
- Marker attribute for indicating that the marked object can filter error responses from the
-the
#[api_v2_errors]
macro. - Marker attribute for indicating that a function is an OpenAPI v2 compatible operation.
- Creates route handler with
paperclip::actix::web::Resource
.
+paperclip::actix - Rust Expand description
Plugin types, traits and macros for actix-web framework.
+Modules§
- Proxy module for
actix_web::web
.
Structs§
- Wrapper for
actix_web::App
. - Workaround for possibility to directly return HttpResponse from closure handler.
- Wrapper for wrapping over
impl Responder
thingies (to avoid breakage).
Traits§
- Indicates that this thingmabob has a path and a bunch of definitions and operations.
- Extension trait for actix-web applications.
- Actix-specific trait for indicating that this entity can modify an operation
+and/or update the global map of definitions.
Attribute Macros§
- Marker attribute for indicating that the marked object can represent non-2xx (error)
+status codes with optional descriptions.
- Marker attribute for indicating that the marked object can filter error responses from the
+the
#[api_v2_errors]
macro. - Marker attribute for indicating that a function is an OpenAPI v2 compatible operation.
- Creates route handler with
paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder. - Creates route handler with
paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
@@ -14,4 +14,4 @@
In order to control the output type and status codes the return value/response must implement the
trait actix_web::Responder. - Creates route handler with
paperclip::actix::web::Resource
.
In order to control the output type and status codes the return value/response must implement the
-trait actix_web::Responder.
Derive Macros§
- Derive attribute for indicating that a type is an OpenAPI v2 compatible header parameter.
- Derive attribute for indicating that a type is an OpenAPI v2 compatible definition.
- Marker attribute for indicating that an object forbids public access to operation (for example AccessToken).
\ No newline at end of file
+trait actix_web::Responder.
Derive Macros§
- Derive attribute for indicating that a type is an OpenAPI v2 compatible header parameter.
- Derive attribute for indicating that a type is an OpenAPI v2 compatible definition.
- Marker attribute for indicating that an object forbids public access to operation (for example AccessToken).
\ No newline at end of file
diff --git a/paperclip/actix/struct.AcceptedJson.html b/paperclip/actix/struct.AcceptedJson.html
index 95092968a..bccab3942 100644
--- a/paperclip/actix/struct.AcceptedJson.html
+++ b/paperclip/actix/struct.AcceptedJson.html
@@ -1,27 +1,27 @@
-AcceptedJson in paperclip::actix - Rust Struct paperclip::actix::AcceptedJson
source · pub struct AcceptedJson<T>(pub T)
+AcceptedJson in paperclip::actix - Rust Struct paperclip::actix::AcceptedJson
source · pub struct AcceptedJson<T>(pub T)
where
- T: Serialize + Apiv2Schema;
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Apiv2Schema for AcceptedJson<T>where
- T: Serialize + Apiv2Schema,
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl<T> Debug for AcceptedJson<T>
source§impl<T> Display for AcceptedJson<T>
source§impl<T> OperationModifier for AcceptedJson<T>where
- T: Serialize + Apiv2Schema,
source§fn update_response(
+ T: Serialize + Apiv2Schema;Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Apiv2Schema for AcceptedJson<T>where
+ T: Serialize + Apiv2Schema,
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl<T> Debug for AcceptedJson<T>
source§impl<T> Display for AcceptedJson<T>
source§impl<T> OperationModifier for AcceptedJson<T>where
+ T: Serialize + Apiv2Schema,
source§fn update_response(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the responses map in the given operation (if needed).source§fn update_parameter(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the parameters list in the given operation (if needed).source§fn update_definitions(map: &mut BTreeMap<String, DefaultSchemaRaw>)
Update the definitions map (if needed).source§fn update_security(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
-)
Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).source§impl<T> Responder for AcceptedJson<T>where
- T: Serialize + Apiv2Schema,
§type Body = BoxBody
source§fn respond_to(self, _: &HttpRequest) -> HttpResponse
Convert self to HttpResponse
.§fn customize(self) -> CustomizeResponder<Self>where
+)Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).
source§impl<T> Responder for AcceptedJson<T>where
+ T: Serialize + Apiv2Schema,
§type Body = BoxBody
source§fn respond_to(self, _: &HttpRequest) -> HttpResponse
Convert self to HttpResponse
.Auto Trait Implementations§
§impl<T> Freeze for AcceptedJson<T>where
T: Freeze,
§impl<T> RefUnwindSafe for AcceptedJson<T>where
T: RefUnwindSafe,
§impl<T> Send for AcceptedJson<T>where
T: Send,
§impl<T> Sync for AcceptedJson<T>where
T: Sync,
§impl<T> Unpin for AcceptedJson<T>where
T: Unpin,
§impl<T> UnwindSafe for AcceptedJson<T>where
- T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
+ T: UnwindSafe,Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> Into<U> for Twhere
@@ -32,11 +32,11 @@
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more
source§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
diff --git a/paperclip/actix/struct.App.html b/paperclip/actix/struct.App.html
index 6a9ae32a1..3e72ce509 100644
--- a/paperclip/actix/struct.App.html
+++ b/paperclip/actix/struct.App.html
@@ -1,4 +1,4 @@
-App in paperclip::actix - Rust pub struct App<T> { /* private fields */ }
Expand description
Wrapper for actix_web::App
.
+App in paperclip::actix - Rust pub struct App<T> { /* private fields */ }
Expand description
Wrapper for actix_web::App
.
Implementations§
source§impl<T> App<T>
sourcepub fn data_factory<F, Out, D, E>(self, data: F) -> App<T>where
F: Fn() -> Out + 'static,
@@ -46,13 +46,13 @@
recorded by the wrapper and serves them in the given path
as a JSON.
sourcepub fn with_raw_json_spec<F>(self, call: F) -> App<T>
Calls the given function with App
and JSON Value
representing your API
+ F: FnMut(App<T>, Value) -> App<T>,
Calls the given function with App
and JSON Value
representing your API
specification built until now.
NOTE: Unlike with_json_spec_at
, this only has the API spec built until
this function call. Any route handler added after this call won’t affect the
spec. So, it’s important to call this function after adding all route handlers.
sourcepub fn with_raw_json_spec_v3<F>(self, call: F) -> App<T>
Calls the given function with App
and JSON Value
representing your API
+ F: FnMut(App<T>, Value) -> App<T>,
Calls the given function with App
and JSON Value
representing your API
v2 specification built until now which is converted to v3.
NOTE: Unlike with_json_spec_at
, this only has the API spec built until
this function call. Any route handler added after this call won’t affect the
@@ -66,10 +66,10 @@
So, it’s important to call this function after adding all route handlers.
Auto Trait Implementations§
§impl<T> Freeze for App<T>where
T: Freeze,
§impl<T> !RefUnwindSafe for App<T>
§impl<T> !Send for App<T>
§impl<T> !Sync for App<T>
§impl<T> Unpin for App<T>where
- T: Unpin,
§impl<T> !UnwindSafe for App<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> Into<U> for Twhere
@@ -80,7 +80,7 @@
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more
source§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, U> TryFrom<U> for Twhere
diff --git a/paperclip/actix/struct.CreatedJson.html b/paperclip/actix/struct.CreatedJson.html
index 8e922b3c0..c2e5c7394 100644
--- a/paperclip/actix/struct.CreatedJson.html
+++ b/paperclip/actix/struct.CreatedJson.html
@@ -1,27 +1,27 @@
-CreatedJson in paperclip::actix - Rust Struct paperclip::actix::CreatedJson
source · pub struct CreatedJson<T>(pub T)
+CreatedJson in paperclip::actix - Rust Struct paperclip::actix::CreatedJson
source · pub struct CreatedJson<T>(pub T)
where
- T: Serialize + Apiv2Schema;
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Apiv2Schema for CreatedJson<T>where
- T: Serialize + Apiv2Schema,
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl<T> Debug for CreatedJson<T>
source§impl<T> Display for CreatedJson<T>
source§impl<T> OperationModifier for CreatedJson<T>where
- T: Serialize + Apiv2Schema,
source§fn update_response(
+ T: Serialize + Apiv2Schema;Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Apiv2Schema for CreatedJson<T>where
+ T: Serialize + Apiv2Schema,
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl<T> Debug for CreatedJson<T>
source§impl<T> Display for CreatedJson<T>
source§impl<T> OperationModifier for CreatedJson<T>where
+ T: Serialize + Apiv2Schema,
source§fn update_response(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the responses map in the given operation (if needed).source§fn update_parameter(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the parameters list in the given operation (if needed).source§fn update_definitions(map: &mut BTreeMap<String, DefaultSchemaRaw>)
Update the definitions map (if needed).source§fn update_security(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
-)
Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).source§impl<T> Responder for CreatedJson<T>where
- T: Serialize + Apiv2Schema,
§type Body = BoxBody
source§fn respond_to(self, _: &HttpRequest) -> HttpResponse
Convert self to HttpResponse
.§fn customize(self) -> CustomizeResponder<Self>where
+)Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).
source§impl<T> Responder for CreatedJson<T>where
+ T: Serialize + Apiv2Schema,
§type Body = BoxBody
source§fn respond_to(self, _: &HttpRequest) -> HttpResponse
Convert self to HttpResponse
.Auto Trait Implementations§
§impl<T> Freeze for CreatedJson<T>where
T: Freeze,
§impl<T> RefUnwindSafe for CreatedJson<T>where
T: RefUnwindSafe,
§impl<T> Send for CreatedJson<T>where
T: Send,
§impl<T> Sync for CreatedJson<T>where
T: Sync,
§impl<T> Unpin for CreatedJson<T>where
T: Unpin,
§impl<T> UnwindSafe for CreatedJson<T>where
- T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
+ T: UnwindSafe,Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> Into<U> for Twhere
@@ -32,11 +32,11 @@
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more
source§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
diff --git a/paperclip/actix/struct.HttpResponseWrapper.html b/paperclip/actix/struct.HttpResponseWrapper.html
index 29dba3ef4..d2ec4f55f 100644
--- a/paperclip/actix/struct.HttpResponseWrapper.html
+++ b/paperclip/actix/struct.HttpResponseWrapper.html
@@ -1,4 +1,4 @@
-HttpResponseWrapper in paperclip::actix - Rust Struct paperclip::actix::HttpResponseWrapper
source · pub struct HttpResponseWrapper(pub HttpResponse);
Expand description
Workaround for possibility to directly return HttpResponse from closure handler.
+HttpResponseWrapper in paperclip::actix - Rust Struct paperclip::actix::HttpResponseWrapper
source · pub struct HttpResponseWrapper(pub HttpResponse);
Expand description
Workaround for possibility to directly return HttpResponse from closure handler.
This is needed after actix removed impl Future
from HttpResponse
:
https://github.com/actix/actix-web/pull/2601
Example:
@@ -14,10 +14,10 @@
self,
req: &HttpRequest,
) -> HttpResponse<<HttpResponseWrapper as Responder>::Body>Convert self to HttpResponse
.Auto Trait Implementations§
§impl !Freeze for HttpResponseWrapper
§impl !RefUnwindSafe for HttpResponseWrapper
§impl !Send for HttpResponseWrapper
§impl !Sync for HttpResponseWrapper
§impl Unpin for HttpResponseWrapper
§impl !UnwindSafe for HttpResponseWrapper
Blanket Implementations§
Auto Trait Implementations§
§impl !Freeze for HttpResponseWrapper
§impl !RefUnwindSafe for HttpResponseWrapper
§impl !Send for HttpResponseWrapper
§impl !Sync for HttpResponseWrapper
§impl Unpin for HttpResponseWrapper
§impl !UnwindSafe for HttpResponseWrapper
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> Into<U> for Twhere
@@ -28,7 +28,7 @@
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more
source§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, U> TryFrom<U> for Twhere
diff --git a/paperclip/actix/struct.NoContent.html b/paperclip/actix/struct.NoContent.html
index 1700be4e6..4bd4a1bc8 100644
--- a/paperclip/actix/struct.NoContent.html
+++ b/paperclip/actix/struct.NoContent.html
@@ -1,14 +1,14 @@
-NoContent in paperclip::actix - Rust pub struct NoContent;
Trait Implementations§
source§impl Apiv2Schema for NoContent
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl OperationModifier for NoContent
source§fn update_response(
+NoContent in paperclip::actix - Rust pub struct NoContent;
Trait Implementations§
source§impl Apiv2Schema for NoContent
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl OperationModifier for NoContent
source§fn update_response(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the responses map in the given operation (if needed).source§fn update_parameter(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the parameters list in the given operation (if needed).source§fn update_definitions(map: &mut BTreeMap<String, DefaultSchemaRaw>)
Update the definitions map (if needed).source§fn update_security(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
-)
Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).source§impl Responder for NoContent
§type Body = BoxBody
source§fn respond_to(self, _: &HttpRequest) -> HttpResponse
Convert self to HttpResponse
.Auto Trait Implementations§
§impl Freeze for NoContent
§impl RefUnwindSafe for NoContent
§impl Send for NoContent
§impl Sync for NoContent
§impl Unpin for NoContent
§impl UnwindSafe for NoContent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
+)Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).source§impl Responder for NoContent
§type Body = BoxBody
source§fn respond_to(self, _: &HttpRequest) -> HttpResponse
Convert self to HttpResponse
.Auto Trait Implementations§
§impl Freeze for NoContent
§impl RefUnwindSafe for NoContent
§impl Send for NoContent
§impl Sync for NoContent
§impl Unpin for NoContent
§impl UnwindSafe for NoContent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> Into<U> for Twhere
@@ -19,11 +19,11 @@
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more
source§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
-otherwise. Read more§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
diff --git a/paperclip/actix/struct.ResponderWrapper.html b/paperclip/actix/struct.ResponderWrapper.html
index 1d5e7c748..5f457a376 100644
--- a/paperclip/actix/struct.ResponderWrapper.html
+++ b/paperclip/actix/struct.ResponderWrapper.html
@@ -1,14 +1,14 @@
-ResponderWrapper in paperclip::actix - Rust Struct paperclip::actix::ResponderWrapper
source · pub struct ResponderWrapper<T>(pub T);
Expand description
Wrapper for wrapping over impl Responder
thingies (to avoid breakage).
-Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Apiv2Schema for ResponderWrapper<T>where
- T: Responder,
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl<T> OperationModifier for ResponderWrapper<T>where
+ResponderWrapper in paperclip::actix - Rust Struct paperclip::actix::ResponderWrapper
source · pub struct ResponderWrapper<T>(pub T);
Expand description
Wrapper for wrapping over impl Responder
thingies (to avoid breakage).
+Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Apiv2Schema for ResponderWrapper<T>where
+ T: Responder,
source§fn name() -> Option<String>
Name of this schema. This is the name to which the definition of the object is mapped.source§fn description() -> &'static str
Description of this schema. In case the trait is derived, uses the documentation on the type.source§fn raw_schema() -> DefaultSchemaRaw
Returns the raw schema for this object.source§fn schema_with_ref() -> DefaultSchemaRaw
Returns the schema with a reference (if this is an object). Read moresource§fn security_scheme() -> Option<SecurityScheme>
Returns the security scheme for this object.source§fn header_parameter_schema() -> Vec<Parameter<DefaultSchemaRaw>>
source§impl<T> OperationModifier for ResponderWrapper<T>where
T: Responder,
source§fn update_parameter(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the parameters list in the given operation (if needed).source§fn update_response(
_op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
)
Update the responses map in the given operation (if needed).source§fn update_definitions(map: &mut BTreeMap<String, DefaultSchemaRaw>)
Update the definitions map (if needed).source§fn update_security(
op: &mut Operation<Parameter<DefaultSchemaRaw>, Response<DefaultSchemaRaw>>,
-)
Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).source§impl<T> Responder for ResponderWrapper<T>where
- T: Responder,
§type Body = <T as Responder>::Body
source§fn respond_to(
+)
Update the security map in the given operation (if needed).source§fn update_security_definitions(map: &mut BTreeMap<String, SecurityScheme>)
Update the security definition map (if needed).source§impl<T> Responder for ResponderWrapper<T>where
+ T: Responder,
§type Body = <T as Responder>::Body
source§fn respond_to(
self,
req: &HttpRequest,
) -> HttpResponse<<ResponderWrapper<T> as Responder>::Body>
Convert self to HttpResponse
.§fn customize(self) -> CustomizeResponder<Self>where
@@ -18,10 +18,10 @@
T: Send,
§impl<T> Sync for ResponderWrapper<T>where
T: Sync,
§impl<T> Unpin for ResponderWrapper<T>where
T: Unpin,
§impl<T> UnwindSafe for ResponderWrapper<T>where
- T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
- T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§impl<T> From<T> for T
source§fn from(t: T) -> T
Returns the argument unchanged.
+ T: UnwindSafe,Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> Into<U> for Twhere
@@ -32,7 +32,7 @@
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more
source§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, U> TryFrom<U> for Twhere
diff --git a/paperclip/actix/struct.ResponseWrapper.html b/paperclip/actix/struct.ResponseWrapper.html
index 34afdf6b9..2d0f097ca 100644
--- a/paperclip/actix/struct.ResponseWrapper.html
+++ b/paperclip/actix/struct.ResponseWrapper.html
@@ -1,22 +1,22 @@
-ResponseWrapper in paperclip::actix - Rust Struct paperclip::actix::ResponseWrapper
source · pub struct ResponseWrapper<T, H> {
+ResponseWrapper in paperclip::actix - Rust Struct paperclip::actix::ResponseWrapper
source · pub struct ResponseWrapper<T, H> {
pub responder: T,
pub operations: H,
-}
Fields§
§responder: T
§operations: H
Trait Implementations§
source§impl<F, T, H> Apiv2Operation for ResponseWrapper<F, H>