Struct git_odb::data::Object [−][src]
Expand description
A borrowed object using a borrowed slice as backing buffer.
Fields
kind: Kind
kind of object
data: &'a [u8]
decoded, decompressed data, owned by a backing store.
pack_location: Option<Location>
If Some
, this object is from a pack whose pack location can be used to look up pack related information
Implementations
Constructs a new data object from kind
and data
.
Decodes the data in the backing slice into a git_object::ObjectRef
, allowing to access all of its data
conveniently. The cost of parsing an object is negligible.
Note that mutable, decoded objects can be created from a crate::data::Object
using git_object::ObjectRef::into_owned()
.
Returns this object as tree iterator to parse entries one at a time to avoid allocations, or
None
if this is not a tree object.
Returns this object as commit iterator to parse tokens one at a time to avoid allocations, or
None
if this is not a commit object.
Returns this object as tag iterator to parse tokens one at a time to avoid allocations, or
None
if this is not a tag object.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for Object<'a>
impl<'a> UnwindSafe for Object<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more