threadshare: Port to polling 3.0.0
error[E0277]: the trait bound `i32: AsFd` is not satisfied
--> generic/threadshare/src/runtime/executor/reactor.rs:248:28
|
248 | self.poller.delete(source.raw)
| ------ ^^^^^^^^^^ the trait `AsFd` is not implemented for `i32`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `AsFd`:
Poller
socket2::Socket
polling::epoll::Poller
Box<T>
std::fs::File
Stdin
StdinLock<'a>
Stdout
and 24 others
= note: required for `i32` to implement `AsSource`
note: required by a bound in `Poller::delete`
--> /home/slomo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polling-3.0.0/src/lib.rs:613:39
|
613 | pub fn delete(&self, source: impl AsSource) -> io::Result<()> {
| ^^^^^^^^ required by this bound in `Poller::delete`
error[E0308]: mismatched types
--> generic/threadshare/src/runtime/executor/reactor.rs:395:42
|
395 | let res = match self.poller.wait(&mut self.events, Some(Duration::ZERO)) {
| ---- ^^^^^^^^^^^^^^^^ expected `&mut Events`, found `&mut Vec<Event>`
| |
| arguments to this method are incorrect
|
= note: expected mutable reference `&mut Events`
found mutable reference `&mut Vec<polling::Event>`
note: method defined here
--> /home/slomo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polling-3.0.0/src/lib.rs:656:12
|
656 | pub fn wait(&self, events: &mut Events, timeout: Option<Duration>) -> io::Result<usize> {
| ^^^^
error[E0277]: the trait bound `i32: AsFd` is not satisfied
--> generic/threadshare/src/runtime/executor/reactor.rs:418:33
|
417 | ... self.poller.modify(
| ------ required by a bound introduced by this call
418 | ... source.raw,
| ^^^^^^^^^^ the trait `AsFd` is not implemented for `i32`
|
= help: the following other types implement trait `AsFd`:
Poller
socket2::Socket
polling::epoll::Poller
Box<T>
std::fs::File
Stdin
StdinLock<'a>
Stdout
and 24 others
= note: required for `i32` to implement `AsSource`
note: required by a bound in `Poller::modify`
--> /home/slomo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polling-3.0.0/src/lib.rs:559:39
|
559 | pub fn modify(&self, source: impl AsSource, interest: Event) -> io::Result<()> {
| ^^^^^^^^ required by this bound in `Poller::modify`
error: cannot construct `polling::Event` with struct literal syntax due to private fields
--> generic/threadshare/src/runtime/executor/reactor.rs:419:33
|
419 | ... Event {
| ^^^^^
|
= note: ... and other private field `extra` that was not provided
error[E0277]: the trait bound `i32: AsFd` is not satisfied
--> generic/threadshare/src/runtime/executor/reactor.rs:594:21
|
593 | reactor.poller.modify(
| ------ required by a bound introduced by this call
594 | self.raw,
| ^^^^^^^^ the trait `AsFd` is not implemented for `i32`
|
= help: the following other types implement trait `AsFd`:
Poller
socket2::Socket
polling::epoll::Poller
Box<T>
std::fs::File
Stdin
StdinLock<'a>
Stdout
and 24 others
= note: required for `i32` to implement `AsSource`
note: required by a bound in `Poller::modify`
--> /home/slomo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polling-3.0.0/src/lib.rs:559:39
|
559 | pub fn modify(&self, source: impl AsSource, interest: Event) -> io::Result<()> {
| ^^^^^^^^ required by this bound in `Poller::modify`
error: cannot construct `polling::Event` with struct literal syntax due to private fields
--> generic/threadshare/src/runtime/executor/reactor.rs:595:21
|
595 | Event {
| ^^^^^
|
= note: ... and other private field `extra` that was not provided
error[E0277]: the trait bound `i32: AsFd` is not satisfied
--> generic/threadshare/src/runtime/executor/reactor.rs:784:21
|
783 | reactor.poller.modify(
| ------ required by a bound introduced by this call
784 | handle.borrow().source.raw,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `AsFd` is not implemented for `i32`
|
= help: the following other types implement trait `AsFd`:
Poller
socket2::Socket
polling::epoll::Poller
Box<T>
std::fs::File
Stdin
StdinLock<'a>
Stdout
and 24 others
= note: required for `i32` to implement `AsSource`
note: required by a bound in `Poller::modify`
--> /home/slomo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/polling-3.0.0/src/lib.rs:559:39
|
559 | pub fn modify(&self, source: impl AsSource, interest: Event) -> io::Result<()> {
| ^^^^^^^^ required by this bound in `Poller::modify`
error: cannot construct `polling::Event` with struct literal syntax due to private fields
--> generic/threadshare/src/runtime/executor/reactor.rs:785:21
|
785 | Event {
| ^^^^^
|
= note: ... and other private field `extra` that was not provided
Needs a bit of actual work, I think the main change here is the switch to the safe file descriptor APIs.
CC @fengalin