I remember seeing a trait Sealed in standard library and seeing it being used there. I can't find it or its usage by search now. Is it removed?
1 Like
Generally, for each use-case that requires sealing, there is a separate sealed trait. They don't reuse a single one for this purpose.
One example that uses it is TcpStreamExt and other Ext traits like it.
Edit: I guess I'm mistaken. If you look at the source of TcpStreamExt, it does seem to use a single Sealed trait. I guess they must have changed it. Regardless, you wont find it in the docs, because it's only in the docs if it's publicly accessible, and a Sealed trait only works if it isn't publicly accessible.
2 Likes
Thanks, found its definition.
If you want to see the (unstable!) internals, nora hosts a page: https://std.noratrieb.dev/x86_64-unknown-linux-gnu/std/?search=trait%3Asealed