pub trait RenderBackend: Any {
// Required methods
fn as_any_mut(&mut self) -> &mut dyn Any;
fn acquire_mask(&mut self) -> &mut [u8] ⓘ;
}Expand description
Opaque render backend trait with downcasting capability. Core crate defines this trait; UI crates downcast to concrete implementations. This enables true backend independence — core compiles without Ratatui.
Required Methods§
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to concrete backend type.
Sourcefn acquire_mask(&mut self) -> &mut [u8] ⓘ
fn acquire_mask(&mut self) -> &mut [u8] ⓘ
Returns a zero-initialized persistent mask slice sized to the current buffer.
The mask is a flat Vec<u8> that decouples conditional string checks from
bitwise buffer mutation — enabling SIMD-friendly two-pass rendering.
Allocates only when the buffer grows; zero allocations in steady state.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".