pub struct GeometryHandle<T> { /* private fields */ }Expand description
An app-owned, versioned handle to one batch of geometry.
Cheap to clone (Arc bump). See the module docs for the
upload/caching contract. Type aliases MeshHandle, PointsHandle,
and LinesHandle name the concrete instantiations used by the marks.
Implementations§
Source§impl<T: GeometryData> GeometryHandle<T>
impl<T: GeometryData> GeometryHandle<T>
Sourcepub fn new(data: T) -> Self
pub fn new(data: T) -> Self
Create a handle, allocating a fresh GeometryId and computing
bounds. Revision starts at 1.
Sourcepub fn set(&self, data: T)
pub fn set(&self, data: T)
Replace the geometry and advance the revision, recomputing bounds. The backend re-uploads on its next draw because the revision moved.
This is the baseline update path: it re-uploads the whole buffer.
Finer-grained update_range / append paths are designed to slot
in later (the handle is the stable surface) without breaking
callers of set.
Sourcepub fn id(&self) -> GeometryId
pub fn id(&self) -> GeometryId
Stable identity for backend buffer caches.
Sourcepub fn revision(&self) -> u64
pub fn revision(&self) -> u64
Monotonic revision; advances on every GeometryHandle::set.
Trait Implementations§
Source§impl<T: Clone> Clone for GeometryHandle<T>
impl<T: Clone> Clone for GeometryHandle<T>
Source§fn clone(&self) -> GeometryHandle<T>
fn clone(&self) -> GeometryHandle<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> Freeze for GeometryHandle<T>
impl<T> RefUnwindSafe for GeometryHandle<T>
impl<T> Send for GeometryHandle<T>
impl<T> Sync for GeometryHandle<T>
impl<T> Unpin for GeometryHandle<T>
impl<T> UnsafeUnpin for GeometryHandle<T>
impl<T> UnwindSafe for GeometryHandle<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.