Skip to main content

FieldType

Enum FieldType 

Source
#[repr(u8)]
pub enum FieldType {
Show 30 variants Inherited = 0, DbObject = 1, Structure = 2, Pointer = 3, Array = 4, FixedArray = 5, String = 6, CString = 7, Enumeration = 8, FileRef = 9, Boolean = 10, Int8 = 11, UInt8 = 12, Int16 = 13, UInt16 = 14, Int32 = 15, UInt32 = 16, Int64 = 17, UInt64 = 18, Float32 = 19, Float64 = 20, Guid = 21, Sha1 = 22, ResourceRef = 23, Function = 24, TypeRef = 25, BoxedValueRef = 26, Interface = 27, Delegate = 28, Unknown = 31,
}
Expand description

FieldType: bits 4..9 of an encoded type.

Variants§

§

Inherited = 0

Not a field of its own: the type’s base class, whose fields come first; class_ref names it.

§

DbObject = 1

A database object (read as nothing, written as zero bytes).

§

Structure = 2

A nested structure stored inline, of the type class_ref names.

§

Pointer = 3

A reference to another instance of the document or to an import; see Pointer.

§

Array = 4

An array: a 4-byte displacement to the elements, with the count stored just before them.

§

FixedArray = 5

A fixed-length array (read as nothing, written as zero bytes).

§

String = 6

A 32-byte inline string, zero padded.

§

CString = 7

A string stored elsewhere in the data, reached by a 4-byte displacement; -1 is the empty string.

§

Enumeration = 8

An enumeration, a signed 32-bit value.

§

FileRef = 9

A file reference: a string by displacement, then 4 more bytes.

§

Boolean = 10

A boolean, one byte.

§

Int8 = 11

A signed 8-bit integer.

§

UInt8 = 12

An unsigned 8-bit integer.

§

Int16 = 13

A signed 16-bit integer.

§

UInt16 = 14

An unsigned 16-bit integer.

§

Int32 = 15

A signed 32-bit integer.

§

UInt32 = 16

An unsigned 32-bit integer.

§

Int64 = 17

A signed 64-bit integer.

§

UInt64 = 18

An unsigned 64-bit integer.

§

Float32 = 19

A 32-bit float.

§

Float64 = 20

A 64-bit float.

§

Guid = 21

A 16-byte GUID.

§

Sha1 = 22

A 20-byte SHA-1.

§

ResourceRef = 23

A 64-bit resource reference.

§

Function = 24

A function reference (read as nothing, written as zero bytes).

§

TypeRef = 25

A type reference: 4 bytes naming a primitive type or a reflected type, then 4 more bytes.

§

BoxedValueRef = 26

A reference to a boxed value in the boxed-value section; see BoxedRef.

§

Interface = 27

An interface reference (read as nothing, written as zero bytes).

§

Delegate = 28

A delegate, read like a type reference.

§

Unknown = 31

0x1D..0x1F: not a type ReSkate knows; read as nothing, written as zero bytes.

Implementations§

Source§

impl FieldType

Source

pub fn from_bits(v: u16) -> FieldType

The type for the five-bit code v; a code that is not one of the known types is FieldType::Unknown.

Trait Implementations§

Source§

impl Clone for FieldType

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for FieldType

Source§

impl Debug for FieldType

Source§

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

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

impl Eq for FieldType

Source§

impl PartialEq for FieldType

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FieldType

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.