pub struct WebPresenter { /* private fields */ }Expand description
WASM presenter that captures buffers and logs for the host.
Implementations§
Source§impl WebPresenter
impl WebPresenter
Sourcepub const fn outputs(&self) -> &WebOutputs
pub const fn outputs(&self) -> &WebOutputs
Get captured outputs.
Sourcepub fn outputs_mut(&mut self) -> &mut WebOutputs
pub fn outputs_mut(&mut self) -> &mut WebOutputs
Mutably access captured outputs.
Sourcepub fn take_outputs(&mut self) -> WebOutputs
pub fn take_outputs(&mut self) -> WebOutputs
Take captured outputs, leaving empty defaults.
Sourcepub fn flatten_patches_into(&self, cells: &mut Vec<u32>, spans: &mut Vec<u32>)
pub fn flatten_patches_into(&self, cells: &mut Vec<u32>, spans: &mut Vec<u32>)
Flatten patch runs into caller-provided reusable buffers.
Clears and refills the provided cells and spans Vecs, reusing
their heap capacity across frames to avoid per-frame allocation.
Sourcepub fn present_ui_owned(
&mut self,
buf: Buffer,
diff: Option<&BufferDiff>,
full_repaint_hint: bool,
)
pub fn present_ui_owned( &mut self, buf: Buffer, diff: Option<&BufferDiff>, full_repaint_hint: bool, )
Present a frame, taking ownership of the buffer to avoid cloning.
This is the zero-copy fast path for callers that can give up ownership
(e.g. StepProgram::render_frame). The buffer is moved directly into
last_buffer instead of being cloned.
Trait Implementations§
Source§impl BackendPresenter for WebPresenter
impl BackendPresenter for WebPresenter
Source§type Error = WebBackendError
type Error = WebBackendError
Platform-specific error type.
Source§fn capabilities(&self) -> &TerminalCapabilities
fn capabilities(&self) -> &TerminalCapabilities
Terminal capabilities detected by this backend.
Source§fn write_log(&mut self, text: &str) -> Result<(), Self::Error>
fn write_log(&mut self, text: &str) -> Result<(), Self::Error>
Write a log line to the scrollback region (inline mode) or stderr.
Source§impl Clone for WebPresenter
impl Clone for WebPresenter
Source§fn clone(&self) -> WebPresenter
fn clone(&self) -> WebPresenter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebPresenter
impl Debug for WebPresenter
Auto Trait Implementations§
impl Freeze for WebPresenter
impl RefUnwindSafe for WebPresenter
impl Send for WebPresenter
impl Sync for WebPresenter
impl Unpin for WebPresenter
impl UnwindSafe for WebPresenter
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