MCPcopy Create free account
hub / github.com/bajrangCoder/setu / from_imported_node

Method from_imported_node

src/entities/collections.rs:694–711  ·  view source on GitHub ↗
(node: ImportedNode)

Source from the content-addressed store, hash-verified

692 if insert_node(&mut collection.nodes, parent_folder_id, node).is_err() {
693 return None;
694 }
695
696 self.bump_revision();
697 self.save_to_file();
698 cx.emit(CollectionsEvent::NodeAdded(collection_id, node_id));
699 cx.notify();
700 Some(node_id)
701 }
702
703 pub fn remove_node(
704 &mut self,
705 collection_id: Uuid,
706 node_id: Uuid,
707 cx: &mut Context<Self>,
708 ) -> bool {
709 let Some(collection) = self.collections.iter_mut().find(|c| c.id == collection_id) else {
710 return false;
711 };
712
713 if remove_node(&mut collection.nodes, node_id).is_none() {
714 return false;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected