Struct tribble_app::parser::InputSectionElem
source · [−]pub struct InputSectionElem {
pub id: String,
pub label: String,
pub optional: bool,
pub default: Option<String>,
pub input: Input,
}Expand description
The properties of an input element. This needs to be passed around, so it’s broken out of the SectionElem input.
Fields
id: StringThe input’s ID, which can be used to reference its value later for interpolation in a formatted report.
label: StringThe label for the input. This does not support Markdown.
optional: boolWhether or not the input is optional.
default: Option<String>The default value for the input. If the input is optional, this will be the value used for interpolation. If the input is not optional, this will be the default, which means it will be left as this if the user doesn’t fill it in. If a value should be provided, you should make it mandatory and set a default, as optional fields should be assumed to potentially not contain any value (even though they always will if a default value is provided).
If the input is a Select, this must correspond to an entry in options.
input: InputThe actual properties of the input (unique depending on the input’s type).
Trait Implementations
sourceimpl Clone for InputSectionElem
impl Clone for InputSectionElem
sourcefn clone(&self) -> InputSectionElem
fn clone(&self) -> InputSectionElem
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for InputSectionElem
impl Debug for InputSectionElem
sourceimpl<'de> Deserialize<'de> for InputSectionElem
impl<'de> Deserialize<'de> for InputSectionElem
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for InputSectionElem
impl Serialize for InputSectionElem
Auto Trait Implementations
impl RefUnwindSafe for InputSectionElem
impl Send for InputSectionElem
impl Sync for InputSectionElem
impl Unpin for InputSectionElem
impl UnwindSafe for InputSectionElem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more