pub struct PropertyBuilder { /* private fields */ }
Expand description
Implementations
sourceimpl PropertyBuilder
impl PropertyBuilder
sourcepub fn new() -> PropertyBuilder
pub fn new() -> PropertyBuilder
Constructs a new PropertyBuilder
.
sourcepub fn component_type(self, component_type: ComponentType) -> Self
pub fn component_type(self, component_type: ComponentType) -> Self
Add or change type of the property e.g ComponentType::String
.
sourcepub fn format(self, format: Option<ComponentFormat>) -> Self
pub fn format(self, format: Option<ComponentFormat>) -> Self
Add or change additional format for detailing the component type.
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 default(self, default: Option<Value>) -> Self
pub fn default(self, default: Option<Value>) -> Self
Add or change default value for the property which is provided when user has not provided the input.
sourcepub fn enum_values<I: IntoIterator<Item = E>, E: Into<String>>(
self,
enum_values: Option<I>
) -> Self
pub fn enum_values<I: IntoIterator<Item = E>, E: Into<String>>(
self,
enum_values: Option<I>
) -> Self
Add or change enum property variants.
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 deprecated(self, deprecated: Option<Deprecated>) -> Self
pub fn deprecated(self, deprecated: Option<Deprecated>) -> Self
Add or change deprecated status for Property
.
sourcepub fn write_only(self, write_only: Option<bool>) -> Self
pub fn write_only(self, write_only: Option<bool>) -> Self
Add or change write only flag for Property
.
sourcepub fn read_only(self, read_only: Option<bool>) -> Self
pub fn read_only(self, read_only: Option<bool>) -> Self
Add or change read only flag for Property
.
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 PropertyBuilder
impl Default for PropertyBuilder
sourcefn default() -> PropertyBuilder
fn default() -> PropertyBuilder
Returns the “default value” for a type. Read more
sourceimpl From<Property> for PropertyBuilder
impl From<Property> for PropertyBuilder
sourceimpl From<PropertyBuilder> for Property
impl From<PropertyBuilder> for Property
sourcefn from(value: PropertyBuilder) -> Self
fn from(value: PropertyBuilder) -> Self
Converts to this type from the input type.
sourceimpl From<PropertyBuilder> for Component
impl From<PropertyBuilder> for Component
sourcefn from(builder: PropertyBuilder) -> Self
fn from(builder: PropertyBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for PropertyBuilder
impl Send for PropertyBuilder
impl Sync for PropertyBuilder
impl Unpin for PropertyBuilder
impl UnwindSafe for PropertyBuilder
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