pub struct FieldSchema {
pub name: String,
pub type: Option<String>,
pub description: String,
pub default: Option<QuillValue>,
pub example: Option<QuillValue>,
pub examples: Option<QuillValue>,
}Expand description
Schema definition for a template field
Fields§
§name: String§type: Option<String>Field type hint (e.g., “string”, “number”, “boolean”, “object”, “array”)
description: StringDescription of the field
default: Option<QuillValue>Default value for the field
example: Option<QuillValue>Example value for the field
examples: Option<QuillValue>Example values for the field
Implementations§
Source§impl FieldSchema
impl FieldSchema
Sourcepub fn new(name: String, description: String) -> Self
pub fn new(name: String, description: String) -> Self
Create a new FieldSchema with default values
Sourcepub fn from_quill_value(key: String, value: &QuillValue) -> Result<Self, String>
pub fn from_quill_value(key: String, value: &QuillValue) -> Result<Self, String>
Parse a FieldSchema from a QuillValue
Trait Implementations§
Source§impl Clone for FieldSchema
impl Clone for FieldSchema
Source§fn clone(&self) -> FieldSchema
fn clone(&self) -> FieldSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FieldSchema
impl Debug for FieldSchema
Source§impl PartialEq for FieldSchema
impl PartialEq for FieldSchema
impl StructuralPartialEq for FieldSchema
Auto Trait Implementations§
impl Freeze for FieldSchema
impl RefUnwindSafe for FieldSchema
impl Send for FieldSchema
impl Sync for FieldSchema
impl Unpin for FieldSchema
impl UnwindSafe for FieldSchema
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