pub trait DeviceCreationAnyAPI<T>where
Self: DeviceRawAPI<T>,{
// Required methods
unsafe fn empty_impl(
&self,
len: usize,
) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>;
fn full_impl(
&self,
len: usize,
fill: T,
) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>;
fn outof_cpu_vec(
&self,
vec: Vec<T>,
) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>;
fn from_cpu_vec(
&self,
vec: &[T],
) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>;
}
Required Methods§
Sourceunsafe fn empty_impl(
&self,
len: usize,
) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>
unsafe fn empty_impl( &self, len: usize, ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>
§Safety
This function is unsafe because it does not initialize the memory.
fn full_impl( &self, len: usize, fill: T, ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>
fn outof_cpu_vec( &self, vec: Vec<T>, ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>>
fn from_cpu_vec( &self, vec: &[T], ) -> Result<Storage<DataOwned<Self::Raw>, T, 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.