pub struct SendPtr<T>(/* private fields */);Expand description
A raw pointer wrapper that is Send + Sync.
Used to capture *const Params in EditorContext closures without
the ptr as usize hack. Safe because Params fields use atomic
storage — concurrent reads from the GUI thread while the audio
thread writes are safe by design.
The pointed-to data must outlive the SendPtr. In the plugin
context, the plugin instance (which owns the params) always
outlives the editor.
Implementations§
Trait Implementations§
impl<T> Copy for SendPtr<T>
impl<T> Send for SendPtr<T>
impl<T> Sync for SendPtr<T>
Auto Trait Implementations§
impl<T> Freeze for SendPtr<T>
impl<T> RefUnwindSafe for SendPtr<T>where
T: RefUnwindSafe,
impl<T> Unpin for SendPtr<T>
impl<T> UnsafeUnpin for SendPtr<T>
impl<T> UnwindSafe for SendPtr<T>where
T: RefUnwindSafe,
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