Struct LinkBuilder

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

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

Implementations§

Source§

impl<S: State> LinkBuilder<S>

Source

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

Finish building and return the requested object

Source

pub fn operation_ref( self, value: impl Into<String>, ) -> LinkBuilder<SetOperationRef<S>>
where S::OperationRef: IsUnset,

Optional (Some / Option setters). Default: "".

A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the operation_id field, and must point to an Operation Object. Relative operation_ref values may be used to locate an existing Operation Object in the OpenAPI definition. See the rules for resolving Relative References.

Source

pub fn maybe_operation_ref( self, value: Option<impl Into<String>>, ) -> LinkBuilder<SetOperationRef<S>>
where S::OperationRef: IsUnset,

Optional (Some / Option setters). Default: "".

A relative or absolute URI reference to an OAS operation. This field is mutually exclusive of the operation_id field, and must point to an Operation Object. Relative operation_ref values may be used to locate an existing Operation Object in the OpenAPI definition. See the rules for resolving Relative References.

Source

pub fn operation_id( self, value: impl Into<String>, ) -> LinkBuilder<SetOperationId<S>>
where S::OperationId: IsUnset,

Optional (Some / Option setters). Default: "".

The name of an existing, resolvable OAS operation, as defined with a unique operation_id. This field is mutually exclusive of the operation_ref field.

Source

pub fn maybe_operation_id( self, value: Option<impl Into<String>>, ) -> LinkBuilder<SetOperationId<S>>
where S::OperationId: IsUnset,

Optional (Some / Option setters). Default: "".

The name of an existing, resolvable OAS operation, as defined with a unique operation_id. This field is mutually exclusive of the operation_ref field.

Source

pub fn request_body( self, value: impl Into<Value>, ) -> LinkBuilder<SetRequestBody<S>>
where S::RequestBody: IsUnset,

Optional (Some / Option setters).

A literal value or an expression to be used as request body when operation is called.

Source

pub fn maybe_request_body( self, value: Option<impl Into<Value>>, ) -> LinkBuilder<SetRequestBody<S>>
where S::RequestBody: IsUnset,

Optional (Some / Option setters).

A literal value or an expression to be used as request body when operation is called.

Source

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

Optional (Some / Option setters). Default: "".

Description of the link. Value supports Markdown syntax.

Source

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

Optional (Some / Option setters). Default: "".

Description of the link. Value supports Markdown syntax.

Source

pub fn server(self, value: impl Into<Server>) -> LinkBuilder<SetServer<S>>
where S::Server: IsUnset,

Optional (Some / Option setters).

A Server object to be used by the target operation.

Source

pub fn maybe_server( self, value: Option<impl Into<Server>>, ) -> LinkBuilder<SetServer<S>>
where S::Server: IsUnset,

Optional (Some / Option setters).

A Server object to be used by the target operation.

Source

pub fn extensions( self, value: impl Into<Extensions>, ) -> LinkBuilder<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>>, ) -> LinkBuilder<SetExtensions<S>>
where S::Extensions: IsUnset,

Optional (Some / Option setters).

Optional extensions “x-something”.

Source§

impl<S: State> LinkBuilder<S>

Source

pub fn parameters<N: Into<String>, V: Into<Value>>( self, items: impl IntoIterator<Item = (N, V)>, ) -> Self

Add parameters to be passed to Operation upon execution.

Source

pub fn parameter<N: Into<String>, V: Into<Value>>( self, name: N, value: V, ) -> Self

Add parameter to be passed to Operation upon execution.

Trait Implementations§

Source§

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

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<S> Freeze for LinkBuilder<S>

§

impl<S> RefUnwindSafe for LinkBuilder<S>

§

impl<S> Send for LinkBuilder<S>

§

impl<S> Sync for LinkBuilder<S>

§

impl<S> Unpin for LinkBuilder<S>

§

impl<S> UnwindSafe for LinkBuilder<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.