typst::utils

Trait MaybeReverseIter

source
pub trait MaybeReverseIter {
    type RevIfIter;

    // Required method
    fn rev_if(self, condition: bool) -> Self::RevIfIter
       where Self: Sized;
}
Expand description

Adapter for reversing iterators conditionally.

Required Associated Types§

Required Methods§

source

fn rev_if(self, condition: bool) -> Self::RevIfIter
where Self: Sized,

Reverse this iterator (apply .rev()) based on some condition.

Implementors§