Skip to main content

Step

Struct Step 

Source
pub struct Step { /* private fields */ }
Expand description

One step of a pipeline: a tool and its parameters.

There is a typed constructor per tool, for example Step::compress_pdf; use Step::new for any tool id:

use wellfriend::{CompressPdfParams, CompressPdfProfile, Step};

let step = Step::new("compress-pdf").params(CompressPdfParams { profile: Some(CompressPdfProfile::Medium), ..Default::default() });
assert_eq!(step.tool().as_str(), "compress-pdf");

Implementations§

Source§

impl Step

Source

pub fn new(tool: impl Into<ToolId>) -> Self

A step running tool with no parameters.

Source

pub fn params(self, params: impl Into<ToolParameters>) -> Self

The step’s parameters: a typed ...Params struct or ToolParameters.

Source

pub fn tool(&self) -> &ToolId

The tool this step runs.

Source§

impl Step

Source

pub fn add_page_numbers(params: Option<AddPageNumbersParams>) -> Self

A pipeline step running Add Page Numbers (add-page-numbers).

Source

pub fn add_watermark(params: Option<AddWatermarkParams>) -> Self

A pipeline step running Add Watermark (add-watermark).

Source

pub fn edit_metadata(params: Option<EditMetadataParams>) -> Self

A pipeline step running Check & Edit Metadata (edit-metadata).

Source

pub fn check_pdf(params: Option<CheckPdfParams>) -> Self

A pipeline step running Check PDF (check-pdf).

Source

pub fn compress_pdf(params: Option<CompressPdfParams>) -> Self

A pipeline step running Compress (compress-pdf).

Source

pub fn crop_pdf(params: Option<CropPdfParams>) -> Self

A pipeline step running Crop PDF (crop-pdf).

Source

pub fn flatten_pdf(params: Option<FlattenPdfParams>) -> Self

A pipeline step running Flatten PDF (flatten-pdf).

Source

pub fn merge_pdf(params: Option<MergePdfParams>) -> Self

A pipeline step running Merge PDF (merge-pdf).

Source

pub fn n_up_pdf(params: Option<NUpPdfParams>) -> Self

A pipeline step running N-up PDF (n-up-pdf).

Source

pub fn ocr_pdf(params: Option<OcrPdfParams>) -> Self

A pipeline step running OCR PDF (ocr-pdf).

Source

pub fn organize_pdf(params: OrganizePdfParams) -> Self

A pipeline step running Organize PDF (organize-pdf).

Source

pub fn pdf_table_extraction(params: Option<PdfTableExtractionParams>) -> Self

A pipeline step running PDF Table Extraction (pdf-table-extraction).

Source

pub fn protect_pdf(params: ProtectPdfParams) -> Self

A pipeline step running Protect PDF (protect-pdf).

Source

pub fn redact_pdf(params: Option<RedactPdfParams>) -> Self

A pipeline step running Redact PDF (redact-pdf).

Source

pub fn repair_pdf(params: Option<RepairPdfParams>) -> Self

A pipeline step running Repair PDF (repair-pdf).

Source

pub fn rotate_pdf(params: Option<RotatePdfParams>) -> Self

A pipeline step running Rotate PDF (rotate-pdf).

Source

pub fn sanitize_pdf(params: Option<SanitizePdfParams>) -> Self

A pipeline step running Sanitize PDF (sanitize-pdf).

Source

pub fn scale_pdf(params: Option<ScalePdfParams>) -> Self

A pipeline step running Scale PDF (scale-pdf).

Source

pub fn sign_pdf(params: Option<SignPdfParams>) -> Self

A pipeline step running Sign PDF (sign-pdf).

Source

pub fn split_pdf(params: Option<SplitPdfParams>) -> Self

A pipeline step running Split PDF (split-pdf).

Source

pub fn unlock_pdf(params: Option<UnlockPdfParams>) -> Self

A pipeline step running Unlock PDF (unlock-pdf).

Source

pub fn csv_to_pdf(params: Option<CsvToPdfParams>) -> Self

A pipeline step running CSV to PDF (csv-to-pdf).

Source

pub fn excel_to_pdf(params: Option<ExcelToPdfParams>) -> Self

A pipeline step running Excel to PDF (excel-to-pdf).

Source

pub fn image_to_pdf(params: Option<ImageToPdfParams>) -> Self

A pipeline step running Image to PDF (image-to-pdf).

Source

pub fn json_to_pdf(params: Option<JsonToPdfParams>) -> Self

A pipeline step running JSON to PDF (json-to-pdf).

Source

pub fn markdown_to_pdf(params: Option<MarkdownToPdfParams>) -> Self

A pipeline step running Markdown to PDF (markdown-to-pdf).

Source

pub fn pdf_to_chunks(params: Option<PdfToChunksParams>) -> Self

A pipeline step running PDF to Chunks (pdf-to-chunks).

Source

pub fn pdf_to_epub(params: Option<PdfToEpubParams>) -> Self

A pipeline step running PDF to EPUB (pdf-to-epub).

Source

pub fn pdf_to_excel(params: Option<PdfToExcelParams>) -> Self

A pipeline step running PDF to Excel (pdf-to-excel).

Source

pub fn pdf_to_html(params: Option<PdfToHtmlParams>) -> Self

A pipeline step running PDF to HTML (pdf-to-html).

Source

pub fn pdf_to_images(params: Option<PdfToImagesParams>) -> Self

A pipeline step running PDF to Images (pdf-to-images).

Source

pub fn pdf_to_json(params: Option<PdfToJsonParams>) -> Self

A pipeline step running PDF to JSON (pdf-to-json).

Source

pub fn pdf_to_markdown(params: Option<PdfToMarkdownParams>) -> Self

A pipeline step running PDF to Markdown (pdf-to-markdown).

Source

pub fn pdf_to_powerpoint(params: Option<PdfToPowerpointParams>) -> Self

A pipeline step running PDF to PowerPoint (pdf-to-powerpoint).

Source

pub fn pdf_to_text(params: Option<PdfToTextParams>) -> Self

A pipeline step running PDF to Text (pdf-to-text).

Source

pub fn pdf_to_word(params: Option<PdfToWordParams>) -> Self

A pipeline step running PDF to Word (pdf-to-word).

Source

pub fn pdfa_conversion(params: Option<PdfaConversionParams>) -> Self

A pipeline step running PDF/A Conversion (pdfa-conversion).

Source

pub fn powerpoint_to_pdf(params: Option<PowerpointToPdfParams>) -> Self

A pipeline step running PowerPoint to PDF (powerpoint-to-pdf).

Source

pub fn svg_to_pdf(params: Option<SvgToPdfParams>) -> Self

A pipeline step running SVG to PDF (svg-to-pdf).

Source

pub fn text_to_pdf(params: Option<TextToPdfParams>) -> Self

A pipeline step running Text to PDF (text-to-pdf).

Source

pub fn web_capture(params: Option<WebCaptureParams>) -> Self

A pipeline step running Web page to PDF or image (web-capture).

Source

pub fn word_to_pdf(params: Option<WordToPdfParams>) -> Self

A pipeline step running Word to PDF (word-to-pdf).

Source

pub fn convert_from_jpg(params: Option<ConvertFromJpgParams>) -> Self

A pipeline step running Convert from JPG (convert-from-jpg).

Source

pub fn convert_to_jpg(params: Option<ConvertToJpgParams>) -> Self

A pipeline step running Convert to JPG (convert-to-jpg).

Source

pub fn crop_image(params: CropImageParams) -> Self

A pipeline step running Crop Image (crop-image).

Source

pub fn image_metadata(params: Option<ImageMetadataParams>) -> Self

A pipeline step running Image Metadata (image-metadata).

Source

pub fn resize_image(params: Option<ResizeImageParams>) -> Self

A pipeline step running Resize Image (resize-image).

Source

pub fn rotate_image(params: Option<RotateImageParams>) -> Self

A pipeline step running Rotate Image (rotate-image).

Source

pub fn watermark_image(params: Option<WatermarkImageParams>) -> Self

A pipeline step running Watermark Image (watermark-image).

Trait Implementations§

Source§

impl Clone for Step

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Step

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Step

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Step

Auto Trait Implementations§

§

impl Forget for Step

§

impl Freeze for Step

§

impl Move for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnsafeUnpin for Step

§

impl UnwindSafe for Step

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more