pub type IncrTypst2VecPass = Typst2VecPassImpl<true>;Aliased Type§
pub struct IncrTypst2VecPass {
pub glyphs: TGlyph2VecPass<true>,
pub spans: Span2VecPass,
pub cache_items: FingerprintMap<(AtomicU64, Fingerprint, VecItem)>,
pub items: FingerprintMap<(AtomicU64, VecItem)>,
pub new_items: Mutex<RawMutex, Vec<(Fingerprint, VecItem)>>,
pub command_executor: Arc<dyn CommandExecutor + Send + Sync>,
pub lifetime: u64,
/* private fields */
}Fields§
§glyphs: TGlyph2VecPass<true>§spans: Span2VecPass§cache_items: FingerprintMap<(AtomicU64, Fingerprint, VecItem)>§items: FingerprintMap<(AtomicU64, VecItem)>§new_items: Mutex<RawMutex, Vec<(Fingerprint, VecItem)>>§command_executor: Arc<dyn CommandExecutor + Send + Sync>§lifetime: u64Implementations§
Source§impl IncrTypst2VecPass
impl IncrTypst2VecPass
Sourcepub fn increment_lifetime(&mut self)
pub fn increment_lifetime(&mut self)
Increment the lifetime of the module. It increments by 2 which is used to distinguish between the retained items and the new items. Assuming that the old lifetime is ’l, the retained and new lifetime will be ’l + 1 and ’l + 2, respectively.
Sourcepub fn gc(&mut self, threshold: u64) -> Vec<Fingerprint>
pub fn gc(&mut self, threshold: u64) -> Vec<Fingerprint>
Perform garbage collection with given threshold.
Sourcepub fn finalize_delta(&mut self) -> Module
pub fn finalize_delta(&mut self) -> Module
Finalize modules containing new vector items.