pub struct PlayitExecutor<T: PlayitTransport, const REC_CAP: usize = 256> { /* private fields */ }Expand description
Processes playit commands arriving over a PlayitTransport and executes
them against a WidgetNode tree.
The const generic REC_CAP sets the maximum number of events the built-in
recorder can capture (default 256).
Call poll once per frame from your main loop.
Implementations§
Source§impl<T: PlayitTransport, const REC_CAP: usize> PlayitExecutor<T, REC_CAP>
impl<T: PlayitTransport, const REC_CAP: usize> PlayitExecutor<T, REC_CAP>
Sourcepub fn poll<P: EventPipeline, F>(
&mut self,
root: &mut WidgetNode,
status: &StatusData,
fb: Option<&dyn FramebufferReader>,
pipeline: &mut P,
on_extension: F,
)
pub fn poll<P: EventPipeline, F>( &mut self, root: &mut WidgetNode, status: &StatusData, fb: Option<&dyn FramebufferReader>, pipeline: &mut P, on_extension: F, )
Drain incoming bytes, parse complete command lines, and execute them.
root— mutable reference to the widget tree root.status— current telemetry snapshot for?commands.fb— optional framebuffer reader forDpixel dump commands.pipeline— event pipeline for gesture processing. Pass&mut NullPipelinefor direct dispatch.on_extension— callback for application-defined extension commands.
Sourcepub fn poll_with_callback<P: EventPipeline, F, A>(
&mut self,
root: &mut WidgetNode,
status: &StatusData,
fb: Option<&dyn FramebufferReader>,
pipeline: &mut P,
on_extension: F,
after_dispatch: A,
)
pub fn poll_with_callback<P: EventPipeline, F, A>( &mut self, root: &mut WidgetNode, status: &StatusData, fb: Option<&dyn FramebufferReader>, pipeline: &mut P, on_extension: F, after_dispatch: A, )
Variant of poll that invokes after_dispatch after
every event delivered to the widget tree.
Sourcepub fn dispatch_event<P: EventPipeline, A>(
&mut self,
event: Event,
root: &mut WidgetNode,
pipeline: &mut P,
after_dispatch: A,
)
pub fn dispatch_event<P: EventPipeline, A>( &mut self, event: Event, root: &mut WidgetNode, pipeline: &mut P, after_dispatch: A, )
Dispatch one runtime input event through the same gesture pipeline used for transport commands.
Auto Trait Implementations§
impl<T, const REC_CAP: usize> Freeze for PlayitExecutor<T, REC_CAP>where
T: Freeze,
impl<T, const REC_CAP: usize> RefUnwindSafe for PlayitExecutor<T, REC_CAP>where
T: RefUnwindSafe,
impl<T, const REC_CAP: usize> Send for PlayitExecutor<T, REC_CAP>where
T: Send,
impl<T, const REC_CAP: usize> Sync for PlayitExecutor<T, REC_CAP>where
T: Sync,
impl<T, const REC_CAP: usize> Unpin for PlayitExecutor<T, REC_CAP>where
T: Unpin,
impl<T, const REC_CAP: usize> UnsafeUnpin for PlayitExecutor<T, REC_CAP>where
T: UnsafeUnpin,
impl<T, const REC_CAP: usize> UnwindSafe for PlayitExecutor<T, REC_CAP>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