gix_config/
lookup.rs

1/// The error when looking up a value, for example via [`File::try_value()`][crate::File::try_value()].
2#[derive(Debug, thiserror::Error)]
3#[allow(missing_docs)]
4pub enum Error<E> {
5    #[error(transparent)]
6    ValueMissing(#[from] existing::Error),
7    #[error(transparent)]
8    FailedConversion(E),
9}
10
11///
12pub mod existing {
13    /// The error when looking up a value that doesn't exist, for example via [`File::value()`][crate::File::value()].
14    #[derive(Debug, thiserror::Error)]
15    #[allow(missing_docs)]
16    pub enum Error {
17        #[error("The requested section does not exist")]
18        SectionMissing,
19        #[error("The requested subsection does not exist")]
20        SubSectionMissing,
21        #[error("The key does not exist in the requested section")]
22        KeyMissing,
23    }
24}