FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    XamlGroup

    struct · ferroui-build · v0.5.0

    struct XamlGroup
    

    A group of documents that are compiled together into one module: the group transformers see every document of it, so includes between them are linked, as upstream compiles the documents of an assembly.

    View source

    Members

    new

    fn new(module: &str) -> Self
    

    A group whose generated file is the body of the module module of the crate root. Without documents the group is every .xaml file below the XAML root of the build.

    Source

    class_document

    fn class_document(self: Self, name: &str) -> Self
    

    Makes the group the group of a class of the crate: name (its path below the root URI of the assembly) is the document of the class its root names with x:Class, and the group is that document with every document of the group it includes, directly or not. The generated file is the file of the class (rust_emitter::generate_class_file): populate, which the constructor of the class calls, the build functions of the included documents and the loader table. Its module is declared at the crate root like the module of any group (crate::<module>::populate).

    Only with TypeSystem::Model: the class is a type of the crate being built.

    Source

    constructor

    fn constructor(self: Self, constructor: ClassConstructor) -> Self
    

    The constructor the loader table creates the class of a class group with. Without the call the compiler picks it as upstream's does: a public parameterless constructor, else a public constructor that takes the service provider.

    Source

    documents

    fn documents(self: Self, documents: &[(&str, &str)]) -> Self
    

    The documents of the group, by their path below the root URI of the assembly (Views/Main.xaml), in the order they are compiled. The build script states the files they come from with Build::input.

    Source

    create_source_info

    fn create_source_info(self: Self, value: bool) -> Self
    

    Whether the documents are compiled with source information (CreateSourceInfo); without the call, as the assembly states it.

    Source

    internal

    fn internal(self: Self) -> Self
    

    Keeps the group out of the loader table and of the .xamlmeta of the crate: its documents are reached by their build functions only (a second compilation of documents another group registers, as a test compiles them).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.