We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Span
Lazy*
Using
ion-rs = { version = "1.0.0-rc.6", features = ["experimental"] }
It's somewhat difficult (and sometimes not possible unless I'm missing something) to access the Span for a given Lazy*
Here's what I'm trying:
pub(crate) trait IonSpan<'a> { fn get_span(&self) -> Option<Span<'a>>; } impl<'a> IonSpan<'a> for LazyValue<'a, AnyEncoding> { fn get_span(&self) -> Option<Span<'a>> { Some(self.raw()?.span()) } } impl<'a> IonSpan<'a> for LazyStruct<'a, AnyEncoding> { fn get_span(&self) -> Option<Span<'a>> { self.as_value().get_span() } } impl<'a> IonSpan<'a> for LazyList<'a, AnyEncoding> { fn get_span(&self) -> Option<Span<'a>> { todo!("ion-rs doesn't seem to support span or as_value for LazyList") } } impl<'a> IonSpan<'a> for LazyField<'a, AnyEncoding> { fn get_span(&self) -> Option<Span<'a>> { todo!("ion-rs doesn't seem to support span or as_value for LazyList") } } impl<'a> IonSpan<'a> for ValueRef<'a, AnyEncoding> { fn get_span(&self) -> Option<Span<'a>> { todo!("ion-rs doesn't seem to support span or as_value for LazyList") } }
I'm not sure if the implemented methods are ideal, and for several (see the todos), I could find no way to get to the span.
todo
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using
It's somewhat difficult (and sometimes not possible unless I'm missing something) to access the
Span
for a givenLazy*
Here's what I'm trying:
I'm not sure if the implemented methods are ideal, and for several (see the
todo
s), I could find no way to get to the span.The text was updated successfully, but these errors were encountered: