pub struct TemplateValues(/* private fields */);Expand description
Holds a map of parameters and their values.
Implementations§
Source§impl TemplateValues
impl TemplateValues
Sourcepub fn to_serializable(&self) -> BTreeMap<String, String>
pub fn to_serializable(&self) -> BTreeMap<String, String>
Converts values to a serializable object.
Currently only String, Number, and Bool are supported.
Sourcepub fn insert_if_empty(&mut self, key: &str, value: Value)
pub fn insert_if_empty(&mut self, key: &str, value: Value)
Inserts new value if parameter wasn’t initialized before.
Sourcepub fn interactive_if_empty(&mut self, key: &str)
pub fn interactive_if_empty(&mut self, key: &str)
Interactively asks user to provide value for a parameter.
Trait Implementations§
Source§impl Debug for TemplateValues
impl Debug for TemplateValues
Source§impl Default for TemplateValues
impl Default for TemplateValues
Source§fn default() -> TemplateValues
fn default() -> TemplateValues
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TemplateValues
impl RefUnwindSafe for TemplateValues
impl Send for TemplateValues
impl Sync for TemplateValues
impl Unpin for TemplateValues
impl UnwindSafe for TemplateValues
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> Pointable for T
impl<T> Pointable for T
Source§impl<S> SetWithType for S
impl<S> SetWithType for S
Source§fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
Function to set value of a component by its type.