Device macro to generate stateful and publish variants of device specific poll inputs.

This commit is contained in:
Zachary Sunforge
2023-06-18 20:49:30 -07:00
parent 07ae111e15
commit ce72a8a5be
6 changed files with 101 additions and 4 deletions

View File

@ -1,7 +1,9 @@
pub trait Output {
type Value: Copy;
//TODO: return result
//TODO: Make maybe async
fn output(&mut self, setting: Self::Value);
}
//TODO: Should this be maybe async?
fn output(&mut self, setting: Self::Value) -> Result<(), InvalidOutputSetting>;
}
/// Indicates the setting given for an [Output] is statically known to be an impossible setting to achieve.
pub struct InvalidOutputSetting;