Skip to main content

WidgetApp

Struct WidgetApp 

Source
pub struct WidgetApp<W = (), H = (), R = ()> { /* private fields */ }
Expand description

v0.1 application bootstrap for a single widget instance bound to one host and one renderer. The runtime is demand-driven and only redraws when widget code requests it.

Implementations§

Source§

impl WidgetApp<(), (), ()>

Source

pub fn new() -> Self

Source§

impl<H, R> WidgetApp<(), H, R>

Source

pub fn widget<W>(self, name: impl Into<String>, widget: W) -> WidgetApp<W, H, R>
where W: Widget,

Source§

impl<W, R> WidgetApp<W, (), R>
where W: Widget,

Source

pub fn host<H>(self, host: H) -> WidgetApp<W, H, R>

Source§

impl<W, H> WidgetApp<W, H, ()>
where W: Widget,

Source

pub fn renderer<R>(self, renderer: R) -> WidgetApp<W, H, R>

Source§

impl<W, H, R> WidgetApp<W, H, R>
where W: Widget, H: HostRunner<W, R>, R: Renderer,

Source

pub fn run(self) -> Result<()>

Trait Implementations§

Source§

impl Default for WidgetApp<(), (), ()>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<W, H, R> Freeze for WidgetApp<W, H, R>
where W: Freeze, H: Freeze, R: Freeze,

§

impl<W, H, R> RefUnwindSafe for WidgetApp<W, H, R>

§

impl<W, H, R> Send for WidgetApp<W, H, R>
where W: Send, H: Send, R: Send,

§

impl<W, H, R> Sync for WidgetApp<W, H, R>
where W: Sync, H: Sync, R: Sync,

§

impl<W, H, R> Unpin for WidgetApp<W, H, R>
where W: Unpin, H: Unpin, R: Unpin,

§

impl<W, H, R> UnsafeUnpin for WidgetApp<W, H, R>

§

impl<W, H, R> UnwindSafe for WidgetApp<W, H, R>
where W: UnwindSafe, H: UnwindSafe, R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.