Skip to main content

IntentCx

Struct IntentCx 

Source
pub struct IntentCx<'a, S: Spec> {
    pub view: &'a VisualSnapshot<S>,
    /* private fields */
}
Expand description

Intent hook door: the published snapshot (read-only) plus commands.

Fields§

§view: &'a VisualSnapshot<S>

The snapshot published at the end of this tick (already includes every change the intent reports).

Implementations§

Source§

impl<'a, S: Spec> IntentCx<'a, S>

Source

pub fn command(&mut self, cmd: AppCommand<S>)

Enqueue a command, applied in the next settle pass of this tick.

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for IntentCx<'a, S>

§

impl<'a, S> !UnwindSafe for IntentCx<'a, S>

§

impl<'a, S> Forget for IntentCx<'a, S>

§

impl<'a, S> Freeze for IntentCx<'a, S>
where &'a VisualSnapshot<S>: Freeze, &'a mut Vec<AppCommand<S>>: Freeze,

§

impl<'a, S> Move for IntentCx<'a, S>

§

impl<'a, S> Send for IntentCx<'a, S>
where &'a VisualSnapshot<S>: Send, &'a mut Vec<AppCommand<S>>: Send,

§

impl<'a, S> Sync for IntentCx<'a, S>
where &'a VisualSnapshot<S>: Sync, &'a mut Vec<AppCommand<S>>: Sync,

§

impl<'a, S> Unpin for IntentCx<'a, S>
where &'a VisualSnapshot<S>: Unpin, &'a mut Vec<AppCommand<S>>: Unpin,

§

impl<'a, S> UnsafeUnpin for IntentCx<'a, S>
where &'a VisualSnapshot<S>: UnsafeUnpin, &'a mut Vec<AppCommand<S>>: 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.