pub struct Immediate<W>(pub W);Expand description
Presents a synchronous std::io::Write as an AsyncByteSink
whose futures are already complete.
The write happens eagerly, when the method is called; the returned
future merely reports its result. That keeps the future free of any
borrow of the writer — so it is Send whatever the writer is — and a
future tree built over this type completes on its first poll, never
parking inside pdfboss_core::block_on. No flush is ever performed:
the writer comes back (or drops) exactly as buffered.
Tuple Fields§
§0: WTrait Implementations§
Auto Trait Implementations§
impl<W> Freeze for Immediate<W>where
W: Freeze,
impl<W> RefUnwindSafe for Immediate<W>where
W: RefUnwindSafe,
impl<W> Send for Immediate<W>where
W: Send,
impl<W> Sync for Immediate<W>where
W: Sync,
impl<W> Unpin for Immediate<W>where
W: Unpin,
impl<W> UnsafeUnpin for Immediate<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for Immediate<W>where
W: 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