Skip to main content

ProcessorBuilder

Struct ProcessorBuilder 

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

A ProcessorBuilder is used to configure the renaming process and produces Renamed when processing is activated

Implementations§

Source§

impl ProcessorBuilder

Source

pub fn new(format: Format) -> Self

Constructs new ProcessorBuilder

Source

pub fn delimiter(self, delimiter: Delimiter) -> Self

Appends a single Delimiter item to the existing configuration

Source

pub fn delimiters(self, delimiters: Vec<Delimiter>) -> Self

Appends multiple Delimiter items to the existing configuration

Source

pub fn extractor(self, extractor: Extractor) -> Self

Appends a single Extractor item to the existing configuration

Source

pub fn extractors(self, extractors: Vec<Extractor>) -> Self

Appends multiple Extractor items to the existing configuration

Source

pub fn input(self, input: InputType) -> Self

Appends a single file path to the existing configuration

Source

pub fn inputs(self, inputs: Vec<InputType>) -> Self

Appends multiple file paths items to the existing configuration

Source

pub fn replacer(self, trim: Replacer) -> Self

Appends a single Replacer item to the existing configuration

Source

pub fn replacers(self, trims: Vec<Replacer>) -> Self

Appends multiple Replacer items to the existing configuration

Source

pub fn selector(self, selector: Selector) -> Self

Appends a single Selector item to the existing configuration

Source

pub fn selectors(self, selectors: Vec<Selector>) -> Self

Appends multiple Selector items to the existing configuration

Source

pub fn trim(self, trim: Trim) -> Self

Appends a single Trim item to the existing configuration

Source

pub fn trims(self, trims: Vec<Trim>) -> Self

Appends multiple Trim items to the existing configuration

Source

pub fn process(&self) -> Result<Vec<Box<dyn Renamed>>, Error>

Returns Renamed trait objects based on the ProcessorBuilder configuration for all items

Source

pub fn process_subset( &self, processing_limit: usize, ) -> Result<Vec<Box<dyn Renamed>>, Error>

Returns Renamed trait objects based on the ProcessorBuilder configuration up to the processing limit provided

Trait Implementations§

Source§

impl Debug for ProcessorBuilder

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.