pub struct ObjectDefinition {
pub name: String,
pub fields: BTreeMap<String, FieldType>,
pub field_order: Vec<String>,
pub template: Option<String>,
pub children: BTreeMap<String, ObjectDefinition>,
}Fields§
§name: String§fields: BTreeMap<String, FieldType>§field_order: Vec<String>§template: Option<String>§children: BTreeMap<String, ObjectDefinition>Implementations§
Source§impl ObjectDefinition
impl ObjectDefinition
pub fn new( name: &str, definition: &Table, editor_types: &EditorTypes, ) -> Result<ObjectDefinition, Box<dyn Error>>
pub fn from_table( table: &Table, editor_types: &EditorTypes, ) -> Result<BTreeMap<String, ObjectDefinition>, Box<dyn Error>>
pub fn empty_object(&self) -> ObjectValues
Source§impl ObjectDefinition
impl ObjectDefinition
pub fn to_json_schema_properties( &self, is_child: bool, options: &ObjectSchemaOptions, current_path: ValuePath, ) -> ObjectSchema
Trait Implementations§
Source§impl Clone for ObjectDefinition
impl Clone for ObjectDefinition
Source§fn clone(&self) -> ObjectDefinition
fn clone(&self) -> ObjectDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectDefinition
impl Debug for ObjectDefinition
Source§impl<'de> Deserialize<'de> for ObjectDefinition
impl<'de> Deserialize<'de> for ObjectDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ObjectDefinition
impl Hash for ObjectDefinition
Source§impl PartialEq for ObjectDefinition
impl PartialEq for ObjectDefinition
Source§impl Serialize for ObjectDefinition
impl Serialize for ObjectDefinition
impl StructuralPartialEq for ObjectDefinition
Auto Trait Implementations§
impl Freeze for ObjectDefinition
impl RefUnwindSafe for ObjectDefinition
impl Send for ObjectDefinition
impl Sync for ObjectDefinition
impl Unpin for ObjectDefinition
impl UnwindSafe for ObjectDefinition
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