pub unsafe trait KernelArgument {
// Required method
unsafe fn as_raw_arg(&self) -> &[u8] ⓘ;
}Expand description
Types which can be passed as SYCL kernel arguments.
§Safety
A type implementing this trait must mirror the representation and alignment of the corresponding SYCL kernel argument structure.
Required Methods§
Sourceunsafe fn as_raw_arg(&self) -> &[u8] ⓘ
unsafe fn as_raw_arg(&self) -> &[u8] ⓘ
Converts self to a raw byte representation.
§Safety
This function returns a reference to raw bytes. These bytes will be passed to FFI functions. The caller must make sure these functions respect Rust’s aliasing rules.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".