hydro_lang/
boundedness.rs

1use sealed::sealed;
2
3/// A marker trait indicating whether a stream’s length is bounded (finite) or unbounded (potentially infinite).
4///
5/// Implementors of this trait use it to signal the boundedness property of a stream.
6#[sealed]
7pub trait Boundedness {}
8
9/// Marks the stream as being unbounded, which means that it is not
10/// guaranteed to be complete in finite time.
11pub enum Unbounded {}
12
13#[sealed]
14impl Boundedness for Unbounded {}
15
16/// Marks the stream as being bounded, which means that it is guaranteed
17/// to be complete in finite time.
18pub enum Bounded {}
19
20#[sealed]
21impl Boundedness for Bounded {}