pub struct Pipeline { /* private fields */ }Expand description
Pipeline for text shaping, rendering, and export.
Use Pipeline::process for the normal fast path. Use
Pipeline::execute when you need the explicit stage list and a prepared
PipelineContext. In the default configuration, only the shaping,
rendering, and export stages do work; the earlier stages are placeholders.
ⓘ
use typf_core::Pipeline;
let pipeline = Pipeline::builder()
.shaper(my_shaper)
.renderer(my_renderer)
.exporter(my_exporter)
.build()?;
let result = pipeline.process(
"Hello, world!",
font,
&shaping_params,
&render_params,
)?;Implementations§
Source§impl Pipeline
impl Pipeline
pub fn builder() -> PipelineBuilder
Sourcepub fn process(
&self,
text: &str,
font: Arc<dyn FontRef>,
shaping_params: &ShapingParams,
render_params: &RenderParams,
) -> Result<Vec<u8>>
pub fn process( &self, text: &str, font: Arc<dyn FontRef>, shaping_params: &ShapingParams, render_params: &RenderParams, ) -> Result<Vec<u8>>
Run the configured shaper, renderer, and exporter directly.
pub fn execute(&self, context: PipelineContext) -> Result<PipelineContext>
Auto Trait Implementations§
impl Freeze for Pipeline
impl !RefUnwindSafe for Pipeline
impl Send for Pipeline
impl Sync for Pipeline
impl Unpin for Pipeline
impl UnsafeUnpin for Pipeline
impl !UnwindSafe for Pipeline
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