#[repr(C)]pub struct DLDevice {
pub device_type: DLDeviceType,
pub device_id: i32,
}
Fields§
§device_type: DLDeviceType
§device_id: i32
Implementations§
Trait Implementations§
Source§impl AnyCompatible for DLDevice
AnyCompatible for DLDevice
impl AnyCompatible for DLDevice
AnyCompatible for DLDevice
Source§unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
the value to copy to TVMFFIAny
Source§unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
consume the value to move to Any
unsafe fn check_any_strict(data: &TVMFFIAny) -> bool
Source§unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
Copy value from TVMFFIAny after checking
caller must ensure that the value is compatible with the type
Source§unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
the value to move from TVMFFIAny
NOTE: pay very careful attention to avoid memory leak! Read more
Source§unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
try to cast the value from AnyView
Source§fn get_mismatch_type_info(data: &TVMFFIAny) -> String
fn get_mismatch_type_info(data: &TVMFFIAny) -> String
Get the type key of a type when TryCastFromAnyView fails.
impl Copy for DLDevice
impl Eq for DLDevice
impl StructuralPartialEq for DLDevice
Auto Trait Implementations§
impl Freeze for DLDevice
impl RefUnwindSafe for DLDevice
impl Send for DLDevice
impl Sync for DLDevice
impl Unpin for DLDevice
impl UnwindSafe for DLDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more