IncrTypst2VecPass

Type Alias IncrTypst2VecPass 

Source
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: u64

Implementations§

Source§

impl IncrTypst2VecPass

Source

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.

Source

pub fn gc(&mut self, threshold: u64) -> Vec<Fingerprint>

Perform garbage collection with given threshold.

Source

pub fn finalize_delta(&mut self) -> Module

Finalize modules containing new vector items.