pub struct LinuxViewDefinition<W> { /* private fields */ }Expand description
The View { Prop / Events / Command } portion of a Linux declaration.
Implementations§
Source§impl<W> LinuxViewDefinition<W>where
W: LinuxView,
impl<W> LinuxViewDefinition<W>where
W: LinuxView,
Sourcepub fn new(
name: impl Into<String>,
create: impl Fn(LinuxEventEmitter) -> W + 'static,
) -> Self
pub fn new( name: impl Into<String>, create: impl Fn(LinuxEventEmitter) -> W + 'static, ) -> Self
Declares how the widget is created for each mounted node.
Sourcepub fn prop(
self,
property: impl Into<String>,
set: impl Fn(&W, &WhiskerValue) + 'static,
clear: impl Fn(&W) + 'static,
) -> Self
pub fn prop( self, property: impl Into<String>, set: impl Fn(&W, &WhiskerValue) + 'static, clear: impl Fn(&W) + 'static, ) -> Self
Declares one property by its stable Host name.
Sourcepub fn event(self, event: impl Into<String>) -> Self
pub fn event(self, event: impl Into<String>) -> Self
Declares one event by its stable Host name.
Sourcepub fn command(
self,
command: impl Into<String>,
handler: impl Fn(&W, &WhiskerValue) + 'static,
) -> Self
pub fn command( self, command: impl Into<String>, handler: impl Fn(&W, &WhiskerValue) + 'static, ) -> Self
Declares one command by its stable Host name.
Sourcepub fn text_style(
self,
update: impl Fn(&W, &TextStyleSnapshot) + 'static,
) -> Self
pub fn text_style( self, update: impl Fn(&W, &TextStyleSnapshot) + 'static, ) -> Self
Receives the resolved inherited text style.
Sourcepub fn measure(
self,
measure: impl Fn(&ModuleMeasureRequest) -> Option<MeasuredSize> + 'static,
) -> Self
pub fn measure( self, measure: impl Fn(&ModuleMeasureRequest) -> Option<MeasuredSize> + 'static, ) -> Self
Returns the intrinsic size, or None when the request is unsupported.
Auto Trait Implementations§
impl<W> !RefUnwindSafe for LinuxViewDefinition<W>
impl<W> !Send for LinuxViewDefinition<W>
impl<W> !Sync for LinuxViewDefinition<W>
impl<W> !UnwindSafe for LinuxViewDefinition<W>
impl<W> Forget for LinuxViewDefinition<W>
impl<W> Freeze for LinuxViewDefinition<W>where
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const RcInner<dyn Fn(LinuxEventEmitter) -> W> is !null: Freeze,
PhantomData<RcInner<dyn Fn(LinuxEventEmitter) -> W>>: Freeze,
PhantomData<(String, ())>: Freeze,
PhantomData<(String, (Rc<dyn Fn(&W, &WhiskerValue)>, Rc<dyn Fn(&W)>))>: Freeze,
PhantomData<(String, Rc<dyn Fn(&W, &WhiskerValue)>)>: Freeze,
*const RcInner<dyn Fn(&W, &TextStyleSnapshot)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&W, &TextStyleSnapshot)>>: Freeze,
*const RcInner<dyn Fn(&ModuleMeasureRequest) -> Option<MeasuredSize>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&ModuleMeasureRequest) -> Option<MeasuredSize>>>: Freeze,
impl<W> Move for LinuxViewDefinition<W>
impl<W> Unpin for LinuxViewDefinition<W>
impl<W> UnsafeUnpin for LinuxViewDefinition<W>where
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RcInner<dyn Fn(LinuxEventEmitter) -> W> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(LinuxEventEmitter) -> W>>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
PhantomData<(String, (Rc<dyn Fn(&W, &WhiskerValue)>, Rc<dyn Fn(&W)>))>: UnsafeUnpin,
PhantomData<(String, Rc<dyn Fn(&W, &WhiskerValue)>)>: UnsafeUnpin,
*const RcInner<dyn Fn(&W, &TextStyleSnapshot)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&W, &TextStyleSnapshot)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&ModuleMeasureRequest) -> Option<MeasuredSize>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&ModuleMeasureRequest) -> Option<MeasuredSize>>>: UnsafeUnpin,
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