pub struct HFFileDiff {
pub old_blob_id: String,
pub new_blob_id: String,
pub status: GitStatus,
pub file_path: String,
pub new_file_path: Option<String>,
pub is_binary: bool,
pub new_file_size: u64,
}Expand description
Parsed metadata for a single file entry in the Hub’s raw diff output.
One HFFileDiff corresponds to one line in the payload returned by
crate::repository::HFRepository::get_raw_diff or one item yielded by
crate::repository::HFRepository::get_raw_diff_stream. For rename and copy
entries, new_file_path contains the destination
path while file_path remains the source path.
Fields§
§old_blob_id: StringBlob id for the file before the change.
For additions this is typically all zeroes because there is no previous blob.
new_blob_id: StringBlob id for the file after the change.
For deletions this is typically all zeroes because there is no new blob.
status: GitStatusHigh-level git status for the change.
file_path: StringRepository-relative path of the original/source file.
new_file_path: Option<String>Repository-relative destination path for rename/copy entries.
This is None for additions, deletions, and in-place modifications.
is_binary: boolWhether the Hub marked this entry as binary.
true corresponds to a B prefix in the raw diff line; false
corresponds to T (text).
new_file_size: u64Destination-side file size in bytes, as reported by the raw diff line.
Trait Implementations§
Source§impl Clone for HFFileDiff
impl Clone for HFFileDiff
Source§fn clone(&self) -> HFFileDiff
fn clone(&self) -> HFFileDiff
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HFFileDiff
impl Debug for HFFileDiff
impl Eq for HFFileDiff
Source§impl PartialEq for HFFileDiff
impl PartialEq for HFFileDiff
impl StructuralPartialEq for HFFileDiff
Auto Trait Implementations§
impl Freeze for HFFileDiff
impl RefUnwindSafe for HFFileDiff
impl Send for HFFileDiff
impl Sync for HFFileDiff
impl Unpin for HFFileDiff
impl UnsafeUnpin for HFFileDiff
impl UnwindSafe for HFFileDiff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
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
key and return true if they are equal.Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more