pub struct VariantType { /* private fields */ }
Expand description
Describes Variant
types.
The Variant
type system (based on the D-Bus one) describes types with
“type strings”. VariantType
is an owned immutable type string (you can
think of it as a Box<str>
statically guaranteed to be a valid type
string), &VariantTy
is a borrowed one (like &str
).
Tries to create a VariantType
from a string slice.
Returns Ok
if the string is a valid type string, Err
otherwise.
Tries to create a VariantType
from an owned string.
Returns Ok
if the string is a valid type string, Err
otherwise.
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
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Formats the value using the given formatter. Read more
Executes the destructor for this type. 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 !=
.
Returns the type identifier of Self
.
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
impl<T, U> Into<U> for T where
U: From<T>,
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
Returns a SendValue
clone of self
.
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.