BuildInfo

Struct BuildInfo 

Source
pub struct BuildInfo<U: Ui> { /* private fields */ }
Expand description

Information about the construction of the Ui

Implementations§

Source§

impl<U: Ui> BuildInfo<U>

Source

pub fn file(&self) -> Option<Handle<File<U>, U>>

Returns the File’s Handle, if this Widget was pushed to one

Source

pub fn main(&self) -> Option<Handle<dyn Widget<U>, U>>

The Handle of the main Widget from this group

Will return None when the Widget being built is the main Widget, which could happen if it was a spawned floating Widget, for example.

This differs from pushed_to, since this will return the Widget at the “top level of construction”. For example, if a File is added, a VertRule is pushed, and a LineNumbers is pushed to the VertRule, when calling LineNumbersOptions::build, BuildInfo::main will return the File, while BuildInfo::pushed_to will return the VertRule.

Source

pub fn pushed_to(&self) -> Option<Handle<dyn Widget<U>, U>>

The Handle of the Widget this one was pushed to

Will return None when this Widget wasn’t pushed onto any other, which could happen if it was a spawned floating Widget, for example.

This differs from main, since that one will return the Widget at the “top level of construction”. For example, if a File is added, a VertRule is pushed, and a LineNumbers is pushed to the VertRule, when calling LineNumbersOptions::build, BuildInfo::main will return the File, while BuildInfo::pushed_to will return the VertRule.

Auto Trait Implementations§

§

impl<U> !Freeze for BuildInfo<U>

§

impl<U> !RefUnwindSafe for BuildInfo<U>

§

impl<U> !Send for BuildInfo<U>

§

impl<U> !Sync for BuildInfo<U>

§

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

§

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