pub struct RenderEngine { /* private fields */ }
Expand description
Implementations§
Source§impl RenderEngine
impl RenderEngine
Sourcepub fn new() -> RenderEngine
pub fn new() -> RenderEngine
Creates an empty RenderEngine
.
Sourcepub fn add_renderer<R: Renderer + 'static>(&mut self, renderer: R)
pub fn add_renderer<R: Renderer + 'static>(&mut self, renderer: R)
Adds a Renderer
to this RenderEngine
, replacing any existing Renderer
for
the corresponding Renderer::Element
.
Sourcepub fn can_render(&self, element: &dyn Element) -> bool
pub fn can_render(&self, element: &dyn Element) -> bool
Determines if this RenderEngine
can render a given &dyn
Element
. (i.e. whether
it has a mapped renderer for the given &dyn
Element
)
This checks not only the given &dyn
Element
, but also any types it wraps.
Sourcepub fn can_render_specific(&self, element: &dyn Element) -> bool
pub fn can_render_specific(&self, element: &dyn Element) -> bool
Determines if this RenderEngine
can render a given &dyn
Element
. Only checks
the given type, ignoring any wrapped types (unlike Self::can_render
).
Trait Implementations§
Source§impl<R, S> Add<R> for RenderEngine
impl<R, S> Add<R> for RenderEngine
Source§impl Add for RenderEngine
impl Add for RenderEngine
Source§type Output = RenderEngine
type Output = RenderEngine
The resulting type after applying the
+
operator.Source§impl Debug for RenderEngine
impl Debug for RenderEngine
Source§impl Default for RenderEngine
impl Default for RenderEngine
Source§fn default() -> RenderEngine
fn default() -> RenderEngine
Returns the “default value” for a type. Read more
Source§impl From<RenderEngine> for Composer
impl From<RenderEngine> for Composer
Source§fn from(value: RenderEngine) -> Self
fn from(value: RenderEngine) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RenderEngine
impl !RefUnwindSafe for RenderEngine
impl !Send for RenderEngine
impl !Sync for RenderEngine
impl Unpin 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