From 5e441c9441d84d8fab2d34339a71e1034e2cd00e Mon Sep 17 00:00:00 2001 From: Michael Sippel Date: Fri, 15 Mar 2024 19:19:37 +0100 Subject: [PATCH] Any(Inner|Outer)ViewPort: make inner public --- src/view/port.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/view/port.rs b/src/view/port.rs index fe978ba..3dac40d 100644 --- a/src/view/port.rs +++ b/src/view/port.rs @@ -107,6 +107,7 @@ where V::Msg: Clone pub fn attach_to_port(&self, other_port: ViewPort) { self.set_view( other_port.view.read().unwrap().clone() ); other_port.add_observer( self.cast.clone() ); + // todo: forward reset() ? self.update_hooks.write().unwrap().clear(); self.add_update_hook( Arc::new(other_port) ); @@ -303,10 +304,10 @@ impl From> for AnyViewPort { //<<<<>>>><<>><><<>><<<*>>><<>><><<>><<<<>>>> #[derive(Clone)] -pub struct AnyOuterViewPort(AnyViewPort); +pub struct AnyOuterViewPort(pub AnyViewPort); #[derive(Clone)] -pub struct AnyInnerViewPort(AnyViewPort); +pub struct AnyInnerViewPort(pub AnyViewPort); impl AnyOuterViewPort { pub fn downcast(self) -> Result, AnyViewPort>