pub struct PathItem {Show 13 fields
pub ref_path: Option<String>,
pub get: Option<Operation>,
pub post: Option<Operation>,
pub put: Option<Operation>,
pub patch: Option<Operation>,
pub delete: Option<Operation>,
pub head: Option<Operation>,
pub options: Option<Operation>,
pub trace: Option<Operation>,
pub parameters: Option<Vec<Parameter>>,
pub summary: Option<String>,
pub description: Option<String>,
pub servers: Option<Vec<Server>>,
}Expand description
Path Item definition (all HTTP methods for a specific path)
Fields§
§ref_path: Option<String>Reference to another path item.
get: Option<Operation>GET method
post: Option<Operation>POST method
put: Option<Operation>PUT method
patch: Option<Operation>PATCH method
delete: Option<Operation>DELETE method
head: Option<Operation>HEAD method
options: Option<Operation>OPTIONS method
trace: Option<Operation>TRACE method
parameters: Option<Vec<Parameter>>Path parameters
summary: Option<String>Summary
description: Option<String>Description
servers: Option<Vec<Server>>Alternative servers for all operations in this path.
Implementations§
Source§impl PathItem
impl PathItem
Sourcepub fn try_set_operation(
&mut self,
method: HttpMethod,
operation: Operation,
) -> Option<Operation>
pub fn try_set_operation( &mut self, method: HttpMethod, operation: Operation, ) -> Option<Operation>
Try to set an operation for a specific HTTP method.
Returns the operation that was already present, if this call replaced one.
Sourcepub fn set_operation(&mut self, method: HttpMethod, operation: Operation)
pub fn set_operation(&mut self, method: HttpMethod, operation: Operation)
Set an operation for a specific HTTP method, discarding any replaced operation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PathItem
impl<'de> Deserialize<'de> for PathItem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PathItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PathItem
impl Serialize for PathItem
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for PathItem
impl RefUnwindSafe for PathItem
impl Send for PathItem
impl Sync for PathItem
impl Unpin for PathItem
impl UnsafeUnpin for PathItem
impl UnwindSafe for PathItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<C> ValidationContext<C> for C
impl<C> ValidationContext<C> for C
Source§fn validation_context(&self) -> &C
fn validation_context(&self) -> &C
Borrow the context used by
garde::Validate::validate_with.