vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Module vibe.core.stream

Generic stream interface used by several stream-like classes.

This module defines the basic (buffered) stream primitives. For concrete stream types, take a look at the vibe.stream package. The vibe.stream.operations module contains additional high-level operations on streams, such as reading streams by line or as a whole.

Note that starting with vibe-core 1.0.0, streams can be of either struct or class type. Any APIs that take streams as a parameter should use a template type parameter that is tested using the appropriate trait (e.g. isInputStream) instead of assuming the specific interface type (e.g. InputStream).

Functions

NameDescription
nullSink() Returns a NullOutputStream instance.
pipe(source, sink, nbytes, mode) Pipes an InputStream directly into this OutputStream.

Interfaces

NameDescription
ClosableRandomAccessStream Random access stream with support for explicit closing.
ConnectionStream Interface for streams based on a connection.
InputStream Interface for all classes implementing readable streams.
OutputStream Interface for all classes implementing writeable streams.
RandomAccessStream Interface for all streams supporting random access.
Stream Interface for all classes implementing readable and writable streams.
TruncatableStream Extended form of a RandomAccessStream that supports truncation/extension.

Classes

NameDescription
NullOutputStream Stream implementation acting as a sink with no function.

Structs

NameDescription
blocking Marks a function as blocking.
PipeConfig

Enums

NameDescription
PipeMode

Templates

NameDescription
validateClosableRandomAccessStream Verifies that the given type is a valid closable random access stream.
validateConnectionStream Verifies that the given type is a valid connection stream.
validateInputStream Verifies that the given type is a valid input stream.
validateOutputStream Verifies that the given type is a valid output stream.
validateRandomAccessStream Verifies that the given type is a valid random access stream.
validateStream Verifies that the given type is a valid bidirectional stream.
validateTruncatableStream Verifies that the given type is a valid truncatable random access stream.

Manifest constants

NameTypeDescription
isClosableRandomAccessStream Tests if the given aggregate type is a valid random access stream.
isConnectionStream Tests if the given aggregate type is a valid connection stream.
isInputStream Tests if the given aggregate type is a valid input stream.
isOutputStream Tests if the given aggregate type is a valid output stream.
isRandomAccessStream Tests if the given aggregate type is a valid random access stream.
isStream Tests if the given aggregate type is a valid bidirectional stream.
isTruncatableStream Tests if the given aggregate type is a valid random access stream.

Aliases

NameTypeDescription
ClosableRandomAccessStreamProxy vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.ClosableRandomAccessStream) Generic storage for types that implement the RandomAccessStream interface
ConnectionStreamProxy vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.ConnectionStream) Generic storage for types that implement the ConnectionStream interface
InputStreamProxy vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.InputStream) Generic storage for types that implement the InputStream interface
OutputStreamProxy vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.OutputStream) Generic storage for types that implement the OutputStream interface
RandomAccessStreamProxy vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.RandomAccessStream) Generic storage for types that implement the RandomAccessStream interface
StreamProxy vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.Stream) Generic storage for types that implement the Stream interface
TruncatableStreamProxy vibe.internal.interfaceproxy.InterfaceProxy!(vibe.core.stream.TruncatableStream) Generic storage for types that implement the RandomAccessStream interface
Authors

Sönke Ludwig

Copyright

© 2012-2016 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.