pub struct OwnedDrawData { /* private fields */ }Expand description
A container for a heap-allocated deep copy of a DrawData struct.
Notes on thread-safety:
- This type intentionally does NOT implement
Send/Syncbecause it currently retains a pointer to the engine-managed textures list (ImVector<ImTextureData*>) instead of deep-copying it. That list can be mutated by the UI thread across frames. - You may move vertices/indices to another thread by extracting them into your own buffers or by implementing a custom deep copy which snapshots the textures list as well.
The underlying copy is released when this struct is dropped.
Implementations§
Trait Implementations§
Source§impl Default for OwnedDrawData
impl Default for OwnedDrawData
Source§impl Drop for OwnedDrawData
impl Drop for OwnedDrawData
Auto Trait Implementations§
impl Freeze for OwnedDrawData
impl RefUnwindSafe for OwnedDrawData
impl !Send for OwnedDrawData
impl !Sync for OwnedDrawData
impl Unpin for OwnedDrawData
impl UnwindSafe for OwnedDrawData
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
Mutably borrows from an owned value. Read more