Struct OnFileOpen

Source
pub struct OnFileOpen<U: Ui>(/* private fields */);
Expand description

Hookable: Triggers when a File is opened

§Arguments

  • The file builder, which can be used to push widgets to the file, and to eachother.

This is a rather “advanced” hook, since it lets you change the layout of Widgets around the screen. If you don’t need all that power, you can check out WidgetCreated, which is a more straightforward form of changing Widgets, and doesn’t interfere with the default hooks of "FileWidgets" and "WindowWidgets", preset by Duat.

Trait Implementations§

Source§

impl<U: Ui> Hookable for OnFileOpen<U>

Source§

type Input<'h> = &'h mut FileBuilder<U>

The arguments that are passed to each hook.
Source§

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

How to get the arguments from the Hookable
Source§

type Output = ()

The output of triggering hooks. Mostly never used Read more
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<U> !Freeze for OnFileOpen<U>

§

impl<U> !RefUnwindSafe for OnFileOpen<U>

§

impl<U> !Send for OnFileOpen<U>

§

impl<U> !Sync for OnFileOpen<U>

§

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

§

impl<U> !UnwindSafe for OnFileOpen<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.