[][src]Trait ptero::encoder::Encoder

pub trait Encoder<E>: Capacity where
    E: Context
{ pub fn partial_encode(
        &self,
        context: &mut E,
        data: &mut dyn Iterator<Item = Bit>
    ) -> Result<EncoderResult, Box<dyn Error>>; pub fn encode(
        &self,
        context: &mut E,
        data: &mut dyn Iterator<Item = Bit>,
        progress_channel: Option<&Sender<ProgressStatus>>
    ) -> Result<String, Box<dyn Error>> { ... } }

Base trait for all data encoders. The generic type should contain data need by the encoder implementation.

Required methods

pub fn partial_encode(
    &self,
    context: &mut E,
    data: &mut dyn Iterator<Item = Bit>
) -> Result<EncoderResult, Box<dyn Error>>
[src]

Encodes bits provided by data iterator. Every Encoder has Context which exposes access to cover text. See Context for more info.

Arguments

  • context - context of the steganography method, can contain various needed info like pivot etc.
  • data - data iterator which return Bit with each iteration

Returns

It returns whether the encoding was successful. See EncoderResult and EncodingError.

Loading content...

Provided methods

pub fn encode(
    &self,
    context: &mut E,
    data: &mut dyn Iterator<Item = Bit>,
    progress_channel: Option<&Sender<ProgressStatus>>
) -> Result<String, Box<dyn Error>>
[src]

Loading content...

Implementors

impl Encoder<PivotByLineContext> for ELUVMethod[src]

impl Encoder<PivotByLineContext> for ExtendedLineMethod[src]

impl Encoder<PivotByLineContext> for LineExtendMethod[src]

impl<E> Encoder<E> for TrailingUnicodeMethod where
    E: Context
[src]

impl<E> Encoder<E> for TrailingWhitespaceMethod where
    E: Context
[src]

impl<T> Encoder<T> for RandomWhitespaceMethod where
    T: Context
[src]

Loading content...