pub struct CallbackNamedAdapter<T> { /* private fields */ }Expand description
Adapts a callback with a custom name into an AttributeValue.
This type wraps a callback and its custom attribute name, enabling
Into<AttributeValue> trait implementation for named callbacks.
Used by the html! macro for component callback props.
Implementations§
Source§impl<T> CallbackNamedAdapter<T>
impl<T> CallbackNamedAdapter<T>
pub fn new(inner: T, name: &'static str) -> CallbackNamedAdapter<T>
Trait Implementations§
Source§impl<T> Debug for CallbackNamedAdapter<T>where
T: Debug,
impl<T> Debug for CallbackNamedAdapter<T>where
T: Debug,
Source§impl<F> From<CallbackNamedAdapter<F>> for AttributeValue
Converts a named callback adapter into an AttributeValue.
impl<F> From<CallbackNamedAdapter<F>> for AttributeValue
Converts a named callback adapter into an AttributeValue.
Source§fn from(adapter: CallbackNamedAdapter<F>) -> AttributeValue
fn from(adapter: CallbackNamedAdapter<F>) -> AttributeValue
Converts the wrapped closure with custom name into a callback AttributeValue.
§Returns
AttributeValue- An event attribute value with the custom name.
Auto Trait Implementations§
impl<T> Freeze for CallbackNamedAdapter<T>where
T: Freeze,
impl<T> RefUnwindSafe for CallbackNamedAdapter<T>where
T: RefUnwindSafe,
impl<T> Send for CallbackNamedAdapter<T>where
T: Send,
impl<T> Sync for CallbackNamedAdapter<T>where
T: Sync,
impl<T> Unpin for CallbackNamedAdapter<T>where
T: Unpin,
impl<T> UnsafeUnpin for CallbackNamedAdapter<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for CallbackNamedAdapter<T>where
T: UnwindSafe,
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