pub struct RfdAsyncBackend;Expand description
Native file-dialog backend backed by the rfd crate.
Each Self::dispatch call builds an rfd::AsyncFileDialog,
attaches the parent window handle, then spawns the future on
async-std’s global thread pool. The future’s resolution
posts a FileDialogEventPayload back through the supplied
teksilo_core::AppEventPoster.
On macOS, rfd dispatches the actual NSOpenPanel /
NSSavePanel to the AppKit main run loop internally — the
future drives the wakeup machinery, but the panel UI runs on
the main thread that winit is already pumping.
Implementations§
Trait Implementations§
Source§impl Default for RfdAsyncBackend
impl Default for RfdAsyncBackend
Source§impl FileDialogBackend for RfdAsyncBackend
impl FileDialogBackend for RfdAsyncBackend
Source§fn dispatch(
&mut self,
request_id: RequestId,
window_id: TeksiloWindowId,
request: FileDialogRequest,
poster: Arc<dyn AppEventPoster>,
)
fn dispatch( &mut self, request_id: RequestId, window_id: TeksiloWindowId, request: FileDialogRequest, poster: Arc<dyn AppEventPoster>, )
Spawn an async pick/save/folder request. The backend MUST
eventually deliver the result by calling
AppEventPoster::post_external
on the supplied poster, with a boxed FileDialogEventPayload
whose request_id matches the argument and whose
window_id_owner is set to window_id.Auto Trait Implementations§
impl Freeze for RfdAsyncBackend
impl RefUnwindSafe for RfdAsyncBackend
impl Send for RfdAsyncBackend
impl Sync for RfdAsyncBackend
impl Unpin for RfdAsyncBackend
impl UnsafeUnpin for RfdAsyncBackend
impl UnwindSafe for RfdAsyncBackend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.