pub struct Schema {
pub name: String,
pub fields: Vec<Field>,
}Fields§
§name: String§fields: Vec<Field>Implementations§
Source§impl Schema
impl Schema
pub fn new(name: impl Into<String>) -> Self
pub fn field(self, name: impl Into<String>, field_type: FieldType) -> Self
pub fn add_field(&mut self, name: impl Into<String>, field_type: FieldType)
pub fn get_field(&self, name: &str) -> Option<&Field>
pub fn field_index(&self, name: &str) -> Option<usize>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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