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
package. The vibe
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
Name | Description |
---|---|
nullSink()
|
Returns a NullOutputStream instance.
|
pipe(source, sink, nbytes, mode)
|
Pipes an InputStream directly into this OutputStream. |
Interfaces
Name | Description |
---|---|
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
Name | Description |
---|---|
NullOutputStream
|
Stream implementation acting as a sink with no function. |
Structs
Name | Description |
---|---|
blocking
|
Marks a function as blocking. |
PipeConfig
|
Enums
Name | Description |
---|---|
PipeMode
|
Templates
Name | Description |
---|---|
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
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
ClosableRandomAccessStreamProxy
|
vibe
|
Generic storage for types that implement the RandomAccessStream interface
|
ConnectionStreamProxy
|
vibe
|
Generic storage for types that implement the ConnectionStream interface
|
InputStreamProxy
|
vibe
|
Generic storage for types that implement the InputStream interface
|
OutputStreamProxy
|
vibe
|
Generic storage for types that implement the OutputStream interface
|
RandomAccessStreamProxy
|
vibe
|
Generic storage for types that implement the RandomAccessStream interface
|
StreamProxy
|
vibe
|
Generic storage for types that implement the Stream interface
|
TruncatableStreamProxy
|
vibe
|
Generic storage for types that implement the RandomAccessStream interface
|