#[repr(u8)]pub enum LiveReloadEvent {
Reload,
Patches {
route: String,
patches_blob: Vec<u8>,
},
HeadChanged {
route: String,
},
}Expand description
Events produced by the live-reload server.
These are serialized with postcard and sent to the browser client,
which deserializes them in hotmeal-wasm.
Variants§
Reload
Full page reload needed.
Patches
DOM patches for a route (postcard-serialized Vec<Patch<'static>>).
HeadChanged
Head injections changed — full reload required.
Implementations§
Source§impl LiveReloadEvent
impl LiveReloadEvent
Sourcepub fn to_postcard(&self) -> Vec<u8> ⓘ
pub fn to_postcard(&self) -> Vec<u8> ⓘ
Serialize this event to postcard bytes.
Sourcepub fn from_postcard(bytes: &[u8]) -> Result<Self, DeserializeError>
pub fn from_postcard(bytes: &[u8]) -> Result<Self, DeserializeError>
Deserialize a LiveReloadEvent from postcard bytes.
Trait Implementations§
Source§impl Clone for LiveReloadEvent
impl Clone for LiveReloadEvent
Source§fn clone(&self) -> LiveReloadEvent
fn clone(&self) -> LiveReloadEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LiveReloadEvent
impl Debug for LiveReloadEvent
Auto Trait Implementations§
impl Freeze for LiveReloadEvent
impl RefUnwindSafe for LiveReloadEvent
impl Send for LiveReloadEvent
impl Sync for LiveReloadEvent
impl Unpin for LiveReloadEvent
impl UnsafeUnpin for LiveReloadEvent
impl UnwindSafe for LiveReloadEvent
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