pub enum ResourceStatus {
Active,
Committed {
final_len: Option<u64>,
},
Failed(String),
Cancelled,
}Expand description
Status of a resource.
Variants§
Active
Resource is open for writing (streaming in progress).
Committed
Resource has been committed (all data written).
Failed(String)
Resource encountered an error.
Cancelled
Resource’s cancellation token has fired and the data
lifecycle has not progressed past Active (no committed
bytes, no recorded failure).
Committed { .. } and Failed(_) retain priority because
their data outcomes already classify the resource — observers
that want to read the bytes a Committed resource produced
before being cancelled need not be denied. Treat Cancelled
as the routine shutdown signal that supersedes Active
only when there is no other lifecycle classification to
surface.
Trait Implementations§
Source§impl Clone for ResourceStatus
impl Clone for ResourceStatus
Source§fn clone(&self) -> ResourceStatus
fn clone(&self) -> ResourceStatus
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 ResourceStatus
impl Debug for ResourceStatus
Source§impl PartialEq for ResourceStatus
impl PartialEq for ResourceStatus
Source§fn eq(&self, other: &ResourceStatus) -> bool
fn eq(&self, other: &ResourceStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ResourceStatus
impl StructuralPartialEq for ResourceStatus
Auto Trait Implementations§
impl Freeze for ResourceStatus
impl RefUnwindSafe for ResourceStatus
impl Send for ResourceStatus
impl Sync for ResourceStatus
impl Unpin for ResourceStatus
impl UnsafeUnpin for ResourceStatus
impl UnwindSafe for ResourceStatus
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