pub trait ProxyTarget {
// Required methods
fn proxy_write(&mut self, stream: ProxyStream, bytes: &[u8]) -> bool;
fn proxy_flush(&mut self, stream: ProxyStream) -> bool;
}Expand description
A live display a FileProxy can print through.
Implemented for &mut Live<W> and for the LiveHandle of a display on
a refresh thread. Each method returns false when the display is not
redirecting stream, and the proxy then writes to its file instead.
Required Methods§
Sourcefn proxy_write(&mut self, stream: ProxyStream, bytes: &[u8]) -> bool
fn proxy_write(&mut self, stream: ProxyStream, bytes: &[u8]) -> bool
Upstream’s FileProxy.write: buffer bytes and print every completed
line through the display.
Sourcefn proxy_flush(&mut self, stream: ProxyStream) -> bool
fn proxy_flush(&mut self, stream: ProxyStream) -> bool
Upstream’s FileProxy.flush: print a buffered partial line.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".