Enum bspc::Command

source ·
pub enum Command<'a> {
    MapToBsp(&'a [u8]),
    MapToAas(&'a [u8]),
    BspToMap(&'a [u8]),
    BspToBsp(&'a [u8]),
    BspToAas(&'a [u8]),
    Other(CommandArgumentBuilder),
}
Expand description

The subcommand to pass to the BSPC executable.

If this is one of the standard subcommands (i.e. not Other), then the command accepts a byte slice containing the contents of the input file that should be converted. This library handles writing the input file to a temporary directory before invoking the BSPC executable.

Variants

MapToBsp(&'a [u8])

Corresponds to the -map2bsp subcommand.

MapToAas(&'a [u8])

Corresponds to the -map2aas subcommand.

BspToMap(&'a [u8])

Corresponds to the -bsp2map subcommand.

BspToBsp(&'a [u8])

Corresponds to the -bsp2bsp subcommand.

BspToAas(&'a [u8])

Corresponds to the -bsp2aas subcommand.

Other(CommandArgumentBuilder)

Allows sending an arbitrary command to the BSPC executable. This is an asynchronous callback that accepts the temporary directory that can be used to write files to, and returns a future that resolves to a list of arguments to pass to the BSPC executable (or an error).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.