pub struct Field {
pub path: String,
pub kind: String,
pub description: String,
pub default: Option<String>,
pub allowed: Vec<(String, String)>,
pub limits: Vec<String>,
pub examples: Vec<String>,
pub members: Vec<String>,
}Expand description
One field of the spec as the reference shows it.
Fields§
§path: StringIts path: * for a name the author chooses, [] for the items of a list
(machines.*.ports[].port).
kind: StringIts type in words (string, list of mappings, map of name to integer).
description: StringWhat it is for, from the model’s doc comment.
default: Option<String>Its default value as JSON, when the schema states one worth showing.
allowed: Vec<(String, String)>The values it accepts, each with what it means, when it is a closed set.
limits: Vec<String>Ranges and patterns the schema enforces beyond the type.
examples: Vec<String>Examples the schema carries.
members: Vec<String>For a shallow field (common, groups), the names of the fields it holds.
Trait Implementations§
impl Eq for Field
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.