pub struct RelinkEngine { /* private fields */ }Expand description
Engine that manages proxy relinking operations.
Implementations§
Source§impl RelinkEngine
impl RelinkEngine
Sourcepub fn add_rule(&mut self, rule: RelinkRule)
pub fn add_rule(&mut self, rule: RelinkRule)
Add a relink rule.
Sourcepub fn rule_count(&self) -> usize
pub fn rule_count(&self) -> usize
Return the number of rules configured.
Sourcepub fn try_relink(&self, record: &ProxyLinkRecord) -> Option<PathBuf>
pub fn try_relink(&self, record: &ProxyLinkRecord) -> Option<PathBuf>
Attempt to relink a single record by applying rules in order. Returns the new path if a rule matched, or None.
Sourcepub fn relink_batch(&self, records: &mut [ProxyLinkRecord]) -> RelinkReport
pub fn relink_batch(&self, records: &mut [ProxyLinkRecord]) -> RelinkReport
Run relinking on a batch of records, updating their health status.
Sourcepub fn mark_broken_by_prefix(
records: &mut [ProxyLinkRecord],
missing_prefix: &str,
)
pub fn mark_broken_by_prefix( records: &mut [ProxyLinkRecord], missing_prefix: &str, )
Check all records and mark broken links (source file missing). This operates on in-memory path string checks only (no filesystem access).
Sourcepub fn filename(path: &Path) -> Option<String>
pub fn filename(path: &Path) -> Option<String>
Extract the filename from a path for matching purposes.
Sourcepub fn build_filename_index(
records: &[ProxyLinkRecord],
) -> HashMap<String, Vec<usize>>
pub fn build_filename_index( records: &[ProxyLinkRecord], ) -> HashMap<String, Vec<usize>>
Build a lookup map from filename to link records for fuzzy relinking.
Trait Implementations§
Source§impl Debug for RelinkEngine
impl Debug for RelinkEngine
Auto Trait Implementations§
impl Freeze for RelinkEngine
impl RefUnwindSafe for RelinkEngine
impl Send for RelinkEngine
impl Sync for RelinkEngine
impl Unpin for RelinkEngine
impl UnsafeUnpin for RelinkEngine
impl UnwindSafe for RelinkEngine
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