pub struct DropZoneResponse<P, R> {
pub inner: R,
pub response: Response,
pub payload: Option<Arc<P>>,
pub is_being_dragged_over: bool,
}Expand description
Response from a drop zone
Fields§
§inner: RThe return value from the content closure
response: ResponseThe egui response
payload: Option<Arc<P>>The payload if one was dropped
is_being_dragged_over: boolWhether a compatible payload is being dragged over this zone
Implementations§
Source§impl<P, R> DropZoneResponse<P, R>
impl<P, R> DropZoneResponse<P, R>
Sourcepub fn on_drop<Msg, F>(self, ctx: &mut ViewCtx<'_, Msg>, f: F) -> Self
pub fn on_drop<Msg, F>(self, ctx: &mut ViewCtx<'_, Msg>, f: F) -> Self
Emit a message when a payload is dropped
Sourcepub fn on_hover<Msg>(self, ctx: &mut ViewCtx<'_, Msg>, msg: Msg) -> Self
pub fn on_hover<Msg>(self, ctx: &mut ViewCtx<'_, Msg>, msg: Msg) -> Self
Emit a message when hovering with a compatible payload
Sourcepub fn map<U>(self, f: impl FnOnce(R) -> U) -> DropZoneResponse<P, U>
pub fn map<U>(self, f: impl FnOnce(R) -> U) -> DropZoneResponse<P, U>
Map the inner value
Auto Trait Implementations§
impl<P, R> Freeze for DropZoneResponse<P, R>where
R: Freeze,
impl<P, R> !RefUnwindSafe for DropZoneResponse<P, R>
impl<P, R> Send for DropZoneResponse<P, R>
impl<P, R> Sync for DropZoneResponse<P, R>
impl<P, R> Unpin for DropZoneResponse<P, R>where
R: Unpin,
impl<P, R> !UnwindSafe for DropZoneResponse<P, R>
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