arch_pkg_db/text/single/misc.rs
1use super::TextCollection;
2
3impl TextCollection {
4 /// Shrink the capacity of the internal data.
5 pub fn shrink_to_fit(&mut self) {
6 self.internal.shrink_to_fit()
7 }
8
9 /// The number of [`Text`](crate::Text)s within the collection.
10 pub fn len(&self) -> usize {
11 self.internal.len()
12 }
13
14 /// Whether the collection is empty.
15 pub fn is_empty(&self) -> bool {
16 self.internal.is_empty()
17 }
18}