embassy-nrf

Crates

git

Versions

nrf9160-s

Flavors

embassy_nrf::gpiote

Trait Channel

Source
pub trait Channel:
    SealedChannel
    + Into<AnyChannel>
    + Sized
    + 'static {
    // Required method
    fn number(&self) -> usize;

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

GPIOTE channel trait.

Implemented by all GPIOTE channels.

Required Methods§

Source

fn number(&self) -> usize

Get the channel number.

Provided Methods§

Source

fn degrade(self) -> AnyChannel

Convert this channel to a type-erased AnyChannel.

This allows using several channels in situations that might require them to be the same type, like putting them in an array.

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§