pub struct SplittableBufferHandle { /* private fields */ }Expand description
A clonable handle referencing the underlying SplittableBufferInner.
Can be captured inside background sub-read callbacks and consumed via into_buffer(self)
once all child OwnedBuffers and other handles drop to recover the merged OwnedBuffer.
Implementations§
Source§impl SplittableBufferHandle
impl SplittableBufferHandle
Sourcepub fn into_buffer(self) -> Option<OwnedBuffer>
pub fn into_buffer(self) -> Option<OwnedBuffer>
Consumes this handle and attempts to unwrap the underlying Arc<SplittableBufferInner>.
Returns Some(parent_buffer) if this handle and all child OwnedBuffers carved from
SplittableBuffer have been dropped (Arc::strong_count == 1). Otherwise returns None.
Trait Implementations§
Source§impl Clone for SplittableBufferHandle
impl Clone for SplittableBufferHandle
Source§fn clone(&self) -> SplittableBufferHandle
fn clone(&self) -> SplittableBufferHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SplittableBufferHandle
impl !UnwindSafe for SplittableBufferHandle
impl Freeze for SplittableBufferHandle
impl Send for SplittableBufferHandle
impl Sync for SplittableBufferHandle
impl Unpin for SplittableBufferHandle
impl UnsafeUnpin for SplittableBufferHandle
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