(&self, txn: &mut TransactionMut)
| 378 | } |
| 379 | |
| 380 | pub fn clear(&self, txn: &mut TransactionMut) { |
| 381 | let Some(uid) = self.uid() else { |
| 382 | return; |
| 383 | }; |
| 384 | if let Some(array) = self |
| 385 | .container() |
| 386 | .get_with_txn::<_, ArrayRef>(txn, uid.as_ref()) |
| 387 | { |
| 388 | let len = array.iter(txn).count(); |
| 389 | array.remove_range(txn, 0, len as u32); |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | /// An item in a user's section, representing a view and when it was added. |
no test coverage detected