Struct utoipa::openapi::schema::AllOfBuilder
source · pub struct AllOfBuilder { /* private fields */ }
Implementations§
source§impl AllOfBuilder
impl AllOfBuilder
sourcepub fn new() -> AllOfBuilder
pub fn new() -> AllOfBuilder
Constructs a new AllOfBuilder
.
source§impl AllOfBuilder
impl AllOfBuilder
sourcepub fn item<I: Into<RefOr<Schema>>>(self, component: I) -> Self
pub fn item<I: Into<RefOr<Schema>>>(self, component: I) -> Self
Adds a given Schema
to AllOf
Composite Object
sourcepub fn description<I: Into<String>>(self, description: Option<I>) -> Self
pub fn description<I: Into<String>>(self, description: Option<I>) -> Self
Add or change optional description for AllOf
component.
sourcepub fn default(self, default: Option<Value>) -> Self
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.
sourcepub fn example(self, example: Option<Value>) -> Self
pub fn example(self, example: Option<Value>) -> Self
Add or change example shown in UI of the value for richer documentation.
sourcepub fn discriminator(self, discriminator: Option<Discriminator>) -> Self
pub fn discriminator(self, discriminator: Option<Discriminator>) -> Self
Add or change discriminator field of the composite AllOf
type.
sourcepub fn to_array_builder(self) -> ArrayBuilder
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
impl Default for AllOfBuilder
source§impl From<AllOf> for AllOfBuilder
impl From<AllOf> for AllOfBuilder
source§impl From<AllOfBuilder> for AllOf
impl From<AllOfBuilder> for AllOf
source§fn from(value: AllOfBuilder) -> Self
fn from(value: AllOfBuilder) -> Self
Converts to this type from the input type.
source§impl From<AllOfBuilder> for RefOr<Schema>
impl From<AllOfBuilder> for RefOr<Schema>
source§fn from(one_of: AllOfBuilder) -> Self
fn from(one_of: AllOfBuilder) -> Self
Converts to this type from the input type.
source§impl From<AllOfBuilder> for Schema
impl From<AllOfBuilder> for Schema
source§fn from(builder: AllOfBuilder) -> Self
fn from(builder: AllOfBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for AllOfBuilder
impl Send for AllOfBuilder
impl Sync for AllOfBuilder
impl Unpin for AllOfBuilder
impl UnwindSafe for AllOfBuilder
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