pub struct DeclarativeApp { /* private fields */ }
Expand description
Entry point for your declarative app
Implementations§
Source§impl DeclarativeApp
impl DeclarativeApp
Sourcepub fn new(
w: i32,
h: i32,
label: &str,
path: &'static str,
load_fn: fn(&'static str) -> Option<Widget>,
) -> Self
pub fn new( w: i32, h: i32, label: &str, path: &'static str, load_fn: fn(&'static str) -> Option<Widget>, ) -> Self
Instantiate a new declarative app
Sourcepub fn new_inline(w: i32, h: i32, label: &str, widget: Option<Widget>) -> Self
pub fn new_inline(w: i32, h: i32, label: &str, widget: Option<Widget>) -> Self
Instantiate a new declarative app
Sourcepub fn run<F: FnMut(&mut Window) + 'static>(
&self,
run_cb: F,
) -> Result<(), Box<dyn Error>>
pub fn run<F: FnMut(&mut Window) + 'static>( &self, run_cb: F, ) -> Result<(), Box<dyn Error>>
Run your declarative app. The callback exposes the app’s main window
Sourcepub fn run_once<F: FnMut(&mut Window) + 'static>(
&self,
run_cb: F,
) -> Result<(), Box<dyn Error>>
pub fn run_once<F: FnMut(&mut Window) + 'static>( &self, run_cb: F, ) -> Result<(), Box<dyn Error>>
Run the app without hot-reloading!
Sourcepub fn dump_image(&self)
pub fn dump_image(&self)
Just load the image of the window
Trait Implementations§
Source§impl Clone for DeclarativeApp
impl Clone for DeclarativeApp
Source§fn clone(&self) -> DeclarativeApp
fn clone(&self) -> DeclarativeApp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DeclarativeApp
impl RefUnwindSafe for DeclarativeApp
impl Send for DeclarativeApp
impl Sync for DeclarativeApp
impl Unpin for DeclarativeApp
impl UnwindSafe for DeclarativeApp
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