Skip to main content

MarkupAssembly

Struct MarkupAssembly 

Source
pub struct MarkupAssembly {
    pub name: &'static str,
    pub crate_name: &'static str,
    pub xmlns_definitions: &'static [XmlnsDefinition],
    pub xmlns_prefixes: &'static [XmlnsPrefix],
    pub metadata: &'static [(&'static str, &'static str)],
}
Expand description

What a crate states about itself for markup: the assembly name its types are addressed by (using:Ns;assembly=FerroUI.Controls, asset URIs) and its XML namespace definitions.

A crate declares one as a constant and registers it from its register_types() function. A type belongs to the assembly whose crate_name is the first segment of the module path of the type.

Fields§

§name: &'static str

The assembly name (FerroUI.Controls).

§crate_name: &'static str

The crate, as module paths spell it (ferroui_controls).

§xmlns_definitions: &'static [XmlnsDefinition]§xmlns_prefixes: &'static [XmlnsPrefix]§metadata: &'static [(&'static str, &'static str)]

Key/value metadata of the assembly (the AssemblyMetadata attributes of the managed original). The markup loader reads CREATE_SOURCE_INFO.

Implementations§

Source§

impl MarkupAssembly

Source

pub const CREATE_SOURCE_INFO: &'static str = "FerroXamlCreateSourceInfo"

The metadata key that states whether markup compiled for the assembly records source information by default ("true"/"false").

Source

pub const USE_COMPILED_BINDINGS_BY_DEFAULT: &'static str = "FerroUseCompiledBindingsByDefault"

The metadata key that states whether {Binding} in markup of the assembly is a compiled binding by default ("True"/"False"): the FerroUseCompiledBindingsByDefault entry the build task of upstream writes into every assembly it compiles markup for, with the value of its DefaultCompileBindings. The previewer of the designer reads it.

Source

pub fn metadata_value(&self, key: &str) -> Option<&'static str>

The value of the metadata entry key.

Source

pub fn register(assembly: &'static MarkupAssembly)

Adds an assembly to the process-wide table of assemblies. Registering an assembly again does nothing.

Source

pub fn registered_assemblies() -> Vec<&'static MarkupAssembly>

Every registered assembly, in registration order.

Source

pub fn find(name: &str) -> Option<&'static MarkupAssembly>

The registered assembly named name.

Source

pub fn of_module(module_path: &str) -> Option<&'static MarkupAssembly>

The registered assembly that declares the module module_path.

Trait Implementations§

Source§

impl Debug for MarkupAssembly

Source§

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

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

impl Eq for MarkupAssembly

Source§

impl PartialEq for MarkupAssembly

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MarkupAssembly

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> AnyValue for T
where T: PartialEq + 'static,

Source§

fn any_value_as_any(&self) -> &(dyn Any + 'static)

Source§

fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool

Source§

fn any_value_type_name(&self) -> &'static str

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> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.