remove deprecated Commander traits

This commit is contained in:
Michael Sippel 2023-03-25 08:25:45 +01:00
parent b6bd888d3d
commit bdc19c33de

View file

@ -11,34 +11,7 @@ use crate::{
tree::{nav::TreeNavResult} tree::{nav::TreeNavResult}
}; };
//use r3vi::view::singleton::*;
pub trait ObjCommander { pub trait ObjCommander {
fn send_cmd_obj(&mut self, cmd_obj: Arc<RwLock<ReprTree>>) -> TreeNavResult; fn send_cmd_obj(&mut self, cmd_obj: Arc<RwLock<ReprTree>>) -> TreeNavResult;
} }
/*
//impl<Cmd: 'static, T: Commander<Cmd>> ObjCommander for T {
impl<C: Commander> ObjCommander for C
where C::Cmd: 'static
{
fn send_cmd_obj(&mut self, _cmd_obj: Arc<RwLock<ReprTree>>) -> TreeNavResult{
/*
self.send_cmd(
&cmd_obj.read().unwrap()
.get_port::<dyn SingletonView<Item = C::Cmd>>().unwrap()
.get_view().unwrap()
.get()
);
*/
}
}
impl<T: Clone + Send + Sync> Commander for r3vi::buffer::vec::VecBuffer<T> {
type Cmd = r3vi::buffer::vec::VecDiff<T>;
fn send_cmd(&mut self, cmd: &Self::Cmd) -> TreeNavResult {
self.apply_diff(cmd.clone());
TreeNavResult::
}
}
*/