hjr3 / hyper-timeout

A timeout connector for the hyper client
Other
25 stars 10 forks source link

Add `TimeoutConnectorStream::{set_read_timeout_pinned,set_write_timeout_pinned,get_pin_mut}` #21

Closed tesaguri closed 3 years ago

tesaguri commented 3 years ago

TimeoutConnectorStream provides set_read_timeout, set_write_timeout and get_mut methods, but they are hardly useful in practice because TimeoutConnector yields a Pin<Box<TimeoutConnectorStream<_>>> which does not implement DerefMut since TimeoutConnectorStream is !Unpin.

set_read_timeout_pinned, set_write_timeout_pinned, get_pin_mut are counterparts to the above methods which can be used through a Pin<&mut TimeoutConnectorStream>.