pub enum RefreshOutcome {
Unchanged,
Updated {
provider_count: usize,
model_count: usize,
},
Offline {
reason: &'static str,
},
Failed {
reason: String,
},
}Expand description
Outcome of a single refresh attempt.
Why Result and not Result<_, _>: RefreshOutcome::Failed is returned
as Ok(Failed) on purpose. Lazy on-call refresh should not break the
caller’s success path with an Err — the snapshot still serves stale
data. Callers that want to react to failure use match.
Variants§
Unchanged
Snapshot unchanged (HTTP 304, mtime fresh, etc.).
Updated
Snapshot replaced with newer data.
Fields
Offline
No network attempted; served from stale cache or SNAP.
(e.g. OXICODE_MODELS_DEV_DISABLE_FETCH=1, mtime window fresh.)
Failed
Refresh attempted and failed. Previous snapshot still in effect.
Not an Err — see type-level doc above.
Trait Implementations§
Source§impl Clone for RefreshOutcome
impl Clone for RefreshOutcome
Source§fn clone(&self) -> RefreshOutcome
fn clone(&self) -> RefreshOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RefreshOutcome
impl Debug for RefreshOutcome
Source§impl Deserialize<'static> for RefreshOutcome
impl Deserialize<'static> for RefreshOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RefreshOutcome
impl RefUnwindSafe for RefreshOutcome
impl Send for RefreshOutcome
impl Sync for RefreshOutcome
impl Unpin for RefreshOutcome
impl UnsafeUnpin for RefreshOutcome
impl UnwindSafe for RefreshOutcome
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