pub struct Pointer {
pub oid: [u8; 32],
pub size: u64,
pub extensions: Vec<(String, String)>,
}Expand description
A parsed LFS pointer. Represents the content of a git blob that stands in for a real binary file.
Fields§
§oid: [u8; 32]sha256 of the real file content.
size: u64Size of the real file, in bytes.
extensions: Vec<(String, String)>Unknown keys preserved for forward compatibility. Round-tripped on write. Keys are stored lowercase; values as-parsed.
Implementations§
Source§impl Pointer
impl Pointer
Sourcepub fn parse(bytes: &[u8]) -> Result<Self, ParseError>
pub fn parse(bytes: &[u8]) -> Result<Self, ParseError>
Parse an LFS pointer from canonical pointer bytes.
§Errors
Returns a ParseError if the bytes are too large, non-ASCII, use
unsupported line endings, or do not contain a valid version, oid, and
size.
pub fn oid_hex(&self) -> String
Trait Implementations§
impl Eq for Pointer
impl StructuralPartialEq for Pointer
Auto Trait Implementations§
impl Freeze for Pointer
impl RefUnwindSafe for Pointer
impl Send for Pointer
impl Sync for Pointer
impl Unpin for Pointer
impl UnsafeUnpin for Pointer
impl UnwindSafe for Pointer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.