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§
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])
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.