pub struct RenderTarget { /* private fields */ }Expand description
A complete immutable rendering context. Construct one per destination.
Implementations§
Source§impl RenderTarget
impl RenderTarget
pub fn new(kind: TargetKind, caps: TargetCapabilities, theme: Theme) -> Self
Sourcepub fn with_code_highlighting(
self,
highlighting: Option<CodeHighlighting>,
) -> Self
pub fn with_code_highlighting( self, highlighting: Option<CodeHighlighting>, ) -> Self
Give this target’s consoles a default code highlighter (see
ConsoleCodeHighlighting).
pub fn kind(&self) -> TargetKind
pub fn console(&self) -> Console
pub fn segments(&self, value: &dyn Renderable) -> Vec<Segment>
Sourcepub fn frame(&self, value: &dyn Renderable) -> Frame
pub fn frame(&self, value: &dyn Renderable) -> Frame
The render as a Frame, with the same filtering as
RenderTarget::segments. Control segments are not content, so the
frame drops them even on an interactive target.
Sourcepub fn frame_with_regions(&self, value: &dyn Renderable) -> Frame
pub fn frame_with_regions(&self, value: &dyn Renderable) -> Frame
RenderTarget::frame with the semantic regions the renderables
report (see crate::frame::regions). The bytes are the same.
pub fn text(&self, value: &dyn Renderable) -> String
Trait Implementations§
Source§impl Clone for RenderTarget
impl Clone for RenderTarget
Source§impl Debug for RenderTarget
impl Debug for RenderTarget
Source§impl RenderEnvironment for RenderTarget
impl RenderEnvironment for RenderTarget
fn capabilities(&self) -> TargetCapabilities
Auto Trait Implementations§
impl !RefUnwindSafe for RenderTarget
impl !UnwindSafe for RenderTarget
impl Freeze for RenderTarget
impl Send for RenderTarget
impl Sync for RenderTarget
impl Unpin for RenderTarget
impl UnsafeUnpin for RenderTarget
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