Trait Element

Source
pub trait Element:
    Clone
    + Hash
    + Debug {
    // Required methods
    fn from_value(val: GosValue) -> Self;
    fn into_value(self, t: ValueType) -> GosValue;
    fn set_value(&self, val: &GosValue);

    // Provided methods
    fn need_gc() -> bool { ... }
    fn copy_or_clone_slice(dst: &mut [Self], src: &[Self]) { ... }
}
Expand description

Element is used to store GosValue in Typed containers to save memomry

Required Methods§

Source

fn from_value(val: GosValue) -> Self

Source

fn into_value(self, t: ValueType) -> GosValue

Source

fn set_value(&self, val: &GosValue)

Provided Methods§

Source

fn need_gc() -> bool

Source

fn copy_or_clone_slice(dst: &mut [Self], src: &[Self])

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 Element for GosElem

Source§

impl<T> Element for CellElem<T>
where T: CellData,