Struct scutiger_lfs::processor::Oid
source · [−]pub struct Oid { /* private fields */ }
Implementations
sourceimpl Oid
impl Oid
pub fn new(oid: &[u8]) -> Result<Self, Error>
pub fn as_str(&self) -> &str
pub fn value(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [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
sourceimpl Ord for Oid
impl Ord for Oid
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Oid> for Oid
impl PartialOrd<Oid> for Oid
sourcefn partial_cmp(&self, other: &Oid) -> Option<Ordering>
fn partial_cmp(&self, other: &Oid) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Oid
impl StructuralEq for Oid
impl StructuralPartialEq for Oid
Auto Trait Implementations
impl RefUnwindSafe for Oid
impl Send for Oid
impl Sync for Oid
impl Unpin for Oid
impl UnwindSafe for Oid
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more