pub struct Renderer<F> { /* private fields */ }Expand description
Owns a UI window, rendering resources, and event processing.
Use crate::EntryPoint for shared desktop, Android, and web startup.
The renderer and its component builds run on the UI thread.
Implementations§
Source§impl<F, Output> Renderer<F>where
F: Fn() -> Output,
impl<F, Output> Renderer<F>where
F: Fn() -> Output,
Sourcepub fn run(
entry_point: F,
modules: Vec<Box<dyn RenderModule>>,
) -> Result<(), EventLoopError>
pub fn run( entry_point: F, modules: Vec<Box<dyn RenderModule>>, ) -> Result<(), EventLoopError>
Runs the desktop application with default configuration.
Returns an error if the event loop cannot start or fails.
Sourcepub fn run_with_config(
entry_point: F,
modules: Vec<Box<dyn RenderModule>>,
config: TesseraConfig,
) -> Result<(), EventLoopError>
pub fn run_with_config( entry_point: F, modules: Vec<Box<dyn RenderModule>>, config: TesseraConfig, ) -> Result<(), EventLoopError>
Runs the desktop application with the supplied configuration.
Returns an error if the event loop cannot start or fails.
Auto Trait Implementations§
impl<F> !Freeze for Renderer<F>
impl<F> !RefUnwindSafe for Renderer<F>
impl<F> !Send for Renderer<F>
impl<F> !Sync for Renderer<F>
impl<F> !UnwindSafe for Renderer<F>
impl<F> Unpin for Renderer<F>where
F: Unpin,
impl<F> UnsafeUnpin for Renderer<F>where
F: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.