An element positioned in a stream
Constructors
StreamElem !aElement in the stream
The final element in a stream may or may not be marked as final; if it is not, we will only discover after receiving the final element that it was in fact final. Moreover, we do not know ahead of time whether or not the final element will be marked.
When we receive an element and it is not marked final, this might therefore mean one of two things, without being able to tell which:
We are dealing with a stream in which the final element is not marked.
In this case, the element may or may not be the final element; if it is, the next value will be NoMoreElems (but waiting for the next value might mean a blocking call).
We are dealing with a stream in which the final element is marked.
In this case, this element is not final (and the final element, when we receive it, will be tagged as
Final).FinalElem !a !bWe received the final element
The final element is annotated with some additional information.
NoMoreElems !bThere are no more elements
This is used in two situations:
The stream didn't contain any elements at all.
The final element was not marked as final. See StreamElem for detailed additional discussion.
Instances8Bifoldable, Bifunctor, Bitraversable, Functor, Foldable, Traversable, …
Bifoldable StreamElemDefined in grapesy-1.1.1 · Network.GRPC.Common.StreamElemBifunctor StreamElemDefined in grapesy-1.1.1 · Network.GRPC.Common.StreamElemBitraversable StreamElemDefined in grapesy-1.1.1 · Network.GRPC.Common.StreamElemFunctor (StreamElem b)Defined in grapesy-1.1.1 · Network.GRPC.Common.StreamElemFoldable (StreamElem b)Defined in grapesy-1.1.1 · Network.GRPC.Common.StreamElemTraversable (StreamElem b)Defined in grapesy-1.1.1 · Network.GRPC.Common.StreamElem(Eq a, Eq b) => Eq (StreamElem b a)Defined in grapesy-1.1.1 · Network.GRPC.Common.StreamElem(Show a, Show b) => Show (StreamElem b a)Defined in grapesy-1.1.1 · Network.GRPC.Common.StreamElem