1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
pub(crate) mod root {
use super::sections;
use crate::config::tree::Section;
#[derive(Copy, Clone, Default)]
pub struct Tree;
impl Tree {
pub const AUTHOR: sections::Author = sections::Author;
pub const BRANCH: sections::Branch = sections::Branch;
pub const CHECKOUT: sections::Checkout = sections::Checkout;
pub const CLONE: sections::Clone = sections::Clone;
pub const COMMITTER: sections::Committer = sections::Committer;
pub const CORE: sections::Core = sections::Core;
pub const CREDENTIAL: sections::Credential = sections::Credential;
pub const DIFF: sections::Diff = sections::Diff;
pub const EXTENSIONS: sections::Extensions = sections::Extensions;
pub const GITOXIDE: sections::Gitoxide = sections::Gitoxide;
pub const HTTP: sections::Http = sections::Http;
pub const INIT: sections::Init = sections::Init;
pub const PACK: sections::Pack = sections::Pack;
pub const PROTOCOL: sections::Protocol = sections::Protocol;
pub const REMOTE: sections::Remote = sections::Remote;
pub const SAFE: sections::Safe = sections::Safe;
pub const SSH: sections::Ssh = sections::Ssh;
pub const USER: sections::User = sections::User;
pub const URL: sections::Url = sections::Url;
pub fn sections(&self) -> &[&dyn Section] {
&[
&Self::AUTHOR,
&Self::BRANCH,
&Self::CHECKOUT,
&Self::CLONE,
&Self::COMMITTER,
&Self::CORE,
&Self::CREDENTIAL,
&Self::DIFF,
&Self::EXTENSIONS,
&Self::GITOXIDE,
&Self::HTTP,
&Self::INIT,
&Self::PACK,
&Self::PROTOCOL,
&Self::REMOTE,
&Self::SAFE,
&Self::SSH,
&Self::USER,
&Self::URL,
]
}
}
}
mod sections;
pub use sections::{
branch, checkout, core, credential, diff, extensions, gitoxide, http, protocol, remote, ssh, Author, Branch,
Checkout, Clone, Committer, Core, Credential, Diff, Extensions, Gitoxide, Http, Init, Pack, Protocol, Remote, Safe,
Ssh, Url, User,
};
pub mod keys;
pub mod key {
pub mod validate {
#[derive(Debug, thiserror::Error)]
#[error(transparent)]
#[allow(missing_docs)]
pub struct Error {
#[from]
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
}
pub mod validate_assignment {
#[derive(Debug, thiserror::Error)]
#[allow(missing_docs)]
pub enum Error {
#[error("Failed to validate the value to be assigned to this key")]
Validate(#[from] super::validate::Error),
#[error("{message}")]
Name { message: String },
}
}
}
mod traits;
pub use traits::{Key, Link, Note, Section, SubSectionRequirement};