Enum radicle_surf::Branch
source · pub enum Branch {
Local(Local),
Remote(Remote),
}
Expand description
A Branch
represents any git branch. It can be Local
or Remote
.
Note that if a Branch
is created from a git2::Reference
then
any refs/namespaces
will be stripped.
Variants§
Implementations§
source§impl Branch
impl Branch
sourcepub fn remote<R>(remote: Component<'_>, name: R) -> Self
pub fn remote<R>(remote: Component<'_>, name: R) -> Self
Construct a Remote
branch.
The remote
is the remote name of the reference name while
the name
is the suffix, i.e. refs/remotes/<remote>/<name>
.
sourcepub fn short_name(&self) -> &RefString
pub fn short_name(&self) -> &RefString
Return the short Branch
refname,
e.g. fix/ref-format
.
Trait Implementations§
source§impl Ord for Branch
impl Ord for Branch
source§impl PartialOrd for Branch
impl PartialOrd for Branch
impl Eq for Branch
impl StructuralPartialEq for Branch
Auto Trait Implementations§
impl Freeze for Branch
impl RefUnwindSafe for Branch
impl Send for Branch
impl Sync for Branch
impl Unpin for Branch
impl UnwindSafe for Branch
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)