Trait ReflectList

Source
pub trait ReflectList: ReflectArray {
    // Required methods
    fn reflect_push(
        &mut self,
        value: Box<dyn Reflect>,
    ) -> Result<(), Box<dyn Reflect>>;
    fn reflect_pop(&mut self) -> Option<Box<dyn Reflect>>;
    fn reflect_remove(&mut self, index: usize) -> Option<Box<dyn Reflect>>;
    fn reflect_insert(
        &mut self,
        index: usize,
        value: Box<dyn Reflect>,
    ) -> Result<(), Box<dyn Reflect>>;
}
Expand description

Reflect sub trait for working with Vec-like types

Required Methods§

Source

fn reflect_push( &mut self, value: Box<dyn Reflect>, ) -> Result<(), Box<dyn Reflect>>

Source

fn reflect_pop(&mut self) -> Option<Box<dyn Reflect>>

Source

fn reflect_remove(&mut self, index: usize) -> Option<Box<dyn Reflect>>

Source

fn reflect_insert( &mut self, index: usize, value: Box<dyn Reflect>, ) -> Result<(), Box<dyn Reflect>>

Implementations§

Source§

impl dyn ReflectList

Source

pub fn get_reflect_index<T>( &self, index: usize, func: &mut dyn FnMut(Option<&T>), )
where T: Reflect + 'static,

Source

pub fn get_reflect_index_mut<T>( &mut self, index: usize, func: &mut dyn FnMut(Option<&mut T>), )
where T: Reflect + 'static,

Implementations on Foreign Types§

Source§

impl<T> ReflectList for Vec<T>
where T: Reflect + 'static,

REMARK: Reflect is implemented for Vec<T> where T: Reflect only.

Source§

fn reflect_push( &mut self, value: Box<dyn Reflect>, ) -> Result<(), Box<dyn Reflect>>

Source§

fn reflect_pop(&mut self) -> Option<Box<dyn Reflect>>

Source§

fn reflect_remove(&mut self, index: usize) -> Option<Box<dyn Reflect>>

Source§

fn reflect_insert( &mut self, index: usize, value: Box<dyn Reflect>, ) -> Result<(), Box<dyn Reflect>>

Implementors§