pub struct AssemblyModel {Show 17 fields
pub name: String,
pub crate_name: String,
pub xmlns_definitions: Vec<XmlnsDefinitionModel>,
pub xmlns_prefixes: Vec<XmlnsPrefixModel>,
pub metadata: Vec<(String, String)>,
pub namespaces: Vec<(String, String)>,
pub types: Vec<TypeModel>,
pub exports: Vec<ExportModel>,
pub aliases: Vec<AliasModel>,
pub handles: Vec<HandleModel>,
pub casts: Vec<CastModel>,
pub value_types: Vec<ValueTypeModel>,
pub unread_value_types: Vec<(String, i64)>,
pub macros: Vec<MacroModel>,
pub functions: Vec<FunctionsModel>,
pub documents: Vec<DocumentModel>,
pub dependencies: Vec<String>,
}Expand description
What a crate states about itself for markup (AssemblyModel).
Fields§
§name: StringThe assembly name.
crate_name: StringThe name of the crate, as Rust paths spell it.
xmlns_definitions: Vec<XmlnsDefinitionModel>§xmlns_prefixes: Vec<XmlnsPrefixModel>§metadata: Vec<(String, String)>The metadata of the assembly (FerroXamlCreateSourceInfo), name and value.
namespaces: Vec<(String, String)>The namespace table: a module path and the dotted namespace of the types declared below it. A type belongs to the namespace of the longest module path that is a prefix of the path of its module.
types: Vec<TypeModel>§exports: Vec<ExportModel>The export table of the crate: every path another crate can name a type of the crate by, with the path of the module that declares it (9.5.2, step 1). What a glob import of a module of the crate brings into another crate, and what makes a path into the crate canonical, is read from it.
aliases: Vec<AliasModel>The type aliases of the crate whose type the scanner resolved.
handles: Vec<HandleModel>The handles the crate registers for types with markup metadata, of this crate or of the crates it is built on.
casts: Vec<CastModel>The casts the crate registers between Rust types, in the order of the scan.
value_types: Vec<ValueTypeModel>The other registrations with the untyped value conversions the functions of the crate make with their types stated.
unread_value_types: Vec<(String, i64)>The registrations the text of the crate has and the model does not: for each
registration function (VALUE_REGISTRATIONS) with such calls, their number (a call
that leaves a type to inference, a call in the body of a macro, in a macro
invocation or in test code). A crate with such calls registers more than its model
states, so nothing follows from a registration that is not in the model.
macros: Vec<MacroModel>The macros the crate exports that declare through a declaration macro.
functions: Vec<FunctionsModel>The public functions of the inherent impl blocks of the types of the crate that
another crate can name, by type, in the order of the scan.
documents: Vec<DocumentModel>The compiled documents, in the order of the compilation.
dependencies: Vec<String>The .xamlmeta files of the crates this crate is built on, relative to the
directory of this file or absolute.
Implementations§
Source§impl AssemblyModel
impl AssemblyModel
Sourcepub fn new(name: &str, crate_name: &str) -> AssemblyModel
pub fn new(name: &str, crate_name: &str) -> AssemblyModel
A model without types and documents.
Sourcepub fn from_metadata(metadata: XamlMetadata) -> AssemblyModel
pub fn from_metadata(metadata: XamlMetadata) -> AssemblyModel
The model of a file of format 1: the documents of a crate, no types.
Sourcepub fn metadata(&self) -> XamlMetadata
pub fn metadata(&self) -> XamlMetadata
The part of the model a file of format 1 holds: what the compiler reads today.
Sourcepub fn namespace_of_module(&self, module: &str) -> &str
pub fn namespace_of_module(&self, module: &str) -> &str
The namespace the table gives the module module; empty when it has none.
Sourcepub fn find_type(&self, full_name: &str) -> Option<&TypeModel>
pub fn find_type(&self, full_name: &str) -> Option<&TypeModel>
The type with the namespace-qualified name full_name.
Sourcepub fn find_rust_type(&self, rust_path: &str) -> Option<&TypeModel>
pub fn find_rust_type(&self, rust_path: &str) -> Option<&TypeModel>
The type with the Rust type text rust_path (its path, for a type the crate declares).
Sourcepub fn visit_types_mut(&mut self, visit: &mut dyn FnMut(&mut RustType))
pub fn visit_types_mut(&mut self, visit: &mut dyn FnMut(&mut RustType))
Calls visit with every type text of the model that is not of one of its types: the
types of its aliases, its registered handles and its registered casts.
Trait Implementations§
Source§impl Clone for AssemblyModel
impl Clone for AssemblyModel
Source§fn clone(&self) -> AssemblyModel
fn clone(&self) -> AssemblyModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AssemblyModel
impl Debug for AssemblyModel
impl Eq for AssemblyModel
Source§impl PartialEq for AssemblyModel
impl PartialEq for AssemblyModel
impl StructuralPartialEq for AssemblyModel
Auto Trait Implementations§
impl Freeze for AssemblyModel
impl RefUnwindSafe for AssemblyModel
impl Send for AssemblyModel
impl Sync for AssemblyModel
impl Unpin for AssemblyModel
impl UnsafeUnpin for AssemblyModel
impl UnwindSafe for AssemblyModel
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more