~ruther/map-led-strip

ref: b96d6d8db3856bf4056a9092185fb9ffbb69a6af map-led-strip/src/commands/command.rs -rw-r--r-- 512 bytes
b96d6d8d — František Boháček refactor: remove body of specific commands, do not expose fields of structs publicly... 1 year, 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::commands::command_argument::CommandArgument;

pub struct Command<'d>
{
    full: &'d [char],
    parsed_arguments: &'d [CommandArgument<'d>],
}

impl<'d> Command<'d> {
    pub fn new(full: &'d [char], parsed_arguments: &'d [CommandArgument<'d>]) -> Self {
        Self {
            full,
            parsed_arguments
        }
    }
    pub fn full(&self) -> &'d [char] {
        self.full
    }

    pub fn parsed_arguments(&self) -> &'d [CommandArgument<'d>] {
        self.parsed_arguments
    }
}
Do not follow this link