pub enum FieldType {
Boolean,
Bytes,
Integer,
Float,
String,
Relation(SchemaId),
RelationList(SchemaId),
PinnedRelation(SchemaId),
PinnedRelationList(SchemaId),
}Expand description
Valid field types for publishing an application schema.
Implements conversion to OperationValue:
let mut field_definition = OperationFields::new();
field_definition.insert("name", "document_title".into());
field_definition.insert("type", FieldType::String.into());Variants§
Boolean
Defines a boolean field.
Bytes
Defines a bytes field.
Integer
Defines an integer number field.
Float
Defines a floating point number field.
String
Defines a text string field.
Relation(SchemaId)
Defines a Relation field that references the given
schema.
RelationList(SchemaId)
Defines a RelationList field that references the
given schema.
PinnedRelation(SchemaId)
Defines a PinnedRelation field that references the
given schema.
PinnedRelationList(SchemaId)
Defines a PinnedRelationList field that
references the given schema.
Trait Implementations§
Source§impl From<FieldType> for OperationValue
impl From<FieldType> for OperationValue
Source§fn from(field_type: FieldType) -> OperationValue
fn from(field_type: FieldType) -> OperationValue
Converts to this type from the input type.
impl Eq for FieldType
impl StructuralPartialEq for FieldType
Auto Trait Implementations§
impl Freeze for FieldType
impl RefUnwindSafe for FieldType
impl Send for FieldType
impl Sync for FieldType
impl Unpin for FieldType
impl UnwindSafe for FieldType
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