pub trait Seek {
type Error: Error + Send + Sync + 'static;
// Required method
fn seek(
&mut self,
offset: u64,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
}Expand description
Provides bytes from sources that support seek.
The data may be received asynchronously, such as reads from Google Cloud Storage, reads from other remote storage systems, or the result of repeatable computations.
Required Associated Types§
Required Methods§
Sourcefn seek(
&mut self,
offset: u64,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn seek( &mut self, offset: u64, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Resets the stream to start from offset.
The client library automatically restarts writes when the connection is reset or there is some kind of partial failure. Resuming a write may require resetting the stream to an arbitrary point.
The client library assumes that seek(N) followed by next() always
returns the same data.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.