pub struct Document {
pub node: Option<Document>,
pub inner_components: Vec<Rc<Component>>,
pub inner_types: Vec<Type>,
pub local_registry: TypeRegister,
pub custom_fonts: Vec<(SmolStr, SyntaxToken)>,
pub exports: Exports,
pub imports: Vec<ImportedTypes>,
pub embedded_file_resources: RefCell<BTreeMap<SmolStr, EmbeddedResources>>,
pub used_types: RefCell<UsedSubTypes>,
pub popup_menu_impl: Option<Rc<Component>>,
}
Expand description
The full document (a complete file)
Fields§
§node: Option<Document>
§inner_components: Vec<Rc<Component>>
§inner_types: Vec<Type>
§local_registry: TypeRegister
§custom_fonts: Vec<(SmolStr, SyntaxToken)>
A list of paths to .ttf/.ttc files that are supposed to be registered on startup for custom font use.
exports: Exports
§imports: Vec<ImportedTypes>
§embedded_file_resources: RefCell<BTreeMap<SmolStr, EmbeddedResources>>
Map of resources that should be embedded in the generated code, indexed by their absolute path on disk on the build system
used_types: RefCell<UsedSubTypes>
The list of used extra types used recursively.
The popup_menu_impl
Implementations§
Source§impl Document
impl Document
pub fn from_node( node: Document, imports: Vec<ImportedTypes>, reexports: Exports, diag: &mut BuildDiagnostics, parent_registry: &Rc<RefCell<TypeRegister>>, ) -> Self
pub fn exported_roots( &self, ) -> impl DoubleEndedIterator<Item = Rc<Component>> + '_
Sourcepub fn last_exported_component(&self) -> Option<Rc<Component>>
pub fn last_exported_component(&self) -> Option<Rc<Component>>
This is the component that is going to be instantiated by the interpreter
Sourcepub fn visit_all_used_components(&self, v: impl FnMut(&Rc<Component>))
pub fn visit_all_used_components(&self, v: impl FnMut(&Rc<Component>))
visit all root and used component (including globals)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Document
impl !RefUnwindSafe for Document
impl !Send for Document
impl !Sync for Document
impl Unpin for Document
impl !UnwindSafe for Document
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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