pub struct SlotDecl {
pub name: String,
pub default: String,
pub variants: BTreeMap<String, String>,
pub present_when: Option<Value>,
}Expand description
A named position in prompt text, with the alternative wordings that may fill it (IR 0.7).
default always names one of variants — the compiler refuses otherwise. present_when is
carried but never evaluated here: the spec assigns that to the host, and this back-end only asks
the host for the answer.
Fields§
§name: String§default: String§variants: BTreeMap<String, String>§present_when: Option<Value>Present only when the author declared a condition. Carried verbatim, never interpreted.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SlotDecl
impl<'de> Deserialize<'de> for SlotDecl
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for SlotDecl
Auto Trait Implementations§
impl Freeze for SlotDecl
impl RefUnwindSafe for SlotDecl
impl Send for SlotDecl
impl Sync for SlotDecl
impl Unpin for SlotDecl
impl UnsafeUnpin for SlotDecl
impl UnwindSafe for SlotDecl
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