pub trait LocatedDecoder: Send + Sync {
// Required method
fn decode_located(
&self,
cx: &mut ReadCx<'_>,
input: Input,
source_id: String,
) -> Result<LocatedExpr>;
}Expand description
A decoder that preserves source Origin, producing a LocatedExpr.
Optional: CodecRuntime falls back to a plain Decoder with no origin
when a codec provides none.
Required Methods§
Sourcefn decode_located(
&self,
cx: &mut ReadCx<'_>,
input: Input,
source_id: String,
) -> Result<LocatedExpr>
fn decode_located( &self, cx: &mut ReadCx<'_>, input: Input, source_id: String, ) -> Result<LocatedExpr>
Decode input into a LocatedExpr, attributing spans to source_id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".