Struct git_ref::packed::Reference[][src]

pub struct Reference<'a> {
    pub name: FullNameRef<'a>,
    pub target: &'a BStr,
    pub object: Option<&'a BStr>,
}
Expand description

A reference as parsed from the packed-refs file

Fields

name: FullNameRef<'a>

The validated full name of the reference.

target: &'a BStr

The target object id of the reference, hex encoded.

object: Option<&'a BStr>

The fully peeled object id, hex encoded, that the ref is ultimately pointing to i.e. when all indirections are removed.

Implementations

Decode the target as object

Decode the object this reference is ultimately pointing to. Note that this is the target() if this is not a fully peeled reference like a tag.

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.