use super::error::StreamError;
use core::{
pin::Pin,
task::{Context, Poll},
};
pub use self::{sink::sink_with_shutdown, unbounded::unbounded};
pub mod unbounded;
pub mod sink;
#[cfg(not(feature = "send"))]
pub trait Subscriber<I> {
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<bool, StreamError>>;
fn start_send(self: Pin<&mut Self>, item: I) -> Result<(), StreamError>;
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<bool, StreamError>>;
fn closing(self: Pin<&mut Self>, reason: Result<(), StreamError>) -> Result<(), StreamError>;
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), StreamError>>;
}
#[cfg(feature = "send")]
pub trait Subscriber<I>: Send {
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<bool, StreamError>>;
fn start_send(self: Pin<&mut Self>, item: I) -> Result<(), StreamError>;
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<bool, StreamError>>;
fn closing(self: Pin<&mut Self>, reason: Result<(), StreamError>) -> Result<(), StreamError>;
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), StreamError>>;
}