Enum parser_database::ast::FieldArity
source · pub enum FieldArity {
Required,
Optional,
List,
}
Expand description
An arity of a data model field.
Variants§
Required
The field either must be in an insert statement, or the field must have a default value for the insert to succeed.
ⓘ
name String
Optional
The field does not need to be in an insert statement for the write to succeed.
ⓘ
name String?
List
The field can have multiple values stored in the same column.
ⓘ
name String[]
Implementations§
source§impl FieldArity
impl FieldArity
pub fn is_list(&self) -> bool
pub fn is_optional(&self) -> bool
pub fn is_required(&self) -> bool
Trait Implementations§
source§impl Clone for FieldArity
impl Clone for FieldArity
source§fn clone(&self) -> FieldArity
fn clone(&self) -> FieldArity
Returns a copy 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 FieldArity
impl Debug for FieldArity
source§impl Hash for FieldArity
impl Hash for FieldArity
source§impl PartialEq for FieldArity
impl PartialEq for FieldArity
source§fn eq(&self, other: &FieldArity) -> bool
fn eq(&self, other: &FieldArity) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FieldArity
impl Eq for FieldArity
impl StructuralEq for FieldArity
impl StructuralPartialEq for FieldArity
Auto Trait Implementations§
impl RefUnwindSafe for FieldArity
impl Send for FieldArity
impl Sync for FieldArity
impl Unpin for FieldArity
impl UnwindSafe for FieldArity
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
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.