Enum tvm::function::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: i64
UInt(i64)
Tuple Fields
0: i64
Float(f64)
Tuple Fields
0: f64
Null
DataType(DLDataType)
Tuple Fields
0: DLDataType
String(*mut i8)
Device(DLDevice)
Tuple Fields
0: 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)
Tuple Fields
0: &'a TVMByteArray
Str(&'a CStr)
Tuple Fields
0: &'a CStr
Implementations
Trait Implementations
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
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
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more