pub struct CommandGroup<'a> { /* private fields */ }
Expand description
Command
equivalent for a ControllerGroup
, which allow you to update multiple controllers.
This is useful when doing updates for multiple controllers at once.
Implementations§
Source§impl<'a> CommandGroup<'a>
impl<'a> CommandGroup<'a>
Sourcepub async fn execute(self) -> OpenRgbResult<()>
pub async fn execute(self) -> OpenRgbResult<()>
Executes all commands in this group one after another.
Sourcepub fn set_controller_led<C: Into<Color>>(
&mut self,
controller_id: impl ControllerIndex,
led_id: usize,
color: C,
) -> OpenRgbResult<()>
pub fn set_controller_led<C: Into<Color>>( &mut self, controller_id: impl ControllerIndex, led_id: usize, color: C, ) -> OpenRgbResult<()>
Add a command to update a single LED in a controller.
§Errors
Returns an error if the controller is not found in this group.
Sourcepub fn set_controller_leds<C: Into<Color>>(
&mut self,
controller_id: impl ControllerIndex,
colors: impl IntoIterator<Item = C>,
) -> OpenRgbResult<()>
pub fn set_controller_leds<C: Into<Color>>( &mut self, controller_id: impl ControllerIndex, colors: impl IntoIterator<Item = C>, ) -> OpenRgbResult<()>
Add a command to update a multiple LEDs in a controller
§Errors
Returns an error if the controller is not found in this group.
Sourcepub fn set_controller_zone_leds<C: Into<Color>>(
&mut self,
controller_id: impl ControllerIndex,
zone_id: usize,
colors: impl IntoIterator<Item = C>,
) -> OpenRgbResult<()>
pub fn set_controller_zone_leds<C: Into<Color>>( &mut self, controller_id: impl ControllerIndex, zone_id: usize, colors: impl IntoIterator<Item = C>, ) -> OpenRgbResult<()>
Add a command to update a zone in a controller.
§Errors
Returns an error if the controller is not found in this group.
Sourcepub fn set_controller_zone_led<C: Into<Color>>(
&mut self,
controller_id: impl ControllerIndex,
zone_id: usize,
led_idx: usize,
color: C,
) -> OpenRgbResult<()>
pub fn set_controller_zone_led<C: Into<Color>>( &mut self, controller_id: impl ControllerIndex, zone_id: usize, led_idx: usize, color: C, ) -> OpenRgbResult<()>
Add a command to update a single LED in a zone in a controller.
§Errors
Returns an error if the controller is not found in this group.
Sourcepub fn set_controller_segment_leds<C: Into<Color>>(
&mut self,
controller_id: impl ControllerIndex,
zone_id: usize,
segment_id: usize,
colors: impl IntoIterator<Item = C>,
) -> OpenRgbResult<()>
pub fn set_controller_segment_leds<C: Into<Color>>( &mut self, controller_id: impl ControllerIndex, zone_id: usize, segment_id: usize, colors: impl IntoIterator<Item = C>, ) -> OpenRgbResult<()>
Add a command to update a segment in a zone in a controller.
§Errors
Returns an error if the controller is not found in this group.