Command

Enum 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§

§

impl<'a> Freeze for Command<'a>

§

impl<'a> !RefUnwindSafe for Command<'a>

§

impl<'a> Send for Command<'a>

§

impl<'a> Sync for Command<'a>

§

impl<'a> Unpin for Command<'a>

§

impl<'a> !UnwindSafe for Command<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.