You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking into fold_commutative, reduce_commutative, max etc implementations, I realized that the implementation adds a trait bound O: MinOrder<NoOrder, Min = NoOrder>. This seems to enforce that any ordering is accepted as long as it is equal or above NoOrder. This obviously make sense since implementations that do not depend on ordering can accept any streams with any ordering.
impl<'a, T, L, B, O> Stream<T, L, B, O>
where
L: Location<'a>,
O: MinOrder<NoOrder, Min = NoOrder>,
However, I was wondering why the Stream definition does not enforce that all ordering types do participate in the MinOrder trait, or more generically a Boundedness trait.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
While looking into
fold_commutative
,reduce_commutative
,max
etc implementations, I realized that the implementation adds a trait boundO: MinOrder<NoOrder, Min = NoOrder>
. This seems to enforce that any ordering is accepted as long as it is equal or aboveNoOrder
. This obviously make sense since implementations that do not depend on ordering can accept any streams with any ordering.However, I was wondering why the
Stream
definition does not enforce that all ordering types do participate in the MinOrder trait, or more generically a Boundedness trait.Beta Was this translation helpful? Give feedback.
All reactions