pub struct TextCleaner {
pub newlines: Newlines,
pub remove_non_basic_ascii: bool,
pub remve_citations: bool,
}Fields§
§newlines: Newlines§remove_non_basic_ascii: bool§remve_citations: boolImplementations§
Source§impl TextCleaner
impl TextCleaner
pub fn new() -> Self
pub fn do_not_reduce_newlines(self) -> Self
pub fn reduce_newlines_to_single_space(self) -> Self
pub fn reduce_newlines_to_single_newline(self) -> Self
pub fn reduce_newlines_to_double_newline(self) -> Self
pub fn remove_non_basic_ascii(self) -> Self
pub fn remove_citations(self) -> Self
pub fn run(&self, text: &str) -> String
Trait Implementations§
Source§impl Default for TextCleaner
impl Default for TextCleaner
Source§fn default() -> TextCleaner
fn default() -> TextCleaner
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextCleaner
impl RefUnwindSafe for TextCleaner
impl Send for TextCleaner
impl Sync for TextCleaner
impl Unpin for TextCleaner
impl UnsafeUnpin for TextCleaner
impl UnwindSafe for TextCleaner
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more