pub struct ArrayBuilder { /* private fields */ }Implementations§
Source§impl ArrayBuilder
impl ArrayBuilder
Sourcepub fn new() -> ArrayBuilder
pub fn new() -> ArrayBuilder
Constructs a new ArrayBuilder.
Source§impl ArrayBuilder
impl ArrayBuilder
Sourcepub fn items<I>(self, component: I) -> ArrayBuilder
pub fn items<I>(self, component: I) -> ArrayBuilder
Sourcepub fn title<I>(self, title: Option<I>) -> ArrayBuilder
pub fn title<I>(self, title: Option<I>) -> ArrayBuilder
Add or change the title of the Array.
Sourcepub fn description<I>(self, description: Option<I>) -> ArrayBuilder
pub fn description<I>(self, description: Option<I>) -> ArrayBuilder
Add or change description of the property. Markdown syntax is supported.
Sourcepub fn deprecated(self, deprecated: Option<Deprecated>) -> ArrayBuilder
pub fn deprecated(self, deprecated: Option<Deprecated>) -> ArrayBuilder
Add or change deprecated status for Array.
Sourcepub fn example(self, example: Option<Value>) -> ArrayBuilder
pub fn example(self, example: Option<Value>) -> ArrayBuilder
Add or change example shown in UI of the value for richer documentation.
Sourcepub fn default(self, default: Option<Value>) -> ArrayBuilder
pub fn default(self, default: Option<Value>) -> ArrayBuilder
Add or change default value for the object which is provided when user has not provided the input in Swagger UI.
Sourcepub fn max_items(self, max_items: Option<usize>) -> ArrayBuilder
pub fn max_items(self, max_items: Option<usize>) -> ArrayBuilder
Set maximum allowed length for Array.
Sourcepub fn min_items(self, min_items: Option<usize>) -> ArrayBuilder
pub fn min_items(self, min_items: Option<usize>) -> ArrayBuilder
Set minimum allowed length for Array.
Sourcepub fn unique_items(self, unique_items: bool) -> ArrayBuilder
pub fn unique_items(self, unique_items: bool) -> ArrayBuilder
Set or change whether Array should enforce all items to be unique.
Sourcepub fn nullable(self, nullable: bool) -> ArrayBuilder
pub fn nullable(self, nullable: bool) -> ArrayBuilder
Add or change nullable flag for Object.
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 ArrayBuilder
impl Default for ArrayBuilder
Source§fn default() -> ArrayBuilder
fn default() -> ArrayBuilder
Returns the “default value” for a type. Read more
Source§impl From<Array> for ArrayBuilder
impl From<Array> for ArrayBuilder
Source§fn from(value: Array) -> ArrayBuilder
fn from(value: Array) -> ArrayBuilder
Converts to this type from the input type.
Source§impl From<ArrayBuilder> for AdditionalProperties<Schema>
impl From<ArrayBuilder> for AdditionalProperties<Schema>
Source§fn from(value: ArrayBuilder) -> AdditionalProperties<Schema>
fn from(value: ArrayBuilder) -> AdditionalProperties<Schema>
Converts to this type from the input type.
Source§impl From<ArrayBuilder> for Array
impl From<ArrayBuilder> for Array
Source§fn from(value: ArrayBuilder) -> Array
fn from(value: ArrayBuilder) -> Array
Converts to this type from the input type.
Source§impl From<ArrayBuilder> for Schema
impl From<ArrayBuilder> for Schema
Source§fn from(builder: ArrayBuilder) -> Schema
fn from(builder: ArrayBuilder) -> Schema
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ArrayBuilder
impl RefUnwindSafe for ArrayBuilder
impl Send for ArrayBuilder
impl Sync for ArrayBuilder
impl Unpin for ArrayBuilder
impl UnwindSafe for ArrayBuilder
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