1 //! Parsing for data types used in `git-config` files to allow their use from environment variables and other sources.
5 feature
= "document-features",
6 cfg_attr(doc
, doc
= ::document_features
::document_features
!())
8 #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
9 #![deny(missing_docs, rust_2018_idioms, unsafe_code)]
11 /// The error returned when any config value couldn't be instantiated due to malformed input.
12 #[derive(Debug, thiserror::Error, Eq, PartialEq)]
13 #[allow(missing_docs)]
14 #[error("Could not decode '{input}': {message}")]
16 pub message
: &'
static str,
17 pub input
: bstr
::BString
,
19 pub utf8_err
: Option
<std
::str::Utf8Error
>,
23 /// Create a new value error from `message`, with `input` being what's causing the error.
24 pub fn new(message
: &'
static str, input
: impl Into
<bstr
::BString
>) -> Self {
32 pub(crate) fn with_err(mut self, err
: std
::str::Utf8Error
) -> Self {
33 self.utf8_err
= Some(err
);
47 pub use types
::{Boolean, Color, Integer, Path}
;