pub struct Categorization {
pub codec_id: u8,
pub codec_params: Vec<u8>,
pub category: &'static str,
}Expand description
A categorizer’s decision for one file.
codec_id selects the codec; codec_params carries any
codec-specific parameters the categorizer extracted from the
file header (e.g. PCM sample format for FLAC, bitpix for
ricepp). The codec crate owns its parameter format; the
categorizer just hands opaque bytes through.
Fields§
§codec_id: u8Codec id from limnifs_core::codec (e.g. CODEC_FLAC).
codec_params: Vec<u8>Codec-specific parameters extracted from the file header. Encoded format is owned by the codec crate; opaque to the framework.
category: &'static strHuman-readable category name for diagnostics
(e.g. "pcmaudio/waveform", "fits/image").
Trait Implementations§
Source§impl Clone for Categorization
impl Clone for Categorization
Source§fn clone(&self) -> Categorization
fn clone(&self) -> Categorization
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Categorization
impl RefUnwindSafe for Categorization
impl Send for Categorization
impl Sync for Categorization
impl Unpin for Categorization
impl UnsafeUnpin for Categorization
impl UnwindSafe for Categorization
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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