pub struct Shell { /* private fields */ }
Expand description
The Shell of the app contains all the imports like fonts, styles and scripts
Implementations§
Source§impl Shell
impl Shell
Sourcepub fn add_head_links(self, element: StaticStr) -> Self
pub fn add_head_links(self, element: StaticStr) -> Self
Add the links for head
tag like fonts, CSS etc. These are where the resources
should be loaded from.
Sourcepub fn add_styles(self, styles: impl AsRef<[StaticCowStr]>) -> Self
pub fn add_styles(self, styles: impl AsRef<[StaticCowStr]>) -> Self
Add multiple stypes in the <style></style>
field
Sourcepub fn add_const_styles(self, styles: impl AsRef<[&'static str]>) -> Self
pub fn add_const_styles(self, styles: impl AsRef<[&'static str]>) -> Self
Add multiple stypes in the <style></style>
field
Sourcepub fn add_script(self, script: StaticCowStr) -> Self
pub fn add_script(self, script: StaticCowStr) -> Self
Add the scripts in the <body></body>
field
Sourcepub fn add_scripts(self, scripts: impl AsRef<[StaticCowStr]>) -> Self
pub fn add_scripts(self, scripts: impl AsRef<[StaticCowStr]>) -> Self
Add the scripts in the <body></body>
field
Sourcepub fn add_const_scripts(self, scripts: impl AsRef<[&'static str]>) -> Self
pub fn add_const_scripts(self, scripts: impl AsRef<[&'static str]>) -> Self
Add the scripts in the <body></body>
field
Sourcepub fn head_links(&self) -> &[StaticCowStr] ⓘ
pub fn head_links(&self) -> &[StaticCowStr] ⓘ
Get the head_links
Sourcepub fn styles(&self) -> &[StaticCowStr] ⓘ
pub fn styles(&self) -> &[StaticCowStr] ⓘ
Get the styles
Sourcepub fn scripts(&self) -> &[StaticCowStr] ⓘ
pub fn scripts(&self) -> &[StaticCowStr] ⓘ
Get the scripts
Sourcepub fn add_fonts(self, app_env: &ActiveAppEnv) -> Self
pub fn add_fonts(self, app_env: &ActiveAppEnv) -> Self
Add user specified fonts
Trait Implementations§
Source§impl Ord for Shell
impl Ord for Shell
Source§impl PartialOrd for Shell
impl PartialOrd for Shell
impl Eq for Shell
impl StructuralPartialEq for Shell
Auto Trait Implementations§
impl Freeze for Shell
impl RefUnwindSafe for Shell
impl Send for Shell
impl Sync for Shell
impl Unpin for Shell
impl UnwindSafe for Shell
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