[][src]Struct makepad_render::Elements

pub struct Elements<ID, T, TEMPL> where
    ID: Ord + Hash
{ pub template: TEMPL, pub element_list: Vec<ID>, pub element_map: HashMap<ID, ElementsRedraw<T>>, pub redraw_id: u64, }

Fields

template: TEMPLelement_list: Vec<ID>element_map: HashMap<ID, ElementsRedraw<T>>redraw_id: u64

Methods

impl<ID, T, TEMPL> Elements<ID, T, TEMPL> where
    ID: Ord + Hash + Clone
[src]

pub fn new(template: TEMPL) -> Elements<ID, T, TEMPL>[src]

pub fn mark(&mut self, cx: &Cx)[src]

pub fn sweep<F>(&mut self, cx: &mut Cx, destruct_callback: F) where
    F: FnMut(&mut Cx, &mut T), 
[src]

pub fn clear<F>(&mut self, cx: &mut Cx, destruct_callback: F) where
    F: FnMut(&mut Cx, &mut T), 
[src]

Important traits for ElementsIterator<'a, ID, T, TEMPL>
pub fn iter<'a>(&'a mut self) -> ElementsIterator<'a, ID, T, TEMPL>[src]

Important traits for ElementsIteratorNamed<'a, ID, T, TEMPL>
pub fn enumerate<'a>(&'a mut self) -> ElementsIteratorNamed<'a, ID, T, TEMPL>[src]

pub fn get<'a>(&'a mut self, index: ID) -> Option<&mut T>[src]

pub fn get_draw<F>(
    &mut self,
    cx: &mut Cx,
    index: ID,
    insert_callback: F
) -> &mut T where
    F: FnMut(&mut Cx, &TEMPL) -> T, 
[src]

Trait Implementations

impl<ID: Clone, T: Clone, TEMPL: Clone> Clone for Elements<ID, T, TEMPL> where
    ID: Ord + Hash
[src]

impl<ID: Default, T: Default, TEMPL: Default> Default for Elements<ID, T, TEMPL> where
    ID: Ord + Hash
[src]

Auto Trait Implementations

impl<ID, T, TEMPL> RefUnwindSafe for Elements<ID, T, TEMPL> where
    ID: RefUnwindSafe,
    T: RefUnwindSafe,
    TEMPL: RefUnwindSafe

impl<ID, T, TEMPL> Send for Elements<ID, T, TEMPL> where
    ID: Send,
    T: Send,
    TEMPL: Send

impl<ID, T, TEMPL> Sync for Elements<ID, T, TEMPL> where
    ID: Sync,
    T: Sync,
    TEMPL: Sync

impl<ID, T, TEMPL> Unpin for Elements<ID, T, TEMPL> where
    ID: Unpin,
    T: Unpin,
    TEMPL: Unpin

impl<ID, T, TEMPL> UnwindSafe for Elements<ID, T, TEMPL> where
    ID: UnwindSafe,
    T: UnwindSafe,
    TEMPL: UnwindSafe

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.