pub struct AvroObjectReader { /* private fields */ }Available on crate feature
object_store only.Expand description
An implementation of an AsyncFileReader using the ObjectStore API.
Implementations§
Source§impl AvroObjectReader
impl AvroObjectReader
Sourcepub fn new(store: Arc<dyn ObjectStore>, path: Path) -> Self
Available on crate feature async only.
pub fn new(store: Arc<dyn ObjectStore>, path: Path) -> Self
async only.Creates a new Self from a store implementation and file location.
Sourcepub fn with_runtime(self, handle: Handle) -> Self
Available on crate feature async only.
pub fn with_runtime(self, handle: Handle) -> Self
async only.Perform IO on the provided tokio runtime
Tokio is a cooperative scheduler, and relies on tasks yielding in a timely manner to service IO. Therefore, running IO and CPU-bound tasks, such as avro decoding, on the same tokio runtime can lead to degraded throughput, dropped connections and other issues. For more information see here.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AvroObjectReader
impl !RefUnwindSafe for AvroObjectReader
impl Send for AvroObjectReader
impl Sync for AvroObjectReader
impl Unpin for AvroObjectReader
impl UnsafeUnpin for AvroObjectReader
impl !UnwindSafe for AvroObjectReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more