pub fn single_span<S>(source: S, attr: T) -> Self
    where
        S: Into<String>,
    {
        let source = source.into();

        let spans = vec![
            IndexedSpan {
                content: IndexedCow::Borrowed {
                    start: 0,
                    end: source.len(),
                },
                attr,
            },
        ];

        Self::with_spans(source, spans)
    }
/// Returns a new SpannedString with a single span.
Returns a new SpannedString with a single span.
Returns a new SpannedString with a single span .
pub fn single_span<S>(source: S, attr: T) -> Self
    where
        S: Into<String>,
    {
        let source = source.into();
        let spans = vec![
            IndexedSpan {
                content: IndexedCow::Borrowed {
                    start: 0,
                    end: source.len(),
                },
                attr,
            },
        ];
        Self::with_spans(source, spans)
    }
pub fn single_span < S > ( source : S , attr : T ) -> Self where S : Into < String > , { let source = source . into ( ) ; let spans = vec ! [ IndexedSpan { content IndexedCow Borrowed { start 0 end source len ( ) } attr } ] ; Self :: with_spans ( source , spans ) }
Returns a new SpannedString with a single span.
Returns a new SpannedString with a single span .
source
S
attr
T
source
S
attr
T