pub struct ForgeRemote {
pub forge_kind: ForgeKind,
pub host: String,
pub namespace: String,
pub project: String,
pub repo_url: String,
pub web_url: String,
}Expand description
Normalized repository remote metadata for one supported forge.
Fields§
§forge_kind: ForgeKindForge family inferred from the repository remote.
host: StringForge hostname used for browser and API calls.
HTTPS remotes keep any explicit web/API port, while SSH transport ports are stripped during remote normalization.
namespace: StringRepository namespace or owner path.
project: StringRepository name without a trailing .git suffix.
repo_url: StringOriginal remote URL returned by git.
web_url: StringBrowser-openable repository URL derived from the remote.
Implementations§
Source§impl ForgeRemote
impl ForgeRemote
Sourcepub fn project_path(&self) -> String
pub fn project_path(&self) -> String
Returns the <namespace>/<project> path used by forge CLIs and URLs.
Trait Implementations§
Source§impl Clone for ForgeRemote
impl Clone for ForgeRemote
Source§fn clone(&self) -> ForgeRemote
fn clone(&self) -> ForgeRemote
Returns a duplicate of the value. Read more
1.0.0 · 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 ForgeRemote
impl Debug for ForgeRemote
Source§impl PartialEq for ForgeRemote
impl PartialEq for ForgeRemote
impl Eq for ForgeRemote
impl StructuralPartialEq for ForgeRemote
Auto Trait Implementations§
impl Freeze for ForgeRemote
impl RefUnwindSafe for ForgeRemote
impl Send for ForgeRemote
impl Sync for ForgeRemote
impl Unpin for ForgeRemote
impl UnsafeUnpin for ForgeRemote
impl UnwindSafe for ForgeRemote
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