pub struct NotificationChannel { /* private fields */ }
Expand description
Notification channel.
The notification channel allows one thread to notify another that the other thread has some work to do. The notification carries no other information: the receiver is supposed to know where it can get whatever data it needs to what it needs to do.
The point of this is to make sure threads in the CI broker exchange data only via the database, where it is persistent.
Implementations§
Source§impl NotificationChannel
impl NotificationChannel
Sourcepub fn tx(&mut self) -> Result<NotificationSender, NotificationError>
pub fn tx(&mut self) -> Result<NotificationSender, NotificationError>
Return the transmit endpoint of the notification channel. This can only be called once.
Sourcepub fn rx(&mut self) -> Result<NotificationReceiver, NotificationError>
pub fn rx(&mut self) -> Result<NotificationReceiver, NotificationError>
Return the receive endpoint of the notification channel. This can only be called once.
Auto Trait Implementations§
impl Freeze for NotificationChannel
impl RefUnwindSafe for NotificationChannel
impl Send for NotificationChannel
impl !Sync for NotificationChannel
impl Unpin for NotificationChannel
impl UnwindSafe for NotificationChannel
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