embassy-stm32

Crates

git

Versions

stm32f769ng

Flavors

embassy_stm32::exti

Trait Channel

Source
pub trait Channel: SealedChannel + Sized {
    // Required method
    fn number(&self) -> u8;

    // Provided method
    fn degrade(self) -> AnyChannel { ... }
}
Expand description

EXTI channel trait.

Required Methods§

Source

fn number(&self) -> u8

Get the EXTI channel number.

Provided Methods§

Source

fn degrade(self) -> AnyChannel

Type-erase (degrade) this channel into an AnyChannel.

This converts EXTI channel singletons (EXTI0, EXTI1, …), which are all different types, into the same type. It is useful for creating arrays of channels, or avoiding generics.

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.

Implementors§