Lines Matching refs:from

40 /// Get a value from a type implementing `std::fmt::Debug`.
48 /// Get a value from a type implementing `std::fmt::Display`.
56 /// Get a value from an error.
66 /// Get a value from a type implementing `serde::Serialize`.
74 /// Get a value from a type implementing `sval::value::Value`.
148 /// let value = Value::from(42i32);
157 /// Get a value from a type implementing `ToValue`.
165 /// Get a value from a type implementing `std::fmt::Debug`.
175 /// Get a value from a type implementing `std::fmt::Display`.
185 /// Get a value from an error.
197 /// Get a value from a type implementing `serde::Serialize`.
207 /// Get a value from a type implementing `sval::value::Value`.
218 /// Get a value from a type implementing `std::fmt::Debug`.
228 /// Get a value from a type implementing `std::fmt::Display`.
238 /// Get a value from a type implementing `serde::Serialize`.
249 /// Get a value from a type implementing `sval::value::Value`.
260 /// Get a value from a dynamic `std::fmt::Debug`.
267 /// Get a value from a dynamic `std::fmt::Display`.
274 /// Get a value from a dynamic error.
282 /// Get a value from a type implementing `sval::value::Value`.
290 /// Get a value from an internal primitive.
440 Value::from(self)
446 Value::from(self)
452 Value::from(self)
458 Value::from(self)
464 Value::from(self)
469 fn from(value: &'v str) -> Self {
475 fn from(value: &'v u128) -> Self {
481 fn from(value: &'v i128) -> Self {
487 fn from(v: &'v std::num::NonZeroU128) -> Value<'v> {
494 fn from(v: &'v std::num::NonZeroI128) -> Value<'v> {
523 Value::from(*self)
528 fn from(value: $into_ty) -> Self {
541 Value::from(self.get())
546 fn from(value: std::num::$into_ty) -> Self {
547 Value::from(value.get())
622 Value::from(&**self)
628 Value::from(&**self)
640 fn from(v: &'v String) -> Self {
641 Value::from(&**v)
790 Value::from(8u8),
791 Value::from(16u16),
792 Value::from(32u32),
793 Value::from(64u64),
794 Value::from(1usize),
795 Value::from(std::num::NonZeroU8::new(8).unwrap()),
796 Value::from(std::num::NonZeroU16::new(16).unwrap()),
797 Value::from(std::num::NonZeroU32::new(32).unwrap()),
798 Value::from(std::num::NonZeroU64::new(64).unwrap()),
799 Value::from(std::num::NonZeroUsize::new(1).unwrap()),
806 Value::from(-8i8),
807 Value::from(-16i16),
808 Value::from(-32i32),
809 Value::from(-64i64),
810 Value::from(-1isize),
811 Value::from(std::num::NonZeroI8::new(-8).unwrap()),
812 Value::from(std::num::NonZeroI16::new(-16).unwrap()),
813 Value::from(std::num::NonZeroI32::new(-32).unwrap()),
814 Value::from(std::num::NonZeroI64::new(-64).unwrap()),
815 Value::from(std::num::NonZeroIsize::new(-1).unwrap()),
821 vec![Value::from(32.32f32), Value::from(64.64f64)].into_iter()
825 vec![Value::from(true), Value::from(false)].into_iter()
829 vec![Value::from("a string"), Value::from("a loong string")].into_iter()
833 vec![Value::from('a'), Value::from('⛰')].into_iter()
848 let err = std::io::Error::from(std::io::ErrorKind::Other);
930 let short_lived = String::from("short lived");
931 let v = Value::from(&*short_lived);
1006 Value::from(42u64).visit(&mut extract).unwrap();
1029 let short_lived = String::from("A short-lived string");
1030 Value::from(&*short_lived).visit(&mut extract).unwrap();