pub struct FieldCodegen {
pub name: Option<String>,
}Expand description
Codegen settings for individual record fields.
Corresponds to $types.field-codegen in the schema.
Used via value.$ext-type.codegen on record field values.
§Example
@ $types.user {
user-name = `text`
user-name.$codegen.name = "username" // Rename to `username` in Rust
}Fields§
§name: Option<String>Override the field name in generated Rust code.
Trait Implementations§
Source§impl Clone for FieldCodegen
impl Clone for FieldCodegen
Source§fn clone(&self) -> FieldCodegen
fn clone(&self) -> FieldCodegen
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 FieldCodegen
impl Debug for FieldCodegen
Source§impl Default for FieldCodegen
impl Default for FieldCodegen
Source§fn default() -> FieldCodegen
fn default() -> FieldCodegen
Returns the “default value” for a type. Read more
Source§impl<'doc> ParseDocument<'doc> for FieldCodegen
impl<'doc> ParseDocument<'doc> for FieldCodegen
Source§type Error = ParseError
type Error = ParseError
The error type returned by parsing.
Auto Trait Implementations§
impl Freeze for FieldCodegen
impl RefUnwindSafe for FieldCodegen
impl Send for FieldCodegen
impl Sync for FieldCodegen
impl Unpin for FieldCodegen
impl UnwindSafe for FieldCodegen
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