pub trait CoverProfileMatcher {
// Required methods
fn profile_for(&self, cover: &CoverMedia) -> Option<CoverProfile>;
fn apply_profile(
&self,
cover: CoverMedia,
profile: &CoverProfile,
) -> Result<CoverMedia, AdaptiveError>;
}Expand description
Cover profile matching port — detects whether a cover is AI-generated or camera-sourced.
Required Methods§
Sourcefn profile_for(&self, cover: &CoverMedia) -> Option<CoverProfile>
fn profile_for(&self, cover: &CoverMedia) -> Option<CoverProfile>
Return the best-matching CoverProfile for cover, or None
if no profile is close enough.
Sourcefn apply_profile(
&self,
cover: CoverMedia,
profile: &CoverProfile,
) -> Result<CoverMedia, AdaptiveError>
fn apply_profile( &self, cover: CoverMedia, profile: &CoverProfile, ) -> Result<CoverMedia, AdaptiveError>
Apply profile to cover (e.g. adjust JPEG quant tables for a
camera profile; no-op for AI profiles — we avoid their bins instead).
§Errors
Returns AdaptiveError::ProfileMatchFailed.