Poll changes
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user