Any(Inner|Outer)ViewPort: make inner public
This commit is contained in:
parent
5becc11bf9
commit
5e441c9441
1 changed files with 3 additions and 2 deletions
|
@ -107,6 +107,7 @@ where V::Msg: Clone
|
|||
pub fn attach_to_port(&self, other_port: ViewPort<V>) {
|
||||
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<V: View + ?Sized + 'static> From<ViewPort<V>> 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<V: View + ?Sized + 'static>(self) -> Result<OuterViewPort<V>, AnyViewPort>
|
||||
|
|
Loading…
Reference in a new issue