Trait Decoder

Source
pub trait Decoder<D>
where D: Context,
{ // Required method fn partial_decode(&self, context: &D) -> Result<Vec<Bit>, ContextError>; // Provided method fn decode( &self, context: &mut D, progress_channel: Option<&Sender<ProgressStatus>>, ) -> Result<Vec<u8>, Box<dyn Error>> { ... } }
Expand description

Base trait for all data decoders. The generic type should contain data need by the decoder implementation.

Required Methods§

Source

fn partial_decode(&self, context: &D) -> Result<Vec<Bit>, ContextError>

Decodes bits from the cover text. The access to the cover text is bound by the Context.

§Arguments
  • context - context of the steganography method, can contain various needed info like pivot etc.
§Returns

It returns Result, either decoded data as as vector of Bits or error.

Provided Methods§

Source

fn decode( &self, context: &mut D, progress_channel: Option<&Sender<ProgressStatus>>, ) -> Result<Vec<u8>, Box<dyn Error>>

Implementors§