pub struct EventComponent {
pub id: String,
pub name: String,
pub callbacks: HashMap<String, CallbackFn>,
}
Expand description
处理带有Callbacks的Widget
Fields§
§id: String
§name: String
§callbacks: HashMap<String, CallbackFn>
key: callback name, value: callback function
example: @hover_in="lb_hover_in()"
=> key: lb_hover_in, value: {name: “hover_in”, func: Function(xxx)}
Implementations§
Source§impl EventComponent
impl EventComponent
pub fn convert_callbacks( callbacks: &HashMap<PropKey, Value>, ) -> Result<HashMap<String, CallbackFn>, Error>
Trait Implementations§
Source§impl Clone for EventComponent
impl Clone for EventComponent
Source§fn clone(&self) -> EventComponent
fn clone(&self) -> EventComponent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for EventComponent
impl RefUnwindSafe for EventComponent
impl Send for EventComponent
impl Sync for EventComponent
impl Unpin for EventComponent
impl UnwindSafe for EventComponent
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