pub struct AsyncCursor { /* private fields */ }Expand description
Drives any ByteStepper from an AsyncSource:
the async twin of ReadAtCursor.
Each next steps the stage on the calling task and awaits the source
only when the stage needs bytes, so a container demuxer (cheap per step)
streams packets from a socket or an object store without holding a
thread during I/O and without becoming async itself. Range requests are
coalesced and fetched with one AsyncSource::read_ranges per round.
CPU-heavy stages (image decoders) use decode_async, which moves the
work off the async runtime.
Implementations§
Source§impl AsyncCursor
impl AsyncCursor
Sourcepub fn new(opts: DriveOptions) -> Self
pub fn new(opts: DriveOptions) -> Self
A cursor with the given read sizes.
Sourcepub fn retained_input_capacity(&self) -> usize
pub fn retained_input_capacity(&self) -> usize
Retained driver-owned payload capacity, excluding source caches and outputs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncCursor
impl RefUnwindSafe for AsyncCursor
impl Send for AsyncCursor
impl Sync for AsyncCursor
impl Unpin for AsyncCursor
impl UnsafeUnpin for AsyncCursor
impl UnwindSafe for AsyncCursor
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