Struct opendal::ObjectReader

source ·
pub struct ObjectReader { /* private fields */ }
Expand description

ObjectReader is a bytes reader that carries it’s related metadata. Users could fetch part of metadata that carried by read response.

Implementations§

Create a new object reader.

Replace the bytes reader with new one.

Replace the bytes reader with new one.

Convert into a bytes reader to consume the reader.

Convert into parts.

Notes

This function must be used carefully.

The ObjectMetadata is different from the whole object’s metadata. It just described the corresbonding reader’s metadata.

Content length of this object reader.

Content-Length is defined by RFC 7230 Refer to MDN Content-Length for more information.

Notes

The content length returned here is the length of this read request. It’s different from the object’s content length.

Last modified of this object.

Last-Modified is defined by RFC 7232 Refer to MDN Last-Modified for more information.

OpenDAL parse the raw value into OffsetDateTime for convenient.

ETag of this object.

ETag is defined by RFC 7232 Refer to MDN ETag for more information.

OpenDAL will return this value AS-IS like the following:

  • "33a64df551425fcc55e4d42a148795d9f25f89d4"
  • W/"0815"

" is part of etag.

Notes

The etag returned here is the etag of this read request. It’s different from the object’s etag.

Trait Implementations§

Attempt to read from the AsyncRead into buf. Read more
Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Creates an adaptor which will chain this stream with another. Read more
Tries to read some bytes directly into the given buf in asynchronous manner, returning a future type. Read more
Creates a future which will read from the AsyncRead into bufs using vectored IO operations. Read more
Creates a future which will read exactly enough bytes to fill buf, returning an error if end of file (EOF) is hit sooner. Read more
Creates a future which will read all the bytes from this AsyncRead. Read more
Creates a future which will read all the bytes from this AsyncRead. Read more
Helper method for splitting this read/write object into two halves. Read more
Creates an AsyncRead adapter which will read at most limit bytes from the underlying reader. Read more
Reads some bytes from the byte stream. Read more
Like [read()][AsyncReadExt::read()], except it reads into a slice of buffers. Read more
Reads the entire contents and appends them to a Vec. Read more
Reads the entire contents and appends them to a String. Read more
Reads the exact number of bytes required to fill buf. Read more
Creates an adapter which will read at most limit bytes from it. Read more
Converts this [AsyncRead] into a [Stream] of bytes. Read more
Creates an adapter which will chain this stream with another. Read more
Boxes the reader and changes its type to dyn AsyncRead + Send + 'a. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Applies the Compat adapter by value. Read more
Applies the Compat adapter by shared reference. Read more
Applies the Compat adapter by mutable reference. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Reads some bytes from the byte stream. Read more
Like read, except that it reads into a slice of buffers. Read more
Reads all bytes from the byte stream. Read more
Reads all bytes from the byte stream and appends them into a string. Read more
Reads the exact number of bytes required to fill buf. Read more
Creates an adaptor which will read at most limit bytes from it. Read more
Creates a “by reference” adaptor for this instance of Read. Read more
Transforms this Read instance to a Stream over its bytes. Read more
Creates an adaptor which will chain this stream with another. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more