pub struct Repo {
pub owner: String,
pub name: String,
pub host: Option<String>,
}Fields§
§owner: StringA user or organisation, or on GitLab a group path such as
group/subgroup.
name: String§host: Option<String>The host of a repository that is not on github.com, such as
gitlab.com or codeberg.org. None is GitHub.
Implementations§
Source§impl Repo
impl Repo
Sourcepub fn parse(s: &str) -> Option<Self>
pub fn parse(s: &str) -> Option<Self>
Parses OWNER/NAME, a GitHub repository, or HOST/OWNER/NAME, where
a first part with a dot or a colon is the host.
Sourcepub fn on(host: &str, path: &str) -> Option<Self>
pub fn on(host: &str, path: &str) -> Option<Self>
The repository at path on host. Only a GitLab path (or one on a
host jouet does not know yet) can have more than two parts.
Sourcepub fn forge(&self) -> Option<Forge>
pub fn forge(&self) -> Option<Forge>
The forge the repository is on; None for a host jouet does not
know.
Sourcepub fn qualified(&self) -> String
pub fn qualified(&self) -> String
HOST/OWNER/NAME, or OWNER/NAME on GitHub: what Repo::parse
reads back.
Trait Implementations§
impl Eq for Repo
impl StructuralPartialEq for Repo
Auto Trait Implementations§
impl Forget for Repo
impl Freeze for Repo
impl RefUnwindSafe for Repo
impl Send for Repo
impl Sync for Repo
impl Unpin for Repo
impl UnsafeUnpin for Repo
impl UnwindSafe for Repo
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