pub struct RemoteComponent { /* private fields */ }Expand description
A pi-tui component that lives in an extension runtime.
Implementations§
Source§impl RemoteComponent
impl RemoteComponent
Sourcepub fn new(
runtime: u64,
handle: u32,
host: Arc<dyn ComponentHost>,
) -> RemoteComponent
pub fn new( runtime: u64, handle: u32, host: Arc<dyn ComponentHost>, ) -> RemoteComponent
Component handle of host, the runtime numbered runtime.
Sourcepub fn key(&self) -> (u64, u32)
pub fn key(&self) -> (u64, u32)
What identifies it across runtimes: the runtime’s number and its handle there.
Sourcepub fn render(&self, width: u16) -> BoxFuture<'static, Vec<String>>
pub fn render(&self, width: u16) -> BoxFuture<'static, Vec<String>>
Its lines at width columns (see ComponentHost::render).
Sourcepub fn mouse(&self, event: &Value) -> BoxFuture<'static, bool>
pub fn mouse(&self, event: &Value) -> BoxFuture<'static, bool>
Delivers a mouse event (see ComponentHost::mouse).
Sourcepub fn editor_op(&self, op: &Value)
pub fn editor_op(&self, op: &Value)
Sends an operation to the editor it is, as
ComponentHost::editor_op describes.
Trait Implementations§
Source§impl Clone for RemoteComponent
impl Clone for RemoteComponent
Auto Trait Implementations§
impl !RefUnwindSafe for RemoteComponent
impl !UnwindSafe for RemoteComponent
impl Freeze for RemoteComponent
impl Send for RemoteComponent
impl Sync for RemoteComponent
impl Unpin for RemoteComponent
impl UnsafeUnpin for RemoteComponent
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