pub struct ValueText<S: StringStorage> { /* private fields */ }Expand description
Text value type defined in RFC 5545 Section 3.3.11.
Implementations§
Source§impl<'a> ValueText<Segments<'a>>
impl<'a> ValueText<Segments<'a>>
Sourcepub fn resolve(&self) -> Cow<'a, str>
pub fn resolve(&self) -> Cow<'a, str>
Resolve the text value into a single string, processing escapes.
This version tries to avoid allocation when there’s only a single string token.
Sourcepub fn span(&self) -> Span
pub fn span(&self) -> Span
Get the full span from the first to the last token.
This method provides O(1) access to the span that covers all tokens
in the ValueText, from the first character to the last.
Sourcepub fn into_spanned_chars(self) -> ValueTextSpannedChars<'a> ⓘ
pub fn into_spanned_chars(self) -> ValueTextSpannedChars<'a> ⓘ
Create an iterator over characters with their spans.
This method provides a zero-copy iterator that yields each character along with its source position, enabling accurate error reporting.
Trait Implementations§
Source§impl<S: StringStorage> Display for ValueText<S>
impl<S: StringStorage> Display for ValueText<S>
Auto Trait Implementations§
impl<S> Freeze for ValueText<S>
impl<S> RefUnwindSafe for ValueText<S>
impl<S> Send for ValueText<S>
impl<S> Sync for ValueText<S>
impl<S> Unpin for ValueText<S>
impl<S> UnwindSafe for ValueText<S>
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<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.