Struct kconfig_represent::ConfigItem
source · [−]pub struct ConfigItem<T> { /* private fields */ }Expand description
Represents a configuration item as defined by the Abstract Syntax Tree, received from the kconfig-parser module.
Implementations
impl ConfigItem<i64>
Methods applicable only for configuration item for positive integers
impl ConfigItem<Hex>
Methods applicable only for configuration item for positive, hexadecimal integers
Trait Implementations
sourceimpl<T: Clone> Clone for ConfigItem<T>
impl<T: Clone> Clone for ConfigItem<T>
sourcefn clone(&self) -> ConfigItem<T>
fn clone(&self) -> ConfigItem<T>
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 Config for ConfigItem<String>
impl Config for ConfigItem<String>
fn mutation_mode(&self) -> ConfigMutationMode
fn prompt(&self) -> String
fn next_step(&mut self) -> Result<(), Error>
sourcefn select(&mut self, _flag: Option<Tristate>)
fn select(&mut self, _flag: Option<Tristate>)
Selects the item by the value of another item, given the value of that item. Read more
sourcefn imply(&mut self, _flag: Option<Tristate>)
fn imply(&mut self, _flag: Option<Tristate>)
Implies the item by the value of another item, given the value of that item. Read more
sourcefn value_is_default(&self) -> bool
fn value_is_default(&self) -> bool
If the default value matches the actual value, this function results in a truth value. Read more
sourceimpl Config for ConfigItem<bool>
impl Config for ConfigItem<bool>
sourcefn select(&mut self, flag: Option<Tristate>)
fn select(&mut self, flag: Option<Tristate>)
Sets the selected flag, if the item is to be selected with the given value for flag. Only applicable to items which are of type bool or tristate.
sourcefn imply(&mut self, flag: Option<Tristate>)
fn imply(&mut self, flag: Option<Tristate>)
Sets the implied flag, if the item is to be implied. Only applicatie to items which are of type bool or tristate. The item’s value is not force fully set, but can be set depending on the value of the flag.
fn mutation_mode(&self) -> ConfigMutationMode
fn next_step(&mut self) -> Result<(), Error>
fn prompt(&self) -> String
sourcefn value_is_default(&self) -> bool
fn value_is_default(&self) -> bool
If the default value matches the actual value, this function results in a truth value. Read more
sourceimpl Config for ConfigItem<Tristate>
impl Config for ConfigItem<Tristate>
sourcefn select(&mut self, flag: Option<Tristate>)
fn select(&mut self, flag: Option<Tristate>)
Sets the selected flag, if the item is to be selected with the given value for flag. Only applicable to items which are of type bool or tristate.
sourcefn imply(&mut self, flag: Option<Tristate>)
fn imply(&mut self, flag: Option<Tristate>)
Sets the implied flag, if the item is to be implied. Only applicatie to items which are of type bool or tristate. The item’s value is not force fully set, but can be set depending on the value of the flag.
fn mutation_mode(&self) -> ConfigMutationMode
fn next_step(&mut self) -> Result<(), Error>
fn prompt(&self) -> String
sourcefn value_is_default(&self) -> bool
fn value_is_default(&self) -> bool
If the default value matches the actual value, this function results in a truth value. Read more
sourceimpl Config for ConfigItem<i64>
impl Config for ConfigItem<i64>
fn mutation_mode(&self) -> ConfigMutationMode
fn prompt(&self) -> String
fn next_step(&mut self) -> Result<(), Error>
sourcefn select(&mut self, _flag: Option<Tristate>)
fn select(&mut self, _flag: Option<Tristate>)
Selects the item by the value of another item, given the value of that item. Read more
sourcefn imply(&mut self, _flag: Option<Tristate>)
fn imply(&mut self, _flag: Option<Tristate>)
Implies the item by the value of another item, given the value of that item. Read more
sourcefn value_is_default(&self) -> bool
fn value_is_default(&self) -> bool
If the default value matches the actual value, this function results in a truth value. Read more
sourceimpl Config for ConfigItem<Hex>
impl Config for ConfigItem<Hex>
fn mutation_mode(&self) -> ConfigMutationMode
fn prompt(&self) -> String
fn next_step(&mut self) -> Result<(), Error>
sourcefn select(&mut self, _flag: Option<Tristate>)
fn select(&mut self, _flag: Option<Tristate>)
Selects the item by the value of another item, given the value of that item. Read more
sourcefn imply(&mut self, _flag: Option<Tristate>)
fn imply(&mut self, _flag: Option<Tristate>)
Implies the item by the value of another item, given the value of that item. Read more
sourcefn value_is_default(&self) -> bool
fn value_is_default(&self) -> bool
If the default value matches the actual value, this function results in a truth value. Read more
sourceimpl<T: Debug> Debug for ConfigItem<T>
impl<T: Debug> Debug for ConfigItem<T>
sourceimpl Display for ConfigItem<String>
impl Display for ConfigItem<String>
Implements the display routine for the configuration item
sourceimpl Display for ConfigItem<bool>
impl Display for ConfigItem<bool>
Implements the display routine for the configuration item
sourceimpl Display for ConfigItem<Tristate>
impl Display for ConfigItem<Tristate>
Implements the display routine for the configuration item
sourceimpl Display for ConfigItem<i64>
impl Display for ConfigItem<i64>
Implements the display routine for the configuration item
sourceimpl Display for ConfigItem<Hex>
impl Display for ConfigItem<Hex>
Implements the display routine for the configuration item
sourceimpl DotConfig for ConfigItem<String>
impl DotConfig for ConfigItem<String>
Implements the read and write to and from a dot configuration file from or to the configuration item
sourcefn as_dot_config(&self) -> String
fn as_dot_config(&self) -> String
Returns the representation of the configuration item into the configuration file.
sourceimpl DotConfig for ConfigItem<bool>
impl DotConfig for ConfigItem<bool>
Implements the read and write to and from a dot configuration file from or to the configuration item
sourcefn as_dot_config(&self) -> String
fn as_dot_config(&self) -> String
Returns the representation of the configuration item into the configuration file.
sourceimpl DotConfig for ConfigItem<Tristate>
impl DotConfig for ConfigItem<Tristate>
Implements the read and write to and from a dot configuration file from or to the configuration item
sourcefn as_dot_config(&self) -> String
fn as_dot_config(&self) -> String
Returns the representation of the configuration item into the configuration file.
sourceimpl DotConfig for ConfigItem<i64>
impl DotConfig for ConfigItem<i64>
Implements the read and write to and from a dot configuration file from or to the configuration item
sourcefn as_dot_config(&self) -> String
fn as_dot_config(&self) -> String
Returns the representation of the configuration item into the configuration file.
sourceimpl DotConfig for ConfigItem<Hex>
impl DotConfig for ConfigItem<Hex>
file from or to the configuration item
sourcefn as_dot_config(&self) -> String
fn as_dot_config(&self) -> String
Returns the representation of the configuration item into the configuration file.
sourceimpl<T> MenuItem for ConfigItem<T>
impl<T> MenuItem for ConfigItem<T>
Implements the Named type generically for all generic configuration item types.
sourcefn descriptor(&self) -> MenuItemDescriptor
fn descriptor(&self) -> MenuItemDescriptor
Returns the name of the configuration item
sourceimpl StringValue for ConfigItem<String>
impl StringValue for ConfigItem<String>
sourcefn to_string_value(&self) -> String
fn to_string_value(&self) -> String
Formats the value of the configuration item as a string.
fn from_string_value(&mut self, v: &str)
sourcefn default_from_string_value(&mut self, opt_v: Option<String>)
fn default_from_string_value(&mut self, opt_v: Option<String>)
Is called whenever a default value is configured and should be set according to it’s evaluation. Read more
sourcefn default_to_string_value(&self) -> Option<String>
fn default_to_string_value(&self) -> Option<String>
Requests the default value as string representation
sourceimpl StringValue for ConfigItem<bool>
impl StringValue for ConfigItem<bool>
sourcefn to_string_value(&self) -> String
fn to_string_value(&self) -> String
Formats the value of the configuration item as a string.
fn from_string_value(&mut self, v: &str)
sourcefn default_from_string_value(&mut self, v: Option<String>)
fn default_from_string_value(&mut self, v: Option<String>)
Is called whenever a default value is configured and should be set according to it’s evaluation. Read more
sourcefn default_to_string_value(&self) -> Option<String>
fn default_to_string_value(&self) -> Option<String>
Requests the default value as string representation
sourceimpl StringValue for ConfigItem<Tristate>
impl StringValue for ConfigItem<Tristate>
sourcefn to_string_value(&self) -> String
fn to_string_value(&self) -> String
Formats the value of the configuration item as a string.
fn from_string_value(&mut self, v: &str)
sourcefn default_from_string_value(&mut self, v: Option<String>)
fn default_from_string_value(&mut self, v: Option<String>)
Is called whenever a default value is configured and should be set according to it’s evaluation. Read more
sourcefn default_to_string_value(&self) -> Option<String>
fn default_to_string_value(&self) -> Option<String>
Requests the default value as string representation
sourceimpl StringValue for ConfigItem<i64>
impl StringValue for ConfigItem<i64>
sourcefn to_string_value(&self) -> String
fn to_string_value(&self) -> String
Formats the value of the configuration item as a string.
sourcefn from_string_value(&mut self, v: &str)
fn from_string_value(&mut self, v: &str)
Saves the value of the int configuration item from a string. If it is not representing an int, it should silently fail.
sourcefn default_from_string_value(&mut self, v: Option<String>)
fn default_from_string_value(&mut self, v: Option<String>)
Is called whenever a default value is configured and should be set according to it’s evaluation. Read more
sourcefn default_to_string_value(&self) -> Option<String>
fn default_to_string_value(&self) -> Option<String>
Requests the default value as string representation
sourceimpl StringValue for ConfigItem<Hex>
impl StringValue for ConfigItem<Hex>
sourcefn to_string_value(&self) -> String
fn to_string_value(&self) -> String
Formats the value of the configuration item as a string.
sourcefn from_string_value(&mut self, v: &str)
fn from_string_value(&mut self, v: &str)
Saves the value of the int configuration item from a string. If it is not representing an int, it should silently fail.
sourcefn default_from_string_value(&mut self, v: Option<String>)
fn default_from_string_value(&mut self, v: Option<String>)
Is called whenever a default value is configured and should be set according to it’s evaluation. Read more
sourcefn default_to_string_value(&self) -> Option<String>
fn default_to_string_value(&self) -> Option<String>
Requests the default value as string representation
Auto Trait Implementations
impl<T> RefUnwindSafe for ConfigItem<T> where
T: RefUnwindSafe,
impl<T> Send for ConfigItem<T> where
T: Send,
impl<T> Sync for ConfigItem<T> where
T: Sync,
impl<T> Unpin for ConfigItem<T> where
T: Unpin,
impl<T> UnwindSafe for ConfigItem<T> where
T: UnwindSafe,
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