pub struct BrainExporter;Expand description
Export helper for writing .brainbundle files.
Implementations§
Source§impl BrainExporter
impl BrainExporter
Sourcepub fn export_bundle<P: AsRef<Path>>(
db: &Database,
output_path: P,
decouple_ast: bool,
) -> Result<()>
pub fn export_bundle<P: AsRef<Path>>( db: &Database, output_path: P, decouple_ast: bool, ) -> Result<()>
Export database nodes and edges into a portable .brainbundle JSON file.
Writes via a temporary file then rename for crash safety.
When decouple_ast is true:
- drops
NodeType::Symbolnodes - clears
file_path/symbol_hashon remaining nodes - drops edges whose endpoints were removed
Sourcepub fn export_bundle_filtered<P: AsRef<Path>>(
db: &Database,
output_path: P,
decouple_ast: bool,
scope: Option<&str>,
) -> Result<()>
pub fn export_bundle_filtered<P: AsRef<Path>>( db: &Database, output_path: P, decouple_ast: bool, scope: Option<&str>, ) -> Result<()>
Export, optionally limited to one owner scope (SubBrain share without merge).
Hub nodes (readme, changelog, roadmap, backlog) are included when
exporting a SubBrain so the bundle still orients. Edges kept only if both
endpoints remain.
Auto Trait Implementations§
impl Freeze for BrainExporter
impl RefUnwindSafe for BrainExporter
impl Send for BrainExporter
impl Sync for BrainExporter
impl Unpin for BrainExporter
impl UnsafeUnpin for BrainExporter
impl UnwindSafe for BrainExporter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more