Creates a [`SourceInfoSchema`] from string slice `s`. Relies on [`SchemaVersion::from_str`] to create a corresponding [`SourceInfoSchema`] from `s`. # Errors Returns an error if - no [`SchemaVersion`] can be created from `s`, - or the conversion from [`SchemaVersion`] to [`SourceInfoSchema`] fails.
(s: &str)
| 145 | /// - or the conversion from [`SchemaVersion`] to [`SourceInfoSchema`] fails. |
| 146 | fn from_str(s: &str) -> Result<SourceInfoSchema, Self::Err> { |
| 147 | match SchemaVersion::from_str(s) { |
| 148 | Ok(version) => Self::try_from(version), |
| 149 | Err(_) => Err(Error::UnsupportedSchemaVersion(s.to_string())), |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | impl TryFrom<SchemaVersion> for SourceInfoSchema { |
| 155 | type Error = Error; |
nothing calls this directly
no test coverage detected