File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ impl<T: Read + Write + Unpin + fmt::Debug> Unpin for Session<T> {}
57
57
impl < T : Read + Write + Unpin + fmt:: Debug > Unpin for Client < T > { }
58
58
impl < T : Read + Write + Unpin + fmt:: Debug > Unpin for Connection < T > { }
59
59
60
+ // Make it possible to access the inner connection and modify its settings, such as read/write
61
+ // timeouts.
62
+ impl < T : Read + Write + Unpin + fmt:: Debug > AsMut < T > for Session < T > {
63
+ fn as_mut ( & mut self ) -> & mut T {
64
+ self . conn . stream . as_mut ( )
65
+ }
66
+ }
67
+
60
68
/// An (unauthenticated) handle to talk to an IMAP server. This is what you get when first
61
69
/// connecting. A succesfull call to [`Client::login`] or [`Client::authenticate`] will return a
62
70
/// [`Session`] instance that provides the usual IMAP methods.
Original file line number Diff line number Diff line change @@ -97,6 +97,14 @@ pub enum IdleResponse {
97
97
NewData ( ResponseData ) ,
98
98
}
99
99
100
+ // Make it possible to access the inner connection and modify its settings, such as read/write
101
+ // timeouts.
102
+ impl < T : Read + Write + Unpin + fmt:: Debug > AsMut < T > for Handle < T > {
103
+ fn as_mut ( & mut self ) -> & mut T {
104
+ self . session . conn . stream . as_mut ( )
105
+ }
106
+ }
107
+
100
108
impl < T : Read + Write + Unpin + fmt:: Debug + Send > Handle < T > {
101
109
unsafe_pinned ! ( session: Session <T >) ;
102
110
You can’t perform that action at this time.
0 commit comments