gmime.stream

Module for [Stream] class

Types 3

Abstract I/O stream class.

Methods
GType _gType() @property
Stream self()Returns `this`, for use in `with` statements.
StreamGidBuilder builder()Get builder for [gmime.stream.Stream] Returns: New builder object
ptrdiff_t bufferGets(ubyte[] buf)Reads in at most one less than max characters from stream and stores them into the buffer pointed to by buf. Reading stops after an EOS or newline ('\n'). If a newline is read, it is stored into th...
void bufferReadln(ubyte[] buffer)Reads a single line into buffer.
int close()Closes the stream. Returns: `0` on success or %-1 on fail.
void construct(long start, long end)Initializes a new stream with bounds start and end.
bool eos()Tests the end-of-stream indicator for stream. Returns: true on EOS or false otherwise.
int flush()Sync's the stream to disk. Returns: `0` on success or %-1 on fail.
long length()Gets the length of the stream. Returns: the length of the stream or %-1 if unknown.
ptrdiff_t read(ubyte[] buf)Attempts to read up to len bytes from stream into buf.
int reset()Resets the stream. Returns: `0` on success or %-1 on fail.
long seek(long offset, gmime.types.SeekWhence whence)Repositions the offset of the stream stream to the argument offset according to the directive whence as follows:
void setBounds(long start, long end)Set the bounds on a stream.
gmime.stream.Stream substream(long start, long end)Creates a new substream of stream with bounds start and end.
long tell()Gets the current offset within the stream. Returns: the current position within the stream or %-1 on fail.
ptrdiff_t write(ubyte[] buf)Attempts to write up to len bytes of buf to stream.
ptrdiff_t writeString(string str)Writes string to stream.
long writeToStream(gmime.stream.Stream dest)Attempts to write the source stream to the destination stream.
long writev(gmime.types.StreamIOVector[] vector)Writes at most count blocks described by vector to stream.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder for [gmime.stream.Stream]

Methods