Trait embassy_stm32::exti::Channel

source ·
pub trait Channel: Channel + Sized {
    // Required method
    fn number(&self) -> usize;

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

EXTI channel trait.

Required Methods§

source

fn number(&self) -> usize

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.

Object Safety§

This trait is not object safe.

Implementors§