pub struct KeyDef {
pub type_: TypeName,
pub of: Option<String>,
pub required: bool,
pub enum_: Vec<String>,
pub format: Option<String>,
pub requires_keys: Vec<String>,
pub requires_kind: Vec<String>,
pub doc: String,
}Expand description
One key of a rule map, as meta.keys describes it.
Fields§
§type_: TypeNameThe value’s type.
of: Option<String>The item, value or instance shape: a type, a scalar format or a rule map name.
required: boolWhether a schema must carry the key.
enum_: Vec<String>The values the key admits, as text.
format: Option<String>A scalar format or a reference: regex, slug, rule-id,
format-name.
requires_keys: Vec<String>Keys that must be present beside this one.
requires_kind: Vec<String>Block kinds the enclosing block must be one of.
doc: StringWhat the key means.
Trait Implementations§
impl StructuralPartialEq for KeyDef
Auto Trait Implementations§
impl Freeze for KeyDef
impl RefUnwindSafe for KeyDef
impl Send for KeyDef
impl Sync for KeyDef
impl Unpin for KeyDef
impl UnsafeUnpin for KeyDef
impl UnwindSafe for KeyDef
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