pub struct HandlerRef {
pub event: String,
pub chunk: String,
pub symbol: String,
pub captures: Vec<HandlerCapture>,
pub inline: Option<String>,
}Expand description
Reference to an event handler whose body lives in a lazy-loaded JS chunk.
Generated by the view! macro: it inspects the handler closure, asks the
resuma-rs2js crate to translate it to a JS expression, and stores the
resulting chunk id + symbol here.
Fields§
§event: StringDOM event name without the on prefix (e.g. click, input).
chunk: StringJS chunk id (resolved to /_resuma/handler/<chunk>.js at runtime).
symbol: StringSymbol within the chunk.
captures: Vec<HandlerCapture>Signals captured by the handler. The runtime turns these into a
state proxy keyed by the Rust identifier.
inline: Option<String>Inline JS source (pre-built). When present the runtime may evaluate
the handler immediately without a network round-trip — used for tiny
handlers like count.update(|c| c + 1).
Trait Implementations§
Source§impl Clone for HandlerRef
impl Clone for HandlerRef
Source§fn clone(&self) -> HandlerRef
fn clone(&self) -> HandlerRef
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 HandlerRef
impl Debug for HandlerRef
Source§impl<'de> Deserialize<'de> for HandlerRef
impl<'de> Deserialize<'de> for HandlerRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HandlerRef
impl RefUnwindSafe for HandlerRef
impl Send for HandlerRef
impl Sync for HandlerRef
impl Unpin for HandlerRef
impl UnsafeUnpin for HandlerRef
impl UnwindSafe for HandlerRef
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