pub struct PrewarmContextKey { /* private fields */ }Expand description
Context signature binding pre-warmed route artifacts to resource version, theme, display DPR, and locale.
Implementations§
Source§impl PrewarmContextKey
Constructor helpers for PrewarmContextKey.
impl PrewarmContextKey
Constructor helpers for PrewarmContextKey.
Sourcepub fn hash_locale(locale: &str) -> u64
pub fn hash_locale(locale: &str) -> u64
Sourcepub fn from_context(
resource_version: u64,
theme_mode: ThemeMode,
dpr: f32,
) -> Self
pub fn from_context( resource_version: u64, theme_mode: ThemeMode, dpr: f32, ) -> Self
Sourcepub fn from_full_context(
resource_version: u64,
theme_mode: ThemeMode,
dpr: f32,
locale: &str,
) -> Self
pub fn from_full_context( resource_version: u64, theme_mode: ThemeMode, dpr: f32, locale: &str, ) -> Self
Creates a normalized PrewarmContextKey binding resource_version, theme_mode, dpr, and locale.
§Arguments
u64- Application or bundle resource version.ThemeMode- Active light or dark theme mode.f32- Active display scale factor.&str- Active BCP-47 locale tag.
§Returns
Self- Normalized full context key.
Sourcepub fn with_locale(self, locale: &str) -> Self
pub fn with_locale(self, locale: &str) -> Self
Source§impl PrewarmContextKey
impl PrewarmContextKey
pub fn get_resource_version(&self) -> u64
pub fn get_mut_resource_version(&mut self) -> &mut u64
pub fn set_resource_version(&mut self, val: u64) -> &mut Self
pub fn get_theme_mode(&self) -> ThemeMode
pub fn get_mut_theme_mode(&mut self) -> &mut ThemeMode
pub fn set_theme_mode(&mut self, val: ThemeMode) -> &mut Self
pub fn get_dpr_bits(&self) -> u32
pub fn get_mut_dpr_bits(&mut self) -> &mut u32
pub fn set_dpr_bits(&mut self, val: u32) -> &mut Self
pub fn get_locale_hash(&self) -> u64
pub fn get_mut_locale_hash(&mut self) -> &mut u64
pub fn set_locale_hash(&mut self, val: u64) -> &mut Self
Trait Implementations§
Source§impl Clone for PrewarmContextKey
impl Clone for PrewarmContextKey
impl Copy for PrewarmContextKey
Source§impl Debug for PrewarmContextKey
impl Debug for PrewarmContextKey
Source§impl Default for PrewarmContextKey
impl Default for PrewarmContextKey
impl Eq for PrewarmContextKey
Source§impl Hash for PrewarmContextKey
impl Hash for PrewarmContextKey
Source§impl PartialEq for PrewarmContextKey
impl PartialEq for PrewarmContextKey
impl StructuralPartialEq for PrewarmContextKey
Auto Trait Implementations§
impl Forget for PrewarmContextKey
impl Freeze for PrewarmContextKey
impl Move for PrewarmContextKey
impl RefUnwindSafe for PrewarmContextKey
impl Send for PrewarmContextKey
impl Sync for PrewarmContextKey
impl Unpin for PrewarmContextKey
impl UnsafeUnpin for PrewarmContextKey
impl UnwindSafe for PrewarmContextKey
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