slash-lib 0.1.0

Executor types and high-level API for the slash-command language
Documentation
mod echo;
mod exec;
mod find;
mod read;
mod write;

#[cfg(feature = "obfsck")]
mod obfsck;

pub use echo::Echo;
pub use exec::Exec;
pub use find::Find;
pub use read::Read;
pub use write::Write;

#[cfg(feature = "obfsck")]
pub use obfsck::Obfsck;

use crate::command::SlashCommand;

/// Returns all built-in commands.
pub fn all() -> Vec<Box<dyn SlashCommand>> {
    #[allow(unused_mut)]
    let mut v: Vec<Box<dyn SlashCommand>> = vec![
        Box::new(Echo),
        Box::new(Read),
        Box::new(Write),
        Box::new(Exec),
        Box::new(Find),
    ];
    #[cfg(feature = "obfsck")]
    v.push(Box::new(Obfsck));
    v
}