pub struct CompressionPipeline { /* private fields */ }Expand description
The 8-stage compression pipeline orchestrator.
Implementations§
Source§impl CompressionPipeline
impl CompressionPipeline
Sourcepub fn new(preset: &Preset) -> Self
pub fn new(preset: &Preset) -> Self
Construct the pipeline from a preset, creating all 8 built-in stages sorted by priority.
Sourcepub fn compress(
&self,
input: &str,
_ctx: &SessionContext,
preset: &Preset,
) -> Result<CompressedContent>
pub fn compress( &self, input: &str, _ctx: &SessionContext, preset: &Preset, ) -> Result<CompressedContent>
Run content through all enabled stages then apply TOON encoding if the result is JSON.
Sourcepub fn insert_stage(&mut self, stage: Box<dyn CompressionStage>)
pub fn insert_stage(&mut self, stage: Box<dyn CompressionStage>)
Insert a plugin stage and re-sort by priority.
Sourcepub fn reload_preset(&mut self, preset: &Preset) -> Result<()>
pub fn reload_preset(&mut self, preset: &Preset) -> Result<()>
Rebuild stage list from a new preset (hot-reload support). Built-in stages are recreated; plugin stages are dropped and must be re-inserted by the caller.
Auto Trait Implementations§
impl Freeze for CompressionPipeline
impl !RefUnwindSafe for CompressionPipeline
impl Send for CompressionPipeline
impl Sync for CompressionPipeline
impl Unpin for CompressionPipeline
impl UnsafeUnpin for CompressionPipeline
impl !UnwindSafe for CompressionPipeline
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