MCPcopy Create free account
hub / github.com/apache/arrow-rs / from_str

Method from_str

arrow-array/src/timezone.rs:91–98  ·  view source on GitHub ↗
(tz: &str)

Source from the content-addressed store, hash-verified

89 type Err = ArrowError;
90
91 fn from_str(tz: &str) -> Result<Self, Self::Err> {
92 match parse_fixed_offset(tz) {
93 Some(offset) => Ok(Self(TzInner::Offset(offset))),
94 None => Ok(Self(TzInner::Timezone(tz.parse().map_err(|e| {
95 ArrowError::ParseError(format!("Invalid timezone \"{tz}\": {e}"))
96 })?))),
97 }
98 }
99 }
100
101 impl Display for Tz {

Callers

nothing calls this directly

Calls 2

parse_fixed_offsetFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected