diff --git a/source/vibe/core/stream.d b/source/vibe/core/stream.d index cd8331a..12b79f1 100644 --- a/source/vibe/core/stream.d +++ b/source/vibe/core/stream.d @@ -17,6 +17,7 @@ module vibe.core.stream; import vibe.internal.traits : checkInterfaceConformance, validateInterfaceConformance; +import vibe.internal.interfaceproxy; import core.time; import std.algorithm; import std.conv; @@ -275,6 +276,19 @@ final class NullOutputStream : OutputStream { void finalize() {} } + +/// Generic storage for types that implement the `InputStream` interface +alias InputStreamProxy = InterfaceProxy!InputStream; +/// Generic storage for types that implement the `OutputStream` interface +alias OutputStreamProxy = InterfaceProxy!OutputStream; +/// Generic storage for types that implement the `Stream` interface +alias StreamProxy = InterfaceProxy!Stream; +/// Generic storage for types that implement the `ConnectionStream` interface +alias ConnectionStreamProxy = InterfaceProxy!ConnectionStream; +/// Generic storage for types that implement the `RandomAccessStream` interface +alias RandomAccessStreamProxy = InterfaceProxy!RandomAccessStream; + + /** Tests if the given aggregate type is a valid input stream. See_also: `validateInputStream`