asbs

Trait Reveal

Source
pub trait Reveal {
    type Err;

    // Required method
    fn reveal<W: Write>(self, output: W) -> Result<usize, Self::Err>;
}
Expand description

A trait for objects able to reveal steganographic messages, or packages.

Packages are defined by a single required method, reveal, which writes the hidden message to the output.

§Examples

binary::Package can be used to reveal secret messages hidden in binary data.

Required Associated Types§

Source

type Err

The associated error type of the reveal method.

Required Methods§

Source

fn reveal<W: Write>(self, output: W) -> Result<usize, Self::Err>

Writes the hidden message into output, returning how many bytes were written.

It is up to the implementations to establish a format and conditions under which the hidden message is interpreted.

For instance, an implementation may prepend message length to the message while writing, or may provide the caller with a way to specify its length so that the function writes only as many bytes as needed.

§Errors

This function returns any form of error encountered to the caller. If an error is returned, however, it is not guaranteed that no bytes were written.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<M, R> Reveal for &mut Package<M, R>
where M: FnMut(usize) -> Option<u8>, R: Read,