Skip to main content

Map

Struct Map 

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

A handle to a map, which lives on its runtime’s thread.

Each command takes the next sequence number when it is sent and runs on the runtime’s thread after every command sent before it, to this map, another map or the runtime. It returns a Completion of its result, or an error when it can’t be sent, and then never completes. A command sent before the map is built waits for it. Clone is another handle to the same map, and any thread may use one.

The map lives until release or until its last handle drops. A command on a released map fails with ErrorKind::InvalidState.

Implementations§

Source§

impl Map

Source

pub fn discarding_results(&self, on_failure: fn(Error)) -> Map

A handle to the same map whose commands discard their results, for a caller that doesn’t need them: each command’s completion acts as one whose result was taken, and costs no allocation, and a failure, cancellations included, goes to on_failure on the runtime’s thread.

Source

pub fn id(&self) -> MapId

Source

pub fn mode(&self) -> MapMode

When the map renders, as its options set it.

Source

pub fn runtime(&self) -> Runtime

The runtime that the map lives on.

Source

pub fn sent_sequence(&self) -> u64

The sequence number of the last command sent to the map.

Source

pub fn applied_sequence(&self) -> u64

The sequence number of the last command that ran. While the runtime’s thread runs several queued commands as one burst, they count once the frame that shows them all can.

Source

pub fn snapshot(&self) -> Result<MapSnapshot, Error>

The map’s state after the last command that ran, without waiting for the commands still on their way. To read the state after them, send a command and read the snapshot once it completes, or use a query such as camera. Its update_generation counts the renderer’s updates as they are when it is read, which can be later than the rest of the state.

Fails with ErrorKind::InvalidState until the map is built, and after it is released.

Source

pub fn projection(&self, view: Option<&MapView>) -> Result<MapProjection, Error>

A projection of view, or of the map’s view as of snapshot for None, on the ground the map drew then (mln_engine::map::Map::ground): it converts as the map does, in the view’s projection, over terrain on the ground the renderer drew, else on the flat map. It is the caller’s, and doesn’t follow the map.

Fails as snapshot does, and for view as MapView::to_state.

Source

pub fn event_mask(&self) -> EventMask

The events that the map reports, as of the last command that ran.

Source

pub fn with_core<R: Send + 'static>( &self, f: impl FnOnce(&mut Map) -> R + Send + 'static, ) -> Result<Completion<R>, Error>

Runs f on the map itself, on the runtime’s thread, in its place among the map’s commands. It sees the effects of the commands sent before it. The map handles what f changed, and reports its events, before the completion.

Source

pub fn release(&self) -> Result<Completion<()>, Error>

Releases the map. The completion reports when the runtime has let go of it. A render session that was released, but hasn’t let go of the map yet, is abandoned, as RenderSession::abandon does: a caller-driven one that the host stopped servicing would otherwise hold the map for good.

Fails with ErrorKind::InvalidState when the map was released already, or while a render session that wasn’t released is attached to it.

Source

pub fn dispose(&self) -> Result<Completion<()>, Error>

Releases the map whatever its state, as dropping its last handle does, and lets the runtime finish in the background: the completion reports when the runtime has let go of it, and may be dropped. Every command fails with ErrorKind::InvalidState from now on. A render session that is attached and wasn’t released keeps drawing the map’s last update, and the runtime lets go of the map once the session detaches or is abandoned. A released one is abandoned, as release does.

Fails with ErrorKind::InvalidState when the map was released already.

Source

pub fn resize( &self, extent: LogicalExtent, ) -> Result<Completion<Applied>, Error>

Sets the map’s size and scale factor. The map keeps its tiles, and a resize to the extent the map has changes nothing, so it renders nothing. Fails with ErrorKind::InvalidState while a render session is attached, since the session sizes the map to its target: resize the session instead. Fails with ErrorKind::InvalidArgument for an empty size, or a scale factor that isn’t finite and positive.

Source

pub fn request_repaint(&self) -> Result<Completion<Applied>, Error>

Renders a new frame of a continuous map, even when nothing changed. Fails with ErrorKind::InvalidState for a static or tile map, which renders only still images.

Source

pub fn begin_command_group(&self) -> Result<Completion<Applied>, Error>

Holds the map’s changes back from rendering until the matching end_command_group, so that they show in the same frame. Groups nest, and the changes show when the outermost group ends.

Source

pub fn end_command_group(&self) -> Result<Completion<Applied>, Error>

Ends the group that begin_command_group began. Completes with ErrorKind::InvalidState when no group is open.

Source

pub fn command_group(&self) -> Result<CommandGroup, Error>

Begins a command group that ends when the guard drops, or with CommandGroup::end.

Source

pub fn set_event_mask( &self, mask: EventMask, ) -> Result<Completion<Applied>, Error>

Selects the events that the map reports.

Source

pub fn attach( &self, target: RenderTarget, options: AttachOptions, ) -> Result<(RenderSession, Completion<()>), Error>

Attaches a render session, which renders the map into target, and sizes the map to the target. A map has one session at a time. The session takes frame demands and other work at once, and runs them once the completion reports it ready.

The session renders on a thread of its own, or, with Driver::CallerThread, on the thread that takes its DriverWork: the attach completes in that thread’s first service.

Fails with ErrorKind::InvalidState when the map already has a session or was released, or a window is minimized or has no client area, and with ErrorKind::InvalidArgument for an empty target, a Surface::wgpu without the host’s device, or a Win32 window with a pixel format of its own that OpenGL would present to. The completion fails as Device::new does when the session has to create its device and can’t, with ErrorKind::InvalidState when the window or surface had no area to present to by then, with ErrorKind::Unsupported when no GPU can present to a window, and with ErrorKind::Failed when the window has no surface to give.

Source

pub fn attach_then<R>( &self, target: RenderTarget, options: AttachOptions, then: impl FnOnce(&RenderSession, Completion<()>) -> R, ) -> Result<R, Error>

Attaches a render session as attach does, and calls then with it and the attach’s completion before the session’s thread may deliver the attach’s result. A callback that then attaches with Completion::on_complete runs where the session delivers it: on the session’s thread, inside its driver call, even when the session attaches before then runs. One attached after attach returned would run at once on this thread instead.

then keeps the session with a clone of it: the session is released once its last handle drops. Fails as attach does, before then runs.

Source

pub fn request_still_image(&self) -> Result<Completion<()>, Error>

Renders a still image of a static or tile map, once every resource that it needs has loaded. The map’s render session draws it, and RenderSession::read_texture reads its pixels once the completion reports success.

While the image waits, the session has a demand of its own for it, whose FrameResult has no token. The demand waits for the map to load what the image needs, and parks while a borrowed ring has no texture to render into. It finishes with the image’s frame, which completes the image once its result is queued: a frame of the host’s demands completes none. The host’s demands neither replace it nor are replaced by it. When the session ends its demands, by a barrier, a target’s release or a detach, the demand ends too, and the image waits for the next one: once the barrier ran, the target came back, or the next session attached.

Fails with ErrorKind::InvalidState for a continuous map. Completes with ErrorKind::InvalidState while another image is on its way or a command group is open, ErrorKind::Failed when the style or a resource that the image needs fails to load, and ErrorKind::Cancelled when the map is released first.

Source

pub fn scale_factor(&self) -> f64

The map’s scale factor: device pixels per logical pixel. It is the pixel ratio of the map’s options until a render session’s resize sets another, and the map’s next session renders at it.

Source

pub fn registry(&self) -> &Arc<Registry> ⓘ

What the map parses its style against, its renderer draws and its tile workers lay out: its runtime’s registry. A filter for a query parses against its functions.

Source

pub fn set_feature_state( &self, selector: &FeatureStateSelector, state: FeatureState, ) -> Result<Completion<Applied>, Error>

Merges state into the state of the feature that selector names: its keys replace the same keys of the feature’s state, and the other keys stay.

The map keeps the state until it is removed, its source leaves the style, or a style loads: remove_style_source removes the state of the source’s features, and a style that loads removes the state of every source. To set state for a new style’s sources, wait until set_style_url or set_style_json completes.

The map’s next update for its render session carries the state, so a frame shows it, and a rendered query reads it, once the frame renders that update. A command that changes no state publishes no update: an empty state merges nothing.

Fails with ErrorKind::InvalidArgument for a selector without a feature.

Source

pub fn feature_state( &self, selector: &FeatureStateSelector, ) -> Result<Completion<FeatureState>, Error>

The state of the feature that selector names, empty when it has none. Fails with ErrorKind::InvalidArgument for a selector without a feature.

Source

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

Removes the state that selector selects: one key of a feature, all of a feature’s state, or that of every feature in a source layer. The removal reaches the render session as set_feature_state describes, and a removal of no state publishes no update. Fails with ErrorKind::InvalidArgument for a state key without a feature.

Source

pub fn set_style_url( &self, url: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Loads the map’s style from url.

Completes once the style document has loaded and parsed, with ErrorKind::Failed when it fails to, and with ErrorKind::Cancelled when another style load starts or the map is released first. The style’s sources, sprites and glyphs then load in the background. Commands that change the style fail with ErrorKind::InvalidState until the document has parsed.

Source

pub fn set_style_json( &self, json: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Loads the map’s style from JSON text. Completes as set_style_url does, once the style has parsed, but with ErrorKind::InvalidArgument for JSON that isn’t a valid style. A style that fails to parse leaves the map’s style as it was.

Source

pub fn loaded_style_json(&self) -> Result<Completion<String>, Error>

The JSON of the style that the map loaded, without the changes made since.

Source

pub fn style_url(&self) -> Result<Completion<Option<String>>, Error>

The URL of the map’s style, or None for a style loaded from JSON.

Source

pub fn add_style_source_json( &self, source_id: impl Into<String>, json: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Adds a source to the style from its JSON. See mln_engine::map::Map::add_source_json for the errors.

Source

pub fn remove_style_source( &self, source_id: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Removes a source from the style. Completes with ErrorKind::NotFound when the style has no such source, and ErrorKind::InvalidState when a layer uses it or the style isn’t loaded. The source’s features lose their state, and a value held for the source drops before the completion.

Source

pub fn add_style_layer_json( &self, json: impl Into<String>, before_layer_id: Option<String>, ) -> Result<Completion<Applied>, Error>

Adds a layer to the style from its JSON, below before_layer_id or above every layer. See Style::add_layer_json for the errors.

Source

pub fn add_style_layer( &self, layer: Layer, before_layer_id: Option<String>, ) -> Result<Completion<Applied>, Error>

Adds layer to the style, below before_layer_id or above every layer: one of a type that isn’t made from JSON, or one that holds a value for as long as the style has it (Layer::from_style_holding). See Style::add_layer for the errors.

Source

pub fn remove_style_layer( &self, layer_id: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Removes a layer from the style. Completes with ErrorKind::NotFound when the style has no such layer, and ErrorKind::InvalidState while the style isn’t loaded.

Source

pub fn style_layer_json( &self, layer_id: impl Into<String>, ) -> Result<Completion<Option<String>>, Error>

A layer of the style as JSON, or None when the style has no such layer.

Source

pub fn set_style_layer_property( &self, layer_id: impl Into<String>, name: impl Into<String>, json: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Sets a property of a layer to a JSON value. See Style::set_layer_property_json for the errors.

Source

pub fn style_layer_property( &self, layer_id: impl Into<String>, name: impl Into<String>, ) -> Result<Completion<Option<String>>, Error>

A property of a layer as JSON, or None when the layer doesn’t set it. See Style::layer_property_json for the errors.

Source

pub fn set_style_root_property( &self, name: impl Into<String>, json: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Sets a root property of the style to a JSON value, without reloading the style. See Style::set_root_property_json for the properties that change and the errors.

Source

pub fn style_root_property( &self, name: impl Into<String>, ) -> Result<Completion<Option<String>>, Error>

A root property of the style as JSON, or None when neither the style nor the map sets it. See Style::root_property_json.

Source

pub fn set_style_light_property( &self, name: impl Into<String>, json: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Sets a property of the style’s light to a JSON value.

Source

pub fn style_light_property( &self, name: impl Into<String>, ) -> Result<Completion<Option<String>>, Error>

A property of the style’s light as JSON, or None when the light doesn’t set it.

Source

pub fn update_camera( &self, update: CameraUpdate, ) -> Result<Completion<Applied>, Error>

Moves the camera to absolute values, by a jump, an ease or a flight.

Source

pub fn update_camera_then( &self, update: CameraUpdate, on_end: impl FnOnce(Result<TransitionEnd, Error>) + Send + 'static, ) -> Result<Completion<Applied>, Error>

Moves the camera as update_camera does, and calls on_end with how the change ended, on the runtime’s thread: once the map has published the snapshot that shows where the change left the camera, whose generation the end reports, and before the returned completion when the change ends within the command. A command that fails ends as cancelled, and one that the map’s release ends as closed, with generation 0. on_end runs on this thread only with ErrorKind::Cancelled, when the send fails.

Source

pub fn apply_camera_delta( &self, delta: CameraDelta, ) -> Result<Completion<Applied>, Error>

Moves the camera relative to where it is, as a gesture does. Completes with ErrorKind::InvalidArgument for a delta that the camera can’t apply.

Source

pub fn apply_camera_delta_then( &self, delta: CameraDelta, on_end: impl FnOnce(Result<TransitionEnd, Error>) + Send + 'static, ) -> Result<Completion<Applied>, Error>

Applies delta as apply_camera_delta does, and calls on_end with how the change ended, as update_camera_then does.

Source

pub fn camera_for( &self, area: CameraFitArea, options: CameraFitOptions, ) -> Result<Completion<CameraOptions>, Error>

The camera that fits area in the map’s view, after the commands sent before, as [mln_engine::map::Map::camera_for_lat_lngs] fits it. Its zoom stays within the map’s zoom limits.

Completes with ErrorKind::InvalidArgument for an empty area, and for padding and margin that leave no room for it.

Source

pub fn fit_camera( &self, area: CameraFitArea, update: CameraFitUpdate, ) -> Result<Completion<Applied>, Error>

Moves the camera to the one that camera_for finds once the commands sent before have run, as update_camera moves it.

Completes as camera_for fails, and then leaves the camera where it is and ends the animation as cancelled.

Source

pub fn fit_camera_then( &self, area: CameraFitArea, update: CameraFitUpdate, on_end: impl FnOnce(Result<TransitionEnd, Error>) + Send + 'static, ) -> Result<Completion<Applied>, Error>

Fits the camera as fit_camera does, and calls on_end with how the change ended, as update_camera_then does.

Source

pub fn cancel_camera_transitions(&self) -> Result<Completion<Applied>, Error>

Stops every camera animation.

Source

pub fn cancel_camera_transitions_with_id( &self, transition_id: u64, ) -> Result<Completion<Applied>, Error>

Stops the camera animations whose transition ID is transition_id.

Source

pub fn camera(&self) -> Result<Completion<CameraQuery>, Error>

The camera after the commands sent before.

Source

pub fn lat_lng_bounds_for_camera( &self, camera: CameraOptions, ) -> Result<Completion<LatLngBounds>, Error>

The area that camera would show, with the fields that camera leaves out from the map’s camera. It holds every corner of a rotated view, and its longitudes can pass ±180, so a view across the antimeridian gives one continuous range.

Source

pub fn set_bounds( &self, bounds: BoundOptions, ) -> Result<Completion<Applied>, Error>

Sets the limits on the camera.

Source

pub fn set_free_camera_options( &self, camera: FreeCameraOptions, ) -> Result<Completion<Applied>, Error>

Sets the camera’s position and orientation in three dimensions.

Source

pub fn set_viewport_options( &self, options: ViewportOptions, ) -> Result<Completion<Applied>, Error>

Sets how the map orients and constrains its view.

Source

pub fn set_tile_options( &self, options: TileOptions, ) -> Result<Completion<Applied>, Error>

Sets how the map picks the tiles to load.

Source

pub fn set_projection_mode( &self, mode: ProjectionMode, ) -> Result<Completion<Applied>, Error>

Source

pub fn dump_debug_logs(&self) -> Result<Completion<Applied>, Error>

Logs the style’s sources and their state.

Source§

impl Map

Source

pub fn set_global_state_property( &self, name: impl Into<String>, json: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Sets the value name that the style’s global-state expressions read, from JSON. See Style::set_global_state_property_json.

Source

pub fn global_state(&self) -> Result<Completion<String>, Error>

The style’s global state as a JSON object.

Source

pub fn style_source( &self, source_id: impl Into<String>, ) -> Result<Completion<Option<SourceInfo>>, Error>

A source of the style, or None when the style has no such source.

Source

pub fn style_sources(&self) -> Result<Completion<Vec<SourceInfo>>, Error>

The style’s sources, in style order.

Source

pub fn set_style_source_volatile( &self, source_id: impl Into<String>, is_volatile: bool, ) -> Result<Completion<Applied>, Error>

Sets whether a source keeps its tiles out of the persistent cache.

Source

pub fn add_geojson_source( &self, source_id: impl Into<String>, options: GeoJsonSourceOptions, ) -> Result<Completion<Applied>, Error>

Adds a GeoJSON source with no data and options, which stay fixed for as long as the style holds it.

Fails with ErrorKind::InvalidArgument for an option out of range, and completes with it for cluster properties that don’t parse.

Source

pub fn set_geojson_source_url( &self, source_id: impl Into<String>, url: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Makes a GeoJSON source load its data from url. Data that a set_geojson_source_data sent before and that isn’t ready yet is cancelled.

Source

pub fn set_geojson_source_data( &self, source_id: impl Into<String>, json: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Replaces the data of a GeoJSON source with the GeoJSON text json, a feature collection, feature or geometry.

The runtime’s thread parses the data, and a background thread prepares it with the source’s options; the command completes once the source holds it. Later commands don’t wait for it. While the source is still preparing earlier data, only the newest data waits to follow it. With synchronous tiling on, the command prepares the data before later commands run.

Completes with ErrorKind::NotFound when the style has no such source, with InvalidArgument when it isn’t a GeoJSON source, when json isn’t GeoJSON, or when the source clusters and the data isn’t a feature collection of points, and with Cancelled when newer data replaces it while it waits, or when the source’s URL, its removal, a style load or the map’s release replaces the source’s data before it is ready.

Source

pub fn set_geojson_source_synchronous_tiling( &self, source_id: impl Into<String>, enabled: bool, ) -> Result<Completion<Applied>, Error>

Sets whether a GeoJSON source builds its tiles while the map renders, in place of the synchronousUpdate of the source’s JSON.

Source

pub fn add_source_holding( &self, source: Source, held: Box<dyn Any + Send>, ) -> Result<Completion<Applied>, Error>

Adds source to the style, with held, a value that the map holds for that source while it is in the style, which with_held_source reaches. The map drops it once the source leaves the style, by its removal, a style load or the map’s release, before the command that removed it completes. A command that fails drops it before it completes.

Completes with ErrorKind::AlreadyExists when the style has a source with the ID, and as add_style_source_json otherwise.

Source

pub fn with_held_source<T: Any + Send>( &self, source_id: impl Into<String>, apply: impl FnOnce(Result<&mut T, HeldSourceError>) -> Result<(), Error> + Send + 'static, ) -> Result<Completion<Applied>, Error>

A command that runs apply on the runtime’s thread with the value of type T that the map holds for the source source_id, or why it holds none, and completes with what apply returns.

Source

pub fn set_style_image( &self, image: StyleImage, ) -> Result<Completion<Applied>, Error>

Adds image to the style, or replaces the image with its ID.

Source

pub fn remove_style_image( &self, image_id: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Removes an image from the style. Completes with ErrorKind::NotFound when the style has no such image.

Source

pub fn style_image( &self, image_id: impl Into<String>, ) -> Result<Completion<Option<Arc<StyleImage>>>, Error>

An image of the style, or None when the style has no such image.

Source

pub fn add_image_source( &self, source_id: impl Into<String>, coordinates: [LatLng; 4], image: PremultipliedImage, ) -> Result<Completion<Applied>, Error>

Adds an image source that shows image at coordinates, its four corners clockwise from the top left.

Source

pub fn set_image_source_url( &self, source_id: impl Into<String>, url: impl Into<String>, ) -> Result<Completion<Applied>, Error>

Makes an image source load its image from url.

Source

pub fn set_image_source_image( &self, source_id: impl Into<String>, image: PremultipliedImage, ) -> Result<Completion<Applied>, Error>

Replaces the image of an image source.

Source

pub fn set_image_source_coordinates( &self, source_id: impl Into<String>, coordinates: [LatLng; 4], ) -> Result<Completion<Applied>, Error>

Moves the image of an image source to coordinates, its four corners clockwise from the top left.

Source

pub fn image_source_coordinates( &self, source_id: impl Into<String>, ) -> Result<Completion<[LatLng; 4]>, Error>

The corners of an image source’s image, clockwise from the top left.

Source

pub fn style_layer( &self, layer_id: impl Into<String>, ) -> Result<Completion<Option<LayerInfo>>, Error>

A layer of the style, or None when the style has no such layer.

Source

pub fn style_layers(&self) -> Result<Completion<Vec<LayerInfo>>, Error>

The style’s layers, from bottom to top.

Source

pub fn move_style_layer( &self, layer_id: impl Into<String>, before_layer_id: Option<String>, ) -> Result<Completion<Applied>, Error>

Moves a layer below before_layer_id, or above every layer. See Style::move_layer for the errors.

Source

pub fn set_style_transition_options( &self, options: TransitionOptions, ) -> Result<Completion<Applied>, Error>

Sets the default transition of the style’s paint properties.

Source

pub fn style_transition_options( &self, ) -> Result<Completion<TransitionOptions>, Error>

The default transition of the style’s paint properties.

Trait Implementations§

Source§

impl Clone for Map

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Map

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for Map

Source§

impl GestureCamera for Map

Source§

fn lat_lng_for_pixel(&self, pixel: ScreenCoordinate) -> Option<LatLng>

On the ground the map draws, so that a box zoom over terrain centers on the ground it boxed, and in the projection it draws in.

Source§

fn viewport(&self) -> ScreenCoordinate

The viewport’s width and height, in logical pixels.
Source§

fn camera(&self) -> CameraOptions

Source§

fn zoom_range(&self) -> (f64, f64)

The least and greatest zoom the camera may take at its center (see zoom_range).
Source§

fn apply_camera_delta(&mut self, delta: &CameraDelta)

Applies a delta as Map::apply_camera_delta does. The recognizer only sends valid deltas.
Source§

fn release(&mut self, delta: &CameraDelta) -> PendingEnd

Applies a gesture’s last delta, as apply_camera_delta does, and returns how its command ends: the end of the momentum it starts, whose speed a press that stops it can carry.
Source§

fn update_camera(&mut self, update: &CameraUpdate)

Source§

fn cancel_transitions_with_id(&mut self, transition_id: u64)

Source§

impl PartialEq for Map

Source§

fn eq(&self, other: &Map) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Map

§

impl !UnwindSafe for Map

§

impl Forget for Map

§

impl Freeze for Map
where *const ArcInner<MapShared> is !null: Freeze, PhantomData<ArcInner<MapShared>>: Freeze,

§

impl Move for Map

§

impl Send for Map
where Arc<MapShared>: Send,

§

impl Sync for Map
where Arc<MapShared>: Sync,

§

impl Unpin for Map
where Arc<MapShared>: Unpin,

§

impl UnsafeUnpin for Map
where *const ArcInner<MapShared> is !null: UnsafeUnpin, PhantomData<ArcInner<MapShared>>: 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

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