Skip to main content

Any

Struct Any 

Source
pub struct Any { /* private fields */ }
Expand description

An owned, type-erased FFI value.

Any holds any FFI value, such as an integer, a string or an object, and owns it: cloning an Any that holds an object retains the object, and dropping it releases the object. Any AnyCompatible value converts into it with From; TryFrom (converting), downcast_ref (borrowing) and match_any! read it back. Borrow it as an AnyView to pass it without retaining.

The one value it does not own is a DLTensor* converted from an AnyView, as in C++: that Any borrows the tensor and must not outlive it.

§Examples

use tvm_ffi::Any;

let value = Any::from(42_i64);
assert_eq!(i64::try_from(&value)?, 42);
assert!(tvm_ffi::String::try_from(&value).is_err());

let text = Any::from(tvm_ffi::String::from("hello"));
assert_eq!(text.downcast_ref::<tvm_ffi::String>().unwrap().as_str(), "hello");

Implementations§

Source§

impl Any

Source

pub fn new() -> Self

Create an Any holding None, the empty FFI value.

§Returns

An Any holding None.

Source

pub fn type_index(&self) -> i32

Return the runtime type index of the stored value.

Indices below TypeIndex::kTVMFFIStaticObjectBegin are the built-in non-object types; the others are object types.

§Returns

The type index.

Source

pub fn type_key(&self) -> &'static str

The registered type key of the stored value, such as "int" or "ffi.Array", as C++ Any::GetTypeKey.

use tvm_ffi::{Any, Array};
assert_eq!(Any::from(1_i64).type_key(), "int");
assert_eq!(Any::from(Array::from_vec(vec![1_i64])).type_key(), "ffi.Array");
Source

pub fn is_none(&self) -> bool

Whether the value is None.

Source

pub fn as_raw_ffi_any(&self) -> &TVMFFIAny

Borrow the raw ABI representation, which this value owns. Copying it does not retain referenced data or extend its lifetime.

Source

pub fn downcast_ref<T: DowncastRefFromAny>(&self) -> Option<&T>

Borrow the stored value as T when it holds one, without copying it.

T is an object type such as ArrayObj, a managed reference such as Array<i64>, or a value stored in place such as String or i64. The check is strict and never converts, unlike TryFrom. This neither consumes self nor changes any reference count, and the returned reference cannot outlive self.

§Returns

The borrowed object, or None.

use tvm_ffi::{collections::array::ArrayObj, Any, Array};
let value = Any::from(Array::from_vec(vec![1_i64, 2]));
assert_eq!(value.downcast_ref::<ArrayObj>().unwrap().size, 2);
assert_eq!(value.downcast_ref::<Array<i64>>().unwrap()[1], 2);
assert!(value.downcast_ref::<i64>().is_none());

See also match_any!.

Source

pub fn is<T: AnyCompatible>(&self) -> bool

Whether the stored value is a T as is, by the strict check of downcast_ref, without conversion, as std Any::is. It covers every AnyCompatible type, such as bool.

use tvm_ffi::{Any, Array};
let value = Any::from(Array::from_vec(vec![1_i64, 2]));
assert!(value.is::<Array<i64>>());
assert!(!value.is::<Array<f64>>());
assert!(Any::from(true).is::<bool>());
assert!(!Any::from(1_i64).is::<f64>());
Source

pub fn as_raw_ffi_any_mut(&mut self) -> *mut TVMFFIAny

Return a pointer to the raw ABI representation, for a runtime call that writes an owned result into it as an out-parameter.

Writing through the pointer is unsafe: the cell must afterwards hold a value this Any may own and release, and the previous value must have been released or moved out.

Source

pub fn into_raw_ffi_any(self) -> TVMFFIAny

Give up ownership of the value as its raw ABI representation, as Box::into_raw does. Rebuild it with from_raw_ffi_any to release it.

Source

pub unsafe fn from_raw_ffi_any(data: TVMFFIAny) -> Self

Take ownership of a raw ABI representation.

§Safety

data.type_index must describe the payload, and the caller must hand over the ownership data carries, such as one strong reference for an object, so it is released exactly once, by this Any.

Trait Implementations§

Source§

impl Clone for Any

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Any

Formats the type key and the repr, such as Any(int: 1).

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Any

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Any

Formats the value as its repr; see AnyView.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DowncastRefFromAny for Any

Source§

unsafe fn downcast_ref_from_any(cell: &TVMFFIAny) -> Option<&Self>

Borrow cell as Self when it holds one. Read more
Source§

impl Drop for Any

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a> From<&'a Any> for AnyView<'a>

Source§

fn from(value: &'a Any) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut Any> for MutationView<'a>

Source§

fn from(value: &'a mut Any) -> Self

Borrow an owner exclusively without acquiring a reference count.

Reuse still requires the runtime’s uniqueness and alias checks.

Source§

impl From<AnyView<'_>> for Any

Takes ownership of the viewed value: objects gain a reference, borrowed strings and bytes are copied, and an RValueRef gives up its object.

A DLTensor* has no reference count to take, so it is kept as is, as in C++: the Any borrows the tensor and must not outlive it. Convert it to a Tensor to own the tensor.

§Panics

Panics if the view holds an RValueRef whose object an earlier conversion already took.

Source§

fn from(value: AnyView<'_>) -> Self

Converts to this type from the input type.
Source§

impl<T: AnyCompatible> From<T> for Any

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<'a> IntoArg<Any> for &'a Any

Source§

type Output = &'a Any

T when owned, &T when borrowed.
Source§

fn into_arg(self) -> &'a Any

Convert into a T or a &T.
Source§

fn into_owned(self) -> Any

Convert into an owned T, cloning only a borrowed value.
Source§

impl IntoArg<Any> for Any

Source§

type Output = Any

T when owned, &T when borrowed.
Source§

fn into_arg(self) -> Any

Convert into a T or a &T.
Source§

fn into_owned(self) -> Any

Convert into an owned T, cloning only a borrowed value.
Source§

impl<'a> PackedCallArg for &'a Any

Source§

type Holder = &'a Any

What keeps the argument alive during the call.
Source§

fn into_packed_arg(self) -> &'a Any

Source§

fn as_packed_arg(holder: &Self::Holder) -> AnyView<'_>

Source§

impl PackedCallArg for Any

Source§

type Holder = Any

What keeps the argument alive during the call.
Source§

fn into_packed_arg(self) -> Any

Source§

fn as_packed_arg(holder: &Self::Holder) -> AnyView<'_>

Source§

impl<'a> TryFrom<&'a Any> for ()

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for *mut c_void

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for AccessPath

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for AccessStep

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'b, T> TryFrom<&'b Any> for Array<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'b Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for BigInt

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for Bytes

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for DLDataType

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for DLDevice

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for Error

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for Function

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'b, T: ContainerElement> TryFrom<&'b Any> for List<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'b Any) -> Result<Self>

Performs the conversion.
Source§

impl<'b, K, V> TryFrom<&'b Any> for Map<K, V>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'b Any) -> Result<Self>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for Module

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for ObjectRef

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a, T: AnyCompatible> TryFrom<&'a Any> for Option<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for Shape

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for String

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for Tensor

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for Unchanged

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'b, T: ContainerElement> TryFrom<&'b Any> for UnchangedOr<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'b Any) -> Result<Self>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for VisitInterrupt

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for bool

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for f32

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for f64

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for i16

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for i32

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for i64

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for i8

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for isize

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for u16

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for u32

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for u64

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for u8

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<'a> TryFrom<&'a Any> for usize

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: &'a Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for ()

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for *mut c_void

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for AccessPath

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for AccessStep

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T> TryFrom<Any> for Array<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for BigInt

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for Bytes

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for DLDataType

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for DLDevice

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for Error

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for Function

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: ContainerElement> TryFrom<Any> for List<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self>

Performs the conversion.
Source§

impl<K, V> TryFrom<Any> for Map<K, V>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<Any> for Module

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for ObjectRef

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: AnyCompatible> TryFrom<Any> for Option<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for Shape

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for String

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for Tensor

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for Unchanged

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: ContainerElement> TryFrom<Any> for UnchangedOr<T>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self>

Performs the conversion.
Source§

impl TryFrom<Any> for VisitInterrupt

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for bool

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for f32

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for f64

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for i16

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for i32

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for i64

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for i8

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for isize

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for u16

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for u32

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for u64

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for u8

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Any> for usize

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Any) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl ContainerElement for Any

Auto Trait Implementations§

§

impl Freeze for Any

§

impl RefUnwindSafe for Any

§

impl !Send for Any

§

impl !Sync for Any

§

impl Unpin for Any

§

impl UnsafeUnpin for Any

§

impl UnwindSafe for Any

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> TypeSubsumes<T> for T
where T: ?Sized,