pub struct SlotDef {Show 13 fields
pub name: String,
pub type_ref: Option<String>,
pub meta: HashMap<String, Kind>,
pub default: Option<Kind>,
pub is_marker: bool,
pub is_query: bool,
pub is_maybe: bool,
pub is_global: bool,
pub query_of: Option<String>,
pub query_via: Option<String>,
pub query_inverse: Option<String>,
pub children: Vec<SlotDef>,
pub doc: String,
}Expand description
A slot (child tag) definition within a spec.
Fields§
§name: StringSlot name.
type_ref: Option<String>Type reference (e.g. "Str", "Number", "Ref").
meta: HashMap<String, Kind>Metadata tags from angle-bracket meta section.
default: Option<Kind>Default value.
is_marker: boolTrue if this slot is a marker (no type, no value).
is_query: boolTrue if this slot is a query (type is Query<...>).
is_maybe: boolTrue if this slot has the ? suffix (optional).
is_global: boolTrue if prefixed with * (global slot).
query_of: Option<String>For query slots: the of parameter type.
query_via: Option<String>For query slots: the via parameter path.
query_inverse: Option<String>For query slots: the inverse parameter path.
children: Vec<SlotDef>Nested child slots.
doc: StringDoc comment text (collected from // comments before this slot).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SlotDef
impl RefUnwindSafe for SlotDef
impl Send for SlotDef
impl Sync for SlotDef
impl Unpin for SlotDef
impl UnsafeUnpin for SlotDef
impl UnwindSafe for SlotDef
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