Struct concoct::view::Adapt

source ·
pub struct Adapt<T1, A1, T2, A2, V, F = fn(_: &mut T1, _: AdaptThunk<'_, T2, A2, V>) -> Option<A1>> { /* private fields */ }

Implementations§

source§

impl<T1, A1, T2, A2, V, F> Adapt<T1, A1, T2, A2, V, F>where V: View<T2, A2>, F: Fn(&mut T1, AdaptThunk<'_, T2, A2, V>) -> Option<A1>,

source

pub fn new(f: F, child: V) -> Self

Trait Implementations§

source§

impl<T1, A1, T2, A2, V, F> View<T1, A1> for Adapt<T1, A1, T2, A2, V, F>where V: View<T2, A2>, F: Fn(&mut T1, AdaptThunk<'_, T2, A2, V>) -> Option<A1>,

source§

fn build(&mut self, cx: &mut BuildContext) -> Id

source§

fn rebuild(&mut self, cx: &mut BuildContext, old: &mut Self)

source§

fn message( &mut self, state: &mut T1, id_path: &[Id], message: &dyn Any ) -> Option<A1>

source§

fn layout(&mut self, cx: &mut LayoutContext, id: Id)

source§

fn paint(&mut self, taffy: &Taffy, canvas: &mut Canvas)

Auto Trait Implementations§

§

impl<T1, A1, T2, A2, V, F> RefUnwindSafe for Adapt<T1, A1, T2, A2, V, F>where F: RefUnwindSafe, V: RefUnwindSafe,

§

impl<T1, A1, T2, A2, V, F> Send for Adapt<T1, A1, T2, A2, V, F>where F: Send, V: Send,

§

impl<T1, A1, T2, A2, V, F> Sync for Adapt<T1, A1, T2, A2, V, F>where F: Sync, V: Sync,

§

impl<T1, A1, T2, A2, V, F> Unpin for Adapt<T1, A1, T2, A2, V, F>where F: Unpin, V: Unpin,

§

impl<T1, A1, T2, A2, V, F> UnwindSafe for Adapt<T1, A1, T2, A2, V, F>where F: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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> AutoreleaseSafe for Twhere T: ?Sized,