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

Function fmt_binary

datafusion/common/src/scalar/mod.rs:5539–5548  ·  view source on GitHub ↗

writes a byte array to formatter. `[1, 2, 3]` ==> `"1,2,3"`

(data: &[u8], f: &mut fmt::Formatter)

Source from the content-addressed store, hash-verified

5537
5538/// writes a byte array to formatter. `[1, 2, 3]` ==> `"1,2,3"`
5539fn fmt_binary(data: &[u8], f: &mut fmt::Formatter) -> fmt::Result {
5540 let mut iter = data.iter();
5541 if let Some(b) = iter.next() {
5542 write!(f, "{b}")?;
5543 }
5544 for b in iter {
5545 write!(f, ",{b}")?;
5546 }
5547 Ok(())
5548}
5549
5550impl fmt::Debug for ScalarValue {
5551 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

Callers 1

fmtMethod · 0.85

Calls 2

iterMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…