Struct lib_flutter_rust_bridge_codegen::codegen::Config

source ·
pub struct Config {
Show 31 fields pub base_dir: Option<String>, pub rust_input: Option<String>, pub dart_output: Option<String>, pub c_output: Option<String>, pub duplicated_c_output: Option<Vec<String>>, pub rust_root: Option<String>, pub rust_output: Option<String>, pub dart_entrypoint_class_name: Option<String>, pub dart_format_line_length: Option<u32>, pub dart_preamble: Option<String>, pub rust_preamble: Option<String>, pub dart_enums_style: Option<bool>, pub add_mod_to_lib: Option<bool>, pub llvm_path: Option<Vec<String>>, pub llvm_compiler_opts: Option<String>, pub dart_root: Option<String>, pub build_runner: Option<bool>, pub extra_headers: Option<String>, pub web: Option<bool>, pub deps_check: Option<bool>, pub dart3: Option<bool>, pub full_dep: Option<bool>, pub local: Option<bool>, pub default_external_library_loader_web_prefix: Option<String>, pub dart_type_rename: Option<HashMap<String, String>>, pub enable_lifetime: Option<bool>, pub type_64bit_int: Option<bool>, pub default_dart_async: Option<bool>, pub stop_on_error: Option<bool>, pub dump: Option<Vec<ConfigDumpContent>>, pub dump_all: Option<bool>,
}
Expand description

Configuration for code generation Refer to GenerateCommandArgs for documentations

Fields§

§base_dir: Option<String>§rust_input: Option<String>§dart_output: Option<String>§c_output: Option<String>§duplicated_c_output: Option<Vec<String>>§rust_root: Option<String>§rust_output: Option<String>§dart_entrypoint_class_name: Option<String>§dart_format_line_length: Option<u32>§dart_preamble: Option<String>§rust_preamble: Option<String>§dart_enums_style: Option<bool>§add_mod_to_lib: Option<bool>§llvm_path: Option<Vec<String>>§llvm_compiler_opts: Option<String>§dart_root: Option<String>§build_runner: Option<bool>§extra_headers: Option<String>§web: Option<bool>§deps_check: Option<bool>§dart3: Option<bool>§full_dep: Option<bool>§local: Option<bool>§default_external_library_loader_web_prefix: Option<String>§dart_type_rename: Option<HashMap<String, String>>§enable_lifetime: Option<bool>§type_64bit_int: Option<bool>§default_dart_async: Option<bool>§stop_on_error: Option<bool>§dump: Option<Vec<ConfigDumpContent>>§dump_all: Option<bool>

Implementations§

source§

impl Config

source

pub fn from_files_auto() -> Result<Self>

source

pub fn from_config_file(location: &str) -> Result<Option<Self>>

source

pub fn from_pubspec_yaml(location: &str) -> Result<Option<Self>>

Loads the Config from a specified pubspec.yaml file.

Returns None if it doesn’t contain the flutter_rust_bridge section somewhere in the file.

Trait Implementations§

source§

impl Debug for Config

source§

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

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

impl Default for Config

source§

fn default() -> Config

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

impl<'de> Deserialize<'de> for Config

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 Serialize for Config

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§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

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> 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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,