AnyData

Trait AnyData 

Source
pub trait AnyData<T> {
    // Required methods
    fn new(val: T) -> Self;
    fn value(&self) -> &T;
    fn value_mut(&mut self) -> &mut T;
}

Required Methods§

Source

fn new(val: T) -> Self

Source

fn value(&self) -> &T

Source

fn value_mut(&mut self) -> &mut T

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.

Implementations on Foreign Types§

Source§

impl<T> AnyData<T> for Box<dyn Any>
where T: 'static,

Source§

fn new(val: T) -> Self

Source§

fn value(&self) -> &T

Source§

fn value_mut(&mut self) -> &mut T

Implementors§