Skip to main content

FetchReport

Struct FetchReport 

Source
pub struct FetchReport {
    pub hash_kind: Kind,
    pub advertised: Vec<AdvertisedRef>,
    pub updates: Vec<RefUpdatePlan>,
    pub receipt: Option<PackReceipt>,
    pub objects_total: u32,
    pub objects_done: u32,
    pub pack_bytes: u64,
    pub haves_sent: usize,
    pub acked: Vec<ObjectId>,
    pub rounds: usize,
}
Expand description

What one fetch did.

Fields§

§hash_kind: Kind

The hash kind the exchange ran at.

§advertised: Vec<AdvertisedRef>

Every reference the remote advertised, whether or not it was wanted.

§updates: Vec<RefUpdatePlan>

The references the caller’s plan chose, and where they would move.

§receipt: Option<PackReceipt>

What the PackIngest said, or None when there was nothing to fetch.

None is the ordinary answer for a mirror polling a remote that has not moved: no want, no command=fetch, no pack, and no walk charged to the server.

§objects_total: u32

The object count the packfile declared, read from bytes 8..12 of its header before a single object was stored.

This is the denominator a progress bar needs, and it is available at the start of the transfer rather than the end. Zero when no pack was fetched.

§objects_done: u32

The object count the ingest actually indexed, from the receipt.

Equal to Self::objects_total or the fetch fails; see FetchPack::fetch. The numerator’s live progress belongs to the ingest and not to this module: counting objects as they pass means inflating every one of them, which is a whole second pack decoder, and gunnar already has exactly one (one implementation). What this module can report live — and does, through FetchProgress — is the declared total the moment the header arrives, and the byte count as it streams.

§pack_bytes: u64

Packfile bytes handed to the ingest, header and trailer included.

§haves_sent: usize

How many have lines were offered.

§acked: Vec<ObjectId>

Every ACK <oid> the remote sent, in order.

§rounds: usize

How many command=fetch rounds were spent. Zero when nothing was wanted, one when the remote was ready immediately, otherwise two.

Trait Implementations§

Source§

impl Clone for FetchReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FetchReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more