ion-rust
ion-rust copied to clipboard
It seems `Position` is not publicly nameable
It seems Position is not publicly accessible: https://github.com/amazon-ion/ion-rust/blob/main/src/lib.rs#L181
Using
ion-rs = { version = "1.0.0-rc.6", features = ["experimental"] }
Given an IonError, err:
This works:
let position: Option<_> = match err {
IonError::Incomplete(e) => Some(e.position()),
IonError::Decoding(e) => e.position(),
_ => None,
};
But there is no way to explicitly name the type for the position variable, because I can’t actually import the Position type
let position: Option<&Position> = ...
286 | let position: Option<&Position> = match &self.0 {
| ^^^^^^^^ not found in this scope