sapling/eden
Adam Simpkins 1b36d4bf83 add a StoreResult class
Summary:
Add a new StoreResult which wraps the std::string returned by RocksDB.

This replaces the std::unique<string> that LocalStore::get() used to return.
This lets us avoid a memory allocation.  StoreResult can also represent a "not
found" result, so that this case can be processed efficiently without having to
throw an exception.

Additionally, StoreResult is move-only so we can't ever unintentionally copy
the string data, which is potentially expensive.  It also provides APIs for
creating IOBuf wrappers, or moving the string to the heap so we can create an
managed IOBuf around it.

Reviewed By: bolinfest

Differential Revision: D3403958

fbshipit-source-id: ab0c304988a53eda50341ecc2f96ae5235e5260c
2016-06-08 19:01:13 -07:00
..
fs add a StoreResult class 2016-06-08 19:01:13 -07:00
fuse use std::array when possible 2016-06-08 00:15:22 -07:00
utils add a kDirSeparator constant 2016-06-02 22:08:15 -07:00
DEFS Initial commit 2016-05-12 14:09:13 -07:00