pub struct Concat<O: TextOut>(/* private fields */);Expand description
Concatenation: a Join with no separator, under the name the design
brief and the language give it.
Every fragment is appended as it is. The item markers are accepted and
counted all the same, so the interpreter’s concat and join share
one shape and a program can move between them without the calls around
them changing; that shared shape is the whole reason for a type where a
bare output would do.
Implementations§
Source§impl<O: TextOut> Concat<O>
impl<O: TextOut> Concat<O>
pub fn new(out: O) -> Self
Sourcepub fn item_start(&mut self) -> Result<(), Fail>
pub fn item_start(&mut self) -> Result<(), Fail>
Begin an item; see Join::item_start.
pub fn into_inner(self) -> O
Trait Implementations§
Source§impl<O: TextOut> TextOut for Concat<O>
impl<O: TextOut> TextOut for Concat<O>
fn write_str(&mut self, s: &str) -> Result<(), Fail>
fn flush(&mut self) -> Result<(), Fail>
Source§fn has_committed(&self) -> bool
fn has_committed(&self) -> bool
Whether any text has reached the final destination, so that a
failure found now leaves partial output behind. A renderer asks this
when it fails and reports
committed_output from the answer, which
is how a host knows to print output: "partial" rather than
"none". The default is the conservative answer for an output that
cannot tell: whatever the renderer handed over may be out. render’s
WriteOut answers exactly, from the bytes its writer received; a
fragment that is still buffered is not committed, and into_inner
drops it rather than sending it after the fact.Auto Trait Implementations§
impl<O> Freeze for Concat<O>
impl<O> RefUnwindSafe for Concat<O>where
Join<O>: RefUnwindSafe,
impl<O> Send for Concat<O>
impl<O> Sync for Concat<O>
impl<O> Unpin for Concat<O>
impl<O> UnsafeUnpin for Concat<O>where
Join<O>: UnsafeUnpin,
impl<O> UnwindSafe for Concat<O>where
Join<O>: 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