#[non_exhaustive]
pub enum EncodingBox {
Show 30 variants Char, Short, Int, Long, LongLong, UChar, UShort, UInt, ULong, ULongLong, Float, Double, LongDouble, FloatComplex, DoubleComplex, LongDoubleComplex, Bool, Void, String, Object, Block, Class, Sel, Unknown, BitField(u8Option<Box<Self>>), Pointer(Box<Self>), Atomic(Box<Self>), Array(usizeBox<Self>), Struct(StringOption<Vec<Self>>), Union(StringOption<Vec<Self>>),
}
Expand description

The boxed version of Encoding.

This has exactly the same items as Encoding, the only difference is in where the contents of the more complex encodings like Struct are stored.

In Encoding, the data is stored in static memory, while in EncodingBox it is stored on the heap. The former allows storing in constants (which is required by the Encode and RefEncode traits), while the latter allows dynamically, such as in the case of parsing encodings.

This should be considered a temporary restriction. Encoding and EncodingBox will become equivalent once heap allocation in constants is possible.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Char

Same as Encoding::Char.

§

Short

Same as Encoding::Short.

§

Int

Same as Encoding::Int.

§

Long

Same as Encoding::Long.

§

LongLong

§

UChar

Same as Encoding::UChar.

§

UShort

§

UInt

Same as Encoding::UInt.

§

ULong

Same as Encoding::ULong.

§

ULongLong

§

Float

Same as Encoding::Float.

§

Double

§

LongDouble

§

FloatComplex

§

DoubleComplex

§

LongDoubleComplex

§

Bool

Same as Encoding::Bool.

§

Void

Same as Encoding::Void.

§

String

§

Object

§

Block

Same as Encoding::Block.

§

Class

Same as Encoding::Class.

§

Sel

Same as Encoding::Sel.

§

Unknown

§

BitField(u8Option<Box<Self>>)

§

Pointer(Box<Self>)

§

Atomic(Box<Self>)

§

Array(usizeBox<Self>)

Same as Encoding::Array.

§

Struct(StringOption<Vec<Self>>)

§

Union(StringOption<Vec<Self>>)

Same as Encoding::Union.

Implementations§

Parse and comsume an encoding from the start of a string.

This is can be used to parse concatenated encodings, such as those returned by method_getTypeEncoding.

from_str is simpler, use that instead if you can.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Same formatting as Encoding’s Display implementation.

Formats the value using the given formatter. Read more
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.