#[non_exhaustive]pub struct PathItem {
pub summary: Option<String>,
pub description: Option<String>,
pub servers: Servers,
pub parameters: Parameters,
pub operations: Operations,
}Expand description
Implements OpenAPI Path Item Object what describes Operations available 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 intended to apply all operations in this PathItem.
description: Option<String>Optional description intended to apply all operations in this PathItem.
Description supports markdown syntax.
servers: ServersAlternative Server array to serve all Operations in this PathItem overriding
the global server array.
parameters: ParametersList of Parameters common to all Operations in this PathItem. Parameters cannot
contain duplicate parameters. They can be overridden in Operation level but cannot be
removed there.
operations: OperationsMap of operations in this PathItem. Operations can hold only one operation
per PathItemType.
Implementations§
source§impl PathItem
impl PathItem
sourcepub fn new<O>(path_item_type: PathItemType, operation: O) -> PathItem
pub fn new<O>(path_item_type: PathItemType, operation: O) -> PathItem
Construct a new PathItem with provided Operation mapped to given PathItemType.
sourcepub fn append(&mut self, other: &mut PathItem)
pub fn append(&mut self, other: &mut PathItem)
Moves all elements from other into self, leaving other empty.
If a key from other is already present in self, the respective
value from self will be overwritten with the respective value from other.
sourcepub fn add_operation<O>(
self,
path_item_type: PathItemType,
operation: O,
) -> PathItem
pub fn add_operation<O>( self, path_item_type: PathItemType, operation: O, ) -> PathItem
Append a new Operation by PathItemType to this PathItem. Operations can
hold only one operation per PathItemType.
sourcepub fn summary<S>(self, summary: S) -> PathItem
pub fn summary<S>(self, summary: S) -> PathItem
Add or change summary intended to apply all operations in this PathItem.
sourcepub fn description<S>(self, description: S) -> PathItem
pub fn description<S>(self, description: S) -> PathItem
Add or change optional description intended to apply all operations in this PathItem.
Description supports markdown syntax.
sourcepub fn servers<I>(self, servers: I) -> PathItemwhere
I: IntoIterator<Item = Server>,
pub fn servers<I>(self, servers: I) -> PathItemwhere
I: IntoIterator<Item = Server>,
sourcepub fn parameters<I>(self, parameters: I) -> PathItemwhere
I: IntoIterator<Item = Parameter>,
pub fn parameters<I>(self, parameters: I) -> PathItemwhere
I: IntoIterator<Item = Parameter>,
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>,
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,
impl StructuralPartialEq for PathItem
Auto Trait Implementations§
impl Freeze for PathItem
impl RefUnwindSafe for PathItem
impl Send for PathItem
impl Sync for PathItem
impl Unpin 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
source§impl<T> FutureTraceExt for Twhere
T: FutureExt,
impl<T> FutureTraceExt for Twhere
T: FutureExt,
source§fn with_current_context_span(self, otel_span: Span) -> WithContext<Self> ⓘ
fn with_current_context_span(self, otel_span: Span) -> WithContext<Self> ⓘ
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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request