Nushell plugin for interacting with D-Bus
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

support for binary input

+10
+10
src/convert.rs
··· 141 141 (Value::String { val, .. }, Some(DbusType::Double)) => 142 142 Ok(MessageItem::Double(try_convert!(f64::from_str(&val[..])))), 143 143 144 + // Binary 145 + (Value::Binary { val, .. }, Some(r#type @ DbusType::Array(content_type))) 146 + if matches!(**content_type, DbusType::Byte) => 147 + { 148 + // FIXME: this is likely pretty inefficient for a bunch of bytes 149 + let sig = Signature::from(r#type.stringify()); 150 + let items = val.iter().cloned().map(MessageItem::Byte).collect::<Vec<_>>(); 151 + Ok(MessageItem::Array(MessageItemArray::new(items, sig).unwrap())) 152 + }, 153 + 144 154 // List/array 145 155 (Value::List { vals, .. }, Some(r#type @ DbusType::Array(content_type))) => { 146 156 let sig = Signature::from(r#type.stringify());