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
The API design is still quite abstract. As a developer unfamiliar with this scope, what does it mean BufferSink and FuturesBytesSink? Which trait should they implement? What APIs do they want to replace?
what does it mean BufferSink and FuturesBytesSink?
BufferSink is a Sink that accept Buffer. It should implement Sink<Buffer, Error=opendal::Error>. It's the opposite of BufferStream which returns a Buffer.
FuturesBytesSink is a Sink that accept Bytes. It should implement Sink<Bytes, Error=std::io::Error>. It's the opposite of FuturesBytesStream which returns a Bytes.
Activity
zjregee commentedon Apr 12, 2024
Can I try some of them like write and write_from?
Xuanwo commentedon Apr 12, 2024
Welcome to have a try!
tisonkun commentedon Apr 16, 2024
@Xuanwo there is no copy_from and pipe_from now?
Xuanwo commentedon Apr 16, 2024
Yes, not implemented.
tisonkun commentedon Apr 16, 2024
@Xuanwo could you then update the issue description and add related source code any contributor can start from?
tisonkun commentedon Apr 16, 2024
@Xuanwo any dangling APIs here? I saw #4498 do something for this issue.
Xuanwo commentedon Apr 16, 2024
The only API left is
into_sinkandinto_bytes_sink. They can replace the existingsinkAPI.I'm still hesitate about the
into_sinkAPI. We can keep it internal use only.tisonkun commentedon Apr 18, 2024
The API design is still quite abstract. As a developer unfamiliar with this scope, what does it mean
BufferSinkandFuturesBytesSink? Which trait should they implement? What APIs do they want to replace?Xuanwo commentedon Apr 22, 2024
BufferSinkis aSinkthat acceptBuffer. It should implementSink<Buffer, Error=opendal::Error>. It's the opposite ofBufferStreamwhich returns aBuffer.FuturesBytesSinkis aSinkthat acceptBytes. It should implementSink<Bytes, Error=std::io::Error>. It's the opposite ofFuturesBytesStreamwhich returns aBytes.Also,
into_bytes_sink() -> FuturesBytesSinkwill replace existing sink(&mut self, sink_from: S).