pub struct FieldDescriptor {
pub key: String,
pub label: String,
pub help: String,
pub kind: PropKind,
pub is_secret: bool,
pub enum_variants: Option<Vec<String>>,
pub required: bool,
pub default: Option<String>,
}Expand description
One renderable input the TUI / web modal must draw.
Shape is derived from prop_fields() filtered by the relevant
schema prefix, then trimmed to the “greatest hits” required for
Quickstart per field_shape. Surfaces never invent fields —
adding a provider or channel kind to the schema lights up here
automatically.
Fields§
§key: StringSchema-side field key (kebab-case terminal segment). The
caller submits this back through BuilderSubmission.
label: StringHuman label shown next to the input.
help: StringOne-line help blurb. Empty when the schema field has no doc.
kind: PropKindWire-tag for the input control to render. Mirrors
PropKind::wire_name.
is_secret: booltrue for #[secret] fields — the modal masks input.
enum_variants: Option<Vec<String>>Closed-set choices for Enum kind. None for everything else.
required: booltrue when Quickstart treats this field as required. Currently
every field returned by field_shape is required, but the
flag is exposed so future additions can include optional rows.
default: Option<String>Pre-filled default the modal should show as ghost text /
initial input value. None when the schema has no meaningful
default for this field (e.g. API keys, bot tokens).
Trait Implementations§
Source§impl Clone for FieldDescriptor
impl Clone for FieldDescriptor
Source§fn clone(&self) -> FieldDescriptor
fn clone(&self) -> FieldDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldDescriptor
impl Debug for FieldDescriptor
Source§impl<'de> Deserialize<'de> for FieldDescriptor
impl<'de> Deserialize<'de> for FieldDescriptor
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>,
Auto Trait Implementations§
impl Freeze for FieldDescriptor
impl RefUnwindSafe for FieldDescriptor
impl Send for FieldDescriptor
impl Sync for FieldDescriptor
impl Unpin for FieldDescriptor
impl UnsafeUnpin for FieldDescriptor
impl UnwindSafe for FieldDescriptor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more