pub struct IrField {
pub name: String,
pub field_type: ScalarType,
pub primary: bool,
pub required: bool,
pub unique: bool,
pub default: Option<Value>,
pub values: Option<Vec<String>>,
pub auto: bool,
}Fields§
§name: String§field_type: ScalarType§primary: bool§required: bool§unique: bool§default: Option<Value>§values: Option<Vec<String>>§auto: boolImplementations§
Source§impl IrField
impl IrField
Sourcepub fn ts_type_string(&self) -> String
pub fn ts_type_string(&self) -> String
TypeScript type including optionality marker.
Sourcepub fn is_optional(&self) -> bool
pub fn is_optional(&self) -> bool
Whether the field is optional in the TypeScript interface.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IrField
impl<'de> Deserialize<'de> for IrField
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
Auto Trait Implementations§
impl Freeze for IrField
impl RefUnwindSafe for IrField
impl Send for IrField
impl Sync for IrField
impl Unpin for IrField
impl UnwindSafe for IrField
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