pub struct Callback(/* private fields */);
Expand description
You can use this to do custom wgpu
rendering in an egui app.
Implement CallbackTrait
and call Callback::new_paint_callback
.
This can be turned into a epaint::PaintCallback
and epaint::Shape
.
Implementations§
source§impl Callback
impl Callback
sourcepub fn new_paint_callback(
rect: Rect,
callback: impl CallbackTrait + 'static,
) -> PaintCallback
pub fn new_paint_callback( rect: Rect, callback: impl CallbackTrait + 'static, ) -> PaintCallback
Creates a new epaint::PaintCallback
from a callback trait instance.
Auto Trait Implementations§
impl Freeze for Callback
impl !RefUnwindSafe for Callback
impl Send for Callback
impl Sync for Callback
impl Unpin for Callback
impl !UnwindSafe for Callback
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