add clone / insert methods
authorDave Watson <davejwatson@fb.com>
Thu, 15 Nov 2012 18:41:35 +0000 (10:41 -0800)
committerJordan DeLong <jdelong@fb.com>
Sun, 16 Dec 2012 22:45:26 +0000 (14:45 -0800)
Summary:
cursor.clone() will clone a length of the chain.  insert(std::move(buf)) will splice in a length of chain
I want this to change thrift2 binary type to IOBuf: we will clone() the network data for zero-copy userspace data, and insert() it if the return value is a IOBuf.

Test Plan: added unittest

Reviewed By: afrind@fb.com

FB internal diff: D632073


No differences found