Skip to main content

SpanLike

Trait SpanLike 

Source
pub trait SpanLike: Copy {
    // Required methods
    fn derive_ranged(&self, range: Range<usize>) -> Self;
    fn cover(self, other: Self) -> Self;
}
Expand description

Trait for allowing tests to parse tokenstreams with dynamic span ranges

Required Methods§

Source

fn derive_ranged(&self, range: Range<usize>) -> Self

Source

fn cover(self, other: Self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SpanLike for ()

Source§

fn derive_ranged(&self, _: Range<usize>) -> Self

Source§

fn cover(self, _other: Self) -> Self

Source§

impl SpanLike for Span

Source§

fn derive_ranged(&self, range: Range<usize>) -> Self

Source§

fn cover(self, other: Self) -> Self

Implementors§