Poll changes

This commit is contained in:
Zachary Sunforge
2023-06-26 13:54:00 -07:00
parent abfa21ff01
commit 1c25e51a8a
8 changed files with 105 additions and 46 deletions

View File

@ -1,11 +1,11 @@
#![feature(async_fn_in_trait, impl_trait_projections)]
#![feature(async_fn_in_trait, impl_trait_projections, never_type)]
use node_poll_variants::PollVariants;
use physical_node::CriticalError;
use physical_node::transducer::input::Poll;
#[derive(PollVariants)]
#[value_type = "SecondT"]
#[error_type = "!"]
struct ExamplePoll<'a, FirstT, SecondT>
where
SecondT: Copy,
@ -21,8 +21,9 @@ where
SecondT: Copy,
{
type Value = SecondT;
type Error = !;
async fn poll(&self) -> Result<Self::Value, CriticalError> {
async fn poll(&self) -> Result<Self::Value, Self::Error> {
Ok(self.second)
}
}