2024-07-25 09:02:43 +01:00
|
|
|
//
|
|
|
|
use derive_more::{Constructor, Display};
|
2024-05-11 19:46:20 +01:00
|
|
|
|
2024-07-25 09:02:43 +01:00
|
|
|
use git_next_core::{Hostname, RepoPath};
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, Constructor, Display)]
|
2024-05-14 16:28:17 +01:00
|
|
|
#[display("{}:{}", host, repo_path)]
|
2024-05-11 19:46:20 +01:00
|
|
|
pub struct GitRemote {
|
|
|
|
host: Hostname,
|
|
|
|
repo_path: RepoPath,
|
|
|
|
}
|
|
|
|
impl GitRemote {
|
|
|
|
pub const fn host(&self) -> &Hostname {
|
|
|
|
&self.host
|
|
|
|
}
|
|
|
|
pub const fn repo_path(&self) -> &RepoPath {
|
|
|
|
&self.repo_path
|
|
|
|
}
|
|
|
|
}
|