#[non_exhaustive]pub struct PathItem {
pub summary: Option<String>,
pub description: Option<String>,
pub servers: Option<Vec<Server>>,
pub parameters: Option<Vec<Parameter>>,
pub operations: BTreeMap<PathItemType, Operation>,
}
Expand description
Implements OpenAPI Path Item Object what describes Operation
s availabe on
a single path.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.summary: Option<String>
Optional summary intented to apply all operations in this PathItem
.
description: Option<String>
Optional description intented to apply all operations in this PathItem
.
Description supports markdown syntax.
servers: Option<Vec<Server>>
Alternative Server
array to serve all Operation
s in this PathItem
overriding
the global server array.
parameters: Option<Vec<Parameter>>
List of Parameter
s common to all Operation
s in this PathItem
. Parameters cannot
contain duplicate parameters. They can be overridden in Operation
level but cannot be
removed there.
operations: BTreeMap<PathItemType, Operation>
Map of operations in this PathItem
. Operations can hold only one operation
per PathItemType
.
Implementations
sourceimpl PathItem
impl PathItem
sourcepub fn new<O: Into<Operation>>(
path_item_type: PathItemType,
operation: O
) -> Self
pub fn new<O: Into<Operation>>(
path_item_type: PathItemType,
operation: O
) -> Self
Construct a new PathItem
with provided Operation
mapped to given PathItemType
.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for PathItem
impl<'de> Deserialize<'de> for PathItem
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<PathItem> for PathItemBuilder
impl From<PathItem> for PathItemBuilder
sourceimpl From<PathItemBuilder> for PathItem
impl From<PathItemBuilder> for PathItem
sourcefn from(value: PathItemBuilder) -> Self
fn from(value: PathItemBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for PathItem
impl Send for PathItem
impl Sync for PathItem
impl Unpin for PathItem
impl UnwindSafe for PathItem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more