pub struct BooleanConversionOptions {
pub case_sensitive: bool,
/* private fields */
}Expand description
Options that control string-to-boolean conversion.
Fields§
§case_sensitive: boolWhether literal matching is case-sensitive.
Implementations§
Source§impl BooleanConversionOptions
impl BooleanConversionOptions
Sourcepub fn env_friendly() -> Self
pub fn env_friendly() -> Self
Creates options suitable for environment variable values.
§Returns
Options accepting true/false, 1/0, yes/no, and on/off.
Sourcepub fn true_literals(&self) -> &[String]
pub fn true_literals(&self) -> &[String]
Sourcepub fn false_literals(&self) -> &[String]
pub fn false_literals(&self) -> &[String]
Sourcepub fn with_case_sensitive(self, case_sensitive: bool) -> Self
pub fn with_case_sensitive(self, case_sensitive: bool) -> Self
Sourcepub fn with_true_literal(self, literal: &str) -> Self
pub fn with_true_literal(self, literal: &str) -> Self
Sourcepub fn with_false_literal(self, literal: &str) -> Self
pub fn with_false_literal(self, literal: &str) -> Self
Trait Implementations§
Source§impl Clone for BooleanConversionOptions
impl Clone for BooleanConversionOptions
Source§fn clone(&self) -> BooleanConversionOptions
fn clone(&self) -> BooleanConversionOptions
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 moreSource§impl Debug for BooleanConversionOptions
impl Debug for BooleanConversionOptions
Source§impl Default for BooleanConversionOptions
impl Default for BooleanConversionOptions
Source§impl PartialEq for BooleanConversionOptions
impl PartialEq for BooleanConversionOptions
Source§fn eq(&self, other: &BooleanConversionOptions) -> bool
fn eq(&self, other: &BooleanConversionOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for BooleanConversionOptions
impl StructuralPartialEq for BooleanConversionOptions
Auto Trait Implementations§
impl Freeze for BooleanConversionOptions
impl RefUnwindSafe for BooleanConversionOptions
impl Send for BooleanConversionOptions
impl Sync for BooleanConversionOptions
impl Unpin for BooleanConversionOptions
impl UnsafeUnpin for BooleanConversionOptions
impl UnwindSafe for BooleanConversionOptions
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