With generic element type:

interface InputBinaryTransport(T) : TransportBase
if (!hasPointers!T && !is(T == class))
{
    /// Reads up to target.length items into target,
    /// returns number of items read. If target.length < 1 throws.
    size_t read(T[] target);
    /// Appends to target up until delimiter is found or end of stream.
    /// The delimiter is included in the target. Returns number
    /// of items read.
    size_t appendDelim(ref T[] target, in T[] delimiter);
}

The rest of the transport interfaces stays the same.


Andrei

Reply via email to