pub struct GeneratorOptions {
pub generate_accessors: bool,
pub generate_id_fields: bool,
pub generate_collection_fields: bool,
pub default_derives: Vec<String>,
}Expand description
Options for code generation
Fields§
§generate_accessors: boolGenerate accessor methods for relations
generate_id_fields: boolGenerate ID field for relations (e.g., order_id: OrderId)
generate_collection_fields: boolGenerate collection fields for relations (e.g., orders: Vec
default_derives: Vec<String>Default derives to add
Implementations§
Source§impl GeneratorOptions
impl GeneratorOptions
pub fn new() -> Self
pub fn with_accessors(self, enabled: bool) -> Self
pub fn with_id_fields(self, enabled: bool) -> Self
pub fn with_collection_fields(self, enabled: bool) -> Self
pub fn with_derives(self, derives: Vec<String>) -> Self
Trait Implementations§
Source§impl Clone for GeneratorOptions
impl Clone for GeneratorOptions
Source§fn clone(&self) -> GeneratorOptions
fn clone(&self) -> GeneratorOptions
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 Debug for GeneratorOptions
impl Debug for GeneratorOptions
Source§impl Default for GeneratorOptions
impl Default for GeneratorOptions
Source§fn default() -> GeneratorOptions
fn default() -> GeneratorOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GeneratorOptions
impl RefUnwindSafe for GeneratorOptions
impl Send for GeneratorOptions
impl Sync for GeneratorOptions
impl Unpin for GeneratorOptions
impl UnsafeUnpin for GeneratorOptions
impl UnwindSafe for GeneratorOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more