pub struct CoverProfileMatcherImpl { /* private fields */ }Expand description
Concrete cover-profile matcher.
Loaded from a JSON codebook at construction time. The built-in codebook includes the Gemini watermark profile.
Implementations§
Source§impl CoverProfileMatcherImpl
impl CoverProfileMatcherImpl
Sourcepub fn from_codebook(json: &str) -> Result<Self, AdaptiveError>
pub fn from_codebook(json: &str) -> Result<Self, AdaptiveError>
Parse an AI profile codebook from a JSON string.
§Errors
Returns AdaptiveError::ProfileMatchFailed if the JSON is malformed.
Sourcepub fn with_built_in() -> Self
pub fn with_built_in() -> Self
Build using the built-in ai_profiles.json codebook bundled at
compile time.
§Panics
Never panics in production — the embedded JSON is validated at compile-time test level.
Sourcepub fn assess_ai_watermark(
&self,
cover: &CoverMedia,
) -> Option<AiWatermarkAssessment>
pub fn assess_ai_watermark( &self, cover: &CoverMedia, ) -> Option<AiWatermarkAssessment>
Assess whether a raster cover still matches a known AI watermark profile.
Trait Implementations§
Source§impl CoverProfileMatcher for CoverProfileMatcherImpl
impl CoverProfileMatcher for CoverProfileMatcherImpl
Source§fn profile_for(&self, cover: &CoverMedia) -> Option<CoverProfile>
fn profile_for(&self, cover: &CoverMedia) -> Option<CoverProfile>
Source§fn 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). Read moreAuto Trait Implementations§
impl Freeze for CoverProfileMatcherImpl
impl RefUnwindSafe for CoverProfileMatcherImpl
impl Send for CoverProfileMatcherImpl
impl Sync for CoverProfileMatcherImpl
impl Unpin for CoverProfileMatcherImpl
impl UnsafeUnpin for CoverProfileMatcherImpl
impl UnwindSafe for CoverProfileMatcherImpl
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