From 0732a7ef54db62194adece5eb6e9efb07b923257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ja=C5=ADhien=20Piatlicki?= Date: Thu, 31 Oct 2024 15:59:35 +0100 Subject: [PATCH] Changes after review --- asynchronix-util/src/observables.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/asynchronix-util/src/observables.rs b/asynchronix-util/src/observables.rs index 1adefa0..45bb28a 100644 --- a/asynchronix-util/src/observables.rs +++ b/asynchronix-util/src/observables.rs @@ -19,7 +19,7 @@ where /// Observable state. /// -/// This struct incapsulates state. Every state change is propagated to the +/// This object encapsulates state. Every state change is propagated to the /// output. #[derive(Debug)] pub struct ObservableState @@ -67,6 +67,11 @@ where self.out.send(self.state.observe()).await; r } + + /// Propagate value. + pub async fn propagate(&mut self) { + self.out.send(self.state.observe()).await; + } } impl Deref for ObservableState