pub struct EvaluatedLayer<'a> { /* private fields */ }Expand description
Borrowed view of an evaluated custom style layer.
Implementations§
Source§impl<'a> EvaluatedLayer<'a>
impl<'a> EvaluatedLayer<'a>
Sourcepub fn paint_is_constant(&self, slot: u32) -> bool
pub fn paint_is_constant(&self, slot: u32) -> bool
Returns true if paint property slot has a constant (non-data-driven) value.
Sourcepub fn paint_f32_constant_or(&self, slot: u32, fallback: f32) -> Result<f32>
pub fn paint_f32_constant_or(&self, slot: u32, fallback: f32) -> Result<f32>
Reads a float paint property if constant, or returns fallback when data-driven.
Sourcepub fn paint_bool(&self, slot: u32) -> Result<bool>
pub fn paint_bool(&self, slot: u32) -> Result<bool>
Reads a constant bool paint property.
Sourcepub fn paint_color(&self, slot: u32) -> Result<Color>
pub fn paint_color(&self, slot: u32) -> Result<Color>
Reads a constant color paint property.
Sourcepub fn paint_color_constant_or(
&self,
slot: u32,
fallback: Color,
) -> Result<Color>
pub fn paint_color_constant_or( &self, slot: u32, fallback: Color, ) -> Result<Color>
Reads a color paint property if constant, or returns fallback when data-driven.
Sourcepub fn paint_vec2(&self, slot: u32) -> Result<Vec2>
pub fn paint_vec2(&self, slot: u32) -> Result<Vec2>
Reads a constant 2-vector paint property.
Sourcepub fn paint_lat_lng(&self, slot: u32) -> Result<LatLng>
pub fn paint_lat_lng(&self, slot: u32) -> Result<LatLng>
Reads a constant geographic position paint property.
Sourcepub fn paint_rotation_degrees(&self, slot: u32) -> Result<f32>
pub fn paint_rotation_degrees(&self, slot: u32) -> Result<f32>
Reads a constant rotation paint property in degrees.
Sourcepub fn paint_str(&self, slot: u32) -> Result<&'a str>
pub fn paint_str(&self, slot: u32) -> Result<&'a str>
Reads a constant string (or enum label) paint property.
Sourcepub fn paint_enum(&self, slot: u32) -> Result<u32>
pub fn paint_enum(&self, slot: u32) -> Result<u32>
Reads a constant enum paint property as its 0-based variant index.
Trait Implementations§
Source§impl<'a> Clone for EvaluatedLayer<'a>
impl<'a> Clone for EvaluatedLayer<'a>
impl<'a> Copy for EvaluatedLayer<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EvaluatedLayer<'a>
impl<'a> !Send for EvaluatedLayer<'a>
impl<'a> !Sync for EvaluatedLayer<'a>
impl<'a> !UnwindSafe for EvaluatedLayer<'a>
impl<'a> Forget for EvaluatedLayer<'a>
impl<'a> Freeze for EvaluatedLayer<'a>where
&'a dyn EvaluatedLayerBackend: Freeze,
impl<'a> Move for EvaluatedLayer<'a>
impl<'a> Unpin for EvaluatedLayer<'a>where
&'a dyn EvaluatedLayerBackend: Unpin,
impl<'a> UnsafeUnpin for EvaluatedLayer<'a>where
&'a dyn EvaluatedLayerBackend: UnsafeUnpin,
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