Struct Config

Source
pub struct Config {
Show 38 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 default_rust_opaque_codec: Option<RustOpaqueCodecMode>, 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 auto_upgrade_dependency: Option<bool>, pub parse_const: Option<bool>, pub dart_format: Option<bool>, pub dart_fix: Option<bool>, pub rust_format: Option<bool>, pub stop_on_error: Option<bool>, pub dump: Option<Vec<ConfigDumpContent>>, pub dump_all: Option<bool>, pub rust_features: Option<Vec<String>>,
}
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>§default_rust_opaque_codec: Option<RustOpaqueCodecMode>§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>§auto_upgrade_dependency: Option<bool>§parse_const: Option<bool>§dart_format: Option<bool>§dart_fix: Option<bool>§rust_format: Option<bool>§stop_on_error: Option<bool>§dump: Option<Vec<ConfigDumpContent>>§dump_all: Option<bool>§rust_features: Option<Vec<String>>

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

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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>,