TInputRangeTransport

Adapts an ubyte input range for reading via the TTransport interface.

The case where R is a plain ubyte[] is reasonably optimized, so a possible use case for TInputRangeTransport would be to deserialize some data held in a memory buffer.

Constructors

this
this(R data)

Constructs a new instance.

Members

Functions

borrow
const(ubyte)[] borrow(ubyte* buf, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()

Closing is a no-op() for a memory buffer.

consume
void consume(size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
isOpen
bool isOpen()

An input range transport is always open.

open
void open()

Opening is a no-op() for an input range transport.

peek
bool peek()
Undocumented in source. Be warned that the author may not have intended to support it.
read
size_t read(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
readAll
void readAll(ubyte[] buf)

Shortcut version of readAll() for slicable ranges.

reset
void reset(R data)

Sets a new data range to use.

Inherited Members

From TBaseTransport

isOpen
bool isOpen()
Undocumented in source. Be warned that the author may not have intended to support it.
peek
bool peek()
Undocumented in source. Be warned that the author may not have intended to support it.
open
void open()
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
read
size_t read(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
readAll
void readAll(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
readEnd
size_t readEnd()
Undocumented in source. Be warned that the author may not have intended to support it.
write
void write(ubyte[] buf)
Undocumented in source. Be warned that the author may not have intended to support it.
writeEnd
size_t writeEnd()
Undocumented in source. Be warned that the author may not have intended to support it.
flush
void flush()
Undocumented in source. Be warned that the author may not have intended to support it.
borrow
const(ubyte)[] borrow(ubyte* buf, size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.
consume
void consume(size_t len)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta