Skip to main content

RenderSession

Struct RenderSession 

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

A render session: a renderer that draws a map into a target, on a thread of its own or on the host’s.

The host demands frames, which finish with FrameResults that drain_frame_results takes. A demand shows the map’s commands sent before it, except the changes that an open command group holds back. The session’s work runs on its thread in the order it was sent, and reports through a Completion. Clone is another handle to the same session, and any thread may use one.

A session that attached with Driver::CallerThread runs its work only when the host services its DriverWork, which take_driver_work hands out.

The session lives until detach, release, dispose or abandon, or until its last handle drops, and it holds its map until then. A call that sends work to a session that no longer takes it fails with ErrorKind::InvalidState, or with the failure of a session that failed.

Unless the session was released or disposed, the last drop of its handles, AcquiredFrames and FrameViews waits for a core worker’s thread to end, once the session has let go of its graphics objects and its map. A drop on a thread of the library, such as in a callback or a wake that the library runs, doesn’t wait: it leaves the session’s thread to end alone.

Implementations§

Source§

impl RenderSession

Source

pub fn send_then<T: Send + 'static>( &self, send: impl FnOnce(&RenderSession) -> Result<Completion<T>, Error>, callback: impl FnOnce(Result<T, Error>) + Send + 'static, ) -> Result<(), Error>

Sends a command with send, such as barrier, and calls callback once with its result, where the session delivers it: on the session’s thread, inside its driver call, even when the command runs before send returns. A Completion::on_complete after the command returned would run at once on this thread instead. The callback doesn’t run when send fails.

Fails as send does.

Source

pub fn take_driver_work(&self) -> Result<DriverWork, Error>

Hands out the work of a Driver::CallerThread session, for the calling thread to run: the session’s graphics work runs only in its service, and on no other thread.

Take it once, on the host’s graphics thread, from the attach on: the attach itself completes in a service. It stays available after a release, which the host services to its end.

Fails with ErrorKind::Unsupported for a session on a core worker, and with ErrorKind::InvalidState once it was taken.

Source

pub fn capabilities(&self) -> Result<RenderSessionCapabilities, Error>

What the session can do. Fails with ErrorKind::InvalidState once it is released.

Source

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

The session’s state now. Fails with ErrorKind::InvalidState once it is released.

Source

pub fn acquire_frame(&self) -> Result<Option<AcquiredFrame>, Error>

Takes the newest frame that a borrowed ring rendered, if one waits: the older frames that the host didn’t acquire are dropped, and the session may render into their textures again. While the host holds a frame in every texture, demands wait for a release.

Fails with ErrorKind::Unsupported for a session without a ring, and as a call that sends work does once the session no longer takes work.

Source

pub fn set_ring( &self, size: Size, ring: BorrowedRing, ) -> Result<Completion<(Applied, GpuSync)>, Error>

Gives a borrowed ring new textures, of size logical pixels: as many as it has, of its format. The completion reports the map’s change and the sync after which the host may use the old textures that the new ring doesn’t have, as release_target says.

Fails with ErrorKind::Unsupported for a session without a borrowed ring, with ErrorKind::InvalidArgument for another number of textures, and with ErrorKind::InvalidState while the host holds one of the ring’s frames. Completes with ErrorKind::Unsupported for textures of another format or kind.

Source

pub fn demand_frame(&self, demand: FrameDemand) -> Result<(), Error>

Asks the session to render a frame, which shows the map commands sent before the call, except the changes that an open command group holds back, and the map’s animations as they are at the call: demand each frame at the display’s pace. A demand sent while the session attaches waits for it.

Every demand finishes with one FrameResult that carries its token. A demand that isn’t DemandMode::Force replaces the demands with the same mode still on their way, which finish as FrameDisposition::Superseded. While the session has no target, or a surface has no texture to render into, a demand finishes as FrameDisposition::TargetNotReady.

Source

pub fn set_frame_pacer( &self, pacer: Option<Arc<FramePacer>>, ) -> Result<(), Error>

Paces the session’s frames with pacer, or with none, stops. At the first refresh that the pacer allows after the map has something new to draw, it demands a frame in DemandMode::IfChanged with token 0, unless a demand came first. One pacer can pace many sessions.

Fails with ErrorKind::InvalidState for a session with a redraw wake.

Source

pub fn drain_frame_results(&self) -> Result<Vec<FrameResult>, Error>

Takes the frame results that wait, oldest first. Fails with ErrorKind::InvalidState once the session is released.

Source

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

Resizes the target, and the map with it, to extent’s size in logical pixels, and sets the map’s scale factor to extent’s, such as when a window moves to a display of another density. The map keeps its tiles, and the renderer draws the next frame at the new scale factor. A later demand shows the new extent, and one sent before shows the old. An exported ring gets images of the new size, and the frames that the host holds keep theirs until it gives them back.

Fails first as a call that sends work does once the session no longer takes work. Then fails with ErrorKind::Unsupported for a borrowed ring, which set_ring resizes, and with ErrorKind::InvalidArgument for an empty size, or a scale factor that isn’t finite and positive.

Source

pub fn release_target(&self) -> Result<Completion<Option<GpuSync>>, Error>

Lets go of a surface session’s surface, and keeps the rest of the session, such as when the platform takes the window away. The demands on their way, and later ones until set_surface gives the session a surface again, finish as FrameDisposition::TargetNotReady. Once the release completes, the session no longer uses the surface or the window it was made from. For a ring, it completes with a sync of the session’s producer kind, after which the host may use or destroy the textures: the session’s GPU work on them, and its waits for the consumer syncs that they were given back with, end there. The session keeps the objects that the sync names until its next release or replacement of the target completes, or it ends. It keeps nothing of the released textures: one that a later ring has again starts fresh, even one that the host gave up.

Fails with ErrorKind::Unsupported for an offscreen session or an exported ring, whose targets are their own. Completes with ErrorKind::Native when a ring can’t submit its work on the textures, which it keeps then.

Source

pub fn set_surface( &self, size: Size, surface: Surface, ) -> Result<Completion<Applied>, Error>

Gives a surface session a new surface of size logical pixels, after release_target, or in place of the one it has, and resizes the map to it. Once the completion reports success, the session no longer uses the old surface. The session presents to it on its device: a window becomes a surface of the device’s backend, and a Surface::wgpu must come from the instance of a WebGPU device. Where the backend made for the old surface can’t present to the new one, as OpenGL ES’s context can’t to another window, the session makes its backend and renderer again.

Fails with ErrorKind::InvalidArgument for an empty size, with ErrorKind::Unsupported for an offscreen session, and with ErrorKind::InvalidState for a window that is minimized or has no client area. Completes with ErrorKind::Unsupported when the session’s device can’t present to the surface in the format that the session renders in: attach a new session instead. Completes with ErrorKind::InvalidState when the window had no area to present to by then. The session then keeps the surface it had, at the new size.

Source

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

Ends the frame demands on their way, including those that wait for a map update and the demand of a still image, which finish as FrameDisposition::NoUpdate, and completes once the work sent before it has run. A still image that still waits gets a new demand once the barrier ran.

Source

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

Frees memory that the renderer can rebuild, such as caches.

Source

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

Clears what the renderer holds, such as loaded tiles, so that the next frame loads and draws the map again.

Source

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

Logs the renderer’s sources and tiles.

Source

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

The pixels of the last frame that an offscreen session rendered: premultiplied RGBA, in rows from top to bottom, at the target’s size in pixels.

Fails with ErrorKind::Unsupported for a surface session. Completes with ErrorKind::InvalidState when the session hasn’t rendered a frame since it attached or resized.

Source

pub fn query_rendered_features( &self, geometry: RenderedQueryGeometry, options: RenderedQueryOptions, ) -> Result<Completion<Vec<Feature>>, Error>

The features that the session drew in an area of the screen, in its last frame. A feature that several layers draw appears once for each. The topmost layer’s features come first, and the bottom layer’s last. A box covers only its part inside the target, so one past every edge covers the whole target.

Fails with ErrorKind::InvalidArgument for a point that isn’t finite or a line string without points.

Source

pub fn query_source_features( &self, source_id: impl Into<String>, options: SourceQueryOptions, ) -> Result<Completion<Vec<Feature>>, Error>

The features of the source source_id in the tiles that it loaded for the current view. A source loads tiles only while a visible layer uses it.

Fails with ErrorKind::InvalidArgument for an empty source_id.

Source

pub fn cluster_children( &self, source_id: impl Into<String>, cluster_id: u32, ) -> Result<Completion<Vec<Feature<f64>>>, Error>

The clusters and points that a cluster of a clustered GeoJSON source splits into at the next zoom level. cluster_id is a cluster feature’s cluster_id property.

The query reads the source as the session’s most recent render attempt had it. A cluster ID belongs to one version of the source’s data, so query the features again after the data changes.

Completes with ErrorKind::NotFound when that render had no source source_id, or the source has no cluster cluster_id, and with ErrorKind::InvalidArgument when the source isn’t a clustered GeoJSON source.

Source

pub fn cluster_leaves( &self, source_id: impl Into<String>, cluster_id: u32, limit: u32, offset: u32, ) -> Result<Completion<Vec<Feature<f64>>>, Error>

The points in a cluster of a clustered GeoJSON source: it skips the first offset, then holds up to limit. It fails as cluster_children does.

Source

pub fn cluster_expansion_zoom( &self, source_id: impl Into<String>, cluster_id: u32, ) -> Result<Completion<u8>, Error>

The zoom level at which a cluster of a clustered GeoJSON source splits into two or more clusters or points. It fails as cluster_children does.

Source

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

Detaches the session from its map and frees its graphics objects. The demands on their way finish as FrameDisposition::TargetNotReady. Once the detach completes, another session can attach to the map.

Source

pub fn abandon(&self) -> Result<u32, Error>

Stops the session at once, without its pending graphics work: that work completes with ErrorKind::TargetLost before this returns, and the demands on their way finish as FrameDisposition::TargetNotReady. Once it returns, the session renders no more, and another session can attach to the map. Release the session afterward.

Returns how many graphics objects the session keeps until the process exits. A caller-driven session abandoned on the thread that services it lets go of them there, at its next service or when its DriverWork drops, and keeps none. Abandoned on another thread, it keeps them, since only that thread may free them, and logs a warning.

It waits for a core worker’s driver call on another thread, such as a frame that it renders. Fails with ErrorKind::Busy inside a driver call on the session’s own thread, such as from a completion that the session delivers, and while a caller-driven session’s service runs on another thread. Fails with ErrorKind::InvalidState once the session is detached, abandoned or released.

Source

pub fn abandon_keeping_graphics(&self) -> Result<u32, Error>

Abandons the session as abandon does, but makes no graphics call: the session keeps its graphics objects until the process exits. Returns how many it keeps, such as its renderer and the backend it draws with.

This is for a host whose shutdown may already have destroyed the graphics objects behind the session.

Source

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

Releases the session, detaching it first when it is attached. The completion reports when the session has let go of its map and its graphics objects, and nothing waits for its thread to end after that. Every call on the session fails with ErrorKind::InvalidState after.

A caller-driven session detaches at the host’s next service, so keep servicing it until the release completes. One that isn’t attached, such as while it attaches or after it failed, is abandoned instead, and so is one whose map is released before that service.

Source

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

Releases the session in any state, without waiting, and nothing waits for its thread to end. Dropping the last handle does the same, then waits for the thread.

Source

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

Releases the session in any state, without waiting and without a graphics call past the one in progress. A session that hasn’t ended is abandoned, keeping its graphics objects until the process exits, as abandon_keeping_graphics does. Nothing waits for its thread to end.

Trait Implementations§

Source§

impl Clone for RenderSession

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 RenderSession

Source§

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

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

impl Eq for RenderSession

Source§

impl PartialEq for RenderSession

Source§

fn eq(&self, other: &RenderSession) -> 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 RenderSession

§

impl !UnwindSafe for RenderSession

§

impl Forget for RenderSession

§

impl Freeze for RenderSession
where *const ArcInner<SessionHandle> is !null: Freeze, PhantomData<ArcInner<SessionHandle>>: Freeze,

§

impl Move for RenderSession

§

impl Send for RenderSession
where Arc<SessionHandle>: Send,

§

impl Sync for RenderSession
where Arc<SessionHandle>: Sync,

§

impl Unpin for RenderSession
where Arc<SessionHandle>: Unpin,

§

impl UnsafeUnpin for RenderSession
where *const ArcInner<SessionHandle> is !null: UnsafeUnpin, PhantomData<ArcInner<SessionHandle>>: 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, 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<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

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