pub struct OperationBuilder<S: State = Empty> { /* private fields */ }
Expand description
Use builder syntax to set the inputs and finish with build()
.
Implementations§
Source§impl<S: State> OperationBuilder<S>
impl<S: State> OperationBuilder<S>
Sourcepub fn build(self) -> Operationwhere
S: IsComplete,
pub fn build(self) -> Operationwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn summary(
self,
value: impl Into<String>,
) -> OperationBuilder<SetSummary<S>>where
S::Summary: IsUnset,
pub fn summary(
self,
value: impl Into<String>,
) -> OperationBuilder<SetSummary<S>>where
S::Summary: IsUnset,
Sourcepub fn maybe_summary(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetSummary<S>>where
S::Summary: IsUnset,
pub fn maybe_summary(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetSummary<S>>where
S::Summary: IsUnset,
Sourcepub fn description(
self,
value: impl Into<String>,
) -> OperationBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn description(
self,
value: impl Into<String>,
) -> OperationBuilder<SetDescription<S>>where
S::Description: IsUnset,
Sourcepub fn maybe_description(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn maybe_description(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetDescription<S>>where
S::Description: IsUnset,
Sourcepub fn operation_id(
self,
value: impl Into<String>,
) -> OperationBuilder<SetOperationId<S>>where
S::OperationId: IsUnset,
pub fn operation_id(
self,
value: impl Into<String>,
) -> OperationBuilder<SetOperationId<S>>where
S::OperationId: IsUnset,
Sourcepub fn maybe_operation_id(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetOperationId<S>>where
S::OperationId: IsUnset,
pub fn maybe_operation_id(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetOperationId<S>>where
S::OperationId: IsUnset,
Sourcepub fn external_docs(
self,
value: impl Into<ExternalDocs>,
) -> OperationBuilder<SetExternalDocs<S>>where
S::ExternalDocs: IsUnset,
pub fn external_docs(
self,
value: impl Into<ExternalDocs>,
) -> OperationBuilder<SetExternalDocs<S>>where
S::ExternalDocs: IsUnset,
Sourcepub fn maybe_external_docs(
self,
value: Option<impl Into<ExternalDocs>>,
) -> OperationBuilder<SetExternalDocs<S>>where
S::ExternalDocs: IsUnset,
pub fn maybe_external_docs(
self,
value: Option<impl Into<ExternalDocs>>,
) -> OperationBuilder<SetExternalDocs<S>>where
S::ExternalDocs: IsUnset,
Sourcepub fn request_body(
self,
value: impl Into<RequestBody>,
) -> OperationBuilder<SetRequestBody<S>>where
S::RequestBody: IsUnset,
pub fn request_body(
self,
value: impl Into<RequestBody>,
) -> OperationBuilder<SetRequestBody<S>>where
S::RequestBody: IsUnset,
Sourcepub fn maybe_request_body(
self,
value: Option<impl Into<RequestBody>>,
) -> OperationBuilder<SetRequestBody<S>>where
S::RequestBody: IsUnset,
pub fn maybe_request_body(
self,
value: Option<impl Into<RequestBody>>,
) -> OperationBuilder<SetRequestBody<S>>where
S::RequestBody: IsUnset,
Sourcepub fn callbacks(
self,
value: impl Into<String>,
) -> OperationBuilder<SetCallbacks<S>>where
S::Callbacks: IsUnset,
pub fn callbacks(
self,
value: impl Into<String>,
) -> OperationBuilder<SetCallbacks<S>>where
S::Callbacks: IsUnset,
Sourcepub fn maybe_callbacks(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetCallbacks<S>>where
S::Callbacks: IsUnset,
pub fn maybe_callbacks(
self,
value: Option<impl Into<String>>,
) -> OperationBuilder<SetCallbacks<S>>where
S::Callbacks: IsUnset,
Sourcepub fn deprecated(
self,
value: impl Into<Deprecated>,
) -> OperationBuilder<SetDeprecated<S>>where
S::Deprecated: IsUnset,
pub fn deprecated(
self,
value: impl Into<Deprecated>,
) -> OperationBuilder<SetDeprecated<S>>where
S::Deprecated: IsUnset,
Sourcepub fn maybe_deprecated(
self,
value: Option<impl Into<Deprecated>>,
) -> OperationBuilder<SetDeprecated<S>>where
S::Deprecated: IsUnset,
pub fn maybe_deprecated(
self,
value: Option<impl Into<Deprecated>>,
) -> OperationBuilder<SetDeprecated<S>>where
S::Deprecated: IsUnset,
Sourcepub fn extensions(
self,
value: impl Into<Extensions>,
) -> OperationBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
pub fn extensions(
self,
value: impl Into<Extensions>,
) -> OperationBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
Sourcepub fn maybe_extensions(
self,
value: Option<impl Into<Extensions>>,
) -> OperationBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
pub fn maybe_extensions(
self,
value: Option<impl Into<Extensions>>,
) -> OperationBuilder<SetExtensions<S>>where
S::Extensions: IsUnset,
Source§impl<S: State> OperationBuilder<S>
impl<S: State> OperationBuilder<S>
Append tag to Operation
tags.
Sourcepub fn parameters<P: Into<Parameter>>(
self,
parameters: impl IntoIterator<Item = P>,
) -> Self
pub fn parameters<P: Into<Parameter>>( self, parameters: impl IntoIterator<Item = P>, ) -> Self
Add or change parameters of the Operation
.
Sourcepub fn parameter(self, parameter: impl Into<Parameter>) -> Self
pub fn parameter(self, parameter: impl Into<Parameter>) -> Self
Append parameter to Operation
parameters.
Sourcepub fn responses<R: Into<RefOr<Response>>, C: Into<String>>(
self,
responses: impl IntoIterator<Item = (C, R)>,
) -> Self
pub fn responses<R: Into<RefOr<Response>>, C: Into<String>>( self, responses: impl IntoIterator<Item = (C, R)>, ) -> Self
Add or change responses of the Operation
.
Sourcepub fn response(
self,
code: impl Into<String>,
response: impl Into<RefOr<Response>>,
) -> Self
pub fn response( self, code: impl Into<String>, response: impl Into<RefOr<Response>>, ) -> Self
Sourcepub fn security(self, security: impl Into<SecurityRequirement>) -> Self
pub fn security(self, security: impl Into<SecurityRequirement>) -> Self
Append SecurityRequirement
to Operation
security requirements.
Sourcepub fn securities<R: Into<SecurityRequirement>>(
self,
securities: impl IntoIterator<Item = R>,
) -> Self
pub fn securities<R: Into<SecurityRequirement>>( self, securities: impl IntoIterator<Item = R>, ) -> Self
Append SecurityRequirement
to Operation
security requirements.
Sourcepub fn servers<E: Into<Server>>(
self,
servers: impl IntoIterator<Item = E>,
) -> Self
pub fn servers<E: Into<Server>>( self, servers: impl IntoIterator<Item = E>, ) -> Self
Trait Implementations§
Source§impl<S: IsComplete> From<OperationBuilder<S>> for Operation
impl<S: IsComplete> From<OperationBuilder<S>> for Operation
Source§fn from(builder: OperationBuilder<S>) -> Self
fn from(builder: OperationBuilder<S>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<S> Freeze for OperationBuilder<S>
impl<S> RefUnwindSafe for OperationBuilder<S>
impl<S> Send for OperationBuilder<S>
impl<S> Sync for OperationBuilder<S>
impl<S> Unpin for OperationBuilder<S>
impl<S> UnwindSafe for OperationBuilder<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more