pub struct CorpusService;Expand description
Corpus index and cover-selection orchestrator.
Implementations§
Source§impl CorpusService
impl CorpusService
Sourcepub fn build_index(
index: &dyn CorpusIndex,
corpus_dir: &Path,
) -> Result<usize, AppError>
pub fn build_index( index: &dyn CorpusIndex, corpus_dir: &Path, ) -> Result<usize, AppError>
Sourcepub fn search(
index: &dyn CorpusIndex,
payload: &Payload,
technique: StegoTechnique,
max_results: usize,
) -> Result<Vec<CorpusEntry>, AppError>
pub fn search( index: &dyn CorpusIndex, payload: &Payload, technique: StegoTechnique, max_results: usize, ) -> Result<Vec<CorpusEntry>, AppError>
Search the index for covers that best encode payload using technique.
§Errors
Returns AppError::Corpus on failure.
Sourcepub fn search_for_model(
index: &dyn CorpusIndex,
payload: &Payload,
model_id: &str,
resolution: (u32, u32),
max_results: usize,
) -> Result<Vec<CorpusEntry>, AppError>
pub fn search_for_model( index: &dyn CorpusIndex, payload: &Payload, model_id: &str, resolution: (u32, u32), max_results: usize, ) -> Result<Vec<CorpusEntry>, AppError>
Search the index restricted to a specific camera model and resolution.
§Errors
Returns AppError::Corpus on failure.
Sourcepub fn model_stats(index: &dyn CorpusIndex) -> Vec<(SpectralKey, usize)>
pub fn model_stats(index: &dyn CorpusIndex) -> Vec<(SpectralKey, usize)>
Return per-model/resolution entry counts from the index.
Auto Trait Implementations§
impl Freeze for CorpusService
impl RefUnwindSafe for CorpusService
impl Send for CorpusService
impl Sync for CorpusService
impl Unpin for CorpusService
impl UnsafeUnpin for CorpusService
impl UnwindSafe for CorpusService
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