@@ -55,16 +55,17 @@ pub trait Peekable<T> {
55
55
fn peek ( & self ) -> bool ;
56
56
}
57
57
58
- pub struct PortOne < T > { priv x: rtcomm:: PortOne < T > }
59
- pub struct ChanOne < T > { priv x: rtcomm:: ChanOne < T > }
58
+ /* priv is disabled to allow users to get at traits like Select. */
59
+ pub struct PortOne < T > { /* priv */ x : rtcomm:: PortOne < T > }
60
+ pub struct ChanOne < T > { /* priv */ x : rtcomm:: ChanOne < T > }
60
61
61
62
pub fn oneshot < T : Send > ( ) -> ( PortOne < T > , ChanOne < T > ) {
62
63
let ( p, c) = rtcomm:: oneshot ( ) ;
63
64
( PortOne { x : p } , ChanOne { x : c } )
64
65
}
65
66
66
- pub struct Port < T > { priv x: rtcomm:: Port < T > }
67
- pub struct Chan < T > { priv x: rtcomm:: Chan < T > }
67
+ pub struct Port < T > { /* priv */ x : rtcomm:: Port < T > }
68
+ pub struct Chan < T > { /* priv */ x : rtcomm:: Chan < T > }
68
69
69
70
pub fn stream < T : Send > ( ) -> ( Port < T > , Chan < T > ) {
70
71
let ( p, c) = rtcomm:: stream ( ) ;
@@ -158,7 +159,7 @@ impl<T: Send> Peekable<T> for Port<T> {
158
159
}
159
160
160
161
161
- pub struct SharedChan < T > { priv x: rtcomm:: SharedChan < T > }
162
+ pub struct SharedChan < T > { /* priv */ x : rtcomm:: SharedChan < T > }
162
163
163
164
impl < T : Send > SharedChan < T > {
164
165
pub fn new ( c : Chan < T > ) -> SharedChan < T > {
@@ -200,7 +201,7 @@ impl<T: Send> Clone for SharedChan<T> {
200
201
}
201
202
}
202
203
203
- pub struct SharedPort < T > { priv x: rtcomm:: SharedPort < T > }
204
+ pub struct SharedPort < T > { /* priv */ x : rtcomm:: SharedPort < T > }
204
205
205
206
impl < T : Send > SharedPort < T > {
206
207
pub fn new ( p : Port < T > ) -> SharedPort < T > {
0 commit comments