Skip to main content

write_communities_json

Function write_communities_json 

pub fn write_communities_json<W: Write>(
    result: &CommunitiesResult,
    w: &mut W,
) -> Result<()>
Expand description

communities emitter — emits the wrapper struct (rows + modularity + community_count), not just the row array — the partition-level summary is the headline metric and JSON consumers expect it alongside the per-file mapping.

§Errors

Returns crate::CodeLoreError::Io when the output sink fails mid-write (e.g. a reader closed the pipe early) and crate::CodeLoreError::Output on a genuine serialisation fault.