None
PL
Can Yrs fit my table?
[]
Bartosz Sypytkowski
struct Table { cols: ArrayRef, // column metadata rows: ArrayRef, // row metadata cells: MapRef, // contents of the cells } impl Table { fn import_columns(&self, txn: &mut TransactionMut, reader: &mut Reader<File>) -> Vec<u32> { let headers = reader.headers().unwrap(); let headers: Vec<_> = headers.iter().collect(); let mut column_ids = Vec::with_capacity(headers.len()); let mut column_id_index = HashSet::with_capacity(headers.len()); for header in headers { let mut col_id = fastrand::u32(..); // (skipped) ensure unique col_id column_ids.push(col_id); let len = self.cols.len(txn); // this preliminary instance will become MapRef after being // integrated into yrs Doc let col_meta = MapPrelim::from([ ("id", Any::BigInt(col_id as i64)), ("name", Any::from(header)), ("width", Any::from(130)),…