pub struct GitLabConfig {
pub access_token: String,
pub api_url: String,
}Expand description
GitLab connection settings. The token IS stored in the config file -
keep its scopes minimal (read_user, read_repository).
Fields§
§access_token: StringPersonal Access Token with read_user + read_repository scopes.
api_url: StringInstance root URL, without the /api/v4 path.
Implementations§
Source§impl GitLabConfig
impl GitLabConfig
Sourcepub fn module() -> ConfigModule
pub fn module() -> ConfigModule
Module metadata for the setup wizard.
Sourcepub fn init(config: &Option<GitLabConfig>) -> Result<Self>
pub fn init(config: &Option<GitLabConfig>) -> Result<Self>
Interactive setup; existing values become the prompt defaults.
let existing_config = Some(GitLabConfig {
access_token: "glpat-old-token".to_string(),
api_url: "https://gitlab.com".to_string(),
});
let new_config = GitLabConfig::init(&existing_config)?;Trait Implementations§
Source§impl Clone for GitLabConfig
impl Clone for GitLabConfig
Source§fn clone(&self) -> GitLabConfig
fn clone(&self) -> GitLabConfig
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 GitLabConfig
impl Debug for GitLabConfig
Source§impl<'de> Deserialize<'de> for GitLabConfig
impl<'de> Deserialize<'de> for GitLabConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GitLabConfig
impl RefUnwindSafe for GitLabConfig
impl Send for GitLabConfig
impl Sync for GitLabConfig
impl Unpin for GitLabConfig
impl UnsafeUnpin for GitLabConfig
impl UnwindSafe for GitLabConfig
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