pub trait SerialExt: Sized + Instance {
// Required method
fn serial<WORD>(
self,
pins: (impl Into<Self::Tx<PushPull>>, impl Into<Self::Rx<PushPull>>),
config: impl Into<Config>,
clocks: &Clocks,
) -> Result<Serial<Self, WORD>, InvalidConfig>;
// Provided methods
fn tx<WORD>(
self,
tx_pin: impl Into<Self::Tx<PushPull>>,
config: impl Into<Config>,
clocks: &Clocks,
) -> Result<Tx<Self, WORD>, InvalidConfig>
where NoPin: Into<Self::Rx<PushPull>> { ... }
fn rx<WORD>(
self,
rx_pin: impl Into<Self::Rx<PushPull>>,
config: impl Into<Config>,
clocks: &Clocks,
) -> Result<Rx<Self, WORD>, InvalidConfig>
where NoPin: Into<Self::Tx<PushPull>> { ... }
}
Required Methods§
fn serial<WORD>( self, pins: (impl Into<Self::Tx<PushPull>>, impl Into<Self::Rx<PushPull>>), config: impl Into<Config>, clocks: &Clocks, ) -> Result<Serial<Self, WORD>, InvalidConfig>
Provided Methods§
fn tx<WORD>( self, tx_pin: impl Into<Self::Tx<PushPull>>, config: impl Into<Config>, clocks: &Clocks, ) -> Result<Tx<Self, WORD>, InvalidConfig>
fn rx<WORD>( self, rx_pin: impl Into<Self::Rx<PushPull>>, config: impl Into<Config>, clocks: &Clocks, ) -> Result<Rx<Self, WORD>, InvalidConfig>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.