pub struct PropDef {
pub name: &'static str,
pub type_annotation: &'static str,
pub optional: bool,
}Expand description
A single prop/argument definition for a component.
Maps to a key in the TypeScript Zod schema’s .shape.
Ref: packages/react-lang/src/parser/prompt.ts analyzeFields()
Fields§
§name: &'static strProp name (matches Zod schema key name, used as positional arg name)
type_annotation: &'static strType annotation string shown in the prompt signature.
Matches what the TS resolveTypeAnnotation() would produce.
optional: boolWhether this prop is optional (z.optional() in Zod)
Auto Trait Implementations§
impl Freeze for PropDef
impl RefUnwindSafe for PropDef
impl Send for PropDef
impl Sync for PropDef
impl Unpin for PropDef
impl UnsafeUnpin for PropDef
impl UnwindSafe for PropDef
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