Enum tvm_rt::ArgValue [−][src]
pub enum ArgValue<'a> {
Show 15 variants
    Int(i64),
    UInt(i64),
    Float(f64),
    Null,
    DataType(DLDataType),
    String(*mut i8),
    Device(DLDevice),
    Handle(*mut c_void),
    ArrayHandle(*mut DLTensor),
    ObjectHandle(*mut c_void),
    ModuleHandle(*mut c_void),
    FuncHandle(*mut c_void),
    NDArrayHandle(*mut c_void),
    Bytes(&'a TVMByteArray),
    Str(&'a CStr),
}Expand description
A borrowed TVMPODValue. Can be constructed using into() but the preferred way
to obtain a ArgValue is automatically via call_packed!.
Variants
Int(i64)
Tuple Fields
0: i64UInt(i64)
Tuple Fields
0: i64Float(f64)
Tuple Fields
0: f64Null
DataType(DLDataType)
Tuple Fields
0: DLDataTypeString(*mut i8)
Device(DLDevice)
Tuple Fields
0: DLDeviceHandle(*mut c_void)
ArrayHandle(*mut DLTensor)
ObjectHandle(*mut c_void)
ModuleHandle(*mut c_void)
FuncHandle(*mut c_void)
NDArrayHandle(*mut c_void)
Bytes(&'a TVMByteArray)
Tuple Fields
0: &'a TVMByteArrayStr(&'a CStr)
Tuple Fields
0: &'a CStrImplementations
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Converts an unspecialized handle to a ArgValue.
Converts an unspecialized mutable handle to a ArgValue.
Performs the conversion.
type Error = ValueDowncastError
type Error = ValueDowncastError
The type returned in the event of a conversion error.
pub fn try_from(
    val: &'a ArgValue<'v>
) -> Result<DLDataType, <DLDataType as TryFrom<&'a ArgValue<'v>>>::Error>
pub fn try_from(
    val: &'a ArgValue<'v>
) -> Result<DLDataType, <DLDataType as TryFrom<&'a ArgValue<'v>>>::Error>
Performs the conversion.
type Error = ValueDowncastError
type Error = ValueDowncastError
The type returned in the event of a conversion error.
pub fn try_from(
    val: ArgValue<'a>
) -> Result<DLDataType, <DLDataType as TryFrom<ArgValue<'a>>>::Error>
pub fn try_from(
    val: ArgValue<'a>
) -> Result<DLDataType, <DLDataType as TryFrom<ArgValue<'a>>>::Error>
Performs the conversion.
Auto Trait Implementations
impl<'a> RefUnwindSafe for ArgValue<'a>
impl<'a> UnwindSafe for ArgValue<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
