Struct utoipa::openapi::path::OperationBuilder
source · pub struct OperationBuilder { /* private fields */ }
Expand description
Implementations§
source§impl OperationBuilder
impl OperationBuilder
sourcepub fn new() -> OperationBuilder
pub fn new() -> OperationBuilder
Constructs a new OperationBuilder
.
source§impl OperationBuilder
impl OperationBuilder
Add or change tags of the Operation
.
sourcepub fn summary<S: Into<String>>(self, summary: Option<S>) -> Self
pub fn summary<S: Into<String>>(self, summary: Option<S>) -> Self
Add or change short summary of the Operation
.
sourcepub fn description<S: Into<String>>(self, description: Option<S>) -> Self
pub fn description<S: Into<String>>(self, description: Option<S>) -> Self
Add or change description of the Operation
.
sourcepub fn operation_id<S: Into<String>>(self, operation_id: Option<S>) -> Self
pub fn operation_id<S: Into<String>>(self, operation_id: Option<S>) -> Self
Add or change operation id of the Operation
.
sourcepub fn parameters<I: IntoIterator<Item = P>, P: Into<Parameter>>(
self,
parameters: Option<I>
) -> Self
pub fn parameters<I: IntoIterator<Item = P>, P: Into<Parameter>>( self, parameters: Option<I> ) -> Self
Add or change parameters of the Operation
.
sourcepub fn parameter<P: Into<Parameter>>(self, parameter: P) -> Self
pub fn parameter<P: Into<Parameter>>(self, parameter: P) -> Self
Append parameter to Operation
parameters.
sourcepub fn request_body(self, request_body: Option<RequestBody>) -> Self
pub fn request_body(self, request_body: Option<RequestBody>) -> Self
Add or change request body of the Operation
.
sourcepub fn responses<R: Into<Responses>>(self, responses: R) -> Self
pub fn responses<R: Into<Responses>>(self, responses: R) -> Self
Add or change responses of the Operation
.
sourcepub fn response<S: Into<String>, R: Into<RefOr<Response>>>(
self,
code: S,
response: R
) -> Self
pub fn response<S: Into<String>, R: Into<RefOr<Response>>>( self, code: S, response: R ) -> Self
sourcepub fn deprecated(self, deprecated: Option<Deprecated>) -> Self
pub fn deprecated(self, deprecated: Option<Deprecated>) -> Self
Add or change deprecated status of the Operation
.
sourcepub fn securities<I: IntoIterator<Item = SecurityRequirement>>(
self,
securities: Option<I>
) -> Self
pub fn securities<I: IntoIterator<Item = SecurityRequirement>>( self, securities: Option<I> ) -> Self
Add or change list of SecurityRequirement
s that are available for Operation
.
sourcepub fn security(self, security: SecurityRequirement) -> Self
pub fn security(self, security: SecurityRequirement) -> Self
Append SecurityRequirement
to Operation
security requirements.
sourcepub fn servers<I: IntoIterator<Item = Server>>(self, servers: Option<I>) -> Self
pub fn servers<I: IntoIterator<Item = Server>>(self, servers: Option<I>) -> Self
Trait Implementations§
source§impl Default for OperationBuilder
impl Default for OperationBuilder
source§impl From<Operation> for OperationBuilder
impl From<Operation> for OperationBuilder
source§impl From<OperationBuilder> for Operation
impl From<OperationBuilder> for Operation
source§fn from(value: OperationBuilder) -> Self
fn from(value: OperationBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for OperationBuilder
impl Send for OperationBuilder
impl Sync for OperationBuilder
impl Unpin for OperationBuilder
impl UnwindSafe for OperationBuilder
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