Struct i_slint_compiler::CompilerConfiguration
source · [−]pub struct CompilerConfiguration {
pub embed_resources: EmbedResourcesKind,
pub include_paths: Vec<PathBuf>,
pub style: Option<String>,
pub open_import_fallback: Option<Rc<dyn Fn(String) -> Pin<Box<dyn Future<Output = Option<Result<String>>>>>>>,
pub inline_all_elements: bool,
pub scale_factor: f64,
}
Expand description
CompilationConfiguration allows configuring different aspects of the compiler.
Fields
embed_resources: EmbedResourcesKind
Indicate whether to embed resources such as images in the generated output or whether to retain references to the resources on the file system.
include_paths: Vec<PathBuf>
The compiler will look in these paths for components used in the file to compile.
style: Option<String>
the name of the style. (eg: “native”)
open_import_fallback: Option<Rc<dyn Fn(String) -> Pin<Box<dyn Future<Output = Option<Result<String>>>>>>>
Callback to load import files which is called if the file could not be found
The callback should open the file specified by the given file name and return an future that provides the text content of the file as output.
inline_all_elements: bool
Run the pass that inlines all the elements.
This may help optimization to optimize the runtime resources usages, but at the cost of much more generated code and binary size.
scale_factor: f64
Compile time scale factor to apply to embedded resources such as images and glyphs.
Implementations
sourceimpl CompilerConfiguration
impl CompilerConfiguration
pub fn new(output_format: OutputFormat) -> Self
Trait Implementations
sourceimpl Clone for CompilerConfiguration
impl Clone for CompilerConfiguration
sourcefn clone(&self) -> CompilerConfiguration
fn clone(&self) -> CompilerConfiguration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CompilerConfiguration
impl !Send for CompilerConfiguration
impl !Sync for CompilerConfiguration
impl Unpin for CompilerConfiguration
impl !UnwindSafe for CompilerConfiguration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more