vibe.d beta banner
get vibe.d
0.8.4

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) Pipes an InputStream directly into this OutputStream.

Interfaces

NameDescription
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.

Classes

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

Structs

NameDescription
blocking Marks a function as blocking.

Templates

NameDescription
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.

Manifest constants

NameTypeDescription
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.

Aliases

NameTypeDescription
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
Authors

Sönke Ludwig

Copyright

© 2012-2016 RejectedSoftware e.K.

License

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