pub struct RenderEngine { /* private fields */ }Expand description
Render Engine - Coordinates output rendering
The RenderEngine manages multiple renderers and provides a unified interface for rendering memory data in various formats.
Key properties:
- Pluggable: Supports adding custom renderers
- Flexible: Supports multiple output formats
- Configurable: Supports various rendering options
Implementations§
Source§impl RenderEngine
impl RenderEngine
Sourcepub fn new(snapshot_engine: SharedSnapshotEngine) -> Self
pub fn new(snapshot_engine: SharedSnapshotEngine) -> Self
Create a new RenderEngine
Sourcepub fn register_renderer(&mut self, renderer: Box<dyn Renderer>)
pub fn register_renderer(&mut self, renderer: Box<dyn Renderer>)
Sourcepub fn render(&self, config: &RenderConfig) -> Result<RenderResult, String>
pub fn render(&self, config: &RenderConfig) -> Result<RenderResult, String>
Sourcepub fn render_snapshot(
&self,
snapshot: &MemorySnapshot,
config: &RenderConfig,
) -> Result<RenderResult, String>
pub fn render_snapshot( &self, snapshot: &MemorySnapshot, config: &RenderConfig, ) -> Result<RenderResult, String>
Sourcepub fn render_json(
&self,
snapshot: &MemorySnapshot,
verbose: bool,
) -> Result<RenderResult, String>
pub fn render_json( &self, snapshot: &MemorySnapshot, verbose: bool, ) -> Result<RenderResult, String>
Render to JSON format
Sourcepub fn has_renderer(&self, format: OutputFormat) -> bool
pub fn has_renderer(&self, format: OutputFormat) -> bool
Check if a renderer is available for the specified format
§Arguments
format- The output format to check
Sourcepub fn renderer_count(&self) -> usize
pub fn renderer_count(&self) -> usize
Get the number of registered renderers
Auto Trait Implementations§
impl Freeze for RenderEngine
impl !RefUnwindSafe for RenderEngine
impl Send for RenderEngine
impl Sync for RenderEngine
impl Unpin for RenderEngine
impl UnsafeUnpin for RenderEngine
impl !UnwindSafe for RenderEngine
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more