pub struct RecordCodegen {
pub type_name: Option<String>,
pub derive: Option<Vec<String>>,
}Expand description
Codegen settings for record types.
Corresponds to $types.record-codegen in the schema.
Used via $ext-type.codegen on record type definitions.
Includes flattened fields from $types.base-codegen.
For field-level codegen settings, use FieldCodegen via
value.$ext-type.codegen on individual fields.
§Example
@ $types.user {
$codegen {
type = "User"
derive = ["Debug", "Clone", "Serialize"]
}
name = `text`
age = `integer`
}Fields§
§type_name: Option<String>Override the generated type name (from base-codegen).
derive: Option<Vec<String>>Override the list of derive macros (from base-codegen).
Trait Implementations§
Source§impl Clone for RecordCodegen
impl Clone for RecordCodegen
Source§fn clone(&self) -> RecordCodegen
fn clone(&self) -> RecordCodegen
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 RecordCodegen
impl Debug for RecordCodegen
Source§impl Default for RecordCodegen
impl Default for RecordCodegen
Source§fn default() -> RecordCodegen
fn default() -> RecordCodegen
Returns the “default value” for a type. Read more
Source§impl<'doc> ParseDocument<'doc> for RecordCodegen
impl<'doc> ParseDocument<'doc> for RecordCodegen
Source§type Error = ParseError
type Error = ParseError
The error type returned by parsing.
Auto Trait Implementations§
impl Freeze for RecordCodegen
impl RefUnwindSafe for RecordCodegen
impl Send for RecordCodegen
impl Sync for RecordCodegen
impl Unpin for RecordCodegen
impl UnwindSafe for RecordCodegen
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