#[repr(transparent)]
pub struct VariantTy { /* private fields */ }
Expand description
Describes Variant
types.
This is a borrowed counterpart of VariantType
.
Essentially it’s a str
statically guaranteed to be a valid type string.
An indefinite type that is a supertype of every type (including itself).
Any maybe type, i.e. Option<T>
.
Any array type, i.e. [T]
.
Any tuple type, i.e. (T)
, (T, T)
, etc.
Any dict entry type, i.e. DictEntry<K, V>
.
Any dictionary type, i.e. HashMap<K, V>
, BTreeMap<K, V>
.
String array, i.e. [&str]
.
Object path array, i.e. [&str]
.
Byte string array, i.e. [[u8]]
.
Variant dictionary, i.e. HashMap<String, Variant>
, BTreeMap<String, Variant>
, etc.
Tries to create a &VariantTy
from a string slice.
Returns Ok
if the string is a valid type string, Err
otherwise.
Converts a type string into &VariantTy
without any checks.
The caller is responsible for passing in only a valid variant type string.
Converts to a string slice.
Check if this variant type is a definite type.
Check if this variant type is a container type.
Check if this variant type is a basic type.
Check if this variant type is a maybe type.
Check if this variant type is an array type.
Check if this variant type is a tuple type.
Check if this variant type is a dict entry type.
Check if this variant type is a variant.
Check if this variant type is a subtype of another.
Return the element type of this variant type.
This function panics if not called with an array or maybe type.
Return the first type of this variant type.
This function panics if not called with an array or dictionary type.
Return the next type of this variant type.
Return the number of items in this variant type.
Return the key type of this variant type.
This function panics if not called with an dictionary type.
Return the value type of this variant type.
This function panics if not called with an dictionary type.
Immutably borrows from an owned value. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Returns the type identifier of Self
.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.
Converts the given value to a String
. Read more