pub struct TextReplacerBuilder { /* private fields */ }Expand description
Builder for the TextReplacer.
Implementations§
Source§impl TextReplacerBuilder
impl TextReplacerBuilder
Sourcepub fn replacement(self, rep: &str) -> Self
pub fn replacement(self, rep: &str) -> Self
Sets the replacement text
Sourcepub fn case_insensitive(self, yes: bool) -> Self
pub fn case_insensitive(self, yes: bool) -> Self
Sets whether the replacement should be case-insensitive
Sourcepub fn and(self) -> Self
pub fn and(self) -> Self
Adds another replacement operation to the chain and resets the builder for a new operation
Sourcepub fn build(self) -> Result<TextReplacer, String>
pub fn build(self) -> Result<TextReplacer, String>
Builds the TextReplacer with all configured replacement operations
Trait Implementations§
Source§impl Clone for TextReplacerBuilder
impl Clone for TextReplacerBuilder
Source§fn clone(&self) -> TextReplacerBuilder
fn clone(&self) -> TextReplacerBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for TextReplacerBuilder
impl Default for TextReplacerBuilder
Source§fn default() -> TextReplacerBuilder
fn default() -> TextReplacerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextReplacerBuilder
impl RefUnwindSafe for TextReplacerBuilder
impl Send for TextReplacerBuilder
impl Sync for TextReplacerBuilder
impl Unpin for TextReplacerBuilder
impl UnsafeUnpin for TextReplacerBuilder
impl UnwindSafe for TextReplacerBuilder
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