Struct DLDevice
#[repr(C)]pub struct DLDevice {
pub device_type: i32,
pub device_id: i32,
}Fields§
§device_type: i32A DLDeviceType code, an i32 so the codes stay an open set.
device_id: i32Implementations§
Trait Implementations§
Source§impl AnyCompatible for DLDevice
impl AnyCompatible for DLDevice
Source§unsafe fn is_undefined(field: *const Self) -> bool
unsafe fn is_undefined(field: *const Self) -> bool
Whether
field, which holds a value of this type or all-zero bytes,
holds all-zero bytes that are no value of this type, as a null object
reference, a string of type index None or a zero device type: a field
that a creator left undefined for reflection to set. An undefined field
is no value; a nullable reference is Option<T>, whose None is a
defined value. Read moreSource§fn type_str() -> String
fn type_str() -> String
The type name in conversion errors and type schemas, such as
int,
ffi.String or Array<int>.Source§unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
Source§unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
Source§unsafe fn check_any_strict(data: &TVMFFIAny) -> bool
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 a
Self out of a cell that holds one, retaining any object. Read moreSource§unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
Move a
Self out of an owning cell that holds one. Read moreSource§unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
Convert
data into a Self by the FFI rules, such as an integer into a
float; Err if it does not convert. Read moreSource§fn get_mismatch_type_info(data: &TVMFFIAny) -> String
fn get_mismatch_type_info(data: &TVMFFIAny) -> String
The name of the mismatched value
data in conversion errors; by
default its runtime type key.Source§fn type_schema() -> String
fn type_schema() -> String
The type schema of the type: the JSON object that describes it, which
the type schemas of functions and fields embed. Read more
Source§impl DowncastRefFromAny for DLDevice
impl DowncastRefFromAny for DLDevice
Source§unsafe fn downcast_ref_from_any(cell: &TVMFFIAny) -> Option<&Self>
unsafe fn downcast_ref_from_any(cell: &TVMFFIAny) -> Option<&Self>
Source§impl<'a> PackedCallArg for &'a DLDevice
impl<'a> PackedCallArg for &'a DLDevice
Source§impl PackedCallArg for DLDevice
impl PackedCallArg for DLDevice
impl Copy for DLDevice
impl Eq for DLDevice
impl OptionalCompatible 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 UnsafeUnpin 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