mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
Comment fixes
This commit is contained in:
@@ -253,8 +253,8 @@ pub(crate) struct DebugLogging {
|
|||||||
pub(crate) msg_id: MsgId,
|
pub(crate) msg_id: MsgId,
|
||||||
/// Handle to the background task responsible for sending
|
/// Handle to the background task responsible for sending
|
||||||
pub(crate) loop_handle: task::JoinHandle<()>,
|
pub(crate) loop_handle: task::JoinHandle<()>,
|
||||||
/// Channel that log events should be send to
|
/// Channel that log events should be sent to.
|
||||||
/// A background loop will receive and handle them
|
/// A background loop will receive and handle them.
|
||||||
pub(crate) sender: Sender<DebugEventLogData>,
|
pub(crate) sender: Sender<DebugEventLogData>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ impl Events {
|
|||||||
Self { receiver, sender }
|
Self { receiver, sender }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Emits an event.
|
/// Emits an event into event channel.
|
||||||
|
///
|
||||||
|
/// If the channel is full, deletes the oldest event first.
|
||||||
pub fn emit(&self, event: Event) {
|
pub fn emit(&self, event: Event) {
|
||||||
match self.sender.try_send(event) {
|
match self.sender.try_send(event) {
|
||||||
Ok(()) => {}
|
Ok(()) => {}
|
||||||
@@ -49,7 +51,7 @@ impl Events {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Retrieve the event emitter.
|
/// Creates an event emitter.
|
||||||
pub fn get_emitter(&self) -> EventEmitter {
|
pub fn get_emitter(&self) -> EventEmitter {
|
||||||
EventEmitter(self.receiver.clone())
|
EventEmitter(self.receiver.clone())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user