Debian Codegraph @

src/ser/raw.rs

raw symbols SCIP
1 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/;
2
3 use serderust-analyzer cargo serde 1.0.228 crate/::{serrust-analyzer cargo serde_core 1.0.228 ser/, Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#};
4
5 use superrust-analyzer cargo ron 0.12.0 ser/::{Errorrust-analyzer cargo ron 0.12.0 error/Error#, Resultrust-analyzer cargo ron 0.12.0 error/Result#};
6
7 pub struct Serializerrust-analyzer cargo ron 0.12.0 ser/raw/Serializer#<'a, W: fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Write#> {
8 serrust-analyzer cargo ron 0.12.0 ser/raw/Serializer#ser.: &'a mut superrust-analyzer cargo ron 0.12.0 ser/::Serializerrust-analyzer cargo ron 0.12.0 ser/Serializer#<W>,
9 }
10
11 impl<'a, W: fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Write#> Serializerrust-analyzer cargo ron 0.12.0 ser/raw/Serializer#<'a, W> {
12 pub fn newrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`]new().(ser: &'a mut superrust-analyzer cargo ron 0.12.0 ser/::Serializerrust-analyzer cargo ron 0.12.0 ser/Serializer#<W>) -> Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`] {
13 Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`] { serrust-analyzer cargo ron 0.12.0 ser/raw/Serializer#ser. }
14 }
15 }
16
17 impl<'a, W: fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Write#> serrust-analyzer cargo serde_core 1.0.228 ser/::Serializerrust-analyzer cargo serde_core 1.0.228 ser/Serializer# for Serializerrust-analyzer cargo ron 0.12.0 ser/raw/Serializer#<'a, W> {
18 type Errorrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]Error# = Errorrust-analyzer cargo ron 0.12.0 error/Error#;
19 type Okrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]Ok# = ();
20 type SerializeMaprust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]SerializeMap# = serrust-analyzer cargo serde_core 1.0.228 ser/::Impossiblerust-analyzer cargo serde_core 1.0.228 ser/impossible/Impossible#<(), Errorrust-analyzer cargo ron 0.12.0 error/Error#>;
21 type SerializeSeqrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]SerializeSeq# = serrust-analyzer cargo serde_core 1.0.228 ser/::Impossiblerust-analyzer cargo serde_core 1.0.228 ser/impossible/Impossible#<(), Errorrust-analyzer cargo ron 0.12.0 error/Error#>;
22 type SerializeStructrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]SerializeStruct# = serrust-analyzer cargo serde_core 1.0.228 ser/::Impossiblerust-analyzer cargo serde_core 1.0.228 ser/impossible/Impossible#<(), Errorrust-analyzer cargo ron 0.12.0 error/Error#>;
23 type SerializeStructVariantrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]SerializeStructVariant# = serrust-analyzer cargo serde_core 1.0.228 ser/::Impossiblerust-analyzer cargo serde_core 1.0.228 ser/impossible/Impossible#<(), Errorrust-analyzer cargo ron 0.12.0 error/Error#>;
24 type SerializeTuplerust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]SerializeTuple# = serrust-analyzer cargo serde_core 1.0.228 ser/::Impossiblerust-analyzer cargo serde_core 1.0.228 ser/impossible/Impossible#<(), Errorrust-analyzer cargo ron 0.12.0 error/Error#>;
25 type SerializeTupleStructrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]SerializeTupleStruct# = serrust-analyzer cargo serde_core 1.0.228 ser/::Impossiblerust-analyzer cargo serde_core 1.0.228 ser/impossible/Impossible#<(), Errorrust-analyzer cargo ron 0.12.0 error/Error#>;
26 type SerializeTupleVariantrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]SerializeTupleVariant# = serrust-analyzer cargo serde_core 1.0.228 ser/::Impossiblerust-analyzer cargo serde_core 1.0.228 ser/impossible/Impossible#<(), Errorrust-analyzer cargo ron 0.12.0 error/Error#>;
27
28 fn serialize_boolrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_bool().(self, _: bool) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
29 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
30 }
31
32 fn serialize_i8rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_i8().(self, _: i8) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
33 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
34 }
35
36 fn serialize_i16rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_i16().(self, _: i16) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
37 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
38 }
39
40 fn serialize_i32rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_i32().(self, _: i32) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
41 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
42 }
43
44 fn serialize_i64rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_i64().(self, _: i64) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
45 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
46 }
47
48 #[cfg(feature = "integer128")]
49 fn serialize_i128rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_i128().(self, _: i128) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
50 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
51 }
52
53 fn serialize_u8rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_u8().(self, _: u8) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
54 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
55 }
56
57 fn serialize_u16rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_u16().(self, _: u16) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
58 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
59 }
60
61 fn serialize_u32rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_u32().(self, _: u32) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
62 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
63 }
64
65 fn serialize_u64rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_u64().(self, _: u64) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
66 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
67 }
68
69 #[cfg(feature = "integer128")]
70 fn serialize_u128rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_u128().(self, _: u128) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
71 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
72 }
73
74 fn serialize_f32rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_f32().(self, _: f32) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
75 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
76 }
77
78 fn serialize_f64rust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_f64().(self, _: f64) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
79 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
80 }
81
82 fn serialize_charrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_char().(self, _: char) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
83 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
84 }
85
86 fn serialize_strrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_str().(self, ron: &str) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
87 self.serrust-analyzer cargo ron 0.12.0 ser/raw/Serializer#ser..outputrust-analyzer cargo ron 0.12.0 ser/Serializer#output..write_strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Write#write_str().(ron)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
88 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
89 }
90
91 fn serialize_bytesrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_bytes().(self, _: &[u8]) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
92 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
93 }
94
95 fn serialize_nonerust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_none().(self) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
96 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
97 }
98
99 fn serialize_somerust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_some().<T: ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized# + Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#>(self, _: &T) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
100 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
101 }
102
103 fn serialize_unitrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_unit().(self) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
104 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
105 }
106
107 fn serialize_unit_structrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_unit_struct().(self, _: &'static str) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
108 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
109 }
110
111 fn serialize_unit_variantrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_unit_variant().(self, _: &'static str, _: u32, _: &'static str) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
112 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
113 }
114
115 fn serialize_newtype_structrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_newtype_struct().<T: ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized# + Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#>(self, _: &'static str, _: &T) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
116 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
117 }
118
119 fn serialize_newtype_variantrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_newtype_variant().<T: ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized# + Serializerust-analyzer cargo serde_core 1.0.228 ser/Serialize#>(
120 self,
121 _: &'static str,
122 _: u32,
123 _: &'static str,
124 _: &T,
125 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
126 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
127 }
128
129 fn serialize_seqrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_seq().(self, _: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]::SerializeSeqrust-analyzer cargo serde_core 1.0.228 ser/Serializer#SerializeSeq#> {
130 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
131 }
132
133 fn serialize_tuplerust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_tuple().(self, _: usize) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]::SerializeTuplerust-analyzer cargo serde_core 1.0.228 ser/Serializer#SerializeTuple#> {
134 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
135 }
136
137 fn serialize_tuple_structrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_tuple_struct().(
138 self,
139 _: &'static str,
140 _: usize,
141 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]::SerializeTupleStructrust-analyzer cargo serde_core 1.0.228 ser/Serializer#SerializeTupleStruct#> {
142 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
143 }
144
145 fn serialize_tuple_variantrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_tuple_variant().(
146 self,
147 _: &'static str,
148 _: u32,
149 _: &'static str,
150 _: usize,
151 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]::SerializeTupleVariantrust-analyzer cargo serde_core 1.0.228 ser/Serializer#SerializeTupleVariant#> {
152 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
153 }
154
155 fn serialize_maprust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_map().(self, _: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]::SerializeMaprust-analyzer cargo serde_core 1.0.228 ser/Serializer#SerializeMap#> {
156 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
157 }
158
159 fn serialize_structrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_struct().(self, _: &'static str, _: usize) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]::SerializeStructrust-analyzer cargo serde_core 1.0.228 ser/Serializer#SerializeStruct#> {
160 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
161 }
162
163 fn serialize_struct_variantrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]serialize_struct_variant().(
164 self,
165 _: &'static str,
166 _: u32,
167 _: &'static str,
168 _: usize,
169 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Selfrust-analyzer cargo ron 0.12.0 ser/raw/impl#[`Serializer<'a, W>`][Serializer]::SerializeStructVariantrust-analyzer cargo serde_core 1.0.228 ser/Serializer#SerializeStructVariant#> {
170 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#)
171 }
172 }
173
174 #[cfg(test)]
175 mod testsrust-analyzer cargo ron 0.12.0 ser/raw/tests/ {
176 macro_rules! test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value! {
177 ($test_name:ident => $serialize_method:ident($($serialize_param:expr),*)) => {
178 #[test]
179 fn $test_name() {
180 use serde::{Serialize, Serializer};
181
182 struct Inner;
183
184 impl Serialize for Inner {
185 fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
186 serializer.$serialize_method($($serialize_param),*).map(|_| unreachable!())
187 }
188 }
189
190 #[derive(Debug)]
191 struct Newtype;
192
193 impl Serialize for Newtype {
194 fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
195 serializer.serialize_newtype_struct(
196 crate::value::raw::RAW_VALUE_TOKEN, &Inner,
197 )
198 }
199 }
200
201 assert_eq!(
202 crate::to_string(&Newtype).unwrap_err(),
203 crate::Error::ExpectedRawValue
204 )
205 }
206 };
207 }
208
209 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_boolrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_bool(). => serialize_boolrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_bool().(false) }
210 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_i8rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_i8(). => serialize_i8rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_i8().(0) }
211 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_i16rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_i16(). => serialize_i16rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_i16().(0) }
212 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_i32rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_i32(). => serialize_i32rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_i32().(0) }
213 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_i64rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_i64(). => serialize_i64rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_i64().(0) }
214 #[cfg(feature = "integer128")]
215 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_i128rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_i128(). => serialize_i128rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_i128().(0) }
216 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_u8rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_u8(). => serialize_u8rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_u8().(0) }
217 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_u16rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_u16(). => serialize_u16rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_u16().(0) }
218 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_u32rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_u32(). => serialize_u32rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_u32().(0) }
219 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_u64rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_u64(). => serialize_u64rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_u64().(0) }
220 #[cfg(feature = "integer128")]
221 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_u128rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_u128(). => serialize_u128rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_u128().(0) }
222 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_f32rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_f32(). => serialize_f32rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_f32().(0.0) }
223 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_f64rust-analyzer cargo ron 0.12.0 ser/raw/tests/test_f64(). => serialize_f64rust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_f64().(0.0) }
224 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_charrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_char(). => serialize_charrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_char().('\0') }
225 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_bytesrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_bytes(). => serialize_bytesrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_bytes().(b"") }
226 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_nonerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_none(). => serialize_nonerust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_none().() }
227 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_somerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_some(). => serialize_somerust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_some().(&()) }
228 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_unitrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_unit(). => serialize_unitrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_unit().() }
229 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_unit_structrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_unit_struct(). => serialize_unit_structrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_unit_struct().("U") }
230 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_unit_variantrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_unit_variant(). => serialize_unit_variantrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_unit_variant().("E", 0, "U") }
231 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_newtype_structrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_newtype_struct(). => serialize_newtype_structrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_newtype_struct().("N", &()) }
232 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_newtype_variantrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_newtype_variant(). => serialize_newtype_variantrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_newtype_variant().("E", 0, "N", &()) }
233 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_seqrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_seq(). => serialize_seqrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_seq().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#) }
234 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_tuplerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_tuple(). => serialize_tuplerust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_tuple().(0) }
235 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_tuple_structrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_tuple_struct(). => serialize_tuple_structrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_tuple_struct().("T", 0) }
236 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_tuple_variantrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_tuple_variant(). => serialize_tuple_variantrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_tuple_variant().("E", 0, "T", 0) }
237 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_maprust-analyzer cargo ron 0.12.0 ser/raw/tests/test_map(). => serialize_maprust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_map().(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#) }
238 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_structrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_struct(). => serialize_structrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_struct().("S", 0) }
239 test_non_raw_valuerust-analyzer cargo ron 0.12.0 ser/raw/tests/test_non_raw_value!! { test_struct_variantrust-analyzer cargo ron 0.12.0 ser/raw/tests/test_struct_variant(). => serialize_struct_variantrust-analyzer cargo serde_core 1.0.228 ser/Serializer#serialize_struct_variant().("E", 0, "S", 0) }
240 }