pub struct Oid { /* private fields */ }
Implementations§
Source§impl Oid
impl Oid
pub fn new(oid: &[u8]) -> Result<Self, Error>
pub fn as_str(&self) -> &str
pub fn value(&self) -> &[u8] ⓘ
pub fn valid(b: &[u8]) -> bool
Sourcepub fn expected_path(&self, path: &Path) -> PathBuf
pub fn expected_path(&self, path: &Path) -> PathBuf
Returns the expected path for this object given the path
argument, which should be a
.git/lfs
directory.
Sourcepub fn exists_at_path(&self, path: &Path) -> bool
pub fn exists_at_path(&self, path: &Path) -> bool
Returns a boolean indicating whether an object with this ID is present under the given
path, which should be a .git/lfs
directory.
Sourcepub fn size_at_path(&self, path: &Path) -> Option<u64>
pub fn size_at_path(&self, path: &Path) -> Option<u64>
Returns Some(size)
, where size
is the size of the file if the object with this ID
exists a the given path, which should be a .git/lfs
directory, or None
otherwise.
Trait Implementations§
Source§impl Ord for Oid
impl Ord for Oid
Source§impl PartialOrd for Oid
impl PartialOrd for Oid
impl Eq for Oid
impl StructuralPartialEq for Oid
Auto Trait Implementations§
impl Freeze for Oid
impl RefUnwindSafe for Oid
impl Send for Oid
impl Sync for Oid
impl Unpin for Oid
impl UnwindSafe for Oid
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