pub struct AppEventBridge {
inner: Arc<dyn AppEventEmitter>,
}Expand description
Bridge adapter that converts DownloadEvent to AppEvent and forwards to AppEventEmitter.
This provides a single wiring path: download manager emits DownloadEvent,
which gets mapped to the appropriate AppEvent variant and sent through
the shared event infrastructure.
§Example
ⓘ
let app_emitter: Arc<dyn AppEventEmitter> = /* Tauri or SSE emitter */;
let download_emitter = AppEventBridge::new(app_emitter);
// Pass to download manager
let manager = build_download_manager(DownloadManagerDeps {
event_emitter: Arc::new(download_emitter),
...
});Fields§
§inner: Arc<dyn AppEventEmitter>Implementations§
Source§impl AppEventBridge
impl AppEventBridge
Sourcepub fn new(emitter: Arc<dyn AppEventEmitter>) -> Self
pub fn new(emitter: Arc<dyn AppEventEmitter>) -> Self
Create a new bridge wrapping an AppEventEmitter.
Sourceconst fn map_event(event: DownloadEvent) -> AppEvent
const fn map_event(event: DownloadEvent) -> AppEvent
Wrap a DownloadEvent in an AppEvent.
Preserves all download event details including shard progress information.
Trait Implementations§
Source§impl Clone for AppEventBridge
impl Clone for AppEventBridge
Source§fn clone(&self) -> AppEventBridge
fn clone(&self) -> AppEventBridge
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AppEventBridge
impl !RefUnwindSafe for AppEventBridge
impl Send for AppEventBridge
impl Sync for AppEventBridge
impl Unpin for AppEventBridge
impl !UnwindSafe for AppEventBridge
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