pub struct ObjectBuilder { /* private fields */ }
Implementations
sourceimpl ObjectBuilder
impl ObjectBuilder
sourcepub fn new() -> ObjectBuilder
pub fn new() -> ObjectBuilder
Constructs a new ObjectBuilder
.
sourcepub fn property<S: Into<String>, I: Into<Component>>(
self,
property_name: S,
component: I
) -> Self
pub fn property<S: Into<String>, I: Into<Component>>(
self,
property_name: S,
component: I
) -> Self
Add new property to the Object
.
Method accepts property name and property component as an arguments.
sourcepub fn required<I: Into<String>>(self, required_field: I) -> Self
pub fn required<I: Into<String>>(self, required_field: I) -> Self
Add field to the required fields of 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 description of the property. Markdown syntax is supported.
sourcepub fn deprecated(self, deprecated: Option<Deprecated>) -> Self
pub fn deprecated(self, deprecated: Option<Deprecated>) -> Self
Add or change deprecated status for Object
.
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 richier documentation.
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
sourceimpl Default for ObjectBuilder
impl Default for ObjectBuilder
sourcefn default() -> ObjectBuilder
fn default() -> ObjectBuilder
Returns the “default value” for a type. Read more
sourceimpl From<Object> for ObjectBuilder
impl From<Object> for ObjectBuilder
sourceimpl From<ObjectBuilder> for Object
impl From<ObjectBuilder> for Object
sourcefn from(value: ObjectBuilder) -> Self
fn from(value: ObjectBuilder) -> Self
Converts to this type from the input type.
sourceimpl From<ObjectBuilder> for Component
impl From<ObjectBuilder> for Component
sourcefn from(builder: ObjectBuilder) -> Self
fn from(builder: ObjectBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for ObjectBuilder
impl Send for ObjectBuilder
impl Sync for ObjectBuilder
impl Unpin for ObjectBuilder
impl UnwindSafe for ObjectBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more