Trait arithmetic_parser::StripCode[][src]

pub trait StripCode {
    type Stripped: 'static;
    fn strip_code(self) -> Self::Stripped;
}
Expand description

Encapsulates stripping references to code fragments. The result can outlive the code.

Implementors of this trait are usually generic by the code lifetime: Foo<'_, ..>, with the result of stripping being Foo<'static, ..>.

Associated Types

type Stripped: 'static[src]

Resulting type after code stripping.

Required methods

fn strip_code(self) -> Self::Stripped[src]

Strips references to code fragments in this type.

Implementors

impl StripCode for Error<'_>[src]

impl<T: Clone + 'static> StripCode for MaybeSpanned<'_, T>[src]

type Stripped = MaybeSpanned<'static, T>

fn strip_code(self) -> Self::Stripped[src]