[−][src]Type Definition arithmetic_parser::MaybeSpanned
type MaybeSpanned<'a, T = ()> = LocatedSpan<CodeFragment<'a>, T>;
Value with an optional associated code span.
Implementations
impl<'a> MaybeSpanned<'a>[src]
pub fn from_str<R>(code: &'a str, range: R) -> Self where
InputSpan<'a>: Slice<R>, [src]
InputSpan<'a>: Slice<R>,
Creates a span from a range in the provided code. This is mostly useful for testing.
impl<T, '_> MaybeSpanned<'_, T>[src]
pub fn code_or_location(&self, default_name: &str) -> String[src]
Returns either the original code fragment (if it's retained), or a string in the form
{default_name} at {line}:{column}.
Trait Implementations
impl<'a, T> From<LocatedSpan<&'a str, T>> for MaybeSpanned<'a, T>[src]
impl<T: Clone + 'static, '_> StripCode for MaybeSpanned<'_, T>[src]
type Stripped = MaybeSpanned<'static, T>
Resulting type after code stripping.