Struct PathItemBuilder

Source
pub struct PathItemBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> PathItemBuilder<S>

Source

pub fn build(self) -> PathItem
where S: IsComplete,

Finish building and return the requested object

Source

pub fn summary(self, value: impl Into<String>) -> PathItemBuilder<SetSummary<S>>
where S::Summary: IsUnset,

Optional (Some / Option setters).

Optional summary intended to apply all operations in this PathItem.

Source

pub fn maybe_summary( self, value: Option<impl Into<String>>, ) -> PathItemBuilder<SetSummary<S>>
where S::Summary: IsUnset,

Optional (Some / Option setters).

Optional summary intended to apply all operations in this PathItem.

Source

pub fn description( self, value: impl Into<String>, ) -> PathItemBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters).

Optional description intended to apply all operations in this PathItem. Description supports markdown syntax.

Source

pub fn maybe_description( self, value: Option<impl Into<String>>, ) -> PathItemBuilder<SetDescription<S>>
where S::Description: IsUnset,

Optional (Some / Option setters).

Optional description intended to apply all operations in this PathItem. Description supports markdown syntax.

Source

pub fn servers( self, value: impl Into<Vec<Server>>, ) -> PathItemBuilder<SetServers<S>>
where S::Servers: IsUnset,

Optional (Some / Option setters).

Alternative Server array to serve all Operations in this PathItem overriding the global server array.

Source

pub fn maybe_servers( self, value: Option<impl Into<Vec<Server>>>, ) -> PathItemBuilder<SetServers<S>>
where S::Servers: IsUnset,

Optional (Some / Option setters).

Alternative Server array to serve all Operations in this PathItem overriding the global server array.

Source

pub fn parameters( self, value: impl Into<Vec<Parameter>>, ) -> PathItemBuilder<SetParameters<S>>
where S::Parameters: IsUnset,

Optional (Some / Option setters).

List 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.

Source

pub fn maybe_parameters( self, value: Option<impl Into<Vec<Parameter>>>, ) -> PathItemBuilder<SetParameters<S>>
where S::Parameters: IsUnset,

Optional (Some / Option setters).

List 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.

Source

pub fn get(self, value: impl Into<Operation>) -> PathItemBuilder<SetGet<S>>
where S::Get: IsUnset,

Optional (Some / Option setters).

Get Operation for the PathItem.

Source

pub fn maybe_get( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetGet<S>>
where S::Get: IsUnset,

Optional (Some / Option setters).

Get Operation for the PathItem.

Source

pub fn put(self, value: impl Into<Operation>) -> PathItemBuilder<SetPut<S>>
where S::Put: IsUnset,

Optional (Some / Option setters).

Put Operation for the PathItem.

Source

pub fn maybe_put( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetPut<S>>
where S::Put: IsUnset,

Optional (Some / Option setters).

Put Operation for the PathItem.

Source

pub fn post(self, value: impl Into<Operation>) -> PathItemBuilder<SetPost<S>>
where S::Post: IsUnset,

Optional (Some / Option setters).

Post Operation for the PathItem.

Source

pub fn maybe_post( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetPost<S>>
where S::Post: IsUnset,

Optional (Some / Option setters).

Post Operation for the PathItem.

Source

pub fn delete( self, value: impl Into<Operation>, ) -> PathItemBuilder<SetDelete<S>>
where S::Delete: IsUnset,

Optional (Some / Option setters).

Delete Operation for the PathItem.

Source

pub fn maybe_delete( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetDelete<S>>
where S::Delete: IsUnset,

Optional (Some / Option setters).

Delete Operation for the PathItem.

Source

pub fn options( self, value: impl Into<Operation>, ) -> PathItemBuilder<SetOptions<S>>
where S::Options: IsUnset,

Optional (Some / Option setters).

Options Operation for the PathItem.

Source

pub fn maybe_options( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetOptions<S>>
where S::Options: IsUnset,

Optional (Some / Option setters).

Options Operation for the PathItem.

Source

pub fn head(self, value: impl Into<Operation>) -> PathItemBuilder<SetHead<S>>
where S::Head: IsUnset,

Optional (Some / Option setters).

Head Operation for the PathItem.

Source

pub fn maybe_head( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetHead<S>>
where S::Head: IsUnset,

Optional (Some / Option setters).

Head Operation for the PathItem.

Source

pub fn patch(self, value: impl Into<Operation>) -> PathItemBuilder<SetPatch<S>>
where S::Patch: IsUnset,

Optional (Some / Option setters).

Patch Operation for the PathItem.

Source

pub fn maybe_patch( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetPatch<S>>
where S::Patch: IsUnset,

Optional (Some / Option setters).

Patch Operation for the PathItem.

Source

pub fn trace(self, value: impl Into<Operation>) -> PathItemBuilder<SetTrace<S>>
where S::Trace: IsUnset,

Optional (Some / Option setters).

Trace Operation for the PathItem.

Source

pub fn maybe_trace( self, value: Option<impl Into<Operation>>, ) -> PathItemBuilder<SetTrace<S>>
where S::Trace: IsUnset,

Optional (Some / Option setters).

Trace Operation for the PathItem.

Source

pub fn extensions( self, value: impl Into<Extensions>, ) -> PathItemBuilder<SetExtensions<S>>
where S::Extensions: IsUnset,

Optional (Some / Option setters).

Optional extensions “x-something”.

Source

pub fn maybe_extensions( self, value: Option<impl Into<Extensions>>, ) -> PathItemBuilder<SetExtensions<S>>
where S::Extensions: IsUnset,

Optional (Some / Option setters).

Optional extensions “x-something”.

Trait Implementations§

Source§

impl<S: IsComplete> From<PathItemBuilder<S>> for PathItem

Source§

fn from(builder: PathItemBuilder<S>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<S> Freeze for PathItemBuilder<S>

§

impl<S> RefUnwindSafe for PathItemBuilder<S>

§

impl<S> Send for PathItemBuilder<S>

§

impl<S> Sync for PathItemBuilder<S>

§

impl<S> Unpin for PathItemBuilder<S>

§

impl<S> UnwindSafe for PathItemBuilder<S>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.