pub struct ObjectInfo {
pub kind: ObjectKind,
pub size: u64,
}Expand description
Object metadata independent of how its body is stored. Lengths are 64-bit so generated objects need not fit in one slice, including on 32-bit hosts.
Fields§
§kind: ObjectKind§size: u64Implementations§
Source§impl ObjectInfo
impl ObjectInfo
Sourcepub fn from_header(header: &[u8]) -> Result<ObjectInfo, Error>
pub fn from_header(header: &[u8]) -> Result<ObjectInfo, Error>
Parse one complete canonical Git header, including its terminating NUL. Sizes use unsigned decimal without leading zeros and fit in 64 bits.
Trait Implementations§
Source§impl Clone for ObjectInfo
impl Clone for ObjectInfo
Source§fn clone(&self) -> ObjectInfo
fn clone(&self) -> ObjectInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ObjectInfo
Source§impl Debug for ObjectInfo
impl Debug for ObjectInfo
impl Eq for ObjectInfo
Source§impl PartialEq for ObjectInfo
impl PartialEq for ObjectInfo
impl StructuralPartialEq for ObjectInfo
Auto Trait Implementations§
impl Freeze for ObjectInfo
impl RefUnwindSafe for ObjectInfo
impl Send for ObjectInfo
impl Sync for ObjectInfo
impl Unpin for ObjectInfo
impl UnsafeUnpin for ObjectInfo
impl UnwindSafe for ObjectInfo
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