pub struct TtyPresenter<W: Write + Send = Stdout> { /* private fields */ }Expand description
Native ANSI presenter (Buffer → escape sequences → stdout).
Wraps ftui_render::presenter::Presenter<W> for real ANSI output.
In headless mode (inner = None), all operations are no-ops.
Implementations§
Source§impl TtyPresenter
impl TtyPresenter
Sourcepub fn new(capabilities: TerminalCapabilities) -> Self
pub fn new(capabilities: TerminalCapabilities) -> Self
Create a headless presenter (no output). Used for tests and headless backends.
Sourcepub fn live(capabilities: TerminalCapabilities) -> Self
pub fn live(capabilities: TerminalCapabilities) -> Self
Create a live presenter that writes ANSI escape sequences to stdout.
Source§impl<W: Write + Send> TtyPresenter<W>
impl<W: Write + Send> TtyPresenter<W>
Sourcepub fn with_writer(writer: W, capabilities: TerminalCapabilities) -> Self
pub fn with_writer(writer: W, capabilities: TerminalCapabilities) -> Self
Create a presenter that writes to an arbitrary Write sink.
Trait Implementations§
Source§impl<W: Write + Send> BackendPresenter for TtyPresenter<W>
impl<W: Write + Send> BackendPresenter for TtyPresenter<W>
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.
Auto Trait Implementations§
impl<W> Freeze for TtyPresenter<W>where
W: Freeze,
impl<W> RefUnwindSafe for TtyPresenter<W>where
W: RefUnwindSafe,
impl<W> Send for TtyPresenter<W>
impl<W> Sync for TtyPresenter<W>where
W: Sync,
impl<W> Unpin for TtyPresenter<W>where
W: Unpin,
impl<W> UnwindSafe for TtyPresenter<W>where
W: 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