steamy-controller 0.2.1

Library to interact with the Steam controller.
Documentation
use {Result as Res, Controller};

/// Controller led management.
pub struct Lizard<'a, 'b: 'a> {
	controller: &'a mut Controller<'b>,
}

impl<'a, 'b> Lizard<'a, 'b> {
	#[doc(hidden)]
	pub fn new(controller: &'a mut Controller<'b>) -> Lizard<'a, 'b> {
		Lizard {
			controller: controller,
		}
	}

	/// Enable lizard mode.
	pub fn enable(self) -> Res<()> {
		self.controller.settings().lizard = true;
		self.controller.reset()
	}

	/// Disable lizard mode.
	pub fn disable(self) -> Res<()> {
		self.controller.settings().lizard = false;
		self.controller.reset()
	}
}