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: Reflect + 'static>( &self, index: usize, func: &mut dyn FnMut(Option<&T>) )

source

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

Implementations on Foreign Types§

source§

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

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§