# ToggleableOutputPin in embedded_hal::digital - Rust
Output pin that can be toggled
Keywords: rust, rustlang, rust-lang, ToggleableOutputPin

# Trait embedded_hal::digital::ToggleableOutputPin

source · [−]

    pub trait ToggleableOutputPin {
        type Error;
        fn try_toggle(&mut self) -> Result<(), Self::Error>;
    }

Expand description

Output pin that can be toggled

See toggleable to use a software implementation if both OutputPin and StatefulOutputPin are implemented. Otherwise, implement this using hardware mechanisms.

## Associated Types

source

#### type Error

Error type

## Required methods

source

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

Toggle pin output.

## Implementors

source

### impl<P> ToggleableOutputPin for P where
P: Default,

#### type Error = P::Error