Trait GetField

Source
pub trait GetField {
    // Required methods
    fn get_field<T>(&self, name: &str, func: &mut dyn FnMut(Option<&T>))
       where T: 'static;
    fn get_field_mut<T>(
        &mut self,
        _name: &str,
        func: &mut dyn FnMut(Option<&mut T>),
    )
       where T: 'static;
}
Expand description

Helper methods over Reflect types

Required Methods§

Source

fn get_field<T>(&self, name: &str, func: &mut dyn FnMut(Option<&T>))
where T: 'static,

Source

fn get_field_mut<T>( &mut self, _name: &str, func: &mut dyn FnMut(Option<&mut T>), )
where T: 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R> GetField for R
where R: Reflect,