pub struct Field {
pub label: String,
pub field_type: FieldType,
pub options: FieldOptions,
}Fields§
§label: String§field_type: FieldType§options: FieldOptionsImplementations§
Source§impl Field
impl Field
pub fn new(label: impl Into<String>, field_type: FieldType) -> Self
pub fn string(label: impl Into<String>) -> Self
pub fn number(label: impl Into<String>) -> Self
pub fn boolean(label: impl Into<String>) -> Self
pub fn file(label: impl Into<String>) -> Self
pub fn reference(label: impl Into<String>, entity: impl Into<String>) -> Self
pub fn array(label: impl Into<String>, item: FieldType) -> Self
pub fn shape( label: impl Into<String>, fields: IndexMap<String, ShapeField>, ) -> Self
pub fn with_sort(self, sort: SortType) -> Self
pub fn with_input(self, input: InputHint) -> Self
pub fn with_metadata(self, key: impl Into<String>, value: JsonValue) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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