Struct ModeCreated

Source
pub struct ModeCreated<M: Mode<U>, U: Ui>(/* private fields */);
Expand description

Hookable: Lets you modify a Mode as it is set

§Arguments

  • The new mode.
  • Its widget.

This hook is very useful if you want to, for example, set different options upon switching to modes, depending on things like the language of a File.

Trait Implementations§

Source§

impl<M: Mode<U>, U: Ui> Hookable for ModeCreated<M, U>

Source§

type Input<'h> = (M, &'h Handle<<M as Mode<U>>::Widget, U>)

The arguments that are passed to each hook.
Source§

type Output = M

The output of triggering hooks. Mostly never used Read more
Source§

fn get_input(&mut self) -> Self::Input<'_>

How to get the arguments from the Hookable
Source§

fn take_output_back(&mut self, output: Self::Output)

When a Hookable has an Output, you can define how it takes it back Read more

Auto Trait Implementations§

§

impl<M, U> !Freeze for ModeCreated<M, U>

§

impl<M, U> !RefUnwindSafe for ModeCreated<M, U>

§

impl<M, U> !Send for ModeCreated<M, U>

§

impl<M, U> !Sync for ModeCreated<M, U>

§

impl<M, U> Unpin for ModeCreated<M, U>
where M: Unpin, <U as Ui>::Area: Unpin,

§

impl<M, U> !UnwindSafe for ModeCreated<M, U>

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<H, U> HookAlias<U> for H
where H: Hookable, U: Ui,

Source§

type Hookable = H

The actual Hookable that this HookAlias is supposed to map to
Source§

type Input<'h> = <H as Hookable>::Input<'h>

Just a shorthand for less boilerplate in the function definition
Source§

type Output = <H as Hookable>::Output

Just a shorthand for less boilerplate in the function definition
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.