You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
impl<S>WebSocketStream<S>{/// Simple send method to replace `futures_sink::Sink` (till v0.3).pubasyncfnsend(&mutself,msg:Message) -> Result<(),WsError>whereS:AsyncRead + AsyncWrite + Unpin,{// Example to make it work. A simpler internal way can be used to implement it.SinkExt::send(self, msg).await}}
In an ideal world, the send method would be called even if the SinkExt was introduced. I'm not sure if there would be additional problems if a method name is duplicated with a method in trait.
cc smol-rs/futures-lite#111smol-rs/futures-lite#112
The text was updated successfully, but these errors were encountered:
I tried but I realized I'm not very good at handling details of async primitives. Considering code robustness, it might be a good idea to assign community members who's more experienced.
Smol(
futures-lite
)'s guys think thatfutures_sink::Sink
(till v0.3) is a legacy API and excluded related APIs infutures-lite
intentionally. They prefer a simpleasync fn send
API.Before a new simple
Sink
API is normalized, I suggest considering implementing a simpleasync fn send
method:In an ideal world, the
send
method would be called even if theSinkExt
was introduced. I'm not sure if there would be additional problems if a method name is duplicated with a method in trait.cc smol-rs/futures-lite#111 smol-rs/futures-lite#112
The text was updated successfully, but these errors were encountered: