Skip to main content

Renderer

Struct Renderer 

Source
pub struct Renderer { /* private fields */ }
Expand description

Draws a map’s updates into the frames of one backend’s Gpu: it keeps the map’s sources, tiles and layers between frames, and the GPU objects they draw with.

The renderer holds no Gpu. Each call that makes, draws or frees its GPU objects takes the one it was made for, which its host lends it, as it does to the target that the renderer draws into. A frame runs in the host, with one Gpu lent to all of it:

ⓘ
let frame = renderer.update(gpu, &update)?;
let image = target.begin_frame(gpu)?;
let drawn = renderer.render(gpu, &image, frame);
let handoff = target.end_frame(gpu);
renderer.finish_frame(gpu, drawn, handoff);

tear_down frees the renderer’s GPU objects. A renderer dropped without it leaves them to the Gpu, which frees them when it drops, and runs the work after the GPU that its layers queued as lost (GpuEnd::Lost).

Implementations§

Source§

impl Renderer

Source

pub fn with_glyph_cache( gpu: &dyn Gpu, pixel_ratio: f32, local_glyphs: LocalGlyphs, glyph_cache: Arc<GlyphCache>, registry: Arc<Registry>, waker: Waker, pool: &Pool, ) -> Self

A renderer that uses glyph_cache, which draws the layer and source types of registry, runs its background work on pool and draws local_glyphs. Its chooser of the device’s fonts runs there too, one choice at a time, never on the thread that calls the renderer.

waker runs, on any thread, when something the renderer waits for arrives, such as a tile’s data or a font engine that got ready: the host asks the renderer’s map for an update for it, as by pushing RendererEvent::Invalidate to the queue the renderer reports to (set_event_queue). It must not call the renderer.

The renderer draws with gpu and only with it: every later call that takes a Gpu takes this one.

The map that the renderer draws must have a registry filled by the same calls as registry: a layer whose type registry lacks isn’t drawn. Renderers given the same GlyphCache share the glyphs they parse from glyph PBFs.

Source

pub fn with_fonts( gpu: &dyn Gpu, pixel_ratio: f32, local_glyphs: LocalGlyphs, glyph_cache: Arc<GlyphCache>, font_face_engine: Arc<dyn FontFaceEngine>, registry: Arc<Registry>, waker: Waker, pool: &Pool, ) -> Self

A renderer that uses glyph_cache, loads the font files of a style’s font faces with font_face_engine instead of font_face_engine::default_engine().

Source

pub fn set_pixel_ratio(&mut self, pixel_ratio: f32)

Draws at pixel_ratio device pixels per logical pixel from the next frame on, which should be the map’s (Map::set_pixel_ratio). The renderer makes its shaders and draws again, frees the ones they replace, and keeps its tiles. The host sizes the backend’s framebuffer for the new ratio.

Source

pub fn set_tile_workers(&mut self, workers: RemoteWorkers)

Runs the tiles’ jobs, and the raster tiles’ workers, in workers (by default on the renderer’s pool). Set it before the first render so that every tile uses it.

Source

pub fn receive_tiles(&mut self)

Takes in what arrived for the tiles since the last frame (their data, their jobs’ replies, glyphs) and starts the jobs it makes ready. Each frame does this first; a host that draws frames on a clock calls it as soon as the renderer asks for an update, so that the tiles’ work doesn’t wait for the next frame to start.

Source

pub fn set_event_queue(&mut self, events: Option<RendererEvents>)

Sets the queue the renderer pushes its events to: the map’s, which the map’s frontend passes on.

Source

pub fn update( &mut self, gpu: &mut dyn Gpu, update_parameters: &Arc<UpdateParameters>, ) -> Option<UpdatedFrame>

Brings the renderer’s state to update_parameters: its style, sources, tiles, layers and placement. Returns the frame to draw, which the host renders into a frame of its target, or None when there is nothing to draw: a still image that hasn’t loaded yet. The work after the GPU that layers queued (AfterGpu) runs once gpu finished.

Source

pub fn render( &mut self, gpu: &mut dyn Gpu, image: &FrameImage, frame: UpdatedFrame, ) -> DrawnFrame

Draws frame, which the last update returned, into image, textures of gpu that the host’s target began a frame with, and submits the frame’s passes. Returns the frame, which the host ends on its target, whether or not it failed (DrawnFrame::error), and then finishes.

Source

pub fn finish_frame( &mut self, gpu: &mut dyn Gpu, frame: DrawnFrame, handoff: Handoff, )

Ends frame, which render drew, once the host’s target handed it off as handoff: destroys what the frame replaced and reports the frame with its rendering stats, and with its error if it failed.

Source

pub fn drop_on_workers<T: Send + 'static>(&self, value: T)

Drops value on the renderer’s workers instead of this thread, for data that would take a frame long to free, such as the sources of an earlier update. The renderer’s drop waits for it.

Source

pub fn frame_projection(&self) -> Option<FrameProjection>

Where the last frame that render drew put the map, or None before the first.

Source

pub fn query_rendered_features( &mut self, geometry: &[ScreenCoordinate], options: &RenderedQueryOptions, ) -> Result<Vec<Feature>, Error>

The features drawn in geometry, a point or a polygon in screen coordinates. Err for a malformed tile.

Source

pub fn query_rendered_features_at_point( &mut self, point: &ScreenCoordinate, options: &RenderedQueryOptions, ) -> Result<Vec<Feature>, Error>

Source

pub fn query_rendered_features_in_box( &mut self, min: &ScreenCoordinate, max: &ScreenCoordinate, options: &RenderedQueryOptions, ) -> Result<Vec<Feature>, Error>

Source

pub fn query_source_features( &mut self, source_id: &str, options: &SourceQueryOptions, ) -> Result<Vec<Feature>, Error>

Source

pub fn query_feature_extensions( &self, source_id: &str, feature: &Feature, extension: &str, extension_field: &str, args: Option<&PropertyMap>, ) -> Result<FeatureExtensionValue, Error>

Queries a feature extension: for a GeoJSON source with cluster on, the “supercluster” extension’s “children”, “leaves” or “expansion-zoom” of a cluster feature (one with a cluster_id property). Anything else is a null value. Err for a cluster ID the source doesn’t have.

Source

pub fn placed_symbols_data(&self) -> Vec<PlacedSymbolData>

The data of the symbols the last placement placed, when collect_placed_symbol_data turned their collection on.

Source

pub fn dump_debug_logs(&self)

Logs every render source’s tiles and the image manager’s state.

Source

pub fn set_feature_state( &mut self, source_id: &str, source_layer_id: Option<&str>, feature_id: &str, state: &FeatureState, )

Merges state into a feature’s state.

An update whose feature state for the source differs from the last update’s replaces the source’s state with the update’s, undoing what this and remove_feature_state did. A renderer that a map drives takes its state from the map’s set_feature_state.

Source

pub fn feature_state( &self, source_id: &str, source_layer_id: Option<&str>, feature_id: &str, ) -> FeatureState

The state of a feature.

Source

pub fn remove_feature_state( &mut self, source_id: &str, source_layer_id: Option<&str>, feature_id: Option<&str>, state_key: Option<&str>, )

Removes a key of a feature’s state, a feature’s whole state, or a source layer’s. An update replaces the source’s state as it does for set_feature_state.

Source

pub fn collect_placed_symbol_data(&mut self, enable: bool)

Source

pub fn set_tile_cache_enabled(&mut self, enable: bool)

Source

pub fn tile_cache_enabled(&self) -> bool

Whether the renderer keeps tiles that left the view, to show them again without loading them.

Source

pub fn lose_context(&mut self)

Drops every layer, and runs the work after the GPU as lost (GpuEnd::Lost). Call it only before the renderer goes, when its device or target went first: the renderer’s other GPU objects stay those of the lost device.

Source

pub fn reduce_memory_use(&mut self, gpu: &mut dyn Gpu)

Lets go of what the orchestrator caches, destroys what it and the renderer released, and waits for gpu, so that its work finishes before the app goes to the background.

Source

pub fn rendering_stats(&self) -> RenderingStats

The rendering stats, which count the renderer’s resources until it destroys them: a buffer or texture counts until the end of the frame that follows its release, or until reduce_memory_use.

Source

pub fn clear_data(&mut self, gpu: &mut dyn Gpu)

Lets go of the map’s data: its sources, tiles and layers, which the next update loads again. The work after the GPU runs once gpu finished.

Source

pub fn tear_down(self, gpu: &mut dyn Gpu) -> RenderingStats

Destroys the renderer’s GPU objects on gpu, and runs the work after the GPU once gpu finished. Returns its rendering stats as it leaves them, with all its resources released.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Renderer

§

impl !Send for Renderer

§

impl !Sync for Renderer

§

impl !UnwindSafe for Renderer

§

impl Forget for Renderer

§

impl Freeze for Renderer
where *const ArcInner<Registry> is !null: Freeze, PhantomData<ArcInner<Registry>>: Freeze, *const u8 is !null: Freeze, PhantomData<RendererEvent>: Freeze, PhantomData<(SourceKey, SourceTiles)>: Freeze, PhantomData<SourceKey>: Freeze, *mut Counter<Channel<TileEvent>>: Freeze, *mut Counter<Channel<TileEvent>>: Freeze, *mut Counter<Channel<TileEvent>>: Freeze, *const ArcInner<dyn Fn() + Sync + Send> is !null: Freeze, PhantomData<ArcInner<dyn Fn() + Sync + Send>>: Freeze, *const dyn TileWorkers is !null: Freeze, PhantomData<dyn TileWorkers>: Freeze, PhantomData<(JobId, Lane)>: Freeze, PhantomData<(DataKey, Lane)>: Freeze, PhantomData<u8>: Freeze, PhantomData<(Vec<String>, Entry)>: Freeze, *const ArcInner<dyn FontChooser> is !null: Freeze, PhantomData<ArcInner<dyn FontChooser>>: Freeze, *const ArcInner<dyn LocalGlyphRasterizer> is !null: Freeze, PhantomData<ArcInner<dyn LocalGlyphRasterizer>>: Freeze, *const ArcInner<GlyphCache> is !null: Freeze, PhantomData<ArcInner<GlyphCache>>: Freeze, *const ArcInner<Workers> is !null: Freeze, PhantomData<ArcInner<Workers>>: Freeze, *const ArcInner<Lane> is !null: Freeze, PhantomData<ArcInner<Lane>>: Freeze, PhantomData<Vec<String>>: Freeze, PhantomData<Vec<Vec<char>>>: Freeze, PhantomData<FontFace>: Freeze, PhantomData<(Vec<String>, GlyphRange)>: Freeze, *const ArcInner<Vec<FontFace>> is !null: Freeze, PhantomData<ArcInner<Vec<FontFace>>>: Freeze, *const ArcInner<dyn FontFaceEngine> is !null: Freeze, PhantomData<ArcInner<dyn FontFaceEngine>>: Freeze, *const ArcInner<Mutex<RawMutex, EngineReadiness>> is !null: Freeze, PhantomData<ArcInner<Mutex<RawMutex, EngineReadiness>>>: Freeze, PhantomData<(FontData, Vec<String>, GlyphRange, u64)>: Freeze, PhantomData<VecMap<GlyphIDType, Rc<dyn FontFaceShaper>>>: Freeze, PhantomData<String>: Freeze, PhantomData<Arc<Impl>>: Freeze, *const ArcInner<VecSet<String>> is !null: Freeze, PhantomData<ArcInner<VecSet<String>>>: Freeze, PhantomData<u64>: Freeze, PhantomData<Page>: Freeze, PhantomData<(ImageAllocationKey, ImageAllocation)>: Freeze, PhantomData<(BinKey, ImageAllocationKey)>: Freeze, PhantomData<(GlyphAllocationKey, GlyphAllocation)>: Freeze, PhantomData<(BinKey, GlyphAllocationKey)>: Freeze, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: Freeze, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: Freeze, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: Freeze, *const ArcInner<dyn FileSource> is !null: Freeze, PhantomData<ArcInner<dyn FileSource>>: Freeze, PhantomData<StoreEvent>: Freeze, PhantomData<FoundTile>: Freeze, *const ArcInner<Style> is !null: Freeze, PhantomData<ArcInner<Style>>: Freeze, PhantomData<Source>: Freeze, PhantomData<(String, Box<dyn RenderSource>)>: Freeze, PhantomData<Box<dyn RenderLayer>>: Freeze, PhantomData<(String, usize)>: Freeze, *const ArcInner<Light> is !null: Freeze, PhantomData<ArcInner<Light>>: Freeze, *const Transitioning<PropertyValue<LightAnchorType>> is !null: Freeze, PhantomData<Transitioning<PropertyValue<LightAnchorType>>>: Freeze, *const ArcInner<Expr> is !null: Freeze, PhantomData<ArcInner<Expr>>: Freeze, *const ArcInner<VecMap<String, Value>> is !null: Freeze, PhantomData<ArcInner<VecMap<String, Value>>>: Freeze, PhantomData<AnchorOffsetPair>: Freeze, *const ArcInner<Collator> is !null: Freeze, PhantomData<ArcInner<Collator>>: Freeze, PhantomData<FormattedSection>: Freeze, PhantomData<Value>: Freeze, PhantomData<fn() -> LightAnchorType>: Freeze, *const Transitioning<PropertyValue<Position>> is !null: Freeze, PhantomData<Transitioning<PropertyValue<Position>>>: Freeze, PhantomData<fn() -> Position>: Freeze, *const Transitioning<PropertyValue<Color>> is !null: Freeze, PhantomData<Transitioning<PropertyValue<Color>>>: Freeze, PhantomData<fn() -> Color>: Freeze, *const Transitioning<PropertyValue<f32>> is !null: Freeze, PhantomData<Transitioning<PropertyValue<f32>>>: Freeze, PhantomData<fn() -> f32>: Freeze, *const ArcInner<Sky> is !null: Freeze, PhantomData<ArcInner<Sky>>: Freeze, *const ArcInner<TerrainElevation> is !null: Freeze, PhantomData<ArcInner<TerrainElevation>>: Freeze, PhantomData<(IndexedSubfeature, Shape)>: Freeze, PhantomData<Vec<u32>>: Freeze, PhantomData<(u32, RetainedQueryData)>: Freeze, *const PlacementState is !null: Freeze, PhantomData<PlacementState>: Freeze, PhantomData<PlacedSymbolData>: Freeze, PhantomData<Box<dyn ErasedPlacement>>: Freeze, PhantomData<FrameLayer>: Freeze, PhantomData<(usize, PlacingLayer)>: Freeze, PhantomData<Vec<PlacingLayer>>: Freeze, PhantomData<Arc<dyn ErasedEvaluatedLayer>>: Freeze, PhantomData<OverscaledTileID>: Freeze, PhantomData<TileState>: Freeze, PhantomData<(usize, usize)>: Freeze, PhantomData<Slot<Mesh>>: Freeze, NonZero<u64>: Freeze, PhantomData<GroupDraw>: Freeze, NonZero<u32>: Freeze, *const RcInner<ReleaseQueue> is !null: Freeze, PhantomData<RcInner<ReleaseQueue>>: Freeze, PhantomData<(SimpleIdentity, MeshBindings)>: Freeze, PhantomData<UnwrappedTileID>: Freeze, PhantomData<Option<GroupDraw>>: Freeze, PhantomData<(i64, usize)>: Freeze, PhantomData<Pushed>: Freeze, PhantomData<ProgramBlocks>: Freeze, PhantomData<(&'static Block, Range<usize>)>: Freeze, *const LeafNode<(u8, bool, bool), RawGlobeTileMesh> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<((u8, bool, bool), RawGlobeTileMesh)>>: Freeze, *const RcInner<Holder<MeshKey>> is !null: Freeze, PhantomData<RcInner<Holder<MeshKey>>>: Freeze, &'static Program: Freeze, PhantomData<TerrainTile>: Freeze, PhantomData<(CanonicalTileID, (f32, f32))>: Freeze, PhantomData<Drape>: Freeze, PhantomData<Targets>: Freeze, PhantomData<StackDraws>: Freeze, *const ArcInner<[String]> is !null: Freeze, PhantomData<ArcInner<[String]>>: Freeze, PhantomData<SharedMesh>: Freeze, PhantomData<(SimpleIdentity, (Shared<TextureKey>, u64))>: Freeze, PhantomData<(SimpleIdentity, ())>: Freeze, *const RcInner<Holder<TextureKey>> is !null: Freeze, PhantomData<RcInner<Holder<TextureKey>>>: Freeze, PhantomData<(CanonicalTileID, (Shared<TextureKey>, u32))>: Freeze, *const u32 is !null: Freeze, PhantomData<u32>: Freeze, *const (usize, Option<SurfaceLight>) is !null: Freeze, PhantomData<(usize, Option<SurfaceLight>)>: Freeze, PhantomData<(Arc<str>, TextureChannelDataType)>: Freeze, PhantomData<(usize, Result<usize, Arc<str>>)>: Freeze, PhantomData<(Arc<str>, TextureChannelDataType, Target)>: Freeze, PhantomData<(Box<str>, Warning)>: Freeze, PhantomData<FrameLayer>: Freeze, PhantomData<usize>: Freeze, PhantomData<Run>: Freeze, PhantomData<(SamplerState, SamplerId)>: Freeze, PhantomData<(String, String)>: Freeze, PhantomData<((&'static Program, u16, ProjectionVariant), ShaderKey)>: Freeze, PhantomData<(ShaderKey, ShaderId)>: Freeze, PhantomData<(PipelineKey, PipelineId)>: Freeze, PhantomData<(AttributeDataType, (usize, Rc<Buffer>))>: Freeze, PhantomData<Box<Chunk<Texture2D>>>: Freeze, PhantomData<fn() -> TextureKey>: Freeze, PhantomData<Box<Chunk<Indexes>>>: Freeze, PhantomData<fn() -> IndexesKey>: Freeze, *const RcInner<Holder<IndexesKey>> is !null: Freeze, PhantomData<Box<Chunk<Option<Box<DrawObjects>>>>>: Freeze, PhantomData<fn() -> MeshKey>: Freeze, PhantomData<Box<Chunk<TargetObjects>>>: Freeze, PhantomData<fn() -> TargetKey>: Freeze, PhantomData<Target>: Freeze, PhantomData<Box<Chunk<Vertices>>>: Freeze, PhantomData<fn() -> VerticesKey>: Freeze, PhantomData<Release>: Freeze, PhantomData<ResourceId>: Freeze, *const RcInner<Cell<Vec<Box<dyn FnOnce(GpuEnd)>>>> is !null: Freeze, PhantomData<RcInner<Cell<Vec<Box<dyn FnOnce(GpuEnd)>>>>>: Freeze, *const LeafNode<(u8, bool, bool, bool), Mesh> is !null: Freeze, PhantomData<Box<((u8, bool, bool, bool), Mesh)>>: Freeze, *const LeafNode<UnwrappedTileID, (usize, [(u8, bool, bool, bool); 2])> is !null: Freeze, PhantomData<Box<(UnwrappedTileID, (usize, [(u8, bool, bool, bool); 2]))>>: Freeze, PhantomData<Owned<BindingsId>>: Freeze, PhantomData<(TargetFormats, PipelineId)>: Freeze, PhantomData<Held>: Freeze, PhantomData<(SimpleIdentity, Composite)>: Freeze, *const ArcInner<Shared<RendererEvent>> is !null: Freeze, PhantomData<ArcInner<Shared<RendererEvent>>>: Freeze,

§

impl Move for Renderer

§

impl Unpin for Renderer
where Arc<Registry>: Unpin, *const u8 is !null: Unpin, Arc<RenderingStats>: Unpin, Box<Error>: Unpin, Arc<dyn Elevation>: Unpin, NonZero<u16>: Unpin, Box<dyn ErasedOrigin>: Unpin, Arc<StatesNode>: Unpin, Arc<Atomic<u32>>: Unpin, Box<dyn Any>: Unpin, Box<Layout>: Unpin, Arc<Vec<u8>>: Unpin, Arc<Atomic<bool>>: Unpin, Box<dyn ErasedBucket>: Unpin, Arc<dyn ErasedEvaluatedLayer>: Unpin, Arc<FeatureIndex>: Unpin, Arc<Resolved>: Unpin, Rc<TileAtlases>: Unpin, Rc<Dependencies>: Unpin, Rc<Holder<TextureKey>>: Unpin, NonZero<u64>: Unpin, Rc<Holder<VerticesKey>>: Unpin, Rc<Holder<IndexesKey>>: Unpin, Arc<Image<Premultiplied>>: Unpin, *const LeafNode<CanonicalTileID, SetValZST> is !null: Unpin, Box<(CanonicalTileID, SetValZST)>: Unpin, Align4<u32>: Unpin, Arc<SourceStyle>: Unpin, *mut Counter<Channel<TileEvent>>: Unpin, *mut Counter<Channel<TileEvent>>: Unpin, *mut Counter<Channel<TileEvent>>: Unpin, Arc<dyn Fn() + Sync + Send>: Unpin, Box<dyn TileWorkers>: Unpin, Arc<Shared>: Unpin, Arc<BTreeMap<GlyphID, Arc<Glyph>>>: Unpin, *const LeafNode<GlyphID, Arc<Glyph>> is !null: Unpin, Box<(GlyphID, Arc<Glyph>)>: Unpin, *const LeafNode<GlyphID, SetValZST> is !null: Unpin, Box<(GlyphID, SetValZST)>: Unpin, Arc<dyn FontChooser>: Unpin, Arc<dyn LocalGlyphRasterizer>: Unpin, Arc<GlyphCache>: Unpin, Arc<Workers>: Unpin, Arc<Lane>: Unpin, Arc<dyn AsRef<[u8]> + Sync + Send>: Unpin, Arc<Vec<FontFace>>: Unpin, Arc<dyn FontFaceEngine>: Unpin, Arc<Mutex<RawMutex, EngineReadiness>>: Unpin, Rc<dyn FontFaceShaper>: Unpin, Arc<Impl>: Unpin, Arc<VecSet<String>>: Unpin, NonZero<u32>: Unpin, Arc<Glyph>: Unpin, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: Unpin, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: Unpin, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: Unpin, Arc<dyn FileSource>: Unpin, Arc<Style>: Unpin, Arc<str>: Unpin, Arc<dyn ErasedSource>: Unpin, Box<dyn RenderSource>: Unpin, Box<dyn RenderLayer>: Unpin, Arc<Light>: Unpin, Box<Transitioning<PropertyValue<LightAnchorType>>>: Unpin, Arc<Expr>: Unpin, Arc<VecMap<String, Value>>: Unpin, Arc<Collator>: Unpin, Box<Transitioning<PropertyValue<Position>>>: Unpin, Box<Transitioning<PropertyValue<Color>>>: Unpin, Box<Transitioning<PropertyValue<f32>>>: Unpin, Arc<Sky>: Unpin, Arc<TerrainElevation>: Unpin, Arc<Vec<usize>>: Unpin, Box<PlacementState>: Unpin, Box<dyn ErasedPlacement>: Unpin, Arc<dyn ErasedLayerStyle>: Unpin, Rc<Holder<MeshKey>>: Unpin, &'static Program: Unpin, Rc<ReleaseQueue>: Unpin, *const RcInner<Holder<MeshKey>> is !null: Unpin, Rc<Buffer>: Unpin, Rc<GpuTexture>: Unpin, &'static Block: Unpin, *const LeafNode<(u8, bool, bool), RawGlobeTileMesh> is !null: Unpin, Box<((u8, bool, bool), RawGlobeTileMesh)>: Unpin, Arc<[String]>: Unpin, *const LeafNode<(u8, bool, bool, bool), Mesh> is !null: Unpin, Box<((u8, bool, bool, bool), Mesh)>: Unpin, *const LeafNode<UnwrappedTileID, (usize, [(u8, bool, bool, bool); 2])> is !null: Unpin, Box<(UnwrappedTileID, (usize, [(u8, bool, bool, bool); 2]))>: Unpin, Rc<Holder<TargetKey>>: Unpin, *const UnwrappedTileID is !null: Unpin, UnwrappedTileID: Unpin, *const u32 is !null: Unpin, u32: Unpin, *const (usize, Option<SurfaceLight>) is !null: Unpin, (usize, Option<SurfaceLight>): Unpin, Box<str>: Unpin, Box<Chunk<Texture2D>>: Unpin, Box<Chunk<Indexes>>: Unpin, *const RcInner<Holder<IndexesKey>> is !null: Unpin, Box<Chunk<Option<Box<DrawObjects>>>>: Unpin, Box<Chunk<TargetObjects>>: Unpin, Box<Chunk<Vertices>>: Unpin, Rc<Cell<Vec<Box<dyn FnOnce(GpuEnd)>>>>: Unpin, *const RcInner<Cell<Vec<Box<dyn FnOnce(GpuEnd)>>>> is !null: Unpin, Arc<Shared<RendererEvent>>: Unpin,

§

impl UnsafeUnpin for Renderer
where *const ArcInner<Registry> is !null: UnsafeUnpin, PhantomData<ArcInner<Registry>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<RendererEvent>: UnsafeUnpin, PhantomData<(SourceKey, SourceTiles)>: UnsafeUnpin, PhantomData<SourceKey>: UnsafeUnpin, *mut Counter<Channel<TileEvent>>: UnsafeUnpin, *mut Counter<Channel<TileEvent>>: UnsafeUnpin, *mut Counter<Channel<TileEvent>>: UnsafeUnpin, *const ArcInner<dyn Fn() + Sync + Send> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Fn() + Sync + Send>>: UnsafeUnpin, *const dyn TileWorkers is !null: UnsafeUnpin, PhantomData<dyn TileWorkers>: UnsafeUnpin, PhantomData<(JobId, Lane)>: UnsafeUnpin, PhantomData<(DataKey, Lane)>: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<(Vec<String>, Entry)>: UnsafeUnpin, *const ArcInner<dyn FontChooser> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn FontChooser>>: UnsafeUnpin, *const ArcInner<dyn LocalGlyphRasterizer> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn LocalGlyphRasterizer>>: UnsafeUnpin, *const ArcInner<GlyphCache> is !null: UnsafeUnpin, PhantomData<ArcInner<GlyphCache>>: UnsafeUnpin, *const ArcInner<Workers> is !null: UnsafeUnpin, PhantomData<ArcInner<Workers>>: UnsafeUnpin, *const ArcInner<Lane> is !null: UnsafeUnpin, PhantomData<ArcInner<Lane>>: UnsafeUnpin, PhantomData<Vec<String>>: UnsafeUnpin, PhantomData<Vec<Vec<char>>>: UnsafeUnpin, PhantomData<FontFace>: UnsafeUnpin, PhantomData<(Vec<String>, GlyphRange)>: UnsafeUnpin, *const ArcInner<Vec<FontFace>> is !null: UnsafeUnpin, PhantomData<ArcInner<Vec<FontFace>>>: UnsafeUnpin, *const ArcInner<dyn FontFaceEngine> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn FontFaceEngine>>: UnsafeUnpin, *const ArcInner<Mutex<RawMutex, EngineReadiness>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<RawMutex, EngineReadiness>>>: UnsafeUnpin, PhantomData<(FontData, Vec<String>, GlyphRange, u64)>: UnsafeUnpin, PhantomData<VecMap<GlyphIDType, Rc<dyn FontFaceShaper>>>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, PhantomData<Arc<Impl>>: UnsafeUnpin, *const ArcInner<VecSet<String>> is !null: UnsafeUnpin, PhantomData<ArcInner<VecSet<String>>>: UnsafeUnpin, PhantomData<u64>: UnsafeUnpin, PhantomData<Page>: UnsafeUnpin, PhantomData<(ImageAllocationKey, ImageAllocation)>: UnsafeUnpin, PhantomData<(BinKey, ImageAllocationKey)>: UnsafeUnpin, PhantomData<(GlyphAllocationKey, GlyphAllocation)>: UnsafeUnpin, PhantomData<(BinKey, GlyphAllocationKey)>: UnsafeUnpin, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: UnsafeUnpin, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: UnsafeUnpin, *mut Counter<Channel<(u64, Vec<TextureHandle>)>>: UnsafeUnpin, *const ArcInner<dyn FileSource> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn FileSource>>: UnsafeUnpin, PhantomData<StoreEvent>: UnsafeUnpin, PhantomData<FoundTile>: UnsafeUnpin, *const ArcInner<Style> is !null: UnsafeUnpin, PhantomData<ArcInner<Style>>: UnsafeUnpin, PhantomData<Source>: UnsafeUnpin, PhantomData<(String, Box<dyn RenderSource>)>: UnsafeUnpin, PhantomData<Box<dyn RenderLayer>>: UnsafeUnpin, PhantomData<(String, usize)>: UnsafeUnpin, *const ArcInner<Light> is !null: UnsafeUnpin, PhantomData<ArcInner<Light>>: UnsafeUnpin, *const Transitioning<PropertyValue<LightAnchorType>> is !null: UnsafeUnpin, PhantomData<Transitioning<PropertyValue<LightAnchorType>>>: UnsafeUnpin, *const ArcInner<Expr> is !null: UnsafeUnpin, PhantomData<ArcInner<Expr>>: UnsafeUnpin, *const ArcInner<VecMap<String, Value>> is !null: UnsafeUnpin, PhantomData<ArcInner<VecMap<String, Value>>>: UnsafeUnpin, PhantomData<AnchorOffsetPair>: UnsafeUnpin, *const ArcInner<Collator> is !null: UnsafeUnpin, PhantomData<ArcInner<Collator>>: UnsafeUnpin, PhantomData<FormattedSection>: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, PhantomData<fn() -> LightAnchorType>: UnsafeUnpin, *const Transitioning<PropertyValue<Position>> is !null: UnsafeUnpin, PhantomData<Transitioning<PropertyValue<Position>>>: UnsafeUnpin, PhantomData<fn() -> Position>: UnsafeUnpin, *const Transitioning<PropertyValue<Color>> is !null: UnsafeUnpin, PhantomData<Transitioning<PropertyValue<Color>>>: UnsafeUnpin, PhantomData<fn() -> Color>: UnsafeUnpin, *const Transitioning<PropertyValue<f32>> is !null: UnsafeUnpin, PhantomData<Transitioning<PropertyValue<f32>>>: UnsafeUnpin, PhantomData<fn() -> f32>: UnsafeUnpin, *const ArcInner<Sky> is !null: UnsafeUnpin, PhantomData<ArcInner<Sky>>: UnsafeUnpin, *const ArcInner<TerrainElevation> is !null: UnsafeUnpin, PhantomData<ArcInner<TerrainElevation>>: UnsafeUnpin, PhantomData<(IndexedSubfeature, Shape)>: UnsafeUnpin, PhantomData<Vec<u32>>: UnsafeUnpin, PhantomData<(u32, RetainedQueryData)>: UnsafeUnpin, *const PlacementState is !null: UnsafeUnpin, PhantomData<PlacementState>: UnsafeUnpin, PhantomData<PlacedSymbolData>: UnsafeUnpin, PhantomData<Box<dyn ErasedPlacement>>: UnsafeUnpin, PhantomData<FrameLayer>: UnsafeUnpin, PhantomData<(usize, PlacingLayer)>: UnsafeUnpin, PhantomData<Vec<PlacingLayer>>: UnsafeUnpin, PhantomData<Arc<dyn ErasedEvaluatedLayer>>: UnsafeUnpin, PhantomData<OverscaledTileID>: UnsafeUnpin, PhantomData<TileState>: UnsafeUnpin, PhantomData<(usize, usize)>: UnsafeUnpin, PhantomData<Slot<Mesh>>: UnsafeUnpin, NonZeroU64Inner: UnsafeUnpin, PhantomData<GroupDraw>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, *const RcInner<ReleaseQueue> is !null: UnsafeUnpin, PhantomData<RcInner<ReleaseQueue>>: UnsafeUnpin, PhantomData<(SimpleIdentity, MeshBindings)>: UnsafeUnpin, PhantomData<UnwrappedTileID>: UnsafeUnpin, PhantomData<Option<GroupDraw>>: UnsafeUnpin, PhantomData<(i64, usize)>: UnsafeUnpin, PhantomData<Pushed>: UnsafeUnpin, PhantomData<ProgramBlocks>: UnsafeUnpin, PhantomData<(&'static Block, Range<usize>)>: UnsafeUnpin, *const LeafNode<(u8, bool, bool), RawGlobeTileMesh> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<((u8, bool, bool), RawGlobeTileMesh)>>: UnsafeUnpin, *const RcInner<Holder<MeshKey>> is !null: UnsafeUnpin, PhantomData<RcInner<Holder<MeshKey>>>: UnsafeUnpin, &'static Program: UnsafeUnpin, PhantomData<TerrainTile>: UnsafeUnpin, PhantomData<(CanonicalTileID, (f32, f32))>: UnsafeUnpin, PhantomData<Drape>: UnsafeUnpin, PhantomData<Targets>: UnsafeUnpin, PhantomData<StackDraws>: UnsafeUnpin, *const ArcInner<[String]> is !null: UnsafeUnpin, PhantomData<ArcInner<[String]>>: UnsafeUnpin, PhantomData<SharedMesh>: UnsafeUnpin, PhantomData<(SimpleIdentity, (Shared<TextureKey>, u64))>: UnsafeUnpin, PhantomData<(SimpleIdentity, ())>: UnsafeUnpin, *const RcInner<Holder<TextureKey>> is !null: UnsafeUnpin, PhantomData<RcInner<Holder<TextureKey>>>: UnsafeUnpin, PhantomData<(CanonicalTileID, (Shared<TextureKey>, u32))>: UnsafeUnpin, *const u32 is !null: UnsafeUnpin, PhantomData<u32>: UnsafeUnpin, *const (usize, Option<SurfaceLight>) is !null: UnsafeUnpin, PhantomData<(usize, Option<SurfaceLight>)>: UnsafeUnpin, PhantomData<(Arc<str>, TextureChannelDataType)>: UnsafeUnpin, PhantomData<(usize, Result<usize, Arc<str>>)>: UnsafeUnpin, PhantomData<(Arc<str>, TextureChannelDataType, Target)>: UnsafeUnpin, PhantomData<(Box<str>, Warning)>: UnsafeUnpin, PhantomData<FrameLayer>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<Run>: UnsafeUnpin, PhantomData<(SamplerState, SamplerId)>: UnsafeUnpin, PhantomData<(String, String)>: UnsafeUnpin, PhantomData<((&'static Program, u16, ProjectionVariant), ShaderKey)>: UnsafeUnpin, PhantomData<(ShaderKey, ShaderId)>: UnsafeUnpin, PhantomData<(PipelineKey, PipelineId)>: UnsafeUnpin, PhantomData<(AttributeDataType, (usize, Rc<Buffer>))>: UnsafeUnpin, PhantomData<Box<Chunk<Texture2D>>>: UnsafeUnpin, PhantomData<fn() -> TextureKey>: UnsafeUnpin, PhantomData<Box<Chunk<Indexes>>>: UnsafeUnpin, PhantomData<fn() -> IndexesKey>: UnsafeUnpin, *const RcInner<Holder<IndexesKey>> is !null: UnsafeUnpin, PhantomData<Box<Chunk<Option<Box<DrawObjects>>>>>: UnsafeUnpin, PhantomData<fn() -> MeshKey>: UnsafeUnpin, PhantomData<Box<Chunk<TargetObjects>>>: UnsafeUnpin, PhantomData<fn() -> TargetKey>: UnsafeUnpin, PhantomData<Target>: UnsafeUnpin, PhantomData<Box<Chunk<Vertices>>>: UnsafeUnpin, PhantomData<fn() -> VerticesKey>: UnsafeUnpin, PhantomData<Release>: UnsafeUnpin, PhantomData<ResourceId>: UnsafeUnpin, *const RcInner<Cell<Vec<Box<dyn FnOnce(GpuEnd)>>>> is !null: UnsafeUnpin, PhantomData<RcInner<Cell<Vec<Box<dyn FnOnce(GpuEnd)>>>>>: UnsafeUnpin, *const LeafNode<(u8, bool, bool, bool), Mesh> is !null: UnsafeUnpin, PhantomData<Box<((u8, bool, bool, bool), Mesh)>>: UnsafeUnpin, *const LeafNode<UnwrappedTileID, (usize, [(u8, bool, bool, bool); 2])> is !null: UnsafeUnpin, PhantomData<Box<(UnwrappedTileID, (usize, [(u8, bool, bool, bool); 2]))>>: UnsafeUnpin, PhantomData<Owned<BindingsId>>: UnsafeUnpin, PhantomData<(TargetFormats, PipelineId)>: UnsafeUnpin, PhantomData<Held>: UnsafeUnpin, PhantomData<(SimpleIdentity, Composite)>: UnsafeUnpin, *const ArcInner<Shared<RendererEvent>> is !null: UnsafeUnpin, PhantomData<ArcInner<Shared<RendererEvent>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .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
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .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
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool