[][src]Enum binjs_io::Format

pub enum Format {
    Simple,
    Multipart {
        targets: Targets,
        stats: Rc<RefCell<Statistics>>,
    },
    XML,
    JSON,
    Entropy {
        options: Options,
    },
}

All the formats available for encoding/decoding.

Variants

Simple
Multipart

Fields of Multipart

targets: Targetsstats: Rc<RefCell<Statistics>>
XML
JSON
Entropy

Fields of Entropy

options: Options

Methods

impl Format[src]

pub fn simple() -> Self[src]

pub fn randomize_options<R: Rng>(self, rng: &mut R) -> Self[src]

Pick a random set of options.

Used for testing.

pub fn name(&self) -> String[src]

Return a human-readable name for this format.

pub fn with_sections<F, E>(&mut self, f: F) -> Result<(), E> where
    F: FnMut(&mut CompressionTarget, &str) -> Result<(), E>, 
[src]

pub fn subcommand<'a, 'b>() -> App<'a, 'b>[src]

Returns command-line argument for advanced. FormatProvider's subcommands are hidden behind "advanced" command.

pub fn from_matches(spec: &Spec, matches: &ArgMatches) -> Result<Self, Error>[src]

Create a Format based on command-line arguments.

Pick the first format provider that was invoked by matches as a subcommand. If none, pick the default provider, without any command-line arguments.

Trait Implementations

impl Distribution<Format> for Standard[src]

Support picking a random format. Used for testing.

Auto Trait Implementations

impl !RefUnwindSafe for Format

impl !Send for Format

impl !Sync for Format

impl Unpin for Format

impl !UnwindSafe for Format

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]