- iopipe is a modular buffering library based on range-like concepts.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe.html b/docs/iopipe.html
deleted file mode 100644
index 0c76aff..0000000
--- a/docs/iopipe.html
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
- Module iopipe
-
-
-
-
-
-
-
-
Module iopipe
iopipe is a modular buffering library based on range-like concepts.
-
The goal of iopipe is to provide small building blocks that can
- then be combined together in "pipeline" chain to provide the exact
- representation needed for buffered input and output.
-
-
-
The simple principal that iopipe is based on is that i/o needs to be
- buffered, and since we are already creating a buffer for performance, we can
- provide access to the buffer to enable much richer parsing and formatting
- mechanisms. An iopipe chain can provide a window of data that can be used
- with any algorithms or functions that work with simple arrays or ranges.
-
-
-
This module publicly imports all of iopipe.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer.html b/docs/iopipe/buffer.html
deleted file mode 100644
index 6668fe9..0000000
--- a/docs/iopipe/buffer.html
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-
-
- Module iopipe.buffer
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/AllocatedBuffer.allocator.html b/docs/iopipe/buffer/AllocatedBuffer.allocator.html
deleted file mode 100644
index 303f181..0000000
--- a/docs/iopipe/buffer/AllocatedBuffer.allocator.html
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
- Function AllocatedBuffer.allocator
-
-
-
-
-
-
-
-
Function AllocatedBuffer.allocator
Construct a buffer manager with a given allocator.
-
-
-
-
- Allocatorallocator()@property;
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/AllocatedBuffer.avail.html b/docs/iopipe/buffer/AllocatedBuffer.avail.html
deleted file mode 100644
index 82c0e73..0000000
--- a/docs/iopipe/buffer/AllocatedBuffer.avail.html
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
- Function AllocatedBuffer.avail
-
-
-
-
-
-
-
-
Function AllocatedBuffer.avail
-
-
-
- size_tavail();
-
-
-
-
-
Returns
-
The number of unused elements that can be extended without
- needing to fetch more data from the allocator.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/AllocatedBuffer.capacity.html b/docs/iopipe/buffer/AllocatedBuffer.capacity.html
deleted file mode 100644
index 1991623..0000000
--- a/docs/iopipe/buffer/AllocatedBuffer.capacity.html
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- Function AllocatedBuffer.capacity
-
-
-
-
-
-
-
-
Function AllocatedBuffer.capacity
-
-
-
- size_tcapacity();
-
-
-
-
-
Returns
-
The total number of elements currently managed.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/AllocatedBuffer.extend.html b/docs/iopipe/buffer/AllocatedBuffer.extend.html
deleted file mode 100644
index eb7666c..0000000
--- a/docs/iopipe/buffer/AllocatedBuffer.extend.html
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
- Function AllocatedBuffer.extend
-
-
-
-
-
-
-
-
Function AllocatedBuffer.extend
Add more data to the window of currently valid data. To avoid expensive
- reallocation, use avail to tune this call.
-
-
-
-
- size_textend
- (
-
- size_trequest
-
- );
-
-
-
-
-
-
Parameters
-
Name
Description
-
request
The number of additional elements to add to the valid window.
-
-
-
Returns
-
The number of elements that were actually added to the valid
- window. Note that this may be less than the request if more elements
- could not be attained from the allocator.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/AllocatedBuffer.html b/docs/iopipe/buffer/AllocatedBuffer.html
deleted file mode 100644
index bbbe717..0000000
--- a/docs/iopipe/buffer/AllocatedBuffer.html
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
- Struct AllocatedBuffer
-
-
-
-
-
-
-
-
Struct AllocatedBuffer
Array based buffer manager. Uses custom allocator to get the data. Limits
- growth to doubling.
-
Give bytes back to the buffer manager from the back of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
Give bytes back to the buffer manager from the front of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
The size that can be freely allocated before growth is restricted to 2x.
-
- Based on concept by Dmitry Olshansky
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/AllocatedBuffer.releaseBack.html b/docs/iopipe/buffer/AllocatedBuffer.releaseBack.html
deleted file mode 100644
index 2c82204..0000000
--- a/docs/iopipe/buffer/AllocatedBuffer.releaseBack.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
- Function AllocatedBuffer.releaseBack
-
-
-
-
-
-
-
-
Function AllocatedBuffer.releaseBack
Give bytes back to the buffer manager from the back of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
-
-
-
- voidreleaseBack
- (
-
- size_telements
-
- );
-
-
-
-
-
-
Parameters
-
Name
Description
-
elements
number of elements to release.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/AllocatedBuffer.releaseFront.html b/docs/iopipe/buffer/AllocatedBuffer.releaseFront.html
deleted file mode 100644
index 0586cb2..0000000
--- a/docs/iopipe/buffer/AllocatedBuffer.releaseFront.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
- Function AllocatedBuffer.releaseFront
-
-
-
-
-
-
-
-
Function AllocatedBuffer.releaseFront
Give bytes back to the buffer manager from the front of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
The number of additional elements to add to the valid window.
-
-
-
Returns
-
The number of elements that were actually added to the valid
- window. Note that this may be less than the request if more elements
- could not be attained from the OS.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/RingBuffer.html b/docs/iopipe/buffer/RingBuffer.html
deleted file mode 100644
index 2c20382..0000000
--- a/docs/iopipe/buffer/RingBuffer.html
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
-
- Struct RingBuffer
-
-
-
-
-
-
-
-
Struct RingBuffer
A RingBuffer uses the underlying memory management system to avoid any
- copying of data (unless expanding).
-
It works by using the OS's mechanisms that map memory (mmap or VirtualAlloc)
- to map the same region to 2 consecutive addresses. This allows one to use a
- buffer simply as an array, even when the data wraps around the end of the
- buffer.
-
-
-
Like AllocatedBuffer, the growth is limited to doubling, but this has an
- extra restriction that the buffer must be a multiple of the page size. Note
- that this does NOT add any memory to the GC, so do not store GC pointers in
- this buffer.
-
-
-
Unlike AllocatedBuffer, this buffer is NOT copyable, so it must be
- refcounted if you are to pass it around. See rbufd which does this
- automatically for you. The reason for this is that it must unmap the memory
- on destruction.
-
-
-
Note that this buffer is not @safe, since it is possible on reallocation to
- have dangling pointers (if anything keeps a reference to the original
- memory).
-
Give bytes back to the buffer from the back of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
Give bytes back to the buffer from the front of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
The type of the elements the buffer will use. Must be sized as a power of 2.
-
floorSize
The size that can be freely allocated before growth is
- restricted to 2x. Note that the OS imposes a floor size of one page in
- addition to this.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/RingBuffer.releaseBack.html b/docs/iopipe/buffer/RingBuffer.releaseBack.html
deleted file mode 100644
index 872de5e..0000000
--- a/docs/iopipe/buffer/RingBuffer.releaseBack.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
- Function RingBuffer.releaseBack
-
-
-
-
-
-
-
-
Function RingBuffer.releaseBack
Give bytes back to the buffer from the back of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
-
-
-
- voidreleaseBack
- (
-
- size_telements
-
- );
-
-
-
-
-
-
Parameters
-
Name
Description
-
elements
number of elements to release.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/buffer/RingBuffer.releaseFront.html b/docs/iopipe/buffer/RingBuffer.releaseFront.html
deleted file mode 100644
index a70097e..0000000
--- a/docs/iopipe/buffer/RingBuffer.releaseFront.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
- Function RingBuffer.releaseFront
-
-
-
-
-
-
-
-
Function RingBuffer.releaseFront
Give bytes back to the buffer from the front of the buffer.
- These bytes can be removed in this operation or further operations and
- should no longer be used.
-
Convert an io pipe into a range of elements of the pipe. This effectively
- converts an iopipe range of T into a range of T. Note that auto-decoding
- does NOT happen still, so converting a string into an input range produces a
- range of char. The range is extended when no more data is in the window.
-
Swap the bytes of every element before handing to next processor. The
- littleEndian compile-time parameter indicates what endianness the data is
- in. If it matches the platform's endianness, then nothing is done (no byte
- swap occurs). Otherwise, a byte swap processor is returned wrapping the io
- pipe.
-
Write data from a random access range or character array into the given
- iopipe. If relOnWrite is set to true (ReleaseOnWrite.yes), then all data
- before the provided offset, and any new data written to the pipe is always
- released. This is mainly useful for output buffers where you do not wish to
- allocate extra space in the buffer, and wish to flush the buffer when it's
- full.
-
An example processor. This demonstrates the required items for implementing
- an iopipe.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/SimplePipe.chain.html b/docs/iopipe/bufpipe/SimplePipe.chain.html
deleted file mode 100644
index cba1c68..0000000
--- a/docs/iopipe/bufpipe/SimplePipe.chain.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
- Variable SimplePipe.chain
-
-
-
-
-
-
-
-
Variable SimplePipe.chain
The upstream data. This can be any iopipe. Throughout the library, the
- upstream data is generally saved as a member called "chain" as a matter
- of convention. This is not required or expected.
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/SimplePipe.extend.html b/docs/iopipe/bufpipe/SimplePipe.extend.html
deleted file mode 100644
index 1a95f99..0000000
--- a/docs/iopipe/bufpipe/SimplePipe.extend.html
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
- Function SimplePipe.extend
-
-
-
-
-
-
-
-
Function SimplePipe.extend
Get more data from the pipe. The parameter indicates the desired number
- of elements to add to the end of the window. If 0 is passed, then it is
- up to the implementation of the pipe to determine the optimal number of
- elements to add.
-
-
-
-
- size_textend
- (
-
- size_telements
-
- );
-
-
-
-
-
-
Parameters
-
Name
Description
-
elements
Number of elements requested.
-
-
-
Returns
-
The number of elements added. This can be less than or more
- than the parameter, but will only be 0 when no more elements
- can be added. This signifies EOF.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/SimplePipe.html b/docs/iopipe/bufpipe/SimplePipe.html
deleted file mode 100644
index 0cfc25b..0000000
--- a/docs/iopipe/bufpipe/SimplePipe.html
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-
-
- Struct SimplePipe
-
-
-
-
-
-
-
-
Struct SimplePipe
An example processor. This demonstrates the required items for implementing
- an iopipe.
-
SimplePipe will only extend exactly the elements requested (from what is
- availble), so it can be used for testing with a static buffer to simulate
- data coming in at any rate.
-
The upstream data. This can be any iopipe. Throughout the library, the
- upstream data is generally saved as a member called "chain" as a matter
- of convention. This is not required or expected.
-
Get more data from the pipe. The parameter indicates the desired number
- of elements to add to the end of the window. If 0 is passed, then it is
- up to the implementation of the pipe to determine the optimal number of
- elements to add.
-
Release the given number of elements from the front of the window. After
- calling this, make sure to update any tracking indexes for the window
- that you are maintaining.
-
Get the current window of elements for the pipe. This is the data that
- can be used at this moment in time.
-
-
-
-
-
Example
-
-
// any array is a valid iopipe source.
-auto source = "hello, world!";
-
-auto pipe = SimplePipe!(string)(source);
-
-// SimplePipe holds back data until you extend it.
-assert(pipe.window.length == 0);
-
-// Note: elements of narrow strings are code units for purposes of iopipe
-// library.
-assert(pipe.extend(5) == 5);
-assert(pipe.window == "hello");
-
-// Release data to inform the pipe you are done with it
-pipe.release(3);
-assert(pipe.window == "lo");
-
-// you can request "some data" by extending with 0, letting the pipe define
-// what is the best addition of data. This is useful for optimizing OS
-// system call reads.
-assert(pipe.extend(0) == 1);
-assert(pipe.window == "lo,");
-
-// you aren't guaranteed to get all the data you ask for.
-assert(pipe.extend(100) == 7);
-assert(pipe.window == "lo, world!");
-
-pipe.release(pipe.window.length);
-
-// this signifies EOF.
-assert(pipe.extend(1) == 0);
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/SimplePipe.release.html b/docs/iopipe/bufpipe/SimplePipe.release.html
deleted file mode 100644
index acc6b55..0000000
--- a/docs/iopipe/bufpipe/SimplePipe.release.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
- Function SimplePipe.release
-
-
-
-
-
-
-
-
Function SimplePipe.release
Release the given number of elements from the front of the window. After
- calling this, make sure to update any tracking indexes for the window
- that you are maintaining.
-
-
-
-
- voidrelease
- (
-
- size_telements
-
- );
-
-
-
-
-
-
Parameters
-
Name
Description
-
elements
The number of elements to release.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/SimplePipe.this.html b/docs/iopipe/bufpipe/SimplePipe.this.html
deleted file mode 100644
index bbf424c..0000000
--- a/docs/iopipe/bufpipe/SimplePipe.this.html
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
- Function SimplePipe.this
-
-
-
-
-
-
-
-
Function SimplePipe.this
Build on top of an existing chain
-
-
-
-
- this
- (
-
- Chainc
-
- );
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/SimplePipe.valve.html b/docs/iopipe/bufpipe/SimplePipe.valve.html
deleted file mode 100644
index aa660e8..0000000
--- a/docs/iopipe/bufpipe/SimplePipe.valve.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
- Function SimplePipe.valve
-
-
-
-
-
-
-
-
Function SimplePipe.valve
Implement the required valve function. If the pipe you are wrapping
- has a valve, you must provide ref access to the valve.
-
-
-
-
- ref autovalve();
-
-
-
-
Note, the correct boilerplate implementation can be inserted by
- adding the following line to your pipe structure:
-
-
-
mixin implementValve!(nameOfUpstreamPipe);
-
-
-
Returns
-
A valve inlet that allows you to control flow of the data
- through this pipe.
-
-
-
See Also: iopipe.valve
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/SimplePipe.window.html b/docs/iopipe/bufpipe/SimplePipe.window.html
deleted file mode 100644
index f51a45c..0000000
--- a/docs/iopipe/bufpipe/SimplePipe.window.html
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
- Function SimplePipe.window
-
-
-
-
-
-
-
-
Function SimplePipe.window
Get the current window of elements for the pipe. This is the data that
- can be used at this moment in time.
-
-
-
-
- autowindow();
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/arrayCastPipe.html b/docs/iopipe/bufpipe/arrayCastPipe.html
deleted file mode 100644
index aaf96c0..0000000
--- a/docs/iopipe/bufpipe/arrayCastPipe.html
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
- Function arrayCastPipe
-
-
-
-
-
-
-
-
Function arrayCastPipe
Given a pipe chain whose window is a straight array, create a pipe chain that
- converts the array to another array type.
-
This new pipe chain handles any alignment issues when partial
- elements have been extended/released. Also, the size of the new
- element type must be a multiple of, or divide evenly into, the
- original array.
-
-
-
Parameters
-
Name
Description
-
T
Element type for new pipe chain window
-
c
Source pipe chain to use for new chain.
-
-
-
Returns
-
New pipe chain with new array type.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/asElemRange.html b/docs/iopipe/bufpipe/asElemRange.html
deleted file mode 100644
index 127c303..0000000
--- a/docs/iopipe/bufpipe/asElemRange.html
+++ /dev/null
@@ -1,137 +0,0 @@
-
-
-
-
- Function asElemRange
-
-
-
-
-
-
-
-
Function asElemRange
Convert an io pipe into a range of elements of the pipe. This effectively
- converts an iopipe range of T into a range of T. Note that auto-decoding
- does NOT happen still, so converting a string into an input range produces a
- range of char. The range is extended when no more data is in the window.
-
The type of element to allocate with the allocator
-
Allocator
The allocator to use for managing the buffer
-
Source
The type of the input stream. This must have a function
- read that can read into the buffer's window.
-
dev
The input stream to use. If not specified, then a NullDev source is assumed.
-
args
Arguments passed to the allocator (for allocators that need initialization)
-
-
-
Returns
-
An iopipe that uses the given buffer to read data from the given device source.
- The version which takes no parameter uses a NullDev as a source.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/byteSwapper.html b/docs/iopipe/bufpipe/byteSwapper.html
deleted file mode 100644
index 0f0ce31..0000000
--- a/docs/iopipe/bufpipe/byteSwapper.html
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
- Function byteSwapper
-
-
-
-
-
-
-
-
Function byteSwapper
Swap the bytes of every element before handing to next processor. The
- littleEndian compile-time parameter indicates what endianness the data is
- in. If it matches the platform's endianness, then nothing is done (no byte
- swap occurs). Otherwise, a byte swap processor is returned wrapping the io
- pipe.
-
It is advisable to use a template or lambda that does not require a closure,
- and is not a delegate from a struct that might move.
-
-
-
The result is also alias-this'd to the chain, so it can be used as an iopipe also.
-
-
-
-
Parameters
-
Name
Description
-
fun
Function that accepts as its first parameter the input chain (of
- type Chain), and as its second parameter, the buffer to read into. Only
- buffer types that are supported are used.
-
c
The chain to read from
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/outputPipe.html b/docs/iopipe/bufpipe/outputPipe.html
deleted file mode 100644
index 4e5f4a0..0000000
--- a/docs/iopipe/bufpipe/outputPipe.html
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
- Function outputPipe
-
-
-
-
-
-
-
-
Function outputPipe
An output pipe writes all its data to a given sink stream. Any data in the
- output pipe's window has been written to the stream.
-
The iopipe RingBuffer type uses virtual memory mapping to have the same
- segment of data mapped to consecutive addresses. This allows true zero-copy
- usage. However, it does require use of resources that may possibly be
- limited, so you may want to justify that it's needed before using instead of
- bufd.
-
-
-
Note also that a RingBuffer is not copyable (its destructor will unmap the
- memory), so this must use RefCounted to properly work.
-
-
-
-
Parameters
-
Name
Description
-
T
The type of element to allocate with the allocator
-
Source
The type of the input stream. This must have a function
- read that can read into the buffer's window.
-
dev
The input stream to use. If not specified, then a NullDev source is assumed.
-
-
-
Returns
-
An iopipe that uses a RingBuffer to read data from the given device source.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/bufpipe/writeBuf.html b/docs/iopipe/bufpipe/writeBuf.html
deleted file mode 100644
index 6ea0eb8..0000000
--- a/docs/iopipe/bufpipe/writeBuf.html
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
-
- Function writeBuf
-
-
-
-
-
-
-
-
Function writeBuf
Write data from a random access range or character array into the given
- iopipe. If relOnWrite is set to true (ReleaseOnWrite.yes), then all data
- before the provided offset, and any new data written to the pipe is always
- released. This is mainly useful for output buffers where you do not wish to
- allocate extra space in the buffer, and wish to flush the buffer when it's
- full.
-
If relOnWrite is false, then the pipe data is not released, and you should
- consider the "written" part to be the offset + the return value.
-
-
-
-
Parameters
-
Name
Description
-
c
The iopipe chain to write to.
-
data
The range to write to the chain.
-
offset
The starting point to write the data.
-
relOnWrite
If true, data is released as it is written, otherwise,
- it's not released.
-
-
-
Returns
-
The number of elements written. This should match the elements of
- the range, but could potentially be less if there wasn't a way to extend
- more space and more space was needed.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/refc.html b/docs/iopipe/refc.html
deleted file mode 100644
index b12b7fa..0000000
--- a/docs/iopipe/refc.html
+++ /dev/null
@@ -1,152 +0,0 @@
-
-
-
-
- Module iopipe.refc
-
-
-
-
-
-
-
-
Module iopipe.refc
Reference counting using the GC.
-
The RefCounted struct simply stores the item in a GC block, and also adds a
- root to that block. Once all known references to the block are removed
- (tracked by a reference count in the block), then the block is removed, and
- the destructor run. Since it's a root, it can run the full destructor of the
- data underneath, without worrying about GC data being collected underneath it.
-
-
-
This depends on the block not being involved in a cycle, which should be fine
- for iopipes.
-
-
-
Note that atomics are used for the reference count because the GC can destroy
- things in other threads.
-
A struct to ensure only one copy of the provided item exists.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/refc/RefCounted._get.html b/docs/iopipe/refc/RefCounted._get.html
deleted file mode 100644
index 987f8bb..0000000
--- a/docs/iopipe/refc/RefCounted._get.html
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
- Function RefCounted._get
-
-
-
-
-
-
-
-
Function RefCounted._get
Get a reference to the item. Note that if you store a reference to this
- item, it is possible the item will in the future be destroyed, but the
- memory will still be present (until the GC cleans it up).
-
-
-
-
- ref T_get();
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/refc/RefCounted.html b/docs/iopipe/refc/RefCounted.html
deleted file mode 100644
index 1ae47e7..0000000
--- a/docs/iopipe/refc/RefCounted.html
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
- Struct RefCounted
-
-
-
-
-
-
-
-
Struct RefCounted
A struct to ensure only one copy of the provided item exists.
-
-
-
-
- structRefCounted(T)
- ;
-
-
-
-
This differs from Phobos' std.typecons.RefCounted by using the GC to store
- the memory, instead of C's heap. The benefit here is that this version of
- RefCounted can be @safe.
-
-
-
The block containing the item is pinned in the GC until all references are
- gone, which means the destructor will be run synchronously when the last
- reference is removed. Therefore, it is safe to store a RefCounted struct
- inside a GC allocated type.
-
Get a reference to the item. Note that if you store a reference to this
- item, it is possible the item will in the future be destroyed, but the
- memory will still be present (until the GC cleans it up).
-
// note that destructor is called from the parameter to refCounted, so we
-// must trigger only counting destruction of non-init instances of the
-// struct.
-size_t dtorcalled = 0;
-struct S
-{
- int x;
- @safe ~this() {if(x) dtorcalled++;}
- @disable this(this);
-}
-
-{
- auto destroyme = S(1).refCounted;
- auto dm2 = destroyme;
- auto dm3 = destroyme;
-}
-
-assert(dtorcalled == 1);
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/stream.html b/docs/iopipe/stream.html
deleted file mode 100644
index b102e9b..0000000
--- a/docs/iopipe/stream.html
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
-
- Module iopipe.stream
-
-
-
-
-
-
-
Given an ioPipe whose window is a buffer that is a dynamic array of data of
- integral type, performs the proper transformations in order to get a buffer
- of valid char, wchar, or dchar elements, depending on the provided encoding.
- This function is useful for when you have data from a raw source (such as a
- file or stream) that you have determined or know is really a stream of UTF
- data.
-
Given a text iopipe, returns a range based on splitting the text by a given
- code point. This has the advantage over delimitedText.asRange in that the
- delimiter can be hidden.
-
Convert iopipe of one text type into an iopipe for another type. Performs
- conversions at the code-point level. If specified, the resulting iopipe will
- ensure there is a BOM at the beginning of the iopipe. This is useful if
- writing to storage.
-
Process a given text iopipe by a given code point delimeter. The only
- behavior that changes from the input pipe is that extensions to the window
- deliever exactly one more delimited segment of text.
-
Encode a given text iopipe into the desired encoding type. The resulting
- iopipe's element type is ubyte, with the bytes ready to be written to a
- storage device.
-
Given a template function, and an input chain of encoded text data, this
- function will detect the encoding of the input chain, and convert that
- runtime value into a compile-time parameter to the given function. Useful
- for writing code that needs to handle all the forms of text encoding.
-
Given a template function, and an input chain of encoded text data, this
- function will detect the encoding of the input chain, and convert that
- runtime value into a compile-time parameter to the given function. Useful
- for writing code that needs to handle all the forms of text encoding.
-
Take a text-based iopipe and turn it into an output range of dchar. Note
- that the iopipe must be an output iopipe, not an input one. In other words,
- a textOutput result doesn't output its input, it uses its input as a place
- to deposit data.
-
Unknown is specified as char (UTF8 is the default)
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/UTFType.html b/docs/iopipe/textpipe/UTFType.html
deleted file mode 100644
index 738aa0d..0000000
--- a/docs/iopipe/textpipe/UTFType.html
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
- Enum UTFType
-
-
-
-
-
-
-
-
Enum UTFType
Used to specify stream type
-
-
-
-
- enumUTFType
- :int{ ... }
-
-
-
-
-
Enum members
-
-
-
-
Name
Description
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/assumeText.html b/docs/iopipe/textpipe/assumeText.html
deleted file mode 100644
index d519839..0000000
--- a/docs/iopipe/textpipe/assumeText.html
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
- Function assumeText
-
-
-
-
-
-
-
-
Function assumeText
Given an ioPipe whose window is a buffer that is a dynamic array of data of
- integral type, performs the proper transformations in order to get a buffer
- of valid char, wchar, or dchar elements, depending on the provided encoding.
- This function is useful for when you have data from a raw source (such as a
- file or stream) that you have determined or know is really a stream of UTF
- data.
-
If the data must be byte-swapped, then it must be mutable. Otherwise,
- immutable or const data is allowed.
-
-
-
-
Parameters
-
Name
Description
-
enc
The assumed encoding of the text pipe.
-
c
The chain to assume the encoding for. This MUST have a dynamic
- array type for its window, and the elements must be integral.
-
-
-
Returns
-
An appropriate iopipe that has a window of the appropriate character type
- (char, wchar, or dchar) for the assumed encoding. The window will
- be set up so its elements are properly byte-ordered for the compiled
- platform.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/byDelimRange.html b/docs/iopipe/textpipe/byDelimRange.html
deleted file mode 100644
index e6ee12a..0000000
--- a/docs/iopipe/textpipe/byDelimRange.html
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
- Function byDelimRange
-
-
-
-
-
-
-
-
Function byDelimRange
Given a text iopipe, returns a range based on splitting the text by a given
- code point. This has the advantage over delimitedText.asRange in that the
- delimiter can be hidden.
-
If true, then the delimiter is included in each element
- of the range (if present from the original iopipe).
-
c
The iopipe to range-ify.
-
-
-
Returns
-
An input range whose elements are lines of text from the input iopipe,
- with or without delimiters as specified by the KeepDelimiter boolean.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/convertText.html b/docs/iopipe/textpipe/convertText.html
deleted file mode 100644
index 1dba1d0..0000000
--- a/docs/iopipe/textpipe/convertText.html
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
- Function convertText
-
-
-
-
-
-
-
-
Function convertText
Convert iopipe of one text type into an iopipe for another type. Performs
- conversions at the code-point level. If specified, the resulting iopipe will
- ensure there is a BOM at the beginning of the iopipe. This is useful if
- writing to storage.
-
If no conversion is necessary, and no BOM is required, the original iopipe
- is returned.
-
-
-
-
Parameters
-
Name
Description
-
Char
The desired character type in the resulting iopipe. Must be one
- of char, wchar, or dchar.
-
ensureBOM
If true, the resulting iopipe will ALWAYS have a byte order
- mark at the beginning of the stream. At the moment this is
- accomplished by copying all the data from the original iopipe to
- the new one. A better mechanism is being worked on.
-
chain
The source iopipe.
-
-
-
Returns
-
An iopipe which fulfills the given requirements.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/delimitedText.html b/docs/iopipe/textpipe/delimitedText.html
deleted file mode 100644
index 89a40a6..0000000
--- a/docs/iopipe/textpipe/delimitedText.html
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
- Function delimitedText
-
-
-
-
-
-
-
-
Function delimitedText
Process a given text iopipe by a given code point delimeter. The only
- behavior that changes from the input pipe is that extensions to the window
- deliever exactly one more delimited segment of text.
-
The input text iopipe. This must have a window whose elements are
- valid character types.
-
delim
The code point with which to delimit the text. Each extension to
- the iopipe will either end on this delimiter, or will be the last
- segment in the pipe.
-
-
-
Returns
-
An iopipe that behaves as described above.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/detectBOM.html b/docs/iopipe/textpipe/detectBOM.html
deleted file mode 100644
index 24ef159..0000000
--- a/docs/iopipe/textpipe/detectBOM.html
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
- Function detectBOM
-
-
-
-
-
-
-
-
Function detectBOM
Using the given random access range of bytes, determine the stream width.
- This does not advance the range past the BOM.
-
Range in which to detect BOM. Must be a random access range with
- element type of ubyte. Cannot be an infinite range.
-
-
-
Returns
-
Instance of UTFType indicating what the BOM decoding implies.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/encodeText.html b/docs/iopipe/textpipe/encodeText.html
deleted file mode 100644
index 9f8675e..0000000
--- a/docs/iopipe/textpipe/encodeText.html
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
- Function encodeText
-
-
-
-
-
-
-
-
Function encodeText
Encode a given text iopipe into the desired encoding type. The resulting
- iopipe's element type is ubyte, with the bytes ready to be written to a
- storage device.
-
When an iopipe is made up of character types, in some cases a slice of the
- window may not be completely decodeable. For example, a wchar iopipe may
- have only one half of a surrogate pair at the end of the window.
-
-
-
This function generates an iopipe that only allows completely decodeable
- sequences to be released to the next iopipe.
-
-
-
-
Parameters
-
Name
Description
-
c
The iopipe whose element type is one of char, wchar, or dchar.
-
-
-
Returns
-
An appropriate iopipe that ensures decodeability. Note that dchar iopipes
- are always decodeable, so the result is simply a return of the input.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/runEncoded.html b/docs/iopipe/textpipe/runEncoded.html
deleted file mode 100644
index 10e7a73..0000000
--- a/docs/iopipe/textpipe/runEncoded.html
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
- Function runEncoded
-
-
-
-
-
-
-
-
Function runEncoded
Given a template function, and an input chain of encoded text data, this
- function will detect the encoding of the input chain, and convert that
- runtime value into a compile-time parameter to the given function. Useful
- for writing code that needs to handle all the forms of text encoding.
-
Use the encoding type as a parameter to assumeText to get an iopipe of
- char, wchar, or dchar elements for processing.
-
-
-
Note that func must return the same type no matter how it's called, as the
- BOM detection and calling is done at runtime. Given that there are 5
- different encodings that iopipe handles, you will have 6 instantiations of
- the function, no matter whether the input contains that encoding or not.
-
-
-
The second version assumes that the function doesn't care what the encoding
- is, but just wants to get a text iopipe with the appropriate encoding
- already handled. In this case, the function will receive a chain of char,
- wchar, or dchar window elements.
-
-
-
-
Parameters
-
Name
Description
-
func
The template function to call.
-
UnknownIsUTF8
If true, then an undetected encoding will be passed as
- UTF8 to your function. Otherwise, the Unknown encoding will be passed.
-
c
The iopipe input chain that should have encoded text in it.
-
args
Any optional args to pass to the function.
-
-
-
Returns
-
The return value from func.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/runWithEncoding.html b/docs/iopipe/textpipe/runWithEncoding.html
deleted file mode 100644
index 53912bf..0000000
--- a/docs/iopipe/textpipe/runWithEncoding.html
+++ /dev/null
@@ -1,157 +0,0 @@
-
-
-
-
- Function runWithEncoding
-
-
-
-
-
-
-
-
Function runWithEncoding
Given a template function, and an input chain of encoded text data, this
- function will detect the encoding of the input chain, and convert that
- runtime value into a compile-time parameter to the given function. Useful
- for writing code that needs to handle all the forms of text encoding.
-
Use the encoding type as a parameter to assumeText to get an iopipe of
- char, wchar, or dchar elements for processing.
-
-
-
Note that func must return the same type no matter how it's called, as the
- BOM detection and calling is done at runtime. Given that there are 5
- different encodings that iopipe handles, you will have 6 instantiations of
- the function, no matter whether the input contains that encoding or not.
-
-
-
The second version assumes that the function doesn't care what the encoding
- is, but just wants to get a text iopipe with the appropriate encoding
- already handled. In this case, the function will receive a chain of char,
- wchar, or dchar window elements.
-
-
-
-
Parameters
-
Name
Description
-
func
The template function to call.
-
UnknownIsUTF8
If true, then an undetected encoding will be passed as
- UTF8 to your function. Otherwise, the Unknown encoding will be passed.
-
c
The iopipe input chain that should have encoded text in it.
-
args
Any optional args to pass to the function.
-
-
-
Returns
-
The return value from func.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/textConverter.html b/docs/iopipe/textpipe/textConverter.html
deleted file mode 100644
index 742372f..0000000
--- a/docs/iopipe/textpipe/textConverter.html
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
- Function textConverter
-
-
-
-
-
-
-
-
Function textConverter
A converter to allow conversion into any other type of text.
-
The converter does 2 things. First and foremost, it adds a read function
- that allows conversion into any other width of text. The read function
- converts as much text as possible into the given format, extending the base
- iopipe as necessary.
-
-
-
The second thing that it does is potentially add a BOM character to the
- beginning of the text. It was decided to add this here, since you are likely
- already copying data from one iopipe into another. However, in future
- versions, this capability may go away, as we can do this elsewhere with less
- copying. So expect this API to change.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/textpipe/textOutput.html b/docs/iopipe/textpipe/textOutput.html
deleted file mode 100644
index 5bdbdd3..0000000
--- a/docs/iopipe/textpipe/textOutput.html
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
-
- Function textOutput
-
-
-
-
-
-
-
-
Function textOutput
Take a text-based iopipe and turn it into an output range of dchar. Note
- that the iopipe must be an output iopipe, not an input one. In other words,
- a textOutput result doesn't output its input, it uses its input as a place
- to deposit data.
-
-
-
-
- autotextOutput(Chain)
- (
-
- Chainc
-
- );
-
-
-
-
The given iopipe window will be written to, then data that is ready to be
- output is released. It is expected that the iopipe will use this mechanism
- to actually know which data to output. See the example for more information.
-
-
-
-
Parameters
-
Name
Description
-
c
The output iopipe that can be used to put dchars into.
-
-
-
Returns
-
An output range that can accept all forms of text data for output.
-
-
-
Example
-
-
import std.range : put;
-// use a writeable buffer as output.
-char[256] buffer;
-size_t written = 0;
-
-// this helps us see how many chars are written.
-struct LocalIopipe
-{
- char[] window;
- void release(size_t elems)
- {
- window.release(elems);
- written += elems;
- }
- size_t extend(size_t elems) { return 0; }
-}
-auto oRange = LocalIopipe(buffer[]).textOutput;
-put(oRange, "hello, world");
-
-// written is updated whenever the iopipe is released
-assert(buffer[0 .. written] == "hello, world");
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/traits.html b/docs/iopipe/traits.html
deleted file mode 100644
index cd985b1..0000000
--- a/docs/iopipe/traits.html
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
- Module iopipe.traits
-
-
-
-
-
-
-
-
Module iopipe.traits
Base mechanisms used to determine information about iopipes.
-
Create an auto-flushing valve loop. This is for use with a chain where the next
- valve is a holding valve. What this does is automatically run the outlet of
- the holding valve so it seamlessly flushes all data when required.
-
Go down the chain of valves until you find a valve of the given type. This
- is useful if you know there is a pipe you are looking for in the chain of valves.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/valve/holdingLoop.html b/docs/iopipe/valve/holdingLoop.html
deleted file mode 100644
index 9758770..0000000
--- a/docs/iopipe/valve/holdingLoop.html
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
- Function holdingLoop
-
-
-
-
-
-
-
-
Function holdingLoop
Create an auto-flushing valve loop. This is for use with a chain where the next
- valve is a holding valve. What this does is automatically run the outlet of
- the holding valve so it seamlessly flushes all data when required.
-
Note that this will ONLY work if the first valve in the chain is a holdingValve.
-
-
-
The valve loop provides the flush function which allows you to flush any
- released data through the loop without extending. This function returns the
- number of elements flushed.
-
-
-
See holdingValve for a better explanation.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/valve/holdingValve.html b/docs/iopipe/valve/holdingValve.html
deleted file mode 100644
index 05145e5..0000000
--- a/docs/iopipe/valve/holdingValve.html
+++ /dev/null
@@ -1,168 +0,0 @@
-
-
-
-
- Function holdingValve
-
-
-
-
-
-
-
-
Function holdingValve
Create a valve that uses a holding location to pass data from the inlet to the outlet.
-
A holding valve allows one to manually control when data is released downstream. The holding valve consists of 3 parts:
- - An input buffer, controlled by an iopipe called the inlet. This gives access to the input parameter chain.
- - A holding area for data that has been released by the inlet to the outlet. This is basically a FIFO queue.
- - An output buffer, controlled by an iopipe called the outlet. This is the tail end of the holding valve, and provides data downstream.
-
-
-
The inlet is a bit different than the normal iopipe, because it doesn't release data upstream, but rather downstream into the holding area.
-
-
-
The outlet, when releasing data goes upstream with the release call, giving the data back to the buffered source.
-
-
-
One major purpose of the holding valve is to use an autoValve to automate the downstream section, and let the user code interact directly with the inlet.
-
-
-
For example, this creates effectively an output stream:
-
a lambda template used to generate the pipeline that will
- be set up as a push chain.
-
autoFlush
true (default) if you wish to auto-flush the push pipeline
- when all references to it are gone. This moves the whole chain into a
- RefCounted struct which automatically flushes any remaining data that
- hasn't been flushed.
-
c
An ioPipe to be used as the source for the data being pushed.
-
-
-
Returns
-
A wrapped chain that will push any data that is released as needed
- (i.e. as the buffer fills up).
-
-
-
Note
-
If autoFlush is false, you will need to manually call flush on the
- pipeline after all processing is done.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/valve/simpleValve.html b/docs/iopipe/valve/simpleValve.html
deleted file mode 100644
index 1fbf4bb..0000000
--- a/docs/iopipe/valve/simpleValve.html
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
- Function simpleValve
-
-
-
-
-
-
-
This puts a transparent layer between the given chain and the next downstream iopipe to provide valve access. Calling valve on the resulting iopipe gives access to the chain argument passed in.
-
-
-
-
Parameters
-
Name
Description
-
chain
The upstream iopipe chain to provide valve access to.
-
-
-
Returns
-
A new iopipe chain that provides a valve access point to the parameter.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/valve/valveOf.html b/docs/iopipe/valve/valveOf.html
deleted file mode 100644
index 794b710..0000000
--- a/docs/iopipe/valve/valveOf.html
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
- Function valveOf
-
-
-
-
-
-
-
-
Function valveOf
Go down the chain of valves until you find a valve of the given type. This
- is useful if you know there is a pipe you are looking for in the chain of valves.
-
Wrap an iopipe that contains compressed data into an iopipe containing the
- decompressed data. Data is not decompressed in place, so an extra buffer is
- created to hold it.
-
Wrap an iopipe of ubytes into an iopipe containing the compressed data from
- that input. Data is not compressed in place, so an extra buffer is created
- to hold it.
-
Enum for specifying the desired or expected compression format.
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/zip/CompressionFormat.html b/docs/iopipe/zip/CompressionFormat.html
deleted file mode 100644
index b102b77..0000000
--- a/docs/iopipe/zip/CompressionFormat.html
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
- Enum CompressionFormat
-
-
-
-
-
-
-
-
Enum CompressionFormat
Enum for specifying the desired or expected compression format.
-
-
-
-
- enumCompressionFormat
- :int{ ... }
-
-
-
-
-
Enum members
-
-
-
-
Name
Description
-
-
-
- deflate
-
-
Deflate (zip) format
-
-
-
-
- determineFromData
-
-
Auto-detect the format by reading the data (unzip only)
-
-
-
-
- gzip
-
-
GZIP format
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/zip/unzip.html b/docs/iopipe/zip/unzip.html
deleted file mode 100644
index 43529aa..0000000
--- a/docs/iopipe/zip/unzip.html
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
- Function unzip
-
-
-
-
-
-
-
-
Function unzip
Wrap an iopipe that contains compressed data into an iopipe containing the
- decompressed data. Data is not decompressed in place, so an extra buffer is
- created to hold it.
-
This is the source that unzip uses to decompress.
-
-
-
-
Parameters
-
Name
Description
-
c
The input iopipe that provides the compressed data. The window type
- MUST be implicitly convertable to an array of const ubytes.
-
format
The specified format of the data, leave the default to autodetect.
-
-
-
Returns
-
An input stream whose read method decompresses the input iopipe into
- the given buffer.
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/iopipe/zip/zip.html b/docs/iopipe/zip/zip.html
deleted file mode 100644
index 6aca734..0000000
--- a/docs/iopipe/zip/zip.html
+++ /dev/null
@@ -1,140 +0,0 @@
-
-
-
-
- Function zip
-
-
-
-
-
-
-
-
Function zip
Wrap an iopipe of ubytes into an iopipe containing the compressed data from
- that input. Data is not compressed in place, so an extra buffer is created
- to hold it.
-