pub struct GithubRemoteSnapshot { /* private fields */ }Expand description
Frozen effective fetch/push endpoints from one local remote-config read.
Implementations§
Source§impl GithubRemoteSnapshot
impl GithubRemoteSnapshot
Sourcepub fn new(
fetch: GithubGitEndpoint,
push: GithubGitEndpoint,
) -> Result<Self, GitRemoteDiscoveryError>
pub fn new( fetch: GithubGitEndpoint, push: GithubGitEndpoint, ) -> Result<Self, GitRemoteDiscoveryError>
Bind already parsed canonical fetch and push endpoints.
§Errors
Rejects endpoints that identify different GitHub repositories.
Sourcepub fn from_local_config_output(
remote: &GitRemoteName,
output: &[u8],
) -> Result<Self, GitRemoteDiscoveryError>
pub fn from_local_config_output( remote: &GitRemoteName, output: &[u8], ) -> Result<Self, GitRemoteDiscoveryError>
Parse one git config --local --no-includes -z --get-regexp response.
Git emits each matching key and value as key\nvalue\0. Exactly one URL is required;
zero or one push URL is accepted, with an absent push URL inheriting the fetch URL.
Multiple values fail closed instead of using Git’s URL selection rules.
§Errors
Rejects oversized/malformed output, missing or duplicate values, unexpected keys, unsafe endpoints, or differing fetch/push repository identities.
Sourcepub const fn fetch(&self) -> &GithubGitEndpoint
pub const fn fetch(&self) -> &GithubGitEndpoint
Frozen canonical fetch endpoint.
Sourcepub const fn push(&self) -> &GithubGitEndpoint
pub const fn push(&self) -> &GithubGitEndpoint
Frozen canonical push endpoint.
Trait Implementations§
Source§impl Clone for GithubRemoteSnapshot
impl Clone for GithubRemoteSnapshot
Source§impl Debug for GithubRemoteSnapshot
impl Debug for GithubRemoteSnapshot
impl Eq for GithubRemoteSnapshot
Source§impl PartialEq for GithubRemoteSnapshot
impl PartialEq for GithubRemoteSnapshot
impl StructuralPartialEq for GithubRemoteSnapshot
Auto Trait Implementations§
impl Freeze for GithubRemoteSnapshot
impl RefUnwindSafe for GithubRemoteSnapshot
impl Send for GithubRemoteSnapshot
impl Sync for GithubRemoteSnapshot
impl Unpin for GithubRemoteSnapshot
impl UnsafeUnpin for GithubRemoteSnapshot
impl UnwindSafe for GithubRemoteSnapshot
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.