pub struct EntitiesArgs {
pub db: DatabaseArgs,
pub output_dir: PathBuf,
pub derives: Vec<String>,
pub type_overrides: Vec<String>,
pub single_file: bool,
pub tables: Option<Vec<String>>,
pub exclude_tables: Option<Vec<String>>,
pub views: bool,
pub dry_run: bool,
}Fields§
§db: DatabaseArgs§output_dir: PathBufOutput directory for generated files
derives: Vec<String>Additional derives (e.g. Serialize,Deserialize,PartialEq)
type_overrides: Vec<String>Type overrides (e.g. jsonb=MyJsonType,uuid=MyUuid)
single_file: boolGenerate everything into a single file instead of one file per table
tables: Option<Vec<String>>Only generate for these tables (comma-separated)
exclude_tables: Option<Vec<String>>Exclude these tables/views from generation (comma-separated)
views: boolAlso generate structs for SQL views
dry_run: boolPrint to stdout without writing files
Implementations§
Source§impl EntitiesArgs
impl EntitiesArgs
pub fn parse_type_overrides(&self) -> HashMap<String, String>
Trait Implementations§
Source§impl Args for EntitiesArgs
impl Args for EntitiesArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for EntitiesArgs
impl CommandFactory for EntitiesArgs
Source§impl Debug for EntitiesArgs
impl Debug for EntitiesArgs
Source§impl FromArgMatches for EntitiesArgs
impl FromArgMatches for EntitiesArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Parser for EntitiesArgs
impl Parser for EntitiesArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for EntitiesArgs
impl RefUnwindSafe for EntitiesArgs
impl Send for EntitiesArgs
impl Sync for EntitiesArgs
impl Unpin for EntitiesArgs
impl UnsafeUnpin for EntitiesArgs
impl UnwindSafe for EntitiesArgs
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> 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