pub struct SchemaField<'a> {
pub name: &'a str,
pub ty: TypeName<'a>,
pub default: Option<Expr<'a>>,
}Expand description
A schema field. default = Some(expr) makes the field optional: if omitted at
new, the default expression is evaluated in the instantiation scope. A field
with no default is required (E0511 if missing). No nullable (?) fields yet.
Fields§
§name: &'a str§ty: TypeName<'a>§default: Option<Expr<'a>>Trait Implementations§
Source§impl<'a> Clone for SchemaField<'a>
impl<'a> Clone for SchemaField<'a>
Source§fn clone(&self) -> SchemaField<'a>
fn clone(&self) -> SchemaField<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for SchemaField<'a>
impl<'a> Debug for SchemaField<'a>
Source§impl<'a> PartialEq for SchemaField<'a>
impl<'a> PartialEq for SchemaField<'a>
impl<'a> StructuralPartialEq for SchemaField<'a>
Auto Trait Implementations§
impl<'a> Freeze for SchemaField<'a>
impl<'a> RefUnwindSafe for SchemaField<'a>
impl<'a> Send for SchemaField<'a>
impl<'a> Sync for SchemaField<'a>
impl<'a> Unpin for SchemaField<'a>
impl<'a> UnsafeUnpin for SchemaField<'a>
impl<'a> UnwindSafe for SchemaField<'a>
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