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