Skip to content

Commit 49f61ec

Browse files
author
not-elm
committed
fix: doc lint
1 parent 69268ef commit 49f61ec

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

crates/bevy_flurx_ipc/src/ipc_trigger.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,18 @@ pub struct IpcTriggerSender(Arc<Mutex<Vec<IpcTriggerMessage>>>);
2424
impl IpcTriggerSender {
2525
/// Push the [`IpcTriggerMessage`] into queue.
2626
///
27-
/// The pushed event will be deserialized, and then will send as [`IpcEvent`].
27+
/// The message pushed will be deserialized into the type registered with [`IpcTriggerExt::add_ipc_trigger`].
2828
#[inline(always)]
2929
pub fn send(&self, event: IpcTriggerMessage) {
3030
self.0.lock().unwrap().push(event);
3131
}
3232
}
3333

34-
/// Add an [`IpcEvent`] into [`App`].
34+
/// Allows you to receive messages from Ipc as [`Trigger`](bevy::prelude::Trigger).
3535
pub trait IpcTriggerExt {
36-
/// This method registers [`IpcEvent<Payload>`](IpcEvent), which can be read just like a normal bevy event.
36+
/// This method allows you to receive messages from Ipc as [`Trigger`](bevy::prelude::Trigger).
3737
///
3838
/// `event_id` is the id that associated with this event.
39-
///
40-
/// From javascript side, you can emit the event as follows:
41-
/// `window.__FLURX__.emit(<event_id>, payload)`
4239
fn add_ipc_trigger<Payload>(&mut self, event_id: impl Into<String>) -> &mut Self
4340
where
4441
Payload: DeserializeOwned + Event + Send + Sync + 'static;

0 commit comments

Comments
 (0)