rustfmt_nightly::source_map

Trait SpanUtils

Source
pub(crate) trait SpanUtils {
    // Required methods
    fn span_after(&self, original: Span, needle: &str) -> BytePos;
    fn span_after_last(&self, original: Span, needle: &str) -> BytePos;
    fn span_before(&self, original: Span, needle: &str) -> BytePos;
    fn span_before_last(&self, original: Span, needle: &str) -> BytePos;
    fn opt_span_after(&self, original: Span, needle: &str) -> Option<BytePos>;
    fn opt_span_before(&self, original: Span, needle: &str) -> Option<BytePos>;
}

Required Methods§

Source

fn span_after(&self, original: Span, needle: &str) -> BytePos

Source

fn span_after_last(&self, original: Span, needle: &str) -> BytePos

Source

fn span_before(&self, original: Span, needle: &str) -> BytePos

Source

fn span_before_last(&self, original: Span, needle: &str) -> BytePos

Source

fn opt_span_after(&self, original: Span, needle: &str) -> Option<BytePos>

Source

fn opt_span_before(&self, original: Span, needle: &str) -> Option<BytePos>

Implementors§