summaryrefslogtreecommitdiffstats
path: root/src/backend/producer/windows.rs
blob: 6cffab434bd2bb7b28fb6e5c6817fd59fe9a0df5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use anyhow::{anyhow, Result};
use core::task::{Context, Poll};
use futures::Stream;
use std::{io, pin::Pin};

use crate::{
    client::{ClientEvent, ClientHandle},
    event::Event,
    producer::EventProducer,
};

pub struct WindowsProducer {}

impl EventProducer for WindowsProducer {
    fn notify(&mut self, _event: ClientEvent) -> io::Result<()> {
        Ok(())
    }

    fn release(&mut self) -> io::Result<()> {
        Ok(())
    }
}

impl WindowsProducer {
    pub(crate) fn new() -> Result<Self> {
        Err(anyhow!("not implemented"))
    }
}

impl Stream for WindowsProducer {
    type Item = io::Result<(ClientHandle, Event)>;
    fn poll_next(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
        Poll::Pending
    }
}