pub struct RefSpec { /* private fields */ }Implementations§
Source§impl RefSpec
impl RefSpec
Sourcepub fn new(
source: Option<String>,
destination: impl Into<String>,
forced: bool,
) -> GitResult<Self>
pub fn new( source: Option<String>, destination: impl Into<String>, forced: bool, ) -> GitResult<Self>
Construct a refspec after enforcing reserved-remote-name invariants.
Sourcepub fn forced(
source: impl Into<String>,
destination: impl Into<String>,
) -> GitResult<Self>
pub fn forced( source: impl Into<String>, destination: impl Into<String>, ) -> GitResult<Self>
A forced (+) refspec mapping source onto destination.
Sourcepub fn delete(destination: impl Into<String>) -> GitResult<Self>
pub fn delete(destination: impl Into<String>) -> GitResult<Self>
A delete refspec (:destination). Not forced: deleting a destination
that has no source cannot lose work.
Sourcepub fn to_git_format(&self) -> String
pub fn to_git_format(&self) -> String
Render in git refspec syntax, including the leading + when forced.
Sourcepub fn to_git_format_not_forced(&self) -> String
pub fn to_git_format_not_forced(&self) -> String
Render in git refspec syntax without the leading +, even when forced.
Trait Implementations§
impl Eq for RefSpec
impl StructuralPartialEq for RefSpec
Auto Trait Implementations§
impl Freeze for RefSpec
impl RefUnwindSafe for RefSpec
impl Send for RefSpec
impl Sync for RefSpec
impl Unpin for RefSpec
impl UnsafeUnpin for RefSpec
impl UnwindSafe for RefSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request