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

Method try_from

src/pgwire-common/src/format.rs:32–38  ·  view source on GitHub ↗
(value: i16)

Source from the content-addressed store, hash-verified

30 type Error = io::Error;
31
32 fn try_from(value: i16) -> Result<Self, Self::Error> {
33 match value {
34 0 => Ok(Format::Text),
35 1 => Ok(Format::Binary),
36 n => Err(input_err(format!("unknown format code: {}", n))),
37 }
38 }
39}
40
41impl From<Format> for i8 {

Callers

nothing calls this directly

Calls 1

input_errFunction · 0.85

Tested by

no test coverage detected