Skip to main content

RenderSessionHandle

Struct RenderSessionHandle 

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

Owner-thread render session handle bound to a retained map.

Implementations§

Source§

impl RenderSessionHandle

Source

pub fn set_feature_state( &self, selector: &FeatureStateSelector, state: &JsonValue, ) -> Result<()>

Sets per-feature state on a render source for this session.

Source

pub fn get_feature_state( &self, selector: &FeatureStateSelector, ) -> Result<JsonValue>

Copies per-feature state from a render source in this session.

Source

pub fn feature_state( &self, selector: &FeatureStateSelector, ) -> Result<JsonValue>

Copies per-feature state from a render source in this session.

Source

pub fn remove_feature_state( &self, selector: &FeatureStateSelector, ) -> Result<()>

Removes per-feature state selected for this session.

Source

pub fn query_rendered_features( &self, geometry: &RenderedQueryGeometry, options: Option<&RenderedFeatureQueryOptions>, ) -> Result<Vec<QueriedFeature>>

Queries rendered features from the latest render session state.

Source

pub fn query_source_features( &self, source_id: &str, options: Option<&SourceFeatureQueryOptions>, ) -> Result<Vec<QueriedFeature>>

Queries source features from the latest render session state.

Source

pub fn query_feature_extension( &self, source_id: &str, feature: &Feature, extension: &str, extension_field: &str, arguments: Option<&JsonValue>, ) -> Result<FeatureExtensionResult>

Queries a feature extension from the latest render session state.

Source§

impl RenderSessionHandle

Source

pub fn close(self) -> Result<(), HandleOperationError<Self>>

Explicitly destroys the render session.

Native destruction errors are returned. When destruction fails, the underlying native handle remains live so a later close can retry.

Source

pub fn is_closed(&self) -> bool

Source

pub fn resize(&self, width: u32, height: u32, scale_factor: f64) -> Result<()>

Resizes this attached render session.

Source

pub fn render_update(&self) -> Result<()>

Processes the latest map render update for this render target.

Source

pub fn detach( self, ) -> Result<DetachedRenderSessionHandle, HandleOperationError<Self>>

Detaches backend-bound render resources from the map.

The native session remains live only for destruction, so successful detach consumes this handle and returns a detached close-only handle.

Source

pub fn reduce_memory_use(&self) -> Result<()>

Asks the session renderer to release cached resources where possible.

Source

pub fn clear_data(&self) -> Result<()>

Clears renderer data for the session.

Source

pub fn dump_debug_logs(&self) -> Result<()>

Dumps renderer debug logs through MapLibre Native logging.

Source

pub fn texture_image_info(&self) -> Result<TextureImageInfo>

Returns CPU readback metadata for the most recently rendered texture frame.

Source

pub fn read_premultiplied_rgba8_into( &self, data: &mut [u8], ) -> Result<TextureImageInfo>

Reads the most recently rendered texture frame as premultiplied RGBA8.

Source

pub fn read_premultiplied_rgba8(&self) -> Result<PremultipliedRgba8Image>

Reads the most recently rendered texture frame into owned bytes.

Source

pub fn acquire_metal_owned_texture_frame( &self, ) -> Result<MetalOwnedTextureFrameHandle>

Acquires a borrowed Metal frame from a session-owned texture target.

Source

pub fn acquire_vulkan_owned_texture_frame( &self, ) -> Result<VulkanOwnedTextureFrameHandle>

Acquires a borrowed Vulkan frame from a session-owned texture target.

Source

pub fn acquire_opengl_owned_texture_frame( &self, ) -> Result<OpenGLOwnedTextureFrameHandle>

Acquires a borrowed OpenGL frame from a session-owned texture target.

Trait Implementations§

Source§

impl Debug for RenderSessionHandle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.