pub struct Document {
pub node: Option<Document>,
pub inner_components: Vec<Rc<Component>>,
pub inner_structs: Vec<Type>,
pub root_component: Rc<Component>,
pub local_registry: TypeRegister,
pub custom_fonts: Vec<String>,
/* private fields */
}
Expand description
The full document (a complete file)
Fields§
§node: Option<Document>
§inner_components: Vec<Rc<Component>>
§inner_structs: Vec<Type>
§root_component: Rc<Component>
§local_registry: TypeRegister
§custom_fonts: Vec<String>
A list of paths to .ttf/.ttc files that are supposed to be registered on startup for custom font use.
Implementations§
Source§impl Document
impl Document
pub fn from_node( node: Document, foreign_imports: Vec<ImportedTypes>, diag: &mut BuildDiagnostics, parent_registry: &Rc<RefCell<TypeRegister>>, ) -> Self
pub fn exports(&self) -> &Vec<(ExportedName, Type)>
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