pub struct EmbedCheckpoint {Show 14 fields
pub version: u32,
pub created_at: u64,
pub updated_at: u64,
pub repo_id: CheckpointRepoId,
pub repo_path: String,
pub settings_hash: String,
pub processed_files: BTreeSet<String>,
pub remaining_files: Vec<String>,
pub chunks_by_file: BTreeMap<String, Vec<ChunkReference>>,
pub total_chunks: usize,
pub total_tokens: u64,
pub failed_files: BTreeMap<String, String>,
pub phase: CheckpointPhase,
pub integrity_hash: String,
}Expand description
Checkpoint state for embedding operations
Fields§
§version: u32Format version for forward compatibility
created_at: u64When this checkpoint was created (Unix timestamp)
updated_at: u64When this checkpoint was last updated
repo_id: CheckpointRepoIdRepository identifier (bincode-compatible version)
repo_path: StringRepository root path (for validation)
settings_hash: StringHash of the settings used (for validation)
processed_files: BTreeSet<String>Files that have been fully processed
remaining_files: Vec<String>Files remaining to process (for progress tracking)
chunks_by_file: BTreeMap<String, Vec<ChunkReference>>Chunks generated so far (stored by file for efficient resume)
total_chunks: usizeTotal chunks generated
total_tokens: u64Total tokens across all chunks
failed_files: BTreeMap<String, String>Files that failed processing (with error messages)
phase: CheckpointPhaseCurrent phase of processing
integrity_hash: StringIntegrity hash of checkpoint content
Implementations§
Source§impl EmbedCheckpoint
impl EmbedCheckpoint
Sourcepub fn new(
repo_path: &Path,
repo_id: RepoIdentifier,
settings: &EmbedSettings,
) -> Self
pub fn new( repo_path: &Path, repo_id: RepoIdentifier, settings: &EmbedSettings, ) -> Self
Create a new checkpoint for a repository
Sourcepub fn mark_file_processed(&mut self, file: &str, chunks: &[EmbedChunk])
pub fn mark_file_processed(&mut self, file: &str, chunks: &[EmbedChunk])
Record that a file has been processed
Sourcepub fn mark_file_failed(&mut self, file: &str, error: &str)
pub fn mark_file_failed(&mut self, file: &str, error: &str)
Record that a file failed processing
Sourcepub fn set_phase(&mut self, phase: CheckpointPhase)
pub fn set_phase(&mut self, phase: CheckpointPhase)
Set the current processing phase
Sourcepub fn is_chunking_complete(&self) -> bool
pub fn is_chunking_complete(&self) -> bool
Check if all files have been processed
Sourcepub fn progress_percent(&self) -> u32
pub fn progress_percent(&self) -> u32
Get progress as a percentage (0-100)
Sourcepub fn files_processed(&self) -> usize
pub fn files_processed(&self) -> usize
Get number of files processed
Sourcepub fn files_remaining(&self) -> usize
pub fn files_remaining(&self) -> usize
Get number of files remaining
Sourcepub fn files_failed(&self) -> usize
pub fn files_failed(&self) -> usize
Get number of files that failed
Sourcepub fn validate(
&self,
repo_path: &Path,
settings: &EmbedSettings,
) -> Result<(), CheckpointError>
pub fn validate( &self, repo_path: &Path, settings: &EmbedSettings, ) -> Result<(), CheckpointError>
Validate that this checkpoint matches the given settings and repo
Sourcepub fn compute_integrity(&mut self)
pub fn compute_integrity(&mut self)
Compute integrity hash for the checkpoint
Sourcepub fn verify_integrity(&self) -> bool
pub fn verify_integrity(&self) -> bool
Verify integrity hash
Trait Implementations§
Source§impl Clone for EmbedCheckpoint
impl Clone for EmbedCheckpoint
Source§fn clone(&self) -> EmbedCheckpoint
fn clone(&self) -> EmbedCheckpoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EmbedCheckpoint
impl Debug for EmbedCheckpoint
Source§impl<'de> Deserialize<'de> for EmbedCheckpoint
impl<'de> Deserialize<'de> for EmbedCheckpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&EmbedCheckpoint> for CheckpointStats
impl From<&EmbedCheckpoint> for CheckpointStats
Source§fn from(cp: &EmbedCheckpoint) -> Self
fn from(cp: &EmbedCheckpoint) -> Self
Auto Trait Implementations§
impl Freeze for EmbedCheckpoint
impl RefUnwindSafe for EmbedCheckpoint
impl Send for EmbedCheckpoint
impl Sync for EmbedCheckpoint
impl Unpin for EmbedCheckpoint
impl UnwindSafe for EmbedCheckpoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);