pub struct LfsPointer {
pub version: String,
pub oid: String,
pub size: u64,
}Expand description
LFS pointer file content format
Fields§
§version: StringLFS spec version
oid: StringSHA3+BLAKE3 hash of the original content
size: u64Original file size in bytes
Implementations§
Source§impl LfsPointer
impl LfsPointer
Sourcepub fn from_content(content: &[u8]) -> Self
pub fn from_content(content: &[u8]) -> Self
Create a new LFS pointer from content
Sourcepub fn to_pointer_text(&self) -> String
pub fn to_pointer_text(&self) -> String
Serialize to pointer file text
Sourcepub fn from_pointer_text(text: &str) -> Option<Self>
pub fn from_pointer_text(text: &str) -> Option<Self>
Parse from pointer file text
Sourcepub fn is_pointer(data: &[u8]) -> bool
pub fn is_pointer(data: &[u8]) -> bool
Check if a byte slice looks like an LFS pointer
Trait Implementations§
Source§impl Clone for LfsPointer
impl Clone for LfsPointer
Source§fn clone(&self) -> LfsPointer
fn clone(&self) -> LfsPointer
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 moreSource§impl Debug for LfsPointer
impl Debug for LfsPointer
Source§impl<'de> Deserialize<'de> for LfsPointer
impl<'de> Deserialize<'de> for LfsPointer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LfsPointer
impl RefUnwindSafe for LfsPointer
impl Send for LfsPointer
impl Sync for LfsPointer
impl Unpin for LfsPointer
impl UnsafeUnpin for LfsPointer
impl UnwindSafe for LfsPointer
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