pub struct DataReferenceGeneric { /* private fields */ }
Expand description
A Genericized version of DataReference<T>
This type can be safely passed around without knowing the inner
Implements From<DataReference
Implementations§
Source§impl DataReferenceGeneric
impl DataReferenceGeneric
Sourcepub fn type_id(&self) -> TypeId
pub fn type_id(&self) -> TypeId
The TypeId of the associated DataReference<T>, literally TypeId::of::<DataReference<T>>()
Sourcepub fn inner_type_id(&self) -> TypeId
pub fn inner_type_id(&self) -> TypeId
The TypeId of the inner type T of the associated DataReference<T>. If this DataReferenceGeneric is associated with DataReference<T>, this would be the result of TypeId::of::<T>()
Sourcepub fn to_typed<T: 'static>(&self) -> Option<DataReference<T>>
pub fn to_typed<T: 'static>(&self) -> Option<DataReference<T>>
For a given type T, create a DataReference<T> if and only if T matches the type that was used to create this DataReferenceGeneric, otherwise None
This increments the ref count if Some is returned