pub struct LinkBuilder { /* private fields */ }
Implementations§
Source§impl LinkBuilder
impl LinkBuilder
Sourcepub fn new() -> LinkBuilder
pub fn new() -> LinkBuilder
Constructs a new LinkBuilder
.
Source§impl LinkBuilder
impl LinkBuilder
Sourcepub fn operation_ref<S: Into<String>>(self, operation_ref: S) -> Self
pub fn operation_ref<S: Into<String>>(self, operation_ref: S) -> Self
Set 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.
Sourcepub fn operation_id<S: Into<String>>(self, operation_id: S) -> Self
pub fn operation_id<S: Into<String>>(self, operation_id: S) -> Self
Set 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.
Sourcepub fn parameter<N: Into<String>, V: Into<Value>>(
self,
name: N,
value: V,
) -> Self
pub fn parameter<N: Into<String>, V: Into<Value>>( self, name: N, value: V, ) -> Self
Add parameter to be passed to Operation upon execution.
Sourcepub fn request_body<B: Into<Value>>(self, request_body: Option<B>) -> Self
pub fn request_body<B: Into<Value>>(self, request_body: Option<B>) -> Self
Set a literal value or an expression to be used as request body when operation is called.
Sourcepub fn description<S: Into<String>>(self, description: S) -> Self
pub fn description<S: Into<String>>(self, description: S) -> Self
Set description of the link. Value supports Markdown syntax.
Sourcepub fn server<S: Into<Server>>(self, server: Option<S>) -> Self
pub fn server<S: Into<Server>>(self, server: Option<S>) -> Self
Set a Server
object to be used by the target operation.
Sourcepub fn extensions(self, extensions: Option<Extensions>) -> Self
pub fn extensions(self, extensions: Option<Extensions>) -> Self
Add openapi extensions (x-something) of the API.
Trait Implementations§
Source§impl Default for LinkBuilder
impl Default for LinkBuilder
Source§impl From<Link> for LinkBuilder
impl From<Link> for LinkBuilder
Source§impl From<LinkBuilder> for Link
impl From<LinkBuilder> for Link
Source§fn from(value: LinkBuilder) -> Self
fn from(value: LinkBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LinkBuilder
impl RefUnwindSafe for LinkBuilder
impl Send for LinkBuilder
impl Sync for LinkBuilder
impl Unpin for LinkBuilder
impl UnwindSafe for LinkBuilder
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