pub struct Pins {Show 30 fields
pub tx: Pin<Gpio0, <Gpio0 as DefaultTypeState>::Function, <Gpio0 as DefaultTypeState>::PullType>,
pub rx: Pin<Gpio1, <Gpio1 as DefaultTypeState>::Function, <Gpio1 as DefaultTypeState>::PullType>,
pub ble_rts: Pin<Gpio2, <Gpio2 as DefaultTypeState>::Function, <Gpio2 as DefaultTypeState>::PullType>,
pub nina_reset_n: Pin<Gpio3, <Gpio3 as DefaultTypeState>::Function, <Gpio3 as DefaultTypeState>::PullType>,
pub cipo: Pin<Gpio4, <Gpio4 as DefaultTypeState>::Function, <Gpio4 as DefaultTypeState>::PullType>,
pub d10: Pin<Gpio5, <Gpio5 as DefaultTypeState>::Function, <Gpio5 as DefaultTypeState>::PullType>,
pub sck0: Pin<Gpio6, <Gpio6 as DefaultTypeState>::Function, <Gpio6 as DefaultTypeState>::PullType>,
pub copi: Pin<Gpio7, <Gpio7 as DefaultTypeState>::Function, <Gpio7 as DefaultTypeState>::PullType>,
pub ble_tx_cipo: Pin<Gpio8, <Gpio8 as DefaultTypeState>::Function, <Gpio8 as DefaultTypeState>::PullType>,
pub ble_rx_cs: Pin<Gpio9, <Gpio9 as DefaultTypeState>::Function, <Gpio9 as DefaultTypeState>::PullType>,
pub ble_cts_ack: Pin<Gpio10, <Gpio10 as DefaultTypeState>::Function, <Gpio10 as DefaultTypeState>::PullType>,
pub nina_copi: Pin<Gpio11, <Gpio11 as DefaultTypeState>::Function, <Gpio11 as DefaultTypeState>::PullType>,
pub a4: Pin<Gpio12, <Gpio12 as DefaultTypeState>::Function, <Gpio12 as DefaultTypeState>::PullType>,
pub a5: Pin<Gpio13, <Gpio13 as DefaultTypeState>::Function, <Gpio13 as DefaultTypeState>::PullType>,
pub nina_sck: Pin<Gpio14, <Gpio14 as DefaultTypeState>::Function, <Gpio14 as DefaultTypeState>::PullType>,
pub d3: Pin<Gpio15, <Gpio15 as DefaultTypeState>::Function, <Gpio15 as DefaultTypeState>::PullType>,
pub d4: Pin<Gpio16, <Gpio16 as DefaultTypeState>::Function, <Gpio16 as DefaultTypeState>::PullType>,
pub d5: Pin<Gpio17, <Gpio17 as DefaultTypeState>::Function, <Gpio17 as DefaultTypeState>::PullType>,
pub d6: Pin<Gpio18, <Gpio18 as DefaultTypeState>::Function, <Gpio18 as DefaultTypeState>::PullType>,
pub d7: Pin<Gpio19, <Gpio19 as DefaultTypeState>::Function, <Gpio19 as DefaultTypeState>::PullType>,
pub d8: Pin<Gpio20, <Gpio20 as DefaultTypeState>::Function, <Gpio20 as DefaultTypeState>::PullType>,
pub d9: Pin<Gpio21, <Gpio21 as DefaultTypeState>::Function, <Gpio21 as DefaultTypeState>::PullType>,
pub pdmdin: Pin<Gpio22, <Gpio22 as DefaultTypeState>::Function, <Gpio22 as DefaultTypeState>::PullType>,
pub pdmclk: Pin<Gpio23, <Gpio23 as DefaultTypeState>::Function, <Gpio23 as DefaultTypeState>::PullType>,
pub int1: Pin<Gpio24, <Gpio24 as DefaultTypeState>::Function, <Gpio24 as DefaultTypeState>::PullType>,
pub d2: Pin<Gpio25, <Gpio25 as DefaultTypeState>::Function, <Gpio25 as DefaultTypeState>::PullType>,
pub a0: Pin<Gpio26, <Gpio26 as DefaultTypeState>::Function, <Gpio26 as DefaultTypeState>::PullType>,
pub a1: Pin<Gpio27, <Gpio27 as DefaultTypeState>::Function, <Gpio27 as DefaultTypeState>::PullType>,
pub a2: Pin<Gpio28, <Gpio28 as DefaultTypeState>::Function, <Gpio28 as DefaultTypeState>::PullType>,
pub a3: Pin<Gpio29, <Gpio29 as DefaultTypeState>::Function, <Gpio29 as DefaultTypeState>::PullType>,
}
Expand description
BSP replacement for the HAL
Pins
type
This type is intended to provide more meaningful names for the given pins.
To enable specific functions of the pins you can use the [rp2040_hal::gpio::pin::Pin::into_function] function with one of:
- rp2040_hal::gpio::FunctionI2C
- rp2040_hal::gpio::FunctionPwm
- rp2040_hal::gpio::FunctionSpi
- rp2040_hal::gpio::FunctionXip
- rp2040_hal::gpio::FunctionPio0
- rp2040_hal::gpio::FunctionPio1
- rp2040_hal::gpio::FunctionUart
like this:
use rp2040_hal::{pac, gpio::{bank0::Gpio12, Pin, Pins}, sio::Sio};
let mut peripherals = pac::Peripherals::take().unwrap();
let sio = Sio::new(peripherals.SIO);
let pins = Pins::new(peripherals.IO_BANK0,peripherals.PADS_BANK0,sio.gpio_bank0, &mut peripherals.RESETS);
let _spi_sclk = pins.gpio2.into_function::<rp2040_hal::gpio::FunctionSpi>();
let _spi_mosi = pins.gpio3.into_function::<rp2040_hal::gpio::FunctionSpi>();
let _spi_miso = pins.gpio4.into_function::<rp2040_hal::gpio::FunctionSpi>();
See also rp2040_hal::gpio for more in depth information about this!
Fields§
§tx: Pin<Gpio0, <Gpio0 as DefaultTypeState>::Function, <Gpio0 as DefaultTypeState>::PullType>
GPIO 0 supports following functions: | Default | UART0 TX (arduino nano connect)
Function | Alias with applied function |
---|---|
SPI0 RX | [crate::Gp0Spi0Rx] |
UART0 TX | crate::Gp0Uart0Tx |
I2C0 SDA | [crate::Gp0I2C0Sda] |
PWM0 A | [crate::Gp0Pwm0A] |
PIO0 | [crate::Gp0Pio0] |
PIO1 | [crate::Gp0Pio1] |
rx: Pin<Gpio1, <Gpio1 as DefaultTypeState>::Function, <Gpio1 as DefaultTypeState>::PullType>
GPIO 1 supports following functions: | Default | UART0 RX (arduino nano connect)
Function | Alias with applied function |
---|---|
SPI0 CSn | [crate::Gp1Spi0Csn] |
UART0 RX | crate::Gp1Uart0Rx |
I2C0 SCL | [crate::Gp1I2C0Scl] |
PWM0 B | [crate::Gp1Pwm0B] |
PIO0 | [crate::Gp1Pio0] |
PIO1 | [crate::Gp1Pio1] |
ble_rts: Pin<Gpio2, <Gpio2 as DefaultTypeState>::Function, <Gpio2 as DefaultTypeState>::PullType>
GPIO 2 supports following functions: | Default | GPIO0 on nina, relates to BLE CTS
Function | Alias with applied function |
---|---|
SPI0 SCK | [crate::Gp2Spi0Sck] |
UART0 CTS | crate::Gp2Uart0Cts |
I2C1 SDA | [crate::Gp2I2C1Sda] |
PWM1 A | [crate::Gp2Pwm1A] |
PIO0 | [crate::Gp2Pio0] |
PIO1 | [crate::Gp2Pio1] |
nina_reset_n: Pin<Gpio3, <Gpio3 as DefaultTypeState>::Function, <Gpio3 as DefaultTypeState>::PullType>
GPIO 3 supports following functions: | Default | Line for reset of Nina Wifi Module
Function | Alias with applied function |
---|---|
SPI0 TX | [crate::Gp3Spi0Tx] |
UART0 RTS | [crate::Gp3Uart0Rts] |
I2C1 SCL | [crate::Gp3I2C1Scl] |
PWM1 B | [crate::Gp3Pwm1B] |
PIO0 | [crate::Gp3Pio0] |
PIO1 | [crate::Gp3Pio1] |
cipo: Pin<Gpio4, <Gpio4 as DefaultTypeState>::Function, <Gpio4 as DefaultTypeState>::PullType>
GPIO 4 supports following functions: | Default | SpiRx
Function | Alias with applied function |
---|---|
SPI0 RX | crate::Gp4Spi0Rx |
UART1 TX | crate::Gp4Uart1Tx |
I2C0 SDA | crate::Gp4I2C0Sda |
PWM2 A | crate::Gp4Pwm2A |
PIO0 | crate::Gp4Pio0 |
PIO1 | crate::Gp4Pio1 |
d10: Pin<Gpio5, <Gpio5 as DefaultTypeState>::Function, <Gpio5 as DefaultTypeState>::PullType>
GPIO 5 supports following functions: | Default | Generic Digital pin D10
Function | Alias with applied function |
---|---|
SPI0 CSn | crate::Gp5Spi0Csn |
UART1 RX | crate::Gp5Uart1Rx |
I2C0 SCL | crate::Gp5I2C0Scl |
PWM2 B | crate::Gp5Pwm2B |
PIO0 | crate::Gp5Pio0 |
PIO1 | crate::Gp5Pio1 |
sck0: Pin<Gpio6, <Gpio6 as DefaultTypeState>::Function, <Gpio6 as DefaultTypeState>::PullType>
GPIO 6 supports following functions: | Default | SPI0 SCK (tied to on board led)
Function | Alias with applied function |
---|---|
SPI0 SCK | crate::Gp6Spi0Sck |
UART1 CTS | crate::Gp6Uart1Cts |
I2C1 SDA | crate::Gp6I2C1Sda |
PWM3 A | crate::Gp6Pwm3A |
PIO0 | crate::Gp6Pio0 |
PIO1 | crate::Gp6Pio1 |
copi: Pin<Gpio7, <Gpio7 as DefaultTypeState>::Function, <Gpio7 as DefaultTypeState>::PullType>
GPIO 7 supports following functions: | Default | SPI0 TX
Function | Alias with applied function |
---|---|
SPI0 TX | crate::Gp7Spi0Tx |
UART1 RTS | crate::Gp7Uart1Rts |
I2C1 SCL | crate::Gp7I2C1Scl |
PWM3 B | crate::Gp7Pwm3B |
PIO0 | crate::Gp7Pio0 |
PIO1 | crate::Gp7Pio1 |
ble_tx_cipo: Pin<Gpio8, <Gpio8 as DefaultTypeState>::Function, <Gpio8 as DefaultTypeState>::PullType>
GPIO 8 supports following functions: | Default | SPI1 CIPO / UART1 TX connection to Nina Module
Function | Alias with applied function |
---|---|
SPI1 RX | crate::Gp8Spi1Rx |
UART1 TX | crate::Gp8Uart1Tx |
I2C0 SDA | [crate::Gp8I2C0Sda] |
PWM4 A | [crate::Gp8Pwm4A] |
PIO0 | [crate::Gp8Pio0] |
PIO1 | [crate::Gp8Pio1] |
ble_rx_cs: Pin<Gpio9, <Gpio9 as DefaultTypeState>::Function, <Gpio9 as DefaultTypeState>::PullType>
GPIO 9 supports following functions: | Default | SPI1 CS / UART1 RX
Function | Alias with applied function |
---|---|
SPI1 CSn | crate::Gp9Spi1Csn |
UART1 RX | crate::Gp9Uart1Rx |
I2C0 SCL | [crate::Gp9I2C0Scl] |
PWM4 B | [crate::Gp9Pwm4B] |
PIO0 | [crate::Gp9Pio0] |
PIO1 | [crate::Gp9Pio1] |
ble_cts_ack: Pin<Gpio10, <Gpio10 as DefaultTypeState>::Function, <Gpio10 as DefaultTypeState>::PullType>
GPIO 10 supports following functions: | Default | SPI1 ACK / UART1 CTS
Function | Alias with applied function |
---|---|
SPI1 SCK | crate::Gp10Spi1Sck |
UART1 CTS | crate::Gp10Uart1Cts |
I2C1 SDA | [crate::Gp10I2C1Sda] |
PWM5 A | [crate::Gp10Pwm5A] |
PIO0 | [crate::Gp10Pio0] |
PIO1 | [crate::Gp10Pio1] |
nina_copi: Pin<Gpio11, <Gpio11 as DefaultTypeState>::Function, <Gpio11 as DefaultTypeState>::PullType>
GPIO 11 supports following functions: | Default | SPI1 COPI / UART1 RTS
Function | Alias with applied function |
---|---|
SPI1 TX | crate::Gp11Spi1Tx |
UART1 RTS | crate::Gp11Uart1Rts |
I2C1 SCL | [crate::Gp11I2C1Scl] |
PWM5 B | [crate::Gp11Pwm5B] |
PIO0 | [crate::Gp11Pio0] |
PIO1 | [crate::Gp11Pio1] |
a4: Pin<Gpio12, <Gpio12 as DefaultTypeState>::Function, <Gpio12 as DefaultTypeState>::PullType>
GPIO 12 supports following functions: | Default | I2C0 SDA / A4 ~ goes to pullups and auth
Function | Alias with applied function |
---|---|
SPI1 RX | crate::Gp12Spi1Rx |
UART0 TX | crate::Gp12Uart0Tx |
I2C0 SDA | crate::Gp12I2C0Sda |
PWM6 A | crate::Gp12Pwm6A |
PIO0 | crate::Gp12Pio0 |
PIO1 | crate::Gp12Pio1 |
a5: Pin<Gpio13, <Gpio13 as DefaultTypeState>::Function, <Gpio13 as DefaultTypeState>::PullType>
GPIO 13 supports following functions: | Default | I2C0 SCL / A5 ~ goes to pullups
Function | Alias with applied function |
---|---|
SPI1 CSn | crate::Gp13Spi1Csn |
UART0 RX | crate::Gp13Uart0Rx |
I2C0 SCL | crate::Gp13I2C0Scl |
PWM6 B | crate::Gp13Pwm6B |
PIO0 | crate::Gp13Pio0 |
PIO1 | crate::Gp13Pio1 |
nina_sck: Pin<Gpio14, <Gpio14 as DefaultTypeState>::Function, <Gpio14 as DefaultTypeState>::PullType>
GPIO 14 supports following functions: | Default | SPI1 SCK ~ nina SCK
Function | Alias with applied function |
---|---|
SPI1 SCK | crate::Gp14Spi1Sck |
UART0 CTS | [crate::Gp14Uart0Cts] |
I2C1 SDA | [crate::Gp14I2C1Sda] |
PWM7 A | [crate::Gp14Pwm7A] |
PIO0 | [crate::Gp14Pio0] |
PIO1 | [crate::Gp14Pio1] |
d3: Pin<Gpio15, <Gpio15 as DefaultTypeState>::Function, <Gpio15 as DefaultTypeState>::PullType>
GPIO 15 supports following functions: | Default | General Digital pin D3
Function | Alias with applied function |
---|---|
SPI1 TX | crate::Gp15Spi1Tx |
UART0 RTS | crate::Gp15Uart0Rts |
I2C1 SCL | crate::Gp15I2C1Scl |
PWM7 B | crate::Gp15Pwm7B |
PIO0 | crate::Gp15Pio0 |
PIO1 | crate::Gp15Pio1 |
d4: Pin<Gpio16, <Gpio16 as DefaultTypeState>::Function, <Gpio16 as DefaultTypeState>::PullType>
GPIO 16 supports following functions: | Default | General Digital pin D4
Function | Alias with applied function |
---|---|
SPI0 RX | crate::Gp16Spi0Rx |
UART0 TX | crate::Gp16Uart0Tx |
I2C0 SDA | crate::Gp16I2C0Sda |
PWM0 A | crate::Gp16Pwm0A |
PIO0 | crate::Gp16Pio0 |
PIO1 | crate::Gp16Pio1 |
d5: Pin<Gpio17, <Gpio17 as DefaultTypeState>::Function, <Gpio17 as DefaultTypeState>::PullType>
GPIO 17 supports following functions: | Default | General Digital pin D5
Function | Alias with applied function |
---|---|
SPI0 CSn | crate::Gp17Spi0Csn |
UART0 RX | crate::Gp17Uart0Rx |
I2C0 SCL | crate::Gp17I2C0Scl |
PWM0 B | crate::Gp17Pwm0B |
PIO0 | crate::Gp17Pio0 |
PIO1 | crate::Gp17Pio1 |
d6: Pin<Gpio18, <Gpio18 as DefaultTypeState>::Function, <Gpio18 as DefaultTypeState>::PullType>
GPIO 18 supports following functions: | Default | General Digital pin D6
Function | Alias with applied function |
---|---|
SPI0 SCK | crate::Gp18Spi0Sck |
UART0 CTS | crate::Gp18Uart0Cts |
I2C1 SDA | crate::Gp18I2C1Sda |
PWM1 A | crate::Gp18Pwm1A |
PIO0 | crate::Gp18Pio0 |
PIO1 | crate::Gp18Pio1 |
d7: Pin<Gpio19, <Gpio19 as DefaultTypeState>::Function, <Gpio19 as DefaultTypeState>::PullType>
GPIO 19 supports following functions: | Default | General Digital Pin D7
Function | Alias with applied function |
---|---|
SPI0 TX | crate::Gp19Spi0Tx |
UART0 RTS | crate::Gp19Uart0Rts |
I2C1 SCL | crate::Gp19I2C1Scl |
PWM1 B | crate::Gp19Pwm1B |
PIO0 | crate::Gp19Pio0 |
PIO1 | crate::Gp19Pio1 |
d8: Pin<Gpio20, <Gpio20 as DefaultTypeState>::Function, <Gpio20 as DefaultTypeState>::PullType>
GPIO 20 supports following functions: | Default | General Digital pin D8
Function | Alias with applied function |
---|---|
SPI0 RX | crate::Gp20Spi0Rx |
UART1 TX | crate::Gp20Uart1Tx |
I2C0 SDA | crate::Gp20I2C0Sda |
PWM2 A | crate::Gp20Pwm2A |
PIO0 | crate::Gp20Pio0 |
PIO1 | crate::Gp20Pio1 |
d9: Pin<Gpio21, <Gpio21 as DefaultTypeState>::Function, <Gpio21 as DefaultTypeState>::PullType>
GPIO 21 supports following functions: | Default | General Digital pin D9
Function | Alias with applied function |
---|---|
SPI0 CSn | crate::Gp21Spi0Csn |
UART1 RX | crate::Gp21Uart1Rx |
I2C0 SCL | crate::Gp21I2C0Scl |
PWM2 B | crate::Gp21Pwm2B |
PIO0 | crate::Gp21Pio0 |
PIO1 | crate::Gp21Pio1 |
pdmdin: Pin<Gpio22, <Gpio22 as DefaultTypeState>::Function, <Gpio22 as DefaultTypeState>::PullType>
GPIO 22 supports following functions: | Default | PDMDIN
Function | Alias with applied function |
---|---|
SPI0 SCK | [crate::Gp22Spi0Sck] |
UART1 CTS | [crate::Gp22Uart1Cts] |
I2C1 SDA | [crate::Gp22I2C1Sda] |
PWM3 A | [crate::Gp22Pwm3A] |
PIO0 | [crate::Gp22Pio0] |
PIO1 | [crate::Gp22Pio1] |
pdmclk: Pin<Gpio23, <Gpio23 as DefaultTypeState>::Function, <Gpio23 as DefaultTypeState>::PullType>
GPIO 23 supports following functions: | Default | PDMCLK
Function | Alias with applied function |
---|---|
SPI0 TX | [crate::Gp23Spi0Tx] |
UART1 RTS | [crate::Gp23Uart1Rts] |
I2C1 SCL | [crate::Gp23I2C1Scl] |
PWM3 B | [crate::Gp23Pwm3B] |
PIO0 | [crate::Gp23Pio0] |
PIO1 | [crate::Gp23Pio1] |
int1: Pin<Gpio24, <Gpio24 as DefaultTypeState>::Function, <Gpio24 as DefaultTypeState>::PullType>
GPIO 24 supports following functions: | Default | INT1 ~ connected to INT1 on the IMU
Function | Alias with applied function |
---|---|
SPI1 RX | [crate::Gp24Spi1Rx] |
UART1 TX | [crate::Gp24Uart1Tx] |
I2C0 SDA | [crate::Gp24I2C0Sda] |
PWM4 A | [crate::Gp24Pwm4A] |
PIO0 | [crate::Gp24Pio0] |
PIO1 | [crate::Gp24Pio1] |
d2: Pin<Gpio25, <Gpio25 as DefaultTypeState>::Function, <Gpio25 as DefaultTypeState>::PullType>
GPIO 25 supports following functions: | Default |
Function | Alias with applied function |
---|---|
SPI1 CSn | crate::Gp25Spi1Csn |
UART1 RX | crate::Gp25Uart1Rx |
I2C0 SCL | crate::Gp25I2C0Scl |
PWM4 B | crate::Gp25Pwm4B |
PIO0 | crate::Gp25Pio0 |
PIO1 | crate::Gp25Pio1 |
a0: Pin<Gpio26, <Gpio26 as DefaultTypeState>::Function, <Gpio26 as DefaultTypeState>::PullType>
GPIO 26 supports following functions:
Function | Alias with applied function |
---|---|
SPI1 SCK | crate::Gp26Spi1Sck |
UART1 CTS | crate::Gp26Uart1Cts |
I2C1 SDA | crate::Gp26I2C1Sda |
PWM5 A | crate::Gp26Pwm5A |
PIO0 | crate::Gp26Pio0 |
PIO1 | crate::Gp26Pio1 |
a1: Pin<Gpio27, <Gpio27 as DefaultTypeState>::Function, <Gpio27 as DefaultTypeState>::PullType>
GPIO 27 supports following functions:
Function | Alias with applied function |
---|---|
SPI1 TX | crate::Gp27Spi1Tx |
UART1 RTS | crate::Gp27Uart1Rts |
I2C1 SCL | crate::Gp27I2C1Scl |
PWM5 B | crate::Gp27Pwm5B |
PIO0 | crate::Gp27Pio0 |
PIO1 | crate::Gp27Pio1 |
a2: Pin<Gpio28, <Gpio28 as DefaultTypeState>::Function, <Gpio28 as DefaultTypeState>::PullType>
GPIO 28 supports following functions:
Function | Alias with applied function |
---|---|
SPI1 RX | crate::Gp28Spi1Rx |
UART0 TX | crate::Gp28Uart0Tx |
I2C0 SDA | crate::Gp28I2C0Sda |
PWM6 A | crate::Gp28Pwm6A |
PIO0 | crate::Gp28Pio0 |
PIO1 | crate::Gp28Pio1 |
a3: Pin<Gpio29, <Gpio29 as DefaultTypeState>::Function, <Gpio29 as DefaultTypeState>::PullType>
GPIO 29 supports following functions:
Function | Alias with applied function |
---|---|
SPI1 CS | crate::Gp29Spi1CSn |
UART0 RX | crate::Gp29Uart0Rx |
I2C0 SCL | crate::Gp29I2C0Scl |
PWM6 B | crate::Gp29Pwm6B |
PIO0 | crate::Gp29Pio0 |
PIO1 | crate::Gp29Pio1 |
Implementations§
Source§impl Pins
impl Pins
Sourcepub fn new(
io: IO_BANK0,
pads: PADS_BANK0,
sio: SioGpioBank0,
reset: &mut RESETS,
) -> Self
pub fn new( io: IO_BANK0, pads: PADS_BANK0, sio: SioGpioBank0, reset: &mut RESETS, ) -> Self
Auto Trait Implementations§
impl Freeze for Pins
impl RefUnwindSafe for Pins
impl Send for Pins
impl Sync for Pins
impl Unpin for Pins
impl UnwindSafe for Pins
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more