pub struct Carry {
pub prev: Option<char>,
pub single_open: bool,
pub double_open: bool,
}Expand description
What smarten carries from one run of a paragraph to the next (the
text between formatting changes), so quotes after a change open and
close correctly. Each paragraph, title or caption starts from
Carry::default().
Fields§
§prev: Option<char>The last character written, which decides whether a quote opens or
closes; None at the start.
single_open: boolWhether a single quote is open: a ' after a letter or a dash then
closes it; otherwise it is an elision (German “hab’”, “Andreas’”) or,
after a dash, opens one.
double_open: boolWhether a double quote is open: a " right after a dash then closes
it („Ich kam –“); otherwise it opens one (He paused—“Fine.”).
Trait Implementations§
impl Copy for Carry
impl Eq for Carry
impl StructuralPartialEq for Carry
Auto Trait Implementations§
impl Freeze for Carry
impl RefUnwindSafe for Carry
impl Send for Carry
impl Sync for Carry
impl Unpin for Carry
impl UnsafeUnpin for Carry
impl UnwindSafe for Carry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.