pub struct RoutePrewarmTask { /* private fields */ }Expand description
Bounded speculative task queued to pre-warm a target route without competing with foreground frames.
Implementations§
Source§impl RoutePrewarmTask
Builder helpers for RoutePrewarmTask.
impl RoutePrewarmTask
Builder helpers for RoutePrewarmTask.
Sourcepub fn new(
route_key: String,
kind: PrewarmWorkKind,
context: PrewarmContextKey,
estimated_bytes: usize,
estimated_us: u64,
) -> Self
pub fn new( route_key: String, kind: PrewarmWorkKind, context: PrewarmContextKey, estimated_bytes: usize, estimated_us: u64, ) -> Self
Creates a new bounded route pre-warm task descriptor.
§Arguments
String- Target route key.PrewarmWorkKind- Pre-warm phase kind.PrewarmContextKey- Active context signature(version, theme, DPR).usize- Estimated memory/upload footprint in bytes.u64- Estimated execution cost in microseconds.
§Returns
Self- Ready pre-warm task descriptor with default priority1.
Sourcepub fn with_priority(self, priority: u8) -> Self
pub fn with_priority(self, priority: u8) -> Self
Source§impl RoutePrewarmTask
impl RoutePrewarmTask
pub fn get_route_key(&self) -> &String
pub fn get_mut_route_key(&mut self) -> &mut String
pub fn set_route_key(&mut self, val: String) -> &mut Self
pub fn get_kind(&self) -> PrewarmWorkKind
pub fn get_mut_kind(&mut self) -> &mut PrewarmWorkKind
pub fn set_kind(&mut self, val: PrewarmWorkKind) -> &mut Self
pub fn get_context(&self) -> PrewarmContextKey
pub fn get_mut_context(&mut self) -> &mut PrewarmContextKey
pub fn set_context(&mut self, val: PrewarmContextKey) -> &mut Self
pub fn get_estimated_bytes(&self) -> usize
pub fn get_mut_estimated_bytes(&mut self) -> &mut usize
pub fn set_estimated_bytes(&mut self, val: usize) -> &mut Self
pub fn get_estimated_us(&self) -> u64
pub fn get_mut_estimated_us(&mut self) -> &mut u64
pub fn set_estimated_us(&mut self, val: u64) -> &mut Self
pub fn get_priority(&self) -> u8
pub fn get_mut_priority(&mut self) -> &mut u8
pub fn set_priority(&mut self, val: u8) -> &mut Self
Trait Implementations§
Source§impl Clone for RoutePrewarmTask
impl Clone for RoutePrewarmTask
Source§impl Debug for RoutePrewarmTask
impl Debug for RoutePrewarmTask
Source§impl Default for RoutePrewarmTask
impl Default for RoutePrewarmTask
Source§impl PartialEq for RoutePrewarmTask
impl PartialEq for RoutePrewarmTask
impl StructuralPartialEq for RoutePrewarmTask
Auto Trait Implementations§
impl Forget for RoutePrewarmTask
impl Freeze for RoutePrewarmTask
impl Move for RoutePrewarmTask
impl RefUnwindSafe for RoutePrewarmTask
impl Send for RoutePrewarmTaskwhere
RawVecInner: Send,
impl Sync for RoutePrewarmTaskwhere
RawVecInner: Sync,
impl Unpin for RoutePrewarmTask
impl UnsafeUnpin for RoutePrewarmTask
impl UnwindSafe for RoutePrewarmTaskwhere
RawVecInner: UnwindSafe,
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