pub struct StyleEvalContext {
pub zoom: f32,
}Expand description
Runtime evaluation context for paint/layout values.
This lightweight struct carries zoom-only state and is Copy so it can be
passed cheaply through the style-evaluation pipeline. For feature-state-aware
evaluation, use StyleEvalContextFull which borrows a FeatureState
map alongside the zoom level.
Fields§
§zoom: f32Current map zoom level.
Implementations§
Source§impl StyleEvalContext
impl StyleEvalContext
Sourcepub fn with_feature_state(
self,
feature_state: &FeatureState,
) -> StyleEvalContextFull<'_>
pub fn with_feature_state( self, feature_state: &FeatureState, ) -> StyleEvalContextFull<'_>
Promote to a full evaluation context that includes per-feature state.
This is the bridge between the fast zoom-only path and the richer feature-state-aware path used during hover/selection restyling.
Trait Implementations§
Source§impl Clone for StyleEvalContext
impl Clone for StyleEvalContext
Source§fn clone(&self) -> StyleEvalContext
fn clone(&self) -> StyleEvalContext
Returns a duplicate of the value. Read more
1.0.0 · 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 StyleEvalContext
impl Debug for StyleEvalContext
Source§impl Default for StyleEvalContext
impl Default for StyleEvalContext
Source§impl PartialEq for StyleEvalContext
impl PartialEq for StyleEvalContext
impl Copy for StyleEvalContext
impl StructuralPartialEq for StyleEvalContext
Auto Trait Implementations§
impl Freeze for StyleEvalContext
impl RefUnwindSafe for StyleEvalContext
impl Send for StyleEvalContext
impl Sync for StyleEvalContext
impl Unpin for StyleEvalContext
impl UnsafeUnpin for StyleEvalContext
impl UnwindSafe for StyleEvalContext
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