pub unsafe trait VcValueType:
ShrinkToFit
+ Sized
+ Send
+ Sync
+ 'static {
type Read: VcRead<Self>;
type CellMode: VcCellMode<Self>;
// Required method
fn get_value_type_id() -> ValueTypeId;
}
Expand description
A trait implemented on all values types that can be put into a Value Cell
(Vc<T>
).
§Safety
The implementor of this trait must ensure that the read and cell mode
implementations are correct for the value type. Otherwise, it is possible to
generate invalid reads, for instance by using
VcTransparentRead
for a value type that is not
#[repr(transparent)]
.
Required Associated Types§
Required Methods§
Sourcefn get_value_type_id() -> ValueTypeId
fn get_value_type_id() -> ValueTypeId
Returns the type id of the value 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.