pub struct HotReloadOverrideHandler {
pub base_style: Css,
pub hot_reloader: Box<dyn HotReloadHandler>,
}
Expand description
Custom hot-reloader combinator that can be used to merge hot-reloaded styles onto a base style. Can be useful when working from a base configuration, such as the OS-native styles.
Fields§
§base_style: Css
The base style, usually provided by azul-native-style
.
hot_reloader: Box<dyn HotReloadHandler>
The style that will be added on top of the base_style
.
Implementations§
Source§impl HotReloadOverrideHandler
impl HotReloadOverrideHandler
Sourcepub fn new(base_style: Css, hot_reloader: Box<dyn HotReloadHandler>) -> Self
pub fn new(base_style: Css, hot_reloader: Box<dyn HotReloadHandler>) -> Self
Creates a new HotReloadHandler
that merges styles onto the given base style
(usually the system-native style, in order to let the user override properties).
Trait Implementations§
Source§impl HotReloadHandler for HotReloadOverrideHandler
impl HotReloadHandler for HotReloadOverrideHandler
Source§fn reload_style(&self) -> Result<Css, String>
fn reload_style(&self) -> Result<Css, String>
Reloads the style from the source format. Should return Ok() when the CSS has be correctly
reloaded, and an human-readable error string otherwise (since the error needs to be printed
to stdout when hot-reloading).
Source§fn get_reload_interval(&self) -> Duration
fn get_reload_interval(&self) -> Duration
Returns how quickly the hot-reloader should reload the source format.
Auto Trait Implementations§
impl Freeze for HotReloadOverrideHandler
impl !RefUnwindSafe for HotReloadOverrideHandler
impl !Send for HotReloadOverrideHandler
impl !Sync for HotReloadOverrideHandler
impl Unpin for HotReloadOverrideHandler
impl !UnwindSafe for HotReloadOverrideHandler
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