Struct Pin

Source
pub struct Pin<const P: char, const N: u8, MODE = Input<Floating>> { /* private fields */ }
Expand description

Generic pin type

  • MODE is one of the pin modes (see Modes section).
  • P is port name: A for GPIOA, B for GPIOB, etc.
  • N is pin number: from 0 to 15.

Implementations§

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, MODE>

Source

pub fn into_alternate<const A: u8>(self) -> Pin<P, N, Alternate<A, PushPull>>

Configures the pin to operate alternate mode

Source

pub fn into_alternate_open_drain<const A: u8>( self, ) -> Pin<P, N, Alternate<A, OpenDrain>>

Configures the pin to operate in alternate open drain mode

Source

pub fn into_floating_input(self) -> Pin<P, N, Input<Floating>>

Configures the pin to operate as a floating input pin

Source

pub fn into_pull_down_input(self) -> Pin<P, N, Input<PullDown>>

Configures the pin to operate as a pulled down input pin

Source

pub fn into_pull_up_input(self) -> Pin<P, N, Input<PullUp>>

Configures the pin to operate as a pulled up input pin

Source

pub fn into_open_drain_output(self) -> Pin<P, N, Output<OpenDrain>>

Configures the pin to operate as an open drain output pin Initial state will be low.

Source

pub fn into_open_drain_output_in_state( self, initial_state: PinState, ) -> Pin<P, N, Output<OpenDrain>>

Configures the pin to operate as an open-drain output pin. initial_state specifies whether the pin should be initially high or low.

Source

pub fn into_push_pull_output(self) -> Pin<P, N, Output<PushPull>>

Configures the pin to operate as an push pull output pin Initial state will be low.

Source

pub fn into_push_pull_output_in_state( self, initial_state: PinState, ) -> Pin<P, N, Output<PushPull>>

Configures the pin to operate as an push-pull output pin. initial_state specifies whether the pin should be initially high or low.

Source

pub fn into_analog(self) -> Pin<P, N, Analog>

Configures the pin to operate as an analog input pin

Source

pub fn into_dynamic(self) -> DynamicPin<P, N>

Configures the pin as a pin that can change between input and output without changing the type. It starts out as a floating input

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, MODE>
where MODE: PinMode,

Source

pub fn with_floating_input<R>( &mut self, f: impl FnOnce(&mut Pin<P, N, Input<Floating>>) -> R, ) -> R

Temporarily configures this pin as a floating input.

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back.

Source

pub fn with_pull_down_input<R>( &mut self, f: impl FnOnce(&mut Pin<P, N, Input<PullDown>>) -> R, ) -> R

Temporarily configures this pin as a pulled-down input.

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back.

Source

pub fn with_pull_up_input<R>( &mut self, f: impl FnOnce(&mut Pin<P, N, Input<PullUp>>) -> R, ) -> R

Temporarily configures this pin as a pulled-up input.

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back.

Source

pub fn with_analog<R>( &mut self, f: impl FnOnce(&mut Pin<P, N, Analog>) -> R, ) -> R

Temporarily configures this pin as an analog pin.

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back.

Source

pub fn with_open_drain_output<R>( &mut self, f: impl FnOnce(&mut Pin<P, N, Output<OpenDrain>>) -> R, ) -> R

Temporarily configures this pin as an open drain output.

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back. The value of the pin after conversion is undefined. If you want to control it, use with_open_drain_output_in_state

Source

pub fn with_open_drain_output_in_state<R>( &mut self, state: PinState, f: impl FnOnce(&mut Pin<P, N, Output<OpenDrain>>) -> R, ) -> R

Temporarily configures this pin as an open drain output .

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back. Note that the new state is set slightly before conversion happens. This can cause a short output glitch if switching between output modes

Source

pub fn with_push_pull_output<R>( &mut self, f: impl FnOnce(&mut Pin<P, N, Output<PushPull>>) -> R, ) -> R

Temporarily configures this pin as a push-pull output.

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back. The value of the pin after conversion is undefined. If you want to control it, use with_push_pull_output_in_state

Source

pub fn with_push_pull_output_in_state<R>( &mut self, state: PinState, f: impl FnOnce(&mut Pin<P, N, Output<PushPull>>) -> R, ) -> R

Temporarily configures this pin as a push-pull output.

The closure f is called with the reconfigured pin. After it returns, the pin will be configured back. Note that the new state is set slightly before conversion happens. This can cause a short output glitch if switching between output modes

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, Output<MODE>>

Source

pub fn set_speed(self, speed: Speed) -> Self

Set pin speed

Source§

impl<const P: char, const N: u8> Pin<P, N, Output<OpenDrain>>

Source

pub fn internal_pull_up(self, on: bool) -> Self

Enables / disables the internal pull up

Source

pub fn internal_pull_down(self, on: bool) -> Self

Enables / disables the internal pull down

Source§

impl<const P: char, const N: u8, const A: u8> Pin<P, N, Alternate<A, PushPull>>

Source

pub fn set_speed(self, speed: Speed) -> Self

Set pin speed

Source

pub fn internal_pull_up(self, on: bool) -> Self

Enables / disables the internal pull up

Source

pub fn internal_pull_down(self, on: bool) -> Self

Enables / disables the internal pull down

Source§

impl<const P: char, const N: u8, const A: u8> Pin<P, N, Alternate<A, PushPull>>

Source

pub fn set_open_drain(self) -> Pin<P, N, Alternate<A, OpenDrain>>

Turns pin alternate configuration pin into open drain

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, MODE>

Source

pub fn erase_number(self) -> PEPin<P, MODE>

Erases the pin number from the type

This is useful when you want to collect the pins into an array where you need all the elements to have the same type

Source

pub fn erase(self) -> EPin<MODE>

Erases the pin number and the port from the type

This is useful when you want to collect the pins into an array where you need all the elements to have the same type

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, Output<MODE>>

Source

pub fn set_high(&mut self)

Source

pub fn set_low(&mut self)

Source

pub fn get_state(&self) -> PinState

Source

pub fn set_state(&mut self, state: PinState)

Source

pub fn is_set_high(&self) -> bool

Source

pub fn is_set_low(&self) -> bool

Source

pub fn toggle(&mut self)

Source§

impl<const P: char, const N: u8> Pin<P, N, Output<OpenDrain>>

Source

pub fn is_high(&self) -> bool

Source

pub fn is_low(&self) -> bool

Source§

impl<const P: char, const N: u8, MODE> Pin<P, N, Input<MODE>>

Source

pub fn is_high(&self) -> bool

Source

pub fn is_low(&self) -> bool

Trait Implementations§

Source§

impl<const P: char, const N: u8, MODE> Debug for Pin<P, N, MODE>

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const P: char, const N: u8> From<Pin<P, N>> for Pin<P, N, Input<PullDown>>

Source§

fn from(f: Pin<P, N, Input<Floating>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N>> for Pin<P, N, Input<PullUp>>

Source§

fn from(f: Pin<P, N, Input<Floating>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A>>> for Pin<P, N, Input<Floating>>

Source§

fn from(f: Pin<P, N, Alternate<A, PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A>>> for Pin<P, N, Analog>

Source§

fn from(f: Pin<P, N, Alternate<A, PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A>>> for Pin<P, N, Input<PullDown>>

Source§

fn from(f: Pin<P, N, Alternate<A, PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A>>> for Pin<P, N, Input<PullUp>>

Source§

fn from(f: Pin<P, N, Alternate<A, PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A>>> for Pin<P, N, Output<OpenDrain>>

Source§

fn from(f: Pin<P, N, Alternate<A, PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A>>> for Pin<P, N, Output<PushPull>>

Source§

fn from(f: Pin<P, N, Alternate<A, PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A, OpenDrain>>> for Pin<P, N, Input<Floating>>

Source§

fn from(f: Pin<P, N, Alternate<A, OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A, OpenDrain>>> for Pin<P, N, Analog>

Source§

fn from(f: Pin<P, N, Alternate<A, OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A, OpenDrain>>> for Pin<P, N, Input<PullDown>>

Source§

fn from(f: Pin<P, N, Alternate<A, OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A, OpenDrain>>> for Pin<P, N, Input<PullUp>>

Source§

fn from(f: Pin<P, N, Alternate<A, OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A, OpenDrain>>> for Pin<P, N, Output<OpenDrain>>

Source§

fn from(f: Pin<P, N, Alternate<A, OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Alternate<A, OpenDrain>>> for Pin<P, N, Output<PushPull>>

Source§

fn from(f: Pin<P, N, Alternate<A, OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8, const B: u8> From<Pin<P, N, Alternate<B>>> for Pin<P, N, Alternate<A, OpenDrain>>

Source§

fn from(f: Pin<P, N, Alternate<B, PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8, const B: u8> From<Pin<P, N, Alternate<B, OpenDrain>>> for Pin<P, N, Alternate<A, PushPull>>

Source§

fn from(f: Pin<P, N, Alternate<B, OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Analog>> for Pin<P, N, Input<Floating>>

Source§

fn from(f: Pin<P, N, Analog>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Analog>> for Pin<P, N, Alternate<A, PushPull>>

Source§

fn from(f: Pin<P, N, Analog>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8> From<Pin<P, N, Analog>> for Pin<P, N, Alternate<A, OpenDrain>>

Source§

fn from(f: Pin<P, N, Analog>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Analog>> for Pin<P, N, Input<PullDown>>

Source§

fn from(f: Pin<P, N, Analog>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Analog>> for Pin<P, N, Input<PullUp>>

Source§

fn from(f: Pin<P, N, Analog>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Analog>> for Pin<P, N, Output<OpenDrain>>

Source§

fn from(f: Pin<P, N, Analog>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Analog>> for Pin<P, N, Output<PushPull>>

Source§

fn from(f: Pin<P, N, Analog>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8, MODE> From<Pin<P, N, Input<MODE>>> for Pin<P, N, Alternate<A, PushPull>>

Source§

fn from(f: Pin<P, N, Input<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8, MODE> From<Pin<P, N, Input<MODE>>> for Pin<P, N, Alternate<A, OpenDrain>>

Source§

fn from(f: Pin<P, N, Input<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> From<Pin<P, N, Input<MODE>>> for Pin<P, N, Analog>

Source§

fn from(f: Pin<P, N, Input<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> From<Pin<P, N, Input<MODE>>> for Pin<P, N, Output<OpenDrain>>

Source§

fn from(f: Pin<P, N, Input<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> From<Pin<P, N, Input<MODE>>> for Pin<P, N, Output<PushPull>>

Source§

fn from(f: Pin<P, N, Input<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Input<PullDown>>> for Pin<P, N, Input<Floating>>

Source§

fn from(f: Pin<P, N, Input<PullDown>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Input<PullDown>>> for Pin<P, N, Input<PullUp>>

Source§

fn from(f: Pin<P, N, Input<PullDown>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Input<PullUp>>> for Pin<P, N, Input<Floating>>

Source§

fn from(f: Pin<P, N, Input<PullUp>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Input<PullUp>>> for Pin<P, N, Input<PullDown>>

Source§

fn from(f: Pin<P, N, Input<PullUp>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> From<Pin<P, N, Output<MODE>>> for Pin<P, N, Input<Floating>>

Source§

fn from(f: Pin<P, N, Output<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8, MODE> From<Pin<P, N, Output<MODE>>> for Pin<P, N, Alternate<A, PushPull>>

Source§

fn from(f: Pin<P, N, Output<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, const A: u8, MODE> From<Pin<P, N, Output<MODE>>> for Pin<P, N, Alternate<A, OpenDrain>>

Source§

fn from(f: Pin<P, N, Output<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> From<Pin<P, N, Output<MODE>>> for Pin<P, N, Analog>

Source§

fn from(f: Pin<P, N, Output<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> From<Pin<P, N, Output<MODE>>> for Pin<P, N, Input<PullDown>>

Source§

fn from(f: Pin<P, N, Output<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> From<Pin<P, N, Output<MODE>>> for Pin<P, N, Input<PullUp>>

Source§

fn from(f: Pin<P, N, Output<MODE>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Output<OpenDrain>>> for Pin<P, N, Output<PushPull>>

Source§

fn from(f: Pin<P, N, Output<OpenDrain>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8> From<Pin<P, N, Output>> for Pin<P, N, Output<OpenDrain>>

Source§

fn from(f: Pin<P, N, Output<PushPull>>) -> Self

Converts to this type from the input type.
Source§

impl<const P: char, const N: u8, MODE> InputPin for Pin<P, N, Input<MODE>>

Source§

type Error = Infallible

Error type
Source§

fn is_high(&self) -> Result<bool, Self::Error>

Is the input pin high?
Source§

fn is_low(&self) -> Result<bool, Self::Error>

Is the input pin low?
Source§

impl<const P: char, const N: u8> InputPin for Pin<P, N, Output<OpenDrain>>

Source§

type Error = Infallible

Error type
Source§

fn is_high(&self) -> Result<bool, Self::Error>

Is the input pin high?
Source§

fn is_low(&self) -> Result<bool, Self::Error>

Is the input pin low?
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N>, Pin<P, N, Output<OpenDrain>>> for Pin<P, N, Input<Floating>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin( self, state: PinState, ) -> Result<Pin<P, N, Output<OpenDrain>>, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N>, Pin<P, N, Output<OpenDrain>>> for Pin<P, N, Output<OpenDrain>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Pin<P, N, Input<Floating>>, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N>, Pin<P, N, Output>> for Pin<P, N, Input<Floating>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin( self, state: PinState, ) -> Result<Pin<P, N, Output<PushPull>>, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N>, Pin<P, N, Output>> for Pin<P, N, Output<PushPull>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Pin<P, N, Input<Floating>>, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N, Input<PullDown>>, Pin<P, N, Output>> for Pin<P, N, Input<PullDown>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin( self, state: PinState, ) -> Result<Pin<P, N, Output<PushPull>>, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N, Input<PullDown>>, Pin<P, N, Output>> for Pin<P, N, Output<PushPull>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Pin<P, N, Input<PullDown>>, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N, Input<PullUp>>, Pin<P, N, Output>> for Pin<P, N, Input<PullUp>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin( self, state: PinState, ) -> Result<Pin<P, N, Output<PushPull>>, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N, Input<PullUp>>, Pin<P, N, Output>> for Pin<P, N, Output<PushPull>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Pin<P, N, Input<PullUp>>, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8> IoPin<Pin<P, N, Output<OpenDrain>>, Pin<P, N, Output<OpenDrain>>> for Pin<P, N, Output<OpenDrain>>

Source§

type Error = Infallible

Error type.
Source§

fn into_input_pin(self) -> Result<Self, Self::Error>

Tries to convert this pin to input mode. Read more
Source§

fn into_output_pin(self, state: PinState) -> Result<Self, Self::Error>

Tries to convert this pin to output mode with the given initial state. Read more
Source§

impl<const P: char, const N: u8, MODE> OutputPin for Pin<P, N, Output<MODE>>

Source§

type Error = Infallible

Error type
Source§

fn set_high(&mut self) -> Result<(), Self::Error>

Drives the pin high Read more
Source§

fn set_low(&mut self) -> Result<(), Self::Error>

Drives the pin low Read more
Source§

fn set_state(&mut self, state: PinState) -> Result<(), Self::Error>

Drives the pin high or low depending on the provided value Read more
Source§

impl<const P: char, const N: u8, MODE> PinExt for Pin<P, N, MODE>

Source§

type Mode = MODE

Source§

fn pin_id(&self) -> u8

Return pin number
Source§

fn port_id(&self) -> u8

Return port number
Source§

impl<const P: char, const N: u8, MODE> StatefulOutputPin for Pin<P, N, Output<MODE>>

Source§

fn is_set_high(&self) -> Result<bool, Self::Error>

Is the pin in drive high mode? Read more
Source§

fn is_set_low(&self) -> Result<bool, Self::Error>

Is the pin in drive low mode? Read more
Source§

impl<const P: char, const N: u8, MODE> ToggleableOutputPin for Pin<P, N, Output<MODE>>

Source§

type Error = Infallible

Error type
Source§

fn toggle(&mut self) -> Result<(), Self::Error>

Toggle pin output.

Auto Trait Implementations§

§

impl<const P: char, const N: u8, MODE> Freeze for Pin<P, N, MODE>

§

impl<const P: char, const N: u8, MODE> RefUnwindSafe for Pin<P, N, MODE>
where MODE: RefUnwindSafe,

§

impl<const P: char, const N: u8, MODE> Send for Pin<P, N, MODE>
where MODE: Send,

§

impl<const P: char, const N: u8, MODE> Sync for Pin<P, N, MODE>
where MODE: Sync,

§

impl<const P: char, const N: u8, MODE> Unpin for Pin<P, N, MODE>
where MODE: Unpin,

§

impl<const P: char, const N: u8, MODE> UnwindSafe for Pin<P, N, MODE>
where MODE: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<TIM, PC1> Pins<TIM> for PC1
where PC1: CPin<TIM, 0>,