pub enum FnWidget {
Pointer(fn(_: WidgetContext<'_>) -> WidgetNode),
Closure(Arc<dyn Fn(WidgetContext<'_>) -> WidgetNode + Send + Sync>),
}
Variants§
Pointer(fn(_: WidgetContext<'_>) -> WidgetNode)
Closure(Arc<dyn Fn(WidgetContext<'_>) -> WidgetNode + Send + Sync>)
Implementations§
source§impl FnWidget
impl FnWidget
pub fn pointer(value: fn(_: WidgetContext<'_>) -> WidgetNode) -> Self
pub fn closure( value: impl Fn(WidgetContext<'_>) -> WidgetNode + Send + Sync + 'static ) -> Self
pub fn call(&self, context: WidgetContext<'_>) -> WidgetNode
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FnWidget
impl Send for FnWidget
impl Sync for FnWidget
impl Unpin for FnWidget
impl !UnwindSafe for FnWidget
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