Enum spirt::print::multiversion::Versions
source · pub enum Versions<PF> {
Single(PF),
Multiple {
version_names: Vec<String>,
per_row_versions_with_repeat_count: Vec<SmallVec<[(PF, usize); 1]>>,
},
}
Expand description
Wrapper for handling the difference between single-version and multi-version
output, which aren’t expressible in pretty::Fragment
.
Variants§
Single(PF)
Multiple
Fields
§
per_row_versions_with_repeat_count: Vec<SmallVec<[(PF, usize); 1]>>
Each row consists of deduplicated (or “run-length encoded”)
versions, with “repeat count“s larger than 1
indicating that
multiple versions (columns) have the exact same content.
For HTML output, “repeat count“s map to colspan
attributes.
Implementations§
source§impl Versions<FragmentPostLayout>
impl Versions<FragmentPostLayout>
pub fn render_to_html(&self) -> HtmlSnippet
Trait Implementations§
Auto Trait Implementations§
impl<PF> RefUnwindSafe for Versions<PF>where
PF: RefUnwindSafe,
impl<PF> Send for Versions<PF>where
PF: Send,
impl<PF> Sync for Versions<PF>where
PF: Sync,
impl<PF> Unpin for Versions<PF>where
PF: Unpin,
impl<PF> UnwindSafe for Versions<PF>where
PF: UnwindSafe + RefUnwindSafe,
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