pub enum CostEstimateConfidence {
PricedSample,
VerifiedAllAlreadyStored,
AllSamplesAlreadyStoredIncomplete,
}Expand description
Confidence attached to an UploadCostEstimate’s storage_cost_atto.
estimate_upload_cost prices a file by sampling a few of its chunk
addresses and extrapolating. When every sampled chunk is already stored
there is no live price to extrapolate from, so a "0" cost can mean either
“provably free” (the whole file was sampled) or only “probably free” (the
tail was unsampled). This lets callers tell those apart instead of treating
every "0" as unconditionally free.
Variants§
PricedSample
At least one sampled chunk returned a live quote; storage_cost_atto
is extrapolated from a real per-chunk price. The normal case.
VerifiedAllAlreadyStored
Every chunk in the file was sampled and every one was already stored.
storage_cost_atto is exactly "0" — the upload is genuinely free.
AllSamplesAlreadyStoredIncomplete
Every sampled chunk was already stored, but not all chunks were
sampled. storage_cost_atto is "0" as a best-effort guess; the real
upload reconciles the true cost at payment time. Render this as “likely
already stored”, not a guaranteed-free price.
Trait Implementations§
Source§impl Clone for CostEstimateConfidence
impl Clone for CostEstimateConfidence
Source§fn clone(&self) -> CostEstimateConfidence
fn clone(&self) -> CostEstimateConfidence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CostEstimateConfidence
Source§impl Debug for CostEstimateConfidence
impl Debug for CostEstimateConfidence
Source§impl Default for CostEstimateConfidence
impl Default for CostEstimateConfidence
Source§fn default() -> CostEstimateConfidence
fn default() -> CostEstimateConfidence
Source§impl<'de> Deserialize<'de> for CostEstimateConfidence
impl<'de> Deserialize<'de> for CostEstimateConfidence
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>,
impl Eq for CostEstimateConfidence
Source§impl PartialEq for CostEstimateConfidence
impl PartialEq for CostEstimateConfidence
Source§fn eq(&self, other: &CostEstimateConfidence) -> bool
fn eq(&self, other: &CostEstimateConfidence) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CostEstimateConfidence
impl Serialize for CostEstimateConfidence
impl StructuralPartialEq for CostEstimateConfidence
Auto Trait Implementations§
impl Freeze for CostEstimateConfidence
impl RefUnwindSafe for CostEstimateConfidence
impl Send for CostEstimateConfidence
impl Sync for CostEstimateConfidence
impl Unpin for CostEstimateConfidence
impl UnsafeUnpin for CostEstimateConfidence
impl UnwindSafe for CostEstimateConfidence
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
impl<'de, T> BorrowedRpcObject<'de> for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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