pub struct OptionField {
pub name: &'static str,
pub kind: OptionKind,
pub default: OptionValue,
pub help: &'static str,
}Expand description
Schema entry describing one recognised option. Codec crates declare
a &'static [OptionField] listing every key their options struct
consumes.
Fields§
§name: &'static strOption key as it appears in the CodecOptions bag.
kind: OptionKindDeclared type used to coerce and validate the raw string value.
default: OptionValueValue used when the key is absent from the bag (documentation /
introspection — the actual default lives in the struct’s
Default impl).
help: &'static strOne-line human-readable description for --help-style listings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptionField
impl RefUnwindSafe for OptionField
impl Send for OptionField
impl Sync for OptionField
impl Unpin for OptionField
impl UnsafeUnpin for OptionField
impl UnwindSafe for OptionField
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