pub struct LayoutCx<'a, T: StyleLayerType> { /* private fields */ }Expand description
What a layout reads of its tile while it selects features.
Implementations§
Source§impl<'a, T: StyleLayerType> LayoutCx<'a, T>
impl<'a, T: StyleLayerType> LayoutCx<'a, T>
Sourcepub fn layers(&self) -> &'a [Arc<EvaluatedLayer<T>>]
pub fn layers(&self) -> &'a [Arc<EvaluatedLayer<T>>]
The layers of the group, its leader first, whose style the layout’s layout properties and filter are.
Sourcepub fn tile(&self) -> OverscaledTileID
pub fn tile(&self) -> OverscaledTileID
The tile.
Sourcepub fn pixel_ratio(&self) -> f32
pub fn pixel_ratio(&self) -> f32
The device pixels per logical pixel that the map draws at.
Sourcepub fn global_state(&self) -> Option<&'a Arc<GlobalStateMap>>
pub fn global_state(&self) -> Option<&'a Arc<GlobalStateMap>>
The style’s global state, which global-state expressions read.
Sourcepub fn parameters(&self) -> PropertyEvaluationParameters
pub fn parameters(&self) -> PropertyEvaluationParameters
What the layout properties evaluate with: the tile’s zoom and the style’s global state.
Sourcepub fn font_faces(&self) -> Option<&'a Arc<FontFaces>>
pub fn font_faces(&self) -> Option<&'a Arc<FontFaces>>
The style’s font faces, which draw text in the scripts of their ranges, and its fallback faces after them.
Sourcepub fn has_glyphs(&self) -> bool
pub fn has_glyphs(&self) -> bool
Whether the style has glyphs of its own, a glyphs URL.
Sourcepub fn available_images(&self) -> &'a VecSet<String>
pub fn available_images(&self) -> &'a VecSet<String>
The images that exist, which image expressions branch on.
Where image expressions record the images they find unavailable.
Sourcepub fn source_layer(&self) -> Result<TileLayer<'a>, Error>
pub fn source_layer(&self) -> Result<TileLayer<'a>, Error>
The tile’s source layer.
Sourcepub fn source_layer_name(&self) -> &'a str
pub fn source_layer_name(&self) -> &'a str
The name of the tile’s source layer that the layers lay out.
Sourcepub fn filter_context(&self) -> EvaluationContext<'a>
pub fn filter_context(&self) -> EvaluationContext<'a>
What the leader’s filter evaluates with apart from the feature: the tile’s zoom and id and the style’s global state.
Sourcepub fn select(
&mut self,
layer: &TileLayer<'_>,
context: EvaluationContext<'a>,
) -> Selection<'a>
pub fn select( &mut self, layer: &TileLayer<'_>, context: EvaluationContext<'a>, ) -> Selection<'a>
The features of layer, the tile’s source layer, that the leader’s
filter selects, evaluated with context (filter_context).
Sourcepub fn need_image(&mut self, id: &str, kind: ImageType)
pub fn need_image(&mut self, id: &str, kind: ImageType)
Asks for the style’s image id, as kind, unless it is asked for.
Sourcepub fn glyphs(&mut self) -> &mut GlyphDependencies
pub fn glyphs(&mut self) -> &mut GlyphDependencies
The glyphs and shapings the layout asks for.
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for LayoutCx<'a, T>
impl<'a, T> !Send for LayoutCx<'a, T>
impl<'a, T> !Sync for LayoutCx<'a, T>
impl<'a, T> !UnwindSafe for LayoutCx<'a, T>
impl<'a, T> Forget for LayoutCx<'a, T>
impl<'a, T> Freeze for LayoutCx<'a, T>where
&'a [Arc<EvaluatedLayer<T>>]: Freeze,
&'a SourceLayer: Freeze,
&'a BucketParameters: Freeze,
&'a Arc<Vec<FontFace>>: Freeze,
&'a mut GlyphDependencies: Freeze,
&'a mut HashMap<String, ImageType, RandomState>: Freeze,
&'a VecSet<String>: Freeze,
&'a UnavailableImages: Freeze,
&'a mut FilterGroups: Freeze,
impl<'a, T> Move for LayoutCx<'a, T>
impl<'a, T> Unpin for LayoutCx<'a, T>where
&'a [Arc<EvaluatedLayer<T>>]: Unpin,
&'a SourceLayer: Unpin,
&'a BucketParameters: Unpin,
&'a Arc<Vec<FontFace>>: Unpin,
&'a mut GlyphDependencies: Unpin,
&'a mut HashMap<String, ImageType, RandomState>: Unpin,
&'a VecSet<String>: Unpin,
&'a UnavailableImages: Unpin,
&'a mut FilterGroups: Unpin,
impl<'a, T> UnsafeUnpin for LayoutCx<'a, T>where
&'a [Arc<EvaluatedLayer<T>>]: UnsafeUnpin,
&'a SourceLayer: UnsafeUnpin,
&'a BucketParameters: UnsafeUnpin,
&'a Arc<Vec<FontFace>>: UnsafeUnpin,
&'a mut GlyphDependencies: UnsafeUnpin,
&'a mut HashMap<String, ImageType, RandomState>: UnsafeUnpin,
&'a VecSet<String>: UnsafeUnpin,
&'a UnavailableImages: UnsafeUnpin,
&'a mut FilterGroups: 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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.