pub struct Field { /* private fields */ }
Expand description

A Field represents the name and data type of one column or tag.

For example, a table as “create table tb1 (ts timestamp, n nchar(100))”.

When query with “select * from tb1”, you will get two fields:

  1. { name: "ts", ty: Timestamp, bytes: 8 }, a TIMESTAMP field with name ts, bytes length 8 which is the byte-width of i64.
  2. { name: "n", ty: NChar, bytes: 100 }, a NCHAR filed with name n, bytes length 100 which is the length of the variable-length data.

Implementations

Field name.

Escaped file name

Data type of the field.

Preset length of variable length data type.

It’s the byte-width in other types.

Represent the data type in sql.

For example: “INT”, “VARCHAR(100)”.

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

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Write inlined bytes to a writer.

Read inlined bytes into object.

Write inlined bytes with specific options

Get inlined bytes as vector.

Get inlined bytes as printable string, all the bytes will displayed with escaped ascii code.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serialize this value into the given Serde serializer. Read more

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.