GenerateConfig

Struct GenerateConfig 

Source
pub struct GenerateConfig {
    pub project_path: String,
    pub output_path: String,
    pub validation_library: String,
    pub verbose: Option<bool>,
    pub visualize_deps: Option<bool>,
    pub include_private: Option<bool>,
    pub type_mappings: Option<HashMap<String, String>>,
    pub exclude_patterns: Option<Vec<String>>,
    pub include_patterns: Option<Vec<String>>,
}

Fields§

§project_path: String

Path to the Tauri project source directory

§output_path: String

Output path for generated TypeScript files

§validation_library: String

Validation library to use (‘zod’ or ‘none’)

§verbose: Option<bool>

Enable verbose output

§visualize_deps: Option<bool>

Generate dependency graph visualization

§include_private: Option<bool>

Include private struct fields in generation

§type_mappings: Option<HashMap<String, String>>

Custom type mappings

§exclude_patterns: Option<Vec<String>>

File patterns to exclude from analysis

§include_patterns: Option<Vec<String>>

File patterns to include in analysis (overrides excludes)

Implementations§

Source§

impl GenerateConfig

Source

pub fn new() -> Self

Create a new configuration with defaults

Source

pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>

Load configuration from a file

Source

pub fn from_tauri_config<P: AsRef<Path>>(path: P) -> Result<Self, ConfigError>

Load configuration from Tauri configuration file

Source

pub fn save_to_file<P: AsRef<Path>>(&self, path: P) -> Result<(), ConfigError>

Save configuration to a file

Source

pub fn save_to_tauri_config<P: AsRef<Path>>( &self, path: P, ) -> Result<(), ConfigError>

Save configuration to Tauri configuration file

Source

pub fn validate(&self) -> Result<(), ConfigError>

Validate the configuration

Source

pub fn merge(&mut self, other: &GenerateConfig)

Merge with another configuration, with other taking precedence

Source

pub fn is_verbose(&self) -> bool

Get effective verbose setting

Source

pub fn should_visualize_deps(&self) -> bool

Get effective visualize_deps setting

Source

pub fn should_include_private(&self) -> bool

Get effective include_private setting

Trait Implementations§

Source§

impl Clone for GenerateConfig

Source§

fn clone(&self) -> GenerateConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GenerateConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GenerateConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GenerateConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&TypegenCommands> for GenerateConfig

Source§

fn from(cmd: &TypegenCommands) -> Self

Converts to this type from the input type.
Source§

impl Serialize for GenerateConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,