Skip to main content

Application

Struct Application 

Source
pub struct Application<B, M = MemoryOptionsMissing> { /* private fields */ }

Implementations§

Source§

impl<B> Application<B, MemoryOptionsMissing>

Source

pub fn with_backend(backend: B) -> Self

Source

pub fn memory_options( self, options: MemoryOptions, ) -> Application<B, MemoryOptionsConfigured>

Source§

impl<B, M> Application<B, M>

Source

pub fn window_options(self, options: WindowOptions) -> Self

Source

pub fn provide<T>(self, value: T) -> Self
where T: Send + Sync + 'static,

Source

pub fn executor(self, executor: impl UiExecutor) -> Self

Source

pub fn command<C>(self, handler: impl CommandHandler<C>) -> Self
where C: Command,

Source

pub fn on_render_error( self, handler: impl Fn(&RenderError) + Send + Sync + 'static, ) -> Self

Source

pub fn font_families(self, families: &'static [&'static str]) -> Self

Source

pub fn font_assets(self, assets: Vec<FontAsset>) -> Self

Source§

impl<B> Application<B, MemoryOptionsConfigured>

Source

pub fn run( self, view: impl for<'scope, 'context> Fn(&mut RenderCx<'scope, 'context>) -> Element + Send + Sync + 'static, ) -> Result<(), B::Error>

Auto Trait Implementations§

§

impl<B, M = MemoryOptionsMissing> !RefUnwindSafe for Application<B, M>

§

impl<B, M = MemoryOptionsMissing> !UnwindSafe for Application<B, M>

§

impl<B, M> Freeze for Application<B, M>
where B: Freeze, M: Freeze,

§

impl<B, M> Send for Application<B, M>
where B: Send, M: Send,

§

impl<B, M> Sync for Application<B, M>
where B: Sync, M: Sync,

§

impl<B, M> Unpin for Application<B, M>
where B: Unpin, M: Unpin,

§

impl<B, M> UnsafeUnpin for Application<B, M>
where B: UnsafeUnpin, M: UnsafeUnpin,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.