Enum git_ref::file::Reference[][src]

pub enum Reference<'p> {
    Packed(Reference<'p>),
    Loose(Reference),
}
Expand description

Either a loose or packed reference, depending on where it was found.

Variants

Packed

A reference originating in a pack

Tuple Fields of Packed

0: Reference<'p>
Loose

A reference from the filesystem

Tuple Fields of Loose

0: Reference

Implementations

Obtain a reverse iterator over logs of this reference. See crate::file::loose::Reference::log_iter_rev() for details.

Obtain an iterator over logs of this reference. See crate::file::loose::Reference::log_iter() for details.

Returns the kind of reference

Transform this reference into an owned Target

Returns true if this ref is located in a packed ref buffer.

Return the full validated name of the reference, which may include a namespace.

Return the full validated name of the reference, with the given namespace stripped if possible.

If the reference name wasn’t prefixed with namespace, None is returned instead.

Return the target to which the reference points to.

Trait Implementations

Formats the value using the given formatter. Read more

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.

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

Performs the conversion.

Performs the conversion.

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.