Lines Matching refs:Value
23 use ciborium::value::{Integer, Value};
50 pub fn parse_value_array(data: &[u8], context: &'static str) -> Result<Vec<Value>> { in parse_value_array() argument
51 value_to_array(Value::from_slice(data)?, context) in parse_value_array()
55 pub fn value_to_array(v: Value, context: &'static str) -> Result<Vec<Value>> { in value_to_array() argument
60 pub fn value_to_text(v: Value, context: &'static str) -> Result<String> { in value_to_text() argument
65 pub fn value_to_map(v: Value, context: &'static str) -> Result<Vec<(Value, Value)>> { in value_to_map() argument
70 pub fn value_to_num<T: TryFrom<Integer>>(v: Value, context: &'static str) -> Result<T> { in value_to_num() argument
79 pub fn value_to_byte_array<const N: usize>(v: Value, context: &'static str) -> Result<[u8; N]> { in value_to_byte_array() argument
88 pub fn value_to_bytes(v: Value, context: &'static str) -> Result<Vec<u8>> { in value_to_bytes() argument
95 v: &Value, in to_unexpected_item_error() argument
106 pub fn cbor_value_type(v: &Value) -> &'static str { in cbor_value_type()
108 Value::Integer(_) => "int", in cbor_value_type()
109 Value::Bytes(_) => "bstr", in cbor_value_type()
110 Value::Float(_) => "float", in cbor_value_type()
111 Value::Text(_) => "tstr", in cbor_value_type()
112 Value::Bool(_) => "bool", in cbor_value_type()
113 Value::Null => "nul", in cbor_value_type()
114 Value::Tag(_, _) => "tag", in cbor_value_type()
115 Value::Array(_) => "array", in cbor_value_type()
116 Value::Map(_) => "map", in cbor_value_type()
130 pub fn get_label_value(key: &CoseKey, label: Label) -> Result<&Value> { in get_label_value() argument