flo_scene 0.2.0

Entity-messaging system for composing large programs from small programs
Documentation
use crate::host::scene_message::*;

use serde::*;

/// The name of the command sent to request the list command response
pub const LIST_COMMANDS: &str = "list_commands";

///
/// Description of a command as returned by ListCommand
///
#[derive(Clone, PartialEq, Eq, Debug)]
#[derive(Serialize, Deserialize)]
pub struct CommandDescription {
    /// The name of the command
    pub name: String,
}

///
/// As part of a response to a list commands request, this indicates the name of a command supported by the sender. This
/// is often used with a conversion into the response type of a command.
///
#[derive(Clone, PartialEq, Eq, Debug)]
#[derive(Serialize, Deserialize)]
pub struct ListCommandResponse(pub Vec<CommandDescription>);

impl SceneMessage for ListCommandResponse { 
    #[inline]
    fn message_type_name() -> String { "flo_scene::ListCommandResponse".into() }
}