pub fn place_cube(
        &mut self,
        cube_id: CubeId,
        meta: CubeMeta,
    ) -> Result<(), ()> {
        let router = meta.router;
        let vec = self.ensured_router(router);
        vec.retain(|id| id != &cube_id);
        let idx = if meta.idx > vec.len() {
            return Err(());
        } else {
            meta.idx
        };
        vec.insert(idx, cube_id);
        Ok(())
    }
/// places a cube within a safe idx
places a cube within a safe idx
places a cube within a safe idx
pub fn place_cube(
        &mut self,
        cube_id: CubeId,
        meta: CubeMeta,
    ) -> Result<(), ()> {
        let router = meta.router;
        let vec = self.ensured_router(router);
        vec.retain(|id| id != &cube_id);
        let idx = if meta.idx > vec.len() {
            return Err(());
        } else {
            meta.idx
        };
        vec.insert(idx, cube_id);
        Ok(())
    }
pub fn place_cube ( & mut self , cube_id : CubeId , meta : CubeMeta , ) -> Result < ( ) , ( ) > { let router = meta . router ; let vec = self . ensured_router ( router ) ; vec . retain ( | id | id != & cube_id ) ; let idx = if meta . idx > vec . len ( ) { return Err ( ( ) ) ; } else { meta . idx } ; vec . insert ( idx , cube_id ) ; Ok ( ( ) ) }
places a cube within a safe idx
places a cube within a safe idx
&mut self
cube_id
CubeId
meta
CubeMeta
&mut self
cube_id
CubeId
meta
CubeMeta