pub struct AllOfBuilder { /* private fields */ }
Expand description

Builder for AllOf with chainable configuration methods to create a new AllOf.

Implementations§

source§

impl AllOfBuilder

source

pub fn new() -> AllOfBuilder

Constructs a new AllOfBuilder.

source

pub fn build(self) -> AllOf

Constructs a new AllOf taking all fields values from this object.

source§

impl AllOfBuilder

source

pub fn item<I: Into<RefOr<Schema>>>(self, component: I) -> Self

Adds a given Schema to AllOf Composite Object

source

pub fn description<I: Into<String>>(self, description: Option<I>) -> Self

Add or change optional description for AllOf component.

source

pub fn default(self, default: Option<Value>) -> Self

Add or change default value for the object which is provided when user has not provided the input in Swagger UI.

source

pub fn example(self, example: Option<Value>) -> Self

Add or change example shown in UI of the value for richer documentation.

source

pub fn discriminator(self, discriminator: Option<Discriminator>) -> Self

Add or change discriminator field of the composite AllOf type.

source

pub fn nullable(self, nullable: bool) -> Self

Add or change nullable flag for Object.

source

pub fn to_array_builder(self) -> ArrayBuilder

Construct a new ArrayBuilder with this component set to ArrayBuilder::items.

Trait Implementations§

source§

impl Default for AllOfBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<AllOf> for AllOfBuilder

source§

fn from(value: AllOf) -> Self

Converts to this type from the input type.
source§

impl From<AllOfBuilder> for AllOf

source§

fn from(value: AllOfBuilder) -> Self

Converts to this type from the input type.
source§

impl From<AllOfBuilder> for RefOr<Schema>

source§

fn from(one_of: AllOfBuilder) -> Self

Converts to this type from the input type.
source§

impl From<AllOfBuilder> for Schema

source§

fn from(builder: AllOfBuilder) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.