pub struct AsyncChip(_);
Expand description
Implementations
sourceimpl AsyncChip
impl AsyncChip
sourcepub async fn read_line_info_change_event(&self) -> Result<InfoChangeEvent>
pub async fn read_line_info_change_event(&self) -> Result<InfoChangeEvent>
Async form of Chip::read_line_info_change_event
.
Example
use gpiocdev::r#async::tokio::AsyncChip;
let chip = Chip::from_path("/dev/gpiochip0")?;
let achip = AsyncChip::new(chip);
let evt = achip.read_line_info_change_event().await?;
sourcepub fn info_change_events(&self) -> InfoChangeStream<'_>
pub fn info_change_events(&self) -> InfoChangeStream<'_>
Async form of Chip::info_change_events
.
Example
use gpiocdev::r#async::tokio::AsyncChip;
use tokio_stream::StreamExt;
let chip = Chip::from_path("/dev/gpiochip0")?;
let achip = AsyncChip::new(chip);
let mut events = achip.info_change_events();
while let Ok(evt) = events.next().await.unwrap() {
// process event...
}
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AsyncChip
impl Send for AsyncChip
impl Sync for AsyncChip
impl Unpin for AsyncChip
impl !UnwindSafe for AsyncChip
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more