v0.4.0 #210
Xuanwo
started this conversation in
Announcements
v0.4.0
#210
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's Changed
Full Changelog: v0.3.0...v0.4.0
Refer to Upgrade
From v0.3 to v0.4
section for more upgrade details.From v0.3 to v0.4
OpenDAL introduces many breaking changes in v0.4.
Object::reader() is not
AsyncSeek
anymoreSince v0.4,
Object::reader()
will returnimpl BytesRead
instead ofReader
that implementsAsyncRead
andAsyncSeek
. Users who wantAsyncSeek
please wrapped withopendal::io_util::seekable_read
:Use RangeBounds instead
Since v0.4, the following APIs will be removed.
Object::limited_reader(size: u64)
Object::offset_reader(offset: u64)
Object::range_reader(offset: u64, size: u64)
Instead, OpenDAL is providing a more general
range_reader
powered byRangeBounds
:Users can use their familiar rust range syntax:
Return io::Result instead
Since v0.4, all functions in OpenDAL will return
std::io::Result
instead.Please check via
std::io::ErrorKind
directly:Removing Credential
Since v0.4,
Credential
has been removed, please use the API provided byBuilder
directly.Write returns
BytesWriter
insteadSince v0.4,
Accessor::write
will return aBytesWriter
instead accepting aBoxedAsyncReader
.Along with this change, the old
Writer
has been replaced by a new set of write functions:Users can write into an object more easily:
io_util
replacesreaders
Since v0.4, mod
io_util
will replacereaders
. Inio_utils
, OpenDAL provides helpful functions like:into_reader
: ConvertBytesStream
intoBytesRead
into_sink
: ConvertBytesWrite
intoBytesSink
into_stream
: ConvertBytesRead
intoBytesStream
into_writer
: ConvertBytesSink
intoBytesWrite
observe_read
: Add callback forBytesReader
observe_write
: Add callback forBytesWrite
New type alias
For better naming, types that OpenDAL returns have been renamed:
AsyncRead + Unpin + Send
=>BytesRead
BoxedAsyncReader
=>BytesReader
AsyncWrite + Unpin + Send
=>BytesWrite
BoxedAsyncWriter
=>BytesWriter
ObjectStream
=>ObjectStreamer
This discussion was created from the release v0.4.0.
Beta Was this translation helpful? Give feedback.
All reactions