-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add flush
method on Drain
trait
#332
base: master
Are you sure you want to change the base?
Conversation
flush
method on Drain
traitflush
method on Drain
trait
I think this is an excellent addition! Relying on an explicit I've wanted this for a while. Thank you for adding it :) |
Right now, the It's specific to the I think there are two options to make the waiting more explicit. I would appreciate your input on them. 1. Return a
|
@Techcable: Thanks for the review. Cool if its usable =). I was not yet sure about the function either. Your suggestion sounds very good. Both options are totally legit and better then what I provided!. The only thing is can we make it such that the signature for an another Maybe the first one makes more sense, however thinking about what you use in generic code is a Furthermore: What I do not quite understand so far ist:
Might that be a solution which makes more sense? |
Closes: slog-rs/async#35
This needs to be thoroughly reviewed, not sure if its good enough =)
io:Result<()>
could not be turned intoresult::Result<Self::Ok, Self::Err>
since that would need some more redirection or, or I useresult::Result<Self::Ok, Self::Err>
and returnOk(Self::Ok::new())
if possible in the defaultflush()
implementation.Make sure to: