MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / fmt

Method fmt

src/repr/src/strconv.rs:2015–2037  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter)

Source from the content-addressed store, hash-verified

2013
2014impl fmt::Display for ParseError {
2015 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2016 match self.kind {
2017 ParseErrorKind::OutOfRange => {
2018 write!(
2019 f,
2020 "{} is out of range for type {}",
2021 self.input.quoted(),
2022 self.type_name
2023 )?;
2024 if let Some(details) = &self.details {
2025 write!(f, ": {}", details)?;
2026 }
2027 Ok(())
2028 }
2029 ParseErrorKind::InvalidInputSyntax => {
2030 write!(f, "invalid input syntax for type {}: ", self.type_name)?;
2031 if let Some(details) = &self.details {
2032 write!(f, "{}: ", details)?;
2033 }
2034 write!(f, "{}", self.input.quoted())
2035 }
2036 }
2037 }
2038}
2039
2040impl Error for ParseError {}

Callers

nothing calls this directly

Calls 1

write_strMethod · 0.45

Tested by

no test coverage detected