devela::all

Trait DataTypeCopy

Source
pub trait DataTypeCopy: DataType
where Self::Value: DataValueCopy,
{ // Provided method fn data_value_copy_default(&self) -> Option<Self::Value> { ... } }
Expand description

Common marker trait for Copy data types.

Allows extending DataType*CopyWith versions with custom types.

§Coherence

The DataType::is_copy super-trait method should probably return true as well.

§See also

Provided Methods§

Source

fn data_value_copy_default(&self) -> Option<Self::Value>

Returns some default value corresponding to the current (Copy) type.

Or returns None if the actual type doesn’t implement Default.

The default implementation calls DataType::data_value_default.

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§