pub type Boolean = Any<Boolean>;Expand description
A key that represents a boolean value.
Aliased Type§
pub struct Boolean {
pub name: &'static str,
pub section: &'static dyn Section,
pub subsection_requirement: Option<SubSectionRequirement>,
pub link: Option<Link>,
pub note: Option<Note>,
/* private fields */
}Fields§
§name: &'static strThe key of the value in the git configuration.
section: &'static dyn SectionThe parent section of the key.
subsection_requirement: Option<SubSectionRequirement>The subsection requirement to use.
link: Option<Link>A link to other resources that might be eligible as value.
note: Option<Note>A note about this key.
Implementations§
Source§impl Boolean
impl Boolean
Sourcepub const fn new_boolean(
name: &'static str,
section: &'static dyn Section,
) -> Self
pub const fn new_boolean( name: &'static str, section: &'static dyn Section, ) -> Self
Create a new instance.
Sourcepub fn enrich_error(
&'static self,
value: Result<bool, Error>,
) -> Result<bool, Error>
pub fn enrich_error( &'static self, value: Result<bool, Error>, ) -> Result<bool, Error>
Process the value into a result with an improved error message.
value is expected to be provided by gix_config::File::boolean().