(nodes: &mut Vec<CollectionNode>, node_id: Uuid)
| 819 | .collect() |
| 820 | } |
| 821 | |
| 822 | pub fn is_empty(&self) -> bool { |
| 823 | self.collections.is_empty() |
| 824 | } |
| 825 | |
| 826 | pub fn len(&self) -> usize { |
| 827 | self.collections.len() |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | impl EventEmitter<CollectionsEvent> for CollectionsEntity {} |
| 832 | |
| 833 | impl CollectionNode { |
| 834 | fn from_imported_node(node: ImportedNode) -> Self { |
| 835 | match node { |
| 836 | ImportedNode::Folder { name, children } => { |
| 837 | CollectionNode::Folder(CollectionFolderNode { |
| 838 | id: Uuid::new_v4(), |
no test coverage detected