pub trait DataType: Copy + Debug {
type Value: DataValue;
// Required methods
fn data_value_default(&self) -> Option<Self::Value> ⓘ;
fn data_value_is_copy(&self) -> bool;
fn data_value_align(&self) -> usize;
fn data_value_size(&self) -> usize;
}
Expand description
Required Associated Types§
Required Methods§
Sourcefn data_value_default(&self) -> Option<Self::Value> ⓘ
fn data_value_default(&self) -> Option<Self::Value> ⓘ
Returns some default value corresponding to the current type.
Or returns None
if the actual type doesn’t implement Default
.
Sourcefn data_value_is_copy(&self) -> bool
fn data_value_is_copy(&self) -> bool
Returns true if the data represented by this type is Copy
.
Sourcefn data_value_align(&self) -> usize
fn data_value_align(&self) -> usize
Returns the alignment of the data represented by the current type.
Sourcefn data_value_size(&self) -> usize
fn data_value_size(&self) -> usize
Returns the size of the data represented by this type.
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.