pub struct HotReloader(pub Box<dyn HotReloadHandler>);
Tuple Fields§
§0: Box<dyn HotReloadHandler>
Implementations§
Source§impl HotReloader
impl HotReloader
pub fn new(hot_reload_handler: Box<dyn HotReloadHandler>) -> Self
pub fn get_reload_interval(&self) -> Duration
Sourcepub fn reload_style(&self) -> Result<Css, String>
pub fn reload_style(&self) -> Result<Css, String>
Reloads the CSS (if possible).
Returns:
- Ok(css) if the CSS has been successfully reloaded
- Err(why) if the CSS failed to hot-reload.
Auto Trait Implementations§
impl Freeze for HotReloader
impl !RefUnwindSafe for HotReloader
impl !Send for HotReloader
impl !Sync for HotReloader
impl Unpin for HotReloader
impl !UnwindSafe for HotReloader
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