Skip to main content

CliAction

Enum CliAction 

Source
pub enum CliAction {
    Help,
    FixtureNew {
        name: String,
        channels: HashMap<PropertyType, ChannelParameter>,
    },
    FixtureAdd {
        name: String,
        fixture_type_name: String,
        universe: usize,
        channel: ChannelIndex,
    },
    FixtureMove {
        fixture_name: String,
        new_universe: usize,
        new_channel: ChannelIndex,
    },
    FixtureRemove {
        fixture_name: String,
    },
    FixtureSet {
        name: String,
        property_type: PropertyType,
        value: ChannelValue,
    },
    FixtureGetType {
        fixture_name: String,
    },
    Exit {
        save_changes: Option<bool>,
    },
    OtherCommands {
        command: String,
    },
}
Expand description

Represents the available command-line interface (CLI) actions that can be dispatched.

Variants§

§

Help

Displays help information.

§

FixtureNew

Creates a new custom fixture template type with specific properties.

Fields

§name: String

Name of the new fixture type template.

§channels: HashMap<PropertyType, ChannelParameter>

Mapping of property types to their respective channel parameters.

§

FixtureAdd

Spawns an instance of a fixture into a specific universe and channel.

Fields

§name: String

Unique name for the fixture instance.

§fixture_type_name: String

Name of the registered fixture type template to use.

§universe: usize

Target DMX universe index.

§channel: ChannelIndex

Starting DMX channel index within the universe.

§

FixtureMove

Relocates an existing fixture instance to a new universe and/or channel.

Fields

§fixture_name: String

Name of the registered fixture instance to move.

§new_universe: usize

New target DMX universe index.

§new_channel: ChannelIndex

New starting DMX channel index.

§

FixtureRemove

Removes an existing fixture instance.

Fields

§fixture_name: String

Name of the fixture instance to remove.

§

FixtureSet

Updates a specific property value of a fixture.

Fields

§name: String

Name of the target fixture instance.

§property_type: PropertyType

The property type to update.

§value: ChannelValue

New raw channel value to assign.

§

FixtureGetType

Queries the fixture type name for a given fixture instance.

Fields

§fixture_name: String

Name of the fixture instance to query.

§

Exit

Shuts down the application, optionally saving configuration changes.

Behavior based on save_changes:

  • Some(false) – Shuts down immediately without saving changes.
  • Some(true) – Saves changes and then shuts down.
  • None – Prompts the user interactively to confirm whether to save changes.

Note: This command can only be executed within the kernel console.

Fields

§save_changes: Option<bool>

Optional flag indicating whether changes should be saved upon exit.

§

OtherCommands

Fallback for custom or unparsed command strings, mainly used for debug-commands

Fields

§command: String

The raw unparsed command string.

Trait Implementations§

Source§

impl Debug for CliAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CliAction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for CliAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for CliAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.