cast<S> method

StreamChannel<S> cast <S>()

Returns a copy of this with the generic type coerced to S.

If any events emitted by stream aren't of type S, they're converted into CastError events. Similarly, if any events are added to sink that aren't of type S, a CastError is thrown.

Implementation

StreamChannel<S> cast<S>();