MCPcopy Create free account
hub / github.com/apache/datafusion / byte_to_string

Function byte_to_string

datafusion/proto/src/common.rs:29–37  ·  view source on GitHub ↗
(b: u8, description: &str)

Source from the content-addressed store, hash-verified

27}
28
29pub(crate) fn byte_to_string(b: u8, description: &str) -> Result<String> {
30 let b = &[b];
31 let b = std::str::from_utf8(b).map_err(|_| {
32 internal_datafusion_err!(
33 "Invalid CSV {description}: can not represent {b:0x?} as utf8"
34 )
35 })?;
36 Ok(b.to_owned())
37}
38
39#[macro_export]
40macro_rules! convert_required {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…