[][src]Struct sixtyfps_corelib::item_tree::ItemVisitorVTable

#[repr(C)]pub struct ItemVisitorVTable {
    pub visit_item: unsafe extern "C" fn(_: VRefMut<'_, ItemVisitorVTable>, component: &VRc<ComponentVTable, Dyn>, index: usize, item: Pin<VRef<'_, ItemVTable>>) -> VisitChildrenResult,
    pub drop: unsafe extern "C" fn(_: VRefMut<'_, ItemVisitorVTable>),
}

Object to be passed in visit_item_children method of the Component.

Fields

visit_item: unsafe extern "C" fn(_: VRefMut<'_, ItemVisitorVTable>, component: &VRc<ComponentVTable, Dyn>, index: usize, item: Pin<VRef<'_, ItemVTable>>) -> VisitChildrenResult

Called for each children of the visited item

The component parameter is the component in which the item live which might not be the same as the parent's component. index is to be used again in the visit_item_children function of the Component (the one passed as parameter) and item is a reference to the item itself

drop: unsafe extern "C" fn(_: VRefMut<'_, ItemVisitorVTable>)

Destructor

Implementations

impl ItemVisitorVTable[src]

pub fn new<T: ItemVisitor>() -> Self[src]

Create a vtable suitable for a given type implementing the trait.

Trait Implementations

impl VTableMeta for ItemVisitorVTable[src]

type VTable = ItemVisitorVTable

That's the VTable itself (so most likely Self)

type Target = ItemVisitorTO

That's the trait object that implements the functions Read more

impl VTableMetaDrop for ItemVisitorVTable[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.