diff options
author | Julian Tescher <jatescher@gmail.com> | 2019-12-01 21:43:01 -0800 |
---|---|---|
committer | Jens Geyer <jensg@apache.org> | 2019-12-02 21:03:35 +0100 |
commit | 9c6c6bf81a3c934e96378b26fc133f50cf4226a2 (patch) | |
tree | eb58cf9e7a195cc41d78db8f6649717ef34ccd7f /lib/rs | |
parent | b34680f01a09896cfbf3536b4b791e4d7c0ee0a3 (diff) | |
download | thrift-9c6c6bf81a3c934e96378b26fc133f50cf4226a2.tar.gz |
THRIFT-5043 Make TBufferChannel clonable
Client: Rust
Patch: Julian Tescher
This closes #1956
It is useful for `TBufferChannel` to be `Clone` so that you can use it to read bytes that were written by a client for use cases like testing or sending over alternative transports like UDP.
Diffstat (limited to 'lib/rs')
-rw-r--r-- | lib/rs/src/transport/mem.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rs/src/transport/mem.rs b/lib/rs/src/transport/mem.rs index 82c4b579f..987425760 100644 --- a/lib/rs/src/transport/mem.rs +++ b/lib/rs/src/transport/mem.rs @@ -31,7 +31,7 @@ use super::{ReadHalf, TIoChannel, WriteHalf}; /// `set_readable_bytes(...)`. Callers can then read until the buffer is /// depleted. No further reads are accepted until the internal read buffer is /// replenished again. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct TBufferChannel { read: Arc<Mutex<ReadData>>, write: Arc<Mutex<WriteData>>, |