pub enum ScalarKind {
String,
Text,
Bool,
Path,
}Expand description
The kind of value a scalar field collects.
The kind is semantic: it participates in the questionnaire fingerprint, drives the rendered type hint, and selects the shared decoder every collection path uses. Interactive, file, and stdin answers for the same field always run through the same kind decoder, so equivalent raw text decodes identically everywhere.
Variants§
String
A short, single-line value (rendered hint: string). A multi-line
answer is a decode error.
Text
Free-form prose that may span several lines (rendered hint: text).
Bool
A yes/no value (rendered hint: bool). Decodes true/false/
yes/no/y/n case-insensitively.
Path
A filesystem path (rendered hint: path). Decoded as a single-line
string; no filesystem checks are performed at decode time.
Trait Implementations§
Source§impl Clone for ScalarKind
impl Clone for ScalarKind
Source§fn clone(&self) -> ScalarKind
fn clone(&self) -> ScalarKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ScalarKind
Source§impl Debug for ScalarKind
impl Debug for ScalarKind
impl Eq for ScalarKind
Source§impl PartialEq for ScalarKind
impl PartialEq for ScalarKind
impl StructuralPartialEq for ScalarKind
Auto Trait Implementations§
impl Freeze for ScalarKind
impl RefUnwindSafe for ScalarKind
impl Send for ScalarKind
impl Sync for ScalarKind
impl Unpin for ScalarKind
impl UnsafeUnpin for ScalarKind
impl UnwindSafe for ScalarKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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