[][src]Function holly::stream::closable

pub fn closable<I: Clone, S: Stream + Close>(
    id: I,
    s: S
) -> (KillCord, impl Stream<Item = Event<I, S::Item, S::Error>, Error = Void>)

Wrap an existing Stream and make it infallible and closable.

The stream items and errors will be lifted to Event. The stream can also be closed by pulling the returned KillCord. The closing functionality requires support from the stream which must implement Close.