#[repr(u32)]pub enum Memory {
Reference = 0,
Copy = 1,
}
Expand description
For performance sensitive areas, or places dealing with large chunks of memory, it can be faster to get a reference to that memory rather than copying it! However, if this isn’t explicitly stated, it isn’t necessarily clear what’s happening. So this enum allows us to visibly specify what type of memory reference is occurring. https://stereokit.net/Pages/StereoKit/Memory.html
Variants§
Reference = 0
The chunk of memory involved here is a reference that is still managed or used by StereoKit! You should not free it, and be extremely cautious about modifying it.
Copy = 1
This memory is now yours and you must free it yourself! Memory has been allocated, and the data has been copied over to it. Pricey! But safe.
Trait Implementations§
impl Copy for Memory
impl Eq for Memory
impl StructuralPartialEq for Memory
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
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