pub struct MappedText {
pub text: String,
pub source_map: Vec<Option<SourceSpan>>,
}Expand description
Text plus a per-character source map.
Fields§
§text: StringGenerated text.
source_map: Vec<Option<SourceSpan>>Map from generated text character positions back to source spans.
Trait Implementations§
Source§impl Clone for MappedText
impl Clone for MappedText
Source§fn clone(&self) -> MappedText
fn clone(&self) -> MappedText
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 MappedText
impl Debug for MappedText
Source§impl Default for MappedText
impl Default for MappedText
Source§fn default() -> MappedText
fn default() -> MappedText
Returns the “default value” for a type. Read more
impl Eq for MappedText
Source§impl PartialEq for MappedText
impl PartialEq for MappedText
impl StructuralPartialEq for MappedText
Auto Trait Implementations§
impl Freeze for MappedText
impl RefUnwindSafe for MappedText
impl Send for MappedText
impl Sync for MappedText
impl Unpin for MappedText
impl UnsafeUnpin for MappedText
impl UnwindSafe for MappedText
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