pub struct Repository { /* private fields */ }
Implementations§
Source§impl Repository
impl Repository
Sourcepub fn from_url(url: &str) -> Result<Self, Box<dyn Error>>
pub fn from_url(url: &str) -> Result<Self, Box<dyn Error>>
Extracts the owner and repository name from a URL.
Returns Repository
Where host is either “github” or “gitlab” for now.
e.g. https://github.com/szabgab/rust-digger -> (“github”, “szabgab”, “rust-digger”)
pub fn url(&self) -> String
pub fn path(&self, root: &Path) -> PathBuf
pub fn owner_path(&self, root: &Path) -> PathBuf
pub fn is_github(&self) -> bool
pub fn is_gitlab(&self) -> bool
Trait Implementations§
Source§impl Debug for Repository
impl Debug for Repository
Source§impl PartialEq for Repository
impl PartialEq for Repository
impl StructuralPartialEq for Repository
Auto Trait Implementations§
impl Freeze for Repository
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnwindSafe for Repository
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