#[non_exhaustive]pub enum ResourceOutcome {
Ready {
bytes: Vec<u8>,
cache: CachePolicy,
},
WouldBlock,
NotFound,
}Available on crate feature
std only.Expand description
The result of MediaStore::resolve_resource: the resource’s bytes are
ready, the request should wait (a preload-hinted part not yet produced),
or the resource does not (and, for a part whose segment already closed
without it, will never) exist.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ready
The resource’s bytes, plus the cache policy an adapter should apply.
WouldBlock
A preload-hinted part that hasn’t been produced yet — wait for
super::MediaStore::listen and re-resolve.
NotFound
The named resource does not exist and never will (unknown filename shape, or a part whose segment closed without ever producing it).
Trait Implementations§
Source§impl Clone for ResourceOutcome
impl Clone for ResourceOutcome
Source§fn clone(&self) -> ResourceOutcome
fn clone(&self) -> ResourceOutcome
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 ResourceOutcome
impl Debug for ResourceOutcome
impl Eq for ResourceOutcome
Source§impl PartialEq for ResourceOutcome
impl PartialEq for ResourceOutcome
impl StructuralPartialEq for ResourceOutcome
Auto Trait Implementations§
impl Freeze for ResourceOutcome
impl RefUnwindSafe for ResourceOutcome
impl Send for ResourceOutcome
impl Sync for ResourceOutcome
impl Unpin for ResourceOutcome
impl UnsafeUnpin for ResourceOutcome
impl UnwindSafe for ResourceOutcome
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