Closed austinjones closed 3 years ago
Not sure this is a good idea if you want your Stream and Sink API to be compatible to what's likely going to be stabilized in std (#23 suggests that you do). I would suggest you add API on top that takes &self
and use internal mutability (through a Mutex). Just my two cents as an outsider. :)
I like that idea! Would be a simple add-on, and it wouldn't complicate the traits...
I've held off on merging this because some sender implementations (particularly combinators) need internal mutable state. For those kind of types, adding an Arc<Mutex&Self
/ &mut Self
, but Pin requires a reference type when used as self.
Blockers: