Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.11.0
-
None
-
C:\Users\jake>rustup show
Default host: x86_64-pc-windows-msvcstable-x86_64-pc-windows-msvc (default)
rustc 1.30.0 (da5f414c2 2018-10-24)
Description
To implement custom transports ("channels") looks like the intention is:
- Optionally, `impl TIoChannel for XXX` providing a split()
- Create `ReadHalf` and `WriteHalf` as passed to various `XXXProtocol::new()` associated functions
Problems is:
use thrift::transport::{ TIoChannel, ReadHalf, WriteHalf, }; impl TIoChannel for TNngChannel { fn split(self) -> thrift::Result<(ReadHalf<Self>, WriteHalf<Self>)> where Self: Sized, { //SNIP Ok(( ReadHalf { handle: self }, WriteHalf { handle: clone } )) }
Results in:
error[E0451]: field `handle` of struct `thrift::transport::ReadHalf` is private
--> runng-thrift\src\nng_channel.rs:57:24
57 | ReadHalf { handle: self },
^^^^^^^^^^^^ field `handle` is private
To enable creation of custom tranports/channels need to be able to create `ReadHalf` and `WriteHalf` from outside the crate.
Attachments
Issue Links
- links to