pub enum Unexpected<'a> {
Show 30 variants
Void,
Bool(bool),
Char(char),
Int8(i8),
Uint8(u8),
Int16(i16),
Uint16(u16),
Int32(i32),
Uint32(u32),
Int64(i64),
Uint64(u64),
Real(f32),
Vector4(Vector4),
Quaternion(Quaternion),
Matrix3(Matrix3),
Rotation(Rotation),
QsTransform(QsTransform),
Matrix4(Matrix4),
Transform(Transform),
Pointer(Pointer),
Array,
Enum,
Struct,
Variant(Variant),
CString(CString<'a>),
Ulong(Ulong),
Flags,
Half(f16),
StringPtr(StringPtr<'a>),
Other(&'a str),
}Expand description
Unexpected represents an unexpected invocation of any one of the Visitor
trait methods.
This is used as an argument to the invalid_type, invalid_value, and
invalid_length methods of the Error trait to build error messages.
Variants§
Void
No type information.
- C++ type:
void
§Examples
This is often used to fill in generics elements with types for which generics are not used.
hkArray<hkBool>->vtype:TYPE_ARRAY,vsubtype:TYPE_BOOLhkBool->vtype:TYPE_BOOL,vsubtype:TYPE_VOID- There is also a pattern
hkArray<void>. The type information is unknown, but this member always contains theSERIALIZE_IGNOREDflag and can be skipped.
Bool(bool)
- C++ type:
hkBool(bool)
Char(char)
- C++ type:
hkChar(signed char)
Int8(i8)
- C++ type:
hkInt8(signed char)
Uint8(u8)
- C++ type:
hkUint8(unsigned char)
Int16(i16)
- C++ type:
hkInt16(signed short)
Uint16(u16)
- C++ type:
hkUint16(unsigned short)
Int32(i32)
- C++ type:
hkInt32(signed int)
Uint32(u32)
- C++ type:
hkUint32(unsigned int)
Int64(i64)
- C++ type:
hkInt64(signed long long)
Uint64(u64)
- C++ type:
hkUint64(unsigned long long)
Real(f32)
- C++ type:
hkReal(float)
Vector4(Vector4)
- C++ type:
hkVector4
Quaternion(Quaternion)
- C++ type:
hkQuaternion
Matrix3(Matrix3)
- C++ type:
hkMatrix3
Rotation(Rotation)
- C++ type:
hkRotation
QsTransform(QsTransform)
- C++ type:
hkQsTransform
Matrix4(Matrix4)
- C++ type:
hkMatrix4
Transform(Transform)
- C++ type:
hkTransform
Pointer(Pointer)
- C++ type:
T*
Array
Array of items of type T.
- C++ type:
hkArray<T>
Enum
enum type that stores only the size of SizeType in memory.
- C++ type:
hkEnum<Enum,SizeType>
Struct
- C++ type:
class|struct
Variant(Variant)
- C++ type:
hkVariant(void* and hkClass*) type
CString(CString<'a>)
Null terminated string.
- C++ type:
char*
Ulong(Ulong)
- C++ type:
hkUlong(unsigned long), defined to always be the same size as a pointer
Flags
- C++ type:
hkFlags<ENUM, SizeType>- 8,16,32 bits of named values.
Half(f16)
- C++ type:
hkHalf(hkInt16), 16-bit float value
StringPtr(StringPtr<'a>)
Null-terminated string type.
There is a flag StringFlags::OWNED_FLAG = 0x1 defined in the class, so Owned is also possible.
It is unclear which segment (stack, heap, or other) is being pointed to because of the raw pointer.
- C++ type:
hkStringPtr
Other(&'a str)
Other types
Trait Implementations§
Source§impl<'a> Clone for Unexpected<'a>
impl<'a> Clone for Unexpected<'a>
Source§fn clone(&self) -> Unexpected<'a>
fn clone(&self) -> Unexpected<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for Unexpected<'a>
impl<'a> Debug for Unexpected<'a>
Source§impl Display for Unexpected<'_>
impl Display for Unexpected<'_>
Source§impl<'a> PartialEq for Unexpected<'a>
impl<'a> PartialEq for Unexpected<'a>
impl<'a> StructuralPartialEq for Unexpected<'a>
Auto Trait Implementations§
impl<'a> Freeze for Unexpected<'a>
impl<'a> RefUnwindSafe for Unexpected<'a>
impl<'a> Send for Unexpected<'a>
impl<'a> Sync for Unexpected<'a>
impl<'a> Unpin for Unexpected<'a>
impl<'a> UnwindSafe for Unexpected<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more