pub struct ConfigKey {
pub key: String,
pub kind: String,
pub about: String,
pub default: Option<Value>,
pub value: Option<Value>,
pub choices: Vec<String>,
pub min: Option<f64>,
pub max: Option<f64>,
pub required: bool,
}Expand description
One key: what it is, what it is set to, and what it is otherwise.
Fields§
§key: StringThe key, e.g. max_turns; dotted below a sub-table (sigstore.identity).
kind: Stringbool, integer, number, string, choice, duration, argv,
argv_list or string_list.
about: StringWhat it does.
default: Option<Value>The value speccoder uses when the key is absent; none for keys without a default (unset means off, or the key is required).
value: Option<Value>The value in the file, when set.
choices: Vec<String>For choice: the allowed values.
min: Option<f64>For numbers: the smallest allowed.
max: Option<f64>For numbers: the largest allowed.
required: boolThe section (or table) is refused without it.
Trait Implementations§
Source§impl JsonSchema for ConfigKey
impl JsonSchema for ConfigKey
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for ConfigKey
Auto Trait Implementations§
impl Freeze for ConfigKey
impl RefUnwindSafe for ConfigKey
impl Send for ConfigKey
impl Sync for ConfigKey
impl Unpin for ConfigKey
impl UnsafeUnpin for ConfigKey
impl UnwindSafe for ConfigKey
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