Struct NoConnect

Source
pub struct NoConnect(/* private fields */);
Expand description

A virtual pin that is not actually connected to a physical pin.

The pin will always read a fixed value, can be configured to be in any mode, and will always have writes result in no-ops.

Implementations§

Source§

impl NoConnect

Source

pub fn new(value: bool) -> Self

Creates a new NoConnect that will always read the specified high/low value.

Trait Implementations§

Source§

impl Clone for NoConnect

Source§

fn clone(&self) -> NoConnect

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NoConnect

Source§

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

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

impl InputPin for NoConnect

Source§

fn poll_get( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<bool, Self::Error>>

Polls a read operation of this pin to completion.
Source§

impl IntoFloatingInputPin for NoConnect

Source§

type FloatingInputPin = NoConnect

The type of an InputPin that does not employ any pull-up or pull-down resistors.
Source§

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

Attempts to re-configure this pin into the new mode.
Source§

impl IntoOpenDrainOutputPin for NoConnect

Source§

type OpenDrainOutputPin = NoConnect

The type of an OutputPin that is in open drain mode.
Source§

fn into_open_drain_output_pin( self, _initial_high: bool, ) -> Result<Self::OpenDrainOutputPin, Self::Error>

Attempts to re-configure this pin into the new mode.
Source§

impl IntoPullDownInputPin for NoConnect

Source§

type PullDownInputPin = NoConnect

The type of an InputPin that has a pull-down resistor attached.
Source§

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

Attempts to re-configure this pin into the new mode.
Source§

impl IntoPullUpInputPin for NoConnect

Source§

type PullUpInputPin = NoConnect

The type of an InputPin that has a pull-up resistor attached.
Source§

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

Attempts to re-configure this pin into the new mode.
Source§

impl IntoPushPullOutputPin for NoConnect

Source§

type PushPullOutputPin = NoConnect

The type of an OutputPin that is in push-pull mode.
Source§

fn into_push_pull_output_pin( self, _initial_high: bool, ) -> Result<Self::PushPullOutputPin, Self::Error>

Attempts to re-configure this pin into the new mode.
Source§

impl OutputPin for NoConnect

Source§

fn poll_set( self: Pin<&mut Self>, _cx: &mut Context<'_>, _high: bool, ) -> Poll<Result<(), Self::Error>>

Polls a write operation of this pin to completion.
Source§

impl Pin for NoConnect

Source§

type Error = Infallible

The common error type for all pin operations. Read more
Source§

impl Copy for NoConnect

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A> InputPinExt for A
where A: InputPin,

Source§

fn get(&mut self) -> Get<'_, Self>
where Self: Unpin,

Gets the current high or low state of this pin.
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<A> OutputPinExt for A
where A: OutputPin,

Source§

fn set(&mut self, high: bool) -> Set<'_, Self>
where Self: Unpin,

Sets the current high or low state of this pin.
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<A> WriteExt for A
where A: WriteExt,

Source§

fn write<'a>(&'a mut self, bytes: &'a [u8]) -> Write<'a, Self>
where Self: Unpin,

Source§

fn write_all<'a>(&'a mut self, bytes: &'a [u8]) -> WriteAll<'a, Self>
where Self: Unpin,

Source§

fn shutdown(&mut self) -> Shutdown<'_, Self>
where Self: Unpin,