pub fn new_many(mice: Vec<Arc<Mouse>>, id: usize) -> Self {
        let inner = Arc::new(Mutex::new(MiceDevInner {
            packet_offset: 0,
            last_buttons: MouseFlags::empty(),
            buf: VecDeque::with_capacity(BUF_CAPACITY),
        }));
        for m in &mice {
            let cloned = inner.clone();
            m.subscribe(
                Box::new(move |p| cloned.lock().handle_mouse_packet(p)),
                false,
            );
        }
        Self {
            id,
            mice,
            inner,
            inode_id: DevFS::new_inode_id(),
        }
    }
/// Create a "mice" INode from multiple mice.
Create a "mice" INode from multiple mice.
Create a " mice " INode from multiple mice .
pub fn new_many(mice: Vec<Arc<Mouse>>, id: usize) -> Self {
        let inner = Arc::new(Mutex::new(MiceDevInner {
            packet_offset: 0,
            last_buttons: MouseFlags::empty(),
            buf: VecDeque::with_capacity(BUF_CAPACITY),
        }));
        for m in &mice {
            let cloned = inner.clone();
            m.subscribe(
                Box::new(move |p| cloned.lock().handle_mouse_packet(p)),
                false,
            );
        }
        Self {
            id,
            mice,
            inner,
            inode_id: DevFS::new_inode_id(),
        }
    }
pub fn new_many ( mice : Vec < Arc < Mouse > > , id : usize ) -> Self { let inner = Arc :: new ( Mutex :: new ( MiceDevInner { packet_offset : 0 , last_buttons : MouseFlags :: empty ( ) , buf : VecDeque :: with_capacity ( BUF_CAPACITY ) , } ) ) ; for m in & mice { let cloned = inner . clone ( ) ; m . subscribe ( Box :: new ( move | p | cloned . lock ( ) . handle_mouse_packet ( p ) ) , false , ) ; } Self { id , mice , inner , inode_id : DevFS :: new_inode_id ( ) , } }
Create a "mice" INode from multiple mice.
Create a " mice " INode from multiple mice .
mice
Vec<Arc<Mouse>>
id
usize
mice
Vec<Arc<Mouse>>
id
usize