pub struct Refspec<'remote> { /* private fields */ }
Expand description

A structure to represent a git refspec.

Refspecs are currently mainly accessed/created through a Remote.

Implementations

Get the refspec’s direction.

Get the destination specifier.

If the destination is not utf-8, None is returned.

Get the destination specifier, in bytes.

Check if a refspec’s destination descriptor matches a reference

Get the source specifier.

If the source is not utf-8, None is returned.

Get the source specifier, in bytes.

Check if a refspec’s source descriptor matches a reference

Get the force update setting.

Get the refspec’s string.

Returns None if the string is not valid utf8.

Get the refspec’s string as a byte array

Transform a reference to its target following the refspec’s rules

Transform a target reference to its source reference following the refspec’s rules

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.