pub struct CaseFolder { /* private fields */ }
Expand description
Buffer that adjusts word case on the fly.
Implementations§
source§impl CaseFolder
impl CaseFolder
sourcepub fn with_config(case: Case) -> Self
pub fn with_config(case: Case) -> Self
Create a case folder with a case configuration.
sourcepub fn prevent_trimming(&mut self)
pub fn prevent_trimming(&mut self)
Prevent whitespace trimming before and after the current position.
sourcepub fn push_verbatim(&mut self, value: &str)
pub fn push_verbatim(&mut self, value: &str)
Add a string chunk to the buffer.
sourcepub fn push_chunk(&mut self, chunk: &FoldableStringChunk)
pub fn push_chunk(&mut self, chunk: &FoldableStringChunk)
Add a string chunk to the buffer.
sourcepub fn reconfigure(&mut self, case: Case)
pub fn reconfigure(&mut self, case: Case)
Change the configuration of the CaseFolder.
sourcepub fn has_content(&self) -> bool
pub fn has_content(&self) -> bool
Whether the buffer contains only whitespace.
sourcepub fn mark_changed(&mut self)
pub fn mark_changed(&mut self)
Notify the struct that an outside manipulation to the underlying buffer occurred.
Trait Implementations§
source§impl Clone for CaseFolder
impl Clone for CaseFolder
source§fn clone(&self) -> CaseFolder
fn clone(&self) -> CaseFolder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CaseFolder
impl Debug for CaseFolder
source§impl Default for CaseFolder
impl Default for CaseFolder
Auto Trait Implementations§
impl Freeze for CaseFolder
impl RefUnwindSafe for CaseFolder
impl Send for CaseFolder
impl Sync for CaseFolder
impl Unpin for CaseFolder
impl UnwindSafe for CaseFolder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)