git-next-core 0.14.1

core for git-next, the trunk-based development manager
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// The API Token for the user
/// `ForgeJo`: <https://{hostname}/user/settings/applications>
/// `Github`:  <https://github.com/settings/tokens>
#[derive(Clone, Debug, derive_more::Constructor)]
pub struct ApiToken(secrecy::SecretString);
/// The API Token is in effect a password, so it must be explicitly exposed to access its value
impl secrecy::ExposeSecret<str> for ApiToken {
    fn expose_secret(&self) -> &str {
        self.0.expose_secret()
    }
}
impl Default for ApiToken {
    fn default() -> Self {
        Self(String::new().into())
    }
}