pub struct Field {
pub name: String,
pub type_info: TypeInfo,
pub required: bool,
pub description: Option<String>,
pub default: Option<Value>,
pub format: Option<String>,
pub enum_values: Option<Vec<String>>,
}Expand description
A resolved field from a component schema.
Fields§
§name: StringProperty name as declared in the schema.
type_info: TypeInfoResolved type (delegated to takumi).
required: boolWhether the field is listed in the schema’s required array.
description: Option<String>The description annotation, if any.
default: Option<Value>The default value, if any.
format: Option<String>The format annotation (e.g. date-time, int32).
enum_values: Option<Vec<String>>Allowed values when the field declares an enum constraint.
Trait Implementations§
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