Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SendError visible / coercable #19

Open
CallumJHays opened this issue Oct 24, 2017 · 0 comments
Open

Make SendError visible / coercable #19

CallumJHays opened this issue Oct 24, 2017 · 0 comments
Assignees

Comments

@CallumJHays
Copy link

I'm attempting to use BroadcastFutReceiver as a stream combinator to get a Cloneable stream that I can share across threads. I have tried something similar to the following:

fn cloneable<I, E, S>(stream: S) -> BroadcastFutReceiver<I>
where
    I: Clone,
    S: Stream<Item = I, Error = E>,
{
    let (send, recv) = broadcast_fut_queue(1);
    send.send_all(stream); // cannot coerce type E to type SendError<E>
    recv
}

The issue I'm having is I'm not sure how to coerce my generic stream error type implementing T: std::error::Error into a multiqueue::SendError<T> as SendError is not public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants