DevTools

Struct DevTools 

Source
pub struct DevTools<P>
where P: Program,
{ /* private fields */ }
Expand description

The state of the devtools.

Implementations§

Source§

impl<P> DevTools<P>
where P: Program + 'static, <P as Program>::Message: Debug + MaybeClone,

Source

pub fn new(state: <P as Program>::State) -> (DevTools<P>, Task<Message>)

Source

pub fn title(&self, program: &P, window: Id) -> String

Source

pub fn update(&mut self, program: &P, event: Event<P>) -> Task<Event<P>>

Source

pub fn view( &self, program: &P, window: Id, ) -> Element<'_, Event<P>, <P as Program>::Theme, <P as Program>::Renderer>

Source

pub fn subscription(&self, program: &P) -> Subscription<Event<P>>

Source

pub fn theme(&self, program: &P, window: Id) -> Option<<P as Program>::Theme>

Source

pub fn style(&self, program: &P, theme: &<P as Program>::Theme) -> Style

Source

pub fn scale_factor(&self, program: &P, window: Id) -> f32

Source

pub fn state(&self) -> &<P as Program>::State

Auto Trait Implementations§

§

impl<P> Freeze for DevTools<P>
where <P as Program>::State: Freeze,

§

impl<P> RefUnwindSafe for DevTools<P>

§

impl<P> Send for DevTools<P>
where <P as Program>::State: Send, P: Send,

§

impl<P> Sync for DevTools<P>
where <P as Program>::State: Sync, P: Sync,

§

impl<P> Unpin for DevTools<P>
where <P as Program>::State: Unpin, P: Unpin,

§

impl<P> UnwindSafe for DevTools<P>
where <P as Program>::State: UnwindSafe, P: UnwindSafe,

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.
Source§

impl<T> MaybeClone for T

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,