pub trait TreeDecoder: Send + Sync {
// Required method
fn decode_tree(
&self,
cx: &mut ReadCx<'_>,
input: Input,
source_id: String,
) -> Result<LocatedExprTree>;
}Expand description
A decoder that preserves the full source tree as a LocatedExprTree,
including trivia, for lossless round-tripping.
Required Methods§
Sourcefn decode_tree(
&self,
cx: &mut ReadCx<'_>,
input: Input,
source_id: String,
) -> Result<LocatedExprTree>
fn decode_tree( &self, cx: &mut ReadCx<'_>, input: Input, source_id: String, ) -> Result<LocatedExprTree>
Decode input into a LocatedExprTree, attributing spans to
source_id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".