Skip to main content

View

Struct View 

Source
pub struct View<A = ()> { /* private fields */ }

Implementations§

Source§

impl<A> View<A>

Source

pub fn class_when<V: BoolValue>( self, field: Field, value: V, ) -> View<(A, Toggle<V>)>

Source

pub fn child<C: Content>( self, outlet: Outlet, content: C, ) -> View<(A, ChildValue<C>)>

Source

pub fn bind<V: TextValue>(self, field: Field, value: V) -> View<(A, Bind<V>)>

Source

pub fn watch<F, T>(self, field: Field, read: F) -> View<(A, Bind<Computed<F>>)>
where F: FnMut() -> T + 'static, T: Display,

Source

pub fn on_click<F: FnMut() + 'static>( self, click: Click, callback: F, ) -> View<(A, On<F>)>

Source

pub fn template(&self) -> &'static Template

Source§

impl<A: Actions> View<A>

Source

pub fn validate(&self, scope: &Scope) -> Result<()>

Trait Implementations§

Source§

impl<A: Actions + 'static> Content for View<A>

Source§

fn validate(&self, scope: &Scope) -> Result<()>

Source§

impl<A: Actions + 'static> Widget for View<A>

Source§

fn build(&mut self, scope: &Scope) -> Result

Source§

fn mount(self, parent: &Scope) -> Result<Mounted, Error>
where Self: Sized,

Source§

fn show_in(self, parent: &Scope) -> Result<(), Error>
where Self: Sized,

Auto Trait Implementations§

§

impl<A> Forget for View<A>

§

impl<A> Freeze for View<A>
where Option<A>: Freeze,

§

impl<A> Move for View<A>

§

impl<A> RefUnwindSafe for View<A>

§

impl<A> Send for View<A>
where Option<A>: Send,

§

impl<A> Sync for View<A>
where Option<A>: Sync,

§

impl<A> Unpin for View<A>
where Option<A>: Unpin,

§

impl<A> UnsafeUnpin for View<A>
where Option<A>: UnsafeUnpin,

§

impl<A> UnwindSafe for View<A>
where Option<A>: 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<W> IntoChildren for W
where W: Widget,

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.