Skip to main content

DynRuntimeInitAttrs

Struct DynRuntimeInitAttrs 

Source
pub struct DynRuntimeInitAttrs<T: UserEvent> { /* private fields */ }
Expand description

The RuntimeInitAttrs of DynRuntime.

Wraps the attributes of the concrete runtime to use, which is how the runtime is selected. The default value selects no runtime, in which case initializing the DynRuntime fails with Error::RuntimeNotConfigured.

Implementations§

Source§

impl<T: UserEvent> DynRuntimeInitAttrs<T>

Source

pub fn new<A: RuntimeInitAttrs<T>>(attrs: A) -> Self

Selects the runtime initialized with the given attributes.

Source

pub fn is_configured(&self) -> bool

Whether a runtime was selected.

Trait Implementations§

Source§

impl<T: UserEvent> Debug for DynRuntimeInitAttrs<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: UserEvent> Default for DynRuntimeInitAttrs<T>

Source§

fn default() -> Self

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

impl<T: UserEvent> RuntimeInitAttrs<T> for DynRuntimeInitAttrs<T>

Source§

type Runtime = DynRuntime<T>

The runtime initialized with these attributes.
Source§

fn apply_config(&mut self, config: &Config) -> Result<()>

Applies attributes derived from the application configuration.

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for DynRuntimeInitAttrs<T>

§

impl<T> !UnwindSafe for DynRuntimeInitAttrs<T>

§

impl<T> Freeze for DynRuntimeInitAttrs<T>
where Option<Box<dyn ErasedRuntimeInitAttrs<T>>>: Freeze,

§

impl<T> Send for DynRuntimeInitAttrs<T>
where Option<Box<dyn ErasedRuntimeInitAttrs<T>>>: Send,

§

impl<T> Sync for DynRuntimeInitAttrs<T>
where Option<Box<dyn ErasedRuntimeInitAttrs<T>>>: Sync,

§

impl<T> Unpin for DynRuntimeInitAttrs<T>
where Option<Box<dyn ErasedRuntimeInitAttrs<T>>>: Unpin,

§

impl<T> UnsafeUnpin for DynRuntimeInitAttrs<T>
where Option<Box<dyn ErasedRuntimeInitAttrs<T>>>: 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.