Trait IfReadable

Source
pub trait IfReadable<const READABLE: bool> { }
Expand description

IfReadable trait is a simple const bound trait

Note:

If your SendCommand implementation has same code on both Read-Write and Write-Only mode, you can replace trait bound Output + Input with Output + IfReadable<READABLE>.

Implementors§

Source§

impl<T> IfReadable<false> for T
where T: OutputPin,

Source§

impl<T> IfReadable<true> for T
where T: OutputPin + InputPin,