pub struct File { /* private fields */ }Expand description
Content of a template source.
Implementations§
Source§impl File
impl File
Sourcepub fn get_block(&self, block: &Ident) -> Option<&BlockContent>
pub fn get_block(&self, block: &Ident) -> Option<&BlockContent>
Get block by id.
Sourcepub fn get_import_by_id(&self, name: &Ident) -> Option<&Import>
pub fn get_import_by_id(&self, name: &Ident) -> Option<&Import>
Get imported template by id.
Sourcepub fn get_import_by_path(&self, path: &LitStr) -> Option<&Import>
pub fn get_import_by_path(&self, path: &LitStr) -> Option<&Import>
Get imported template by path.
pub fn imports(&self) -> &[Import]
pub fn blocks(&self) -> &[BlockContent]
pub fn blocks_mut(&mut self) -> &mut Vec<BlockContent>
pub fn statics(&self) -> &[Rc<str>]
pub fn layout(&self) -> Option<&LayoutTempl>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl !Send for File
impl !Sync for File
impl Unpin for File
impl UnwindSafe for File
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