pub struct FnMutChunkSource<'s, F, B, E>{ /* private fields */ }Expand description
A ChunkSource implementation that wraps a mutable closure (FnMut).
This struct is generic over a lifetime 's, the closure type F,
the chunk type B, and the error type E. It correctly handles the
lifetime of the returned chunks, which are guaranteed to live at least
as long as the 's lifetime associated with the struct.
Implementations§
Source§impl<'s, F, B, E> FnMutChunkSource<'s, F, B, E>
impl<'s, F, B, E> FnMutChunkSource<'s, F, B, E>
Trait Implementations§
Source§impl<'s, F, B, E> ChunkSource for FnMutChunkSource<'s, F, B, E>
impl<'s, F, B, E> ChunkSource for FnMutChunkSource<'s, F, B, E>
Source§type Error = E
type Error = E
👎Deprecated since 0.3.1: This sync-only trait is superseded by the runtime-agnostic
unescape_stream_into! macro.The type of error that can occur when reading a chunk.
Auto Trait Implementations§
impl<'s, F, B, E> Freeze for FnMutChunkSource<'s, F, B, E>where
F: Freeze,
impl<'s, F, B, E> RefUnwindSafe for FnMutChunkSource<'s, F, B, E>where
F: RefUnwindSafe,
impl<'s, F, B, E> Send for FnMutChunkSource<'s, F, B, E>where
F: Send,
impl<'s, F, B, E> Sync for FnMutChunkSource<'s, F, B, E>where
F: Sync,
impl<'s, F, B, E> Unpin for FnMutChunkSource<'s, F, B, E>where
F: Unpin,
impl<'s, F, B, E> UnwindSafe for FnMutChunkSource<'s, F, B, E>where
F: UnwindSafe,
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