pub struct GraphPartitioner;Expand description
Graph Partitioner
Converts a PetCodeGraph into partitioned SQLite files.
Implementations§
Source§impl GraphPartitioner
impl GraphPartitioner
Sourcepub fn partition(
graph: &PetCodeGraph,
prism_dir: &Path,
root_name: Option<&str>,
) -> Result<Manifest, PartitionerError>
pub fn partition( graph: &PetCodeGraph, prism_dir: &Path, root_name: Option<&str>, ) -> Result<Manifest, PartitionerError>
Partition a PetCodeGraph into SQLite partition files.
§Arguments
graph- The code graph to partitionprism_dir- The .codeprysm directory pathroot_name- Optional root name for multi-root support (uses “default” if None)
§Returns
A Manifest with file→partition mappings and partition→filename mappings.
Sourcepub fn partition_with_stats(
graph: &PetCodeGraph,
prism_dir: &Path,
root_name: Option<&str>,
) -> Result<(Manifest, PartitioningStats), PartitionerError>
pub fn partition_with_stats( graph: &PetCodeGraph, prism_dir: &Path, root_name: Option<&str>, ) -> Result<(Manifest, PartitioningStats), PartitionerError>
Partition a PetCodeGraph and return statistics.
Like partition() but also returns partitioning statistics.
Sourcepub fn partition_with_root_info(
graph: &PetCodeGraph,
prism_dir: &Path,
root_info: RootInfo,
) -> Result<(Manifest, PartitioningStats), PartitionerError>
pub fn partition_with_root_info( graph: &PetCodeGraph, prism_dir: &Path, root_info: RootInfo, ) -> Result<(Manifest, PartitioningStats), PartitionerError>
Partition a graph with a RootInfo structure for complete root metadata.
This variant accepts a pre-configured RootInfo for better control over git metadata and root type.
Sourcepub fn update_partition(
graph: &PetCodeGraph,
prism_dir: &Path,
partition_id: &str,
root_name: &str,
) -> Result<(), PartitionerError>
pub fn update_partition( graph: &PetCodeGraph, prism_dir: &Path, partition_id: &str, root_name: &str, ) -> Result<(), PartitionerError>
Update a single partition after file changes.
This is useful for incremental updates where only a few files changed.
§Arguments
graph- The updated code graph (containing only changed files)prism_dir- The .codeprysm directory pathpartition_id- The partition to updateroot_name- The root name
Sourcepub fn get_unique_files(graph: &PetCodeGraph) -> HashSet<String>
pub fn get_unique_files(graph: &PetCodeGraph) -> HashSet<String>
Get unique files from a graph.
Useful for determining which files are in a partition.
Auto Trait Implementations§
impl Freeze for GraphPartitioner
impl RefUnwindSafe for GraphPartitioner
impl Send for GraphPartitioner
impl Sync for GraphPartitioner
impl Unpin for GraphPartitioner
impl UnwindSafe for GraphPartitioner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more