pub struct MappedTextBuilder { /* private fields */ }Expand description
Helper for constructing mapped generated text.
Implementations§
Source§impl MappedTextBuilder
impl MappedTextBuilder
Sourcepub fn push_str(&mut self, text: &str, source: Option<SourceSpan>)
pub fn push_str(&mut self, text: &str, source: Option<SourceSpan>)
Appends text and maps every appended character to the same source span.
Sourcepub fn push_char(&mut self, ch: char, source: Option<SourceSpan>)
pub fn push_char(&mut self, ch: char, source: Option<SourceSpan>)
Appends one mapped character.
Sourcepub fn push_unmapped_char(&mut self, ch: char)
pub fn push_unmapped_char(&mut self, ch: char)
Appends one unmapped separator character.
Sourcepub fn finish(self) -> MappedText
pub fn finish(self) -> MappedText
Finishes the builder and returns the mapped text.
Trait Implementations§
Source§impl Clone for MappedTextBuilder
impl Clone for MappedTextBuilder
Source§fn clone(&self) -> MappedTextBuilder
fn clone(&self) -> MappedTextBuilder
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 Debug for MappedTextBuilder
impl Debug for MappedTextBuilder
Source§impl Default for MappedTextBuilder
impl Default for MappedTextBuilder
Source§fn default() -> MappedTextBuilder
fn default() -> MappedTextBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MappedTextBuilder
impl RefUnwindSafe for MappedTextBuilder
impl Send for MappedTextBuilder
impl Sync for MappedTextBuilder
impl Unpin for MappedTextBuilder
impl UnsafeUnpin for MappedTextBuilder
impl UnwindSafe for MappedTextBuilder
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§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