pub trait WrapSpannable<T: Parse, U> {
    // Required method
    fn wrap_spannable(self) -> U;

    // Provided method
    fn into_spanned(self, _span: Span) -> U
       where Self: Sized { ... }
}
Expand description

A trait for internal use to automatically convert between nodes and SpannableNode.

Required Methods§

source

fn wrap_spannable(self) -> U

Wrap dummy span information around the node.

Provided Methods§

source

fn into_spanned(self, _span: Span) -> U
where Self: Sized,

Convert the node into a SpannableNode with the specified Span.

Implementations on Foreign Types§

source§

impl<T: Parse> WrapSpannable<T, Option<Box<SpannableNode<T>>>> for Option<Box<T>>

source§

impl<T: Parse> WrapSpannable<T, Option<SpannableNode<T>>> for Option<T>

source§

impl<T: Parse> WrapSpannable<T, Box<SpannableNode<T>>> for Box<T>

source§

impl<T: Parse, U: Ord> WrapSpannable<T, BTreeMap<U, SpannableNode<T>>> for BTreeMap<U, T>

Implementors§

source§

impl<T: Parse> WrapSpannable<T, SpannableNode<T>> for T

source§

impl<T: Parse, U: IntoIterator<Item = SpannableNode<T>> + FromIterator<SpannableNode<T>>, Y: IntoIterator<Item = T>> WrapSpannable<T, U> for Y