hydro_lang/
boundedness.rs1use sealed::sealed;
2
3use crate::keyed_singleton::{BoundedValue, KeyedSingletonBound};
4
5#[sealed]
9pub trait Boundedness: KeyedBoundFoldLike {}
10
11pub enum Unbounded {}
14
15#[sealed]
16impl Boundedness for Unbounded {}
17
18pub enum Bounded {}
21
22#[sealed]
23impl Boundedness for Bounded {}
24
25#[sealed::sealed]
27pub trait KeyedBoundFoldLike {
28 type WhenValueUnbounded: KeyedSingletonBound<UnderlyingBound = Self>;
30 type WhenValueBounded: KeyedSingletonBound<UnderlyingBound = Self>;
32}
33
34#[sealed::sealed]
35impl KeyedBoundFoldLike for Unbounded {
36 type WhenValueUnbounded = Unbounded;
37 type WhenValueBounded = BoundedValue;
38}
39
40#[sealed::sealed]
41impl KeyedBoundFoldLike for Bounded {
42 type WhenValueUnbounded = Bounded;
43 type WhenValueBounded = Bounded;
44}