pub struct PropertyDefinitionBuilder {
pub name: Option<String>,
pub data_type: Option<DataType>,
pub required: Option<bool>,
pub description: Option<String>,
pub number_exponent: Option<i32>,
pub enum_options: Vec<String>,
pub struct_properties: Vec<PropertyDefinition>,
}Expand description
Builder used to create a PropertyDefinition
Fields
name: Option<String>data_type: Option<DataType>required: Option<bool>description: Option<String>number_exponent: Option<i32>enum_options: Vec<String>struct_properties: Vec<PropertyDefinition>Implementations
sourceimpl PropertyDefinitionBuilder
impl PropertyDefinitionBuilder
pub fn new() -> Self
pub fn with_name(self, name: String) -> PropertyDefinitionBuilder
pub fn with_data_type(self, data_type: DataType) -> PropertyDefinitionBuilder
pub fn with_required(self, required: bool) -> PropertyDefinitionBuilder
pub fn with_description(self, description: String) -> PropertyDefinitionBuilder
pub fn with_number_exponent(
self,
number_exponent: i32
) -> PropertyDefinitionBuilder
pub fn with_enum_options(
self,
enum_options: Vec<String>
) -> PropertyDefinitionBuilder
pub fn with_struct_properties(
self,
struct_properties: Vec<PropertyDefinition>
) -> PropertyDefinitionBuilder
pub fn build(self) -> Result<PropertyDefinition, PropertyDefinitionBuildError>
Trait Implementations
sourceimpl Clone for PropertyDefinitionBuilder
impl Clone for PropertyDefinitionBuilder
sourcefn clone(&self) -> PropertyDefinitionBuilder
fn clone(&self) -> PropertyDefinitionBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Default for PropertyDefinitionBuilder
impl Default for PropertyDefinitionBuilder
sourcefn default() -> PropertyDefinitionBuilder
fn default() -> PropertyDefinitionBuilder
Returns the “default value” for a type. Read more
sourceimpl PartialEq<PropertyDefinitionBuilder> for PropertyDefinitionBuilder
impl PartialEq<PropertyDefinitionBuilder> for PropertyDefinitionBuilder
sourcefn eq(&self, other: &PropertyDefinitionBuilder) -> bool
fn eq(&self, other: &PropertyDefinitionBuilder) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &PropertyDefinitionBuilder) -> bool
fn ne(&self, other: &PropertyDefinitionBuilder) -> bool
This method tests for !=.
impl StructuralPartialEq for PropertyDefinitionBuilder
Auto Trait Implementations
impl RefUnwindSafe for PropertyDefinitionBuilder
impl Send for PropertyDefinitionBuilder
impl Sync for PropertyDefinitionBuilder
impl Unpin for PropertyDefinitionBuilder
impl UnwindSafe for PropertyDefinitionBuilder
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