pub struct GitUrl {
pub repository_url: Arc<UrlRef>,
pub repository_gix_url: Url,
pub path: RelativePathBuf,
/* private fields */
}Available on crate feature
git only.Expand description
A URL for an entry in a git repository.
The URL scheme is “git:”, followed by repository URL, a !, and then the entry path
within the repository. The fragment of the repository URL is used to select a git tag,
a commit hash in hex, or a branch name (in which case the tip of the branch will be used).
The default is to use the tip of the default branch.
Note that the fragment cannot be used with local repositories, which will be accessed in their current state.
Fields§
§repository_url: Arc<UrlRef>The repository URL.
repository_gix_url: UrlThe repository gix Url.
path: RelativePathBufThe entry path.
Implementations§
Source§impl GitUrl
impl GitUrl
Sourcepub fn new(
context: &UrlContextRef,
repository_url: Arc<UrlRef>,
repository_gix_url: Url,
path: RelativePathBuf,
) -> Self
pub fn new( context: &UrlContextRef, repository_url: Arc<UrlRef>, repository_gix_url: Url, path: RelativePathBuf, ) -> Self
Constructor.
Sourcepub fn new_with(&self, path: RelativePathBuf) -> Self
pub fn new_with(&self, path: RelativePathBuf) -> Self
Constructor.
Trait Implementations§
Source§impl URL for GitUrl
impl URL for GitUrl
Source§fn context(&self) -> &UrlContext
fn context(&self) -> &UrlContext
The UrlContext used to create this URL.
Source§fn format(&self) -> Option<String>
fn format(&self) -> Option<String>
Format of the URL content’s canonical representation. Read more
Source§fn base(&self) -> Option<UrlRef>
fn base(&self) -> Option<UrlRef>
Returns a URL that is the equivalent of a “base directory” for the URL. Read more
Source§fn conform(&mut self) -> Result<(), UrlError>
fn conform(&mut self) -> Result<(), UrlError>
Available on crate feature
blocking only.Ensures that the URL conforms with the expectations of its functions. If
successful, this function may change the URL appropriately, e.g. a relative
path would be turned into an absolute path. Read more
Source§fn conform_async(&self) -> Result<ConformFuture, UrlError>
fn conform_async(&self) -> Result<ConformFuture, UrlError>
Available on crate feature
async only.Async version of URL::conform. Read more
Source§fn open_async(&self) -> Result<OpenFuture, UrlError>
fn open_async(&self) -> Result<OpenFuture, UrlError>
Available on crate feature
async only.Auto Trait Implementations§
impl Freeze for GitUrl
impl !RefUnwindSafe for GitUrl
impl Send for GitUrl
impl Sync for GitUrl
impl Unpin for GitUrl
impl !UnwindSafe for GitUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.