pub struct Field {
pub name: String,
pub field_type: FieldType,
pub is_nullable: bool,
}
Fields§
§name: String
§field_type: FieldType
§is_nullable: bool
Implementations§
source§impl Field
impl Field
sourcepub fn new(name: &str, ft: FieldType) -> Self
👎Deprecated: Use one of Field::any
, Field::unsigned
, Field::string
, etc. instead
pub fn new(name: &str, ft: FieldType) -> Self
Field::any
, Field::unsigned
, Field::string
, etc. insteadCreate a new field format specifier.
You should use one of the other constructors instead
sourcepub fn is_nullable(self, is_nullable: bool) -> Self
pub fn is_nullable(self, is_nullable: bool) -> Self
Specify if the current field can be nullable or not. This method
captures self
by value and returns it, so it should be used in a
builder fashion.
use tarantool::space::Field;
let f = Field::string("middle name").is_nullable(true);
sourcepub fn any(name: impl Into<String>) -> Self
pub fn any(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “any”
sourcepub fn unsigned(name: impl Into<String>) -> Self
pub fn unsigned(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “unsigned”
sourcepub fn string(name: impl Into<String>) -> Self
pub fn string(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “string”
sourcepub fn number(name: impl Into<String>) -> Self
pub fn number(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “number”
sourcepub fn double(name: impl Into<String>) -> Self
pub fn double(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “double”
sourcepub fn integer(name: impl Into<String>) -> Self
pub fn integer(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “integer”
sourcepub fn boolean(name: impl Into<String>) -> Self
pub fn boolean(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “boolean”
sourcepub fn varbinary(name: impl Into<String>) -> Self
pub fn varbinary(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “varbinary”
sourcepub fn scalar(name: impl Into<String>) -> Self
pub fn scalar(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “scalar”
sourcepub fn decimal(name: impl Into<String>) -> Self
pub fn decimal(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “decimal”
sourcepub fn uuid(name: impl Into<String>) -> Self
pub fn uuid(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “uuid”
sourcepub fn datetime(name: impl Into<String>) -> Self
pub fn datetime(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “datetime”
sourcepub fn interval(name: impl Into<String>) -> Self
pub fn interval(name: impl Into<String>) -> Self
Create a new field format specifier with the given name
and type “interval”