pub struct AsyncChip(/* private fields */);Expand description
Implementations§
Source§impl 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::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::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 !Freeze for AsyncChip
impl !RefUnwindSafe for AsyncChip
impl Send for AsyncChip
impl !Sync for AsyncChip
impl Unpin for AsyncChip
impl !UnwindSafe for AsyncChip
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
Mutably borrows from an owned value. Read more