| /external/rust/crates/serde_json/ |
| D | CONTRIBUTING.md | 1 # Contributing to Serde 3 Serde welcomes contribution from everyone in the form of suggestions, bug 9 Serde development is spread across lots of repositories. In general, prefer to 10 open issues against the main [serde-rs/serde] repository unless the topic is 13 [serde-rs/serde]: https://github.com/serde-rs/serde 23 solve with the feature, any ideas for how Serde could support solving that 26 ## Running the test suite 28 We encourage you to check that the test suite passes locally before submitting a 33 The test suite requires a nightly compiler. 36 # Run the full test suite, including doc test and compile-tests [all …]
|
| /external/crosvm/devices/src/virtio/gpu/ |
| D | parameters.rs | 2 // Use of this source code is governed by a BSD-style license that can be 11 use serde::Deserialize; 12 use serde::Deserializer; 13 use serde::Serialize; 14 use serde::Serializer; 23 pub fn serialize<S>(capset_mask: &u64, serializer: S) -> Result<S::Ok, S::Error> in serialize() 32 pub fn deserialize<'de, D: Deserializer<'de>>(deserializer: D) -> Result<u64, D::Error> { in deserialize() 41 #[serde(deny_unknown_fields, default, rename_all = "kebab-case")] 43 #[serde(rename = "backend")] 45 #[serde(rename = "displays")] [all …]
|
| /external/crosvm/devices/src/pci/ |
| D | stub.rs | 2 // Use of this source code is governed by a BSD-style license that can be 7 //! non-functional, in particular it doesn't have any BARs, IRQs etc. and neither will it handle 18 use serde::Deserialize; 19 use serde::Deserializer; 20 use serde::Serialize; 21 use serde::Serializer; 43 fn default() -> Self { in default() 55 fn deserialize<D>(deserializer: D) -> std::result::Result<PciClassParameters, D::Error> in deserialize() 63 serde::de::Error::custom(format!("Unknown class code {:#x}", class_code)) in deserialize() 79 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error> in serialize() [all …]
|
| /external/crosvm/serde_keyvalue/src/ |
| D | key_values.rs | 2 // Use of this source code is governed by a BSD-style license that can be 36 use serde::de; 37 use serde::Deserialize; 38 use serde::Deserializer; 67 #[error("serde error: {0}")] 73 /// Error that may be thown while parsing a key-values string. 83 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() 92 fn custom<T>(msg: T) -> Self in custom() 106 fn is_separator(c: Option<char>) -> bool { in is_separator() 111 fn any_separator(s: &str) -> IResult<&str, Option<char>> { in any_separator() [all …]
|
| /external/rust/crates/serde_json/tests/regression/ |
| D | issue845.rs | 1 #![allow(clippy::trait_duplication_in_bounds)] // https://github.com/rust-lang/rust-clippy/issues/8… 3 use serde::{Deserialize, Deserializer}; 13 impl<'de, T> serde::de::Visitor<'de> for NumberVisitor<T> 22 fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { in expecting() 26 fn visit_u64<E>(self, v: u64) -> Result<Self::Value, E> in visit_u64() 28 E: serde::de::Error, in visit_u64() 30 T::try_from(v).map_err(serde::de::Error::custom) in visit_u64() 33 fn visit_i64<E>(self, v: i64) -> Result<Self::Value, E> in visit_i64() 35 E: serde::de::Error, in visit_i64() 37 T::try_from(v).map_err(serde::de::Error::custom) in visit_i64() [all …]
|
| /external/rust/crates/csv/tests/ |
| D | tests.rs | 13 include_str!("../examples/data/uspop-null.csv"); 15 include_bytes!("../examples/data/uspop-latin1.csv"); 20 include_str!("../examples/data/smallpop-colon.csv"); 22 include_str!("../examples/data/smallpop-no-headers.csv"); 24 #[test] 26 let mut cmd = cmd_for_example("cookbook-read-basic"); in cookbook_read_basic() 31 #[test] 33 let mut cmd = cmd_for_example("cookbook-read-serde"); in cookbook_read_serde() 38 #[test] 40 let mut cmd = cmd_for_example("cookbook-read-colon"); in cookbook_read_colon() [all …]
|
| /external/crosvm/base/src/ |
| D | descriptor_reflection.rs | 2 // Use of this source code is governed by a BSD-style license that can be 62 use serde::de; 63 use serde::de::Error; 64 use serde::de::Visitor; 65 use serde::ser; 66 use serde::Deserialize; 67 use serde::Deserializer; 68 use serde::Serialize; 69 use serde::Serializer; 80 fn init_descriptor_dst() -> Result<(), &'static str> { in init_descriptor_dst() [all …]
|
| /external/pigweed/pw_rpc/pwpb/public/pw_rpc/pwpb/ |
| D | fake_channel_output.h | 7 // https://www.apache.org/licenses/LICENSE-2.0 36 namespace internal::test::pwpb { 42 } // namespace internal::test::pwpb 68 constexpr iterator(const PayloadsView::iterator& it, const PwpbSerde& serde) in iterator() argument 71 serde_(serde) {} in iterator() 97 PwpbPayloadsView(const PwpbSerde& serde, Args&&... args) in PwpbPayloadsView() argument 98 : view_(args...), serde_(serde) {} in PwpbPayloadsView() 107 : public internal::test::FakeChannelOutputBuffer<kMaxPackets, 134 internal::MethodInfo<kMethod>::serde().request(), 135 internal::test::FakeChannelOutputBuffer< [all …]
|
| /external/rust/crates/indexmap/ |
| D | Cargo.toml.orig | 7 license = "Apache-2.0 OR MIT" 10 categories = ["data-structures", "no-std"] 11 rust-version = "1.56" 16 [build-dependencies] 20 arbitrary = { version = "1.0", optional = true, default-features = false } 21 quickcheck = { version = "1.0", optional = true, default-features = false } 22 serde = { version = "1.0", optional = true, default-features = false } 27 rustc-rayon = { version = "0.4", optional = true } 31 default-features = false 34 [dev-dependencies] [all …]
|
| /external/pigweed/pw_rpc/nanopb/public/pw_rpc/nanopb/ |
| D | fake_channel_output.h | 7 // https://www.apache.org/licenses/LICENSE-2.0 40 namespace internal::test::nanopb { 46 } // namespace internal::test::nanopb 67 const internal::NanopbSerde& serde) in iterator() argument 68 : Base(it), serde_(serde) {} in iterator() 97 NanopbPayloadsView(const internal::NanopbSerde& serde, Args&&... args) in NanopbPayloadsView() argument 98 : view_(args...), serde_(serde) {} in NanopbPayloadsView() 107 : public internal::test::FakeChannelOutputBuffer<kMaxPackets, 134 internal::MethodInfo<kMethod>::serde().request(), 159 internal::MethodInfo<kMethod>::serde().response(), [all …]
|
| /external/rust/crates/log/ |
| D | Cargo.toml.orig | 6 license = "MIT OR Apache-2.0" 8 repository = "https://github.com/rust-lang/log" 13 categories = ["development-tools::debugging"] 19 features = ["std", "serde", "kv_unstable_std", "kv_unstable_sval", "kv_unstable_serde"] 21 [[test]] 26 [[test]] 50 kv_unstable = ["value-bag"] 51 kv_unstable_sval = ["kv_unstable", "value-bag/sval", "sval"] 52 kv_unstable_std = ["std", "kv_unstable", "value-bag/error"] 53 kv_unstable_serde = ["kv_unstable_std", "value-bag/serde", "serde"] [all …]
|
| D | Cargo.toml | 24 categories = ["development-tools::debugging"] 25 license = "MIT OR Apache-2.0" 26 repository = "https://github.com/rust-lang/log" 31 "serde", 37 [[test]] 42 [[test]] 47 [dependencies.cfg-if] 50 [dependencies.serde] 53 default-features = false 56 version = "=1.0.0-alpha.5" [all …]
|
| /external/rust/crates/protobuf/2.27.1/src/ |
| D | singular.rs | 8 #[cfg(feature = "with-serde")] 9 use serde; 28 pub fn some(value: T) -> SingularField<T> { in some() 37 pub fn is_some(&self) -> bool { in is_some() 43 pub fn is_none(&self) -> bool { in is_none() 49 pub fn into_option(self) -> Option<T> { in into_option() 59 pub fn as_ref<'a>(&'a self) -> Option<&'a T> { in as_ref() 69 pub fn as_mut<'a>(&'a mut self) -> Option<&'a mut T> { in as_mut() 79 pub fn unwrap_ref<'a>(&'a self) -> &'a T { in unwrap_ref() 85 pub fn unwrap_mut_ref<'a>(&'a mut self) -> &'a mut T { in unwrap_mut_ref() [all …]
|
| D | repeated.rs | 16 #[cfg(feature = "with-serde")] 17 use serde; 30 pub fn len(&self) -> usize { in len() 50 fn default() -> RepeatedField<T> { in default() 61 pub fn new() -> RepeatedField<T> { in new() 67 pub fn from_vec(vec: Vec<T>) -> RepeatedField<T> { in from_vec() 74 pub fn into_vec(self) -> Vec<T> { in into_vec() 82 pub fn capacity(&self) -> usize { in capacity() 88 pub fn as_slice<'a>(&'a self) -> &'a [T] { in as_slice() 94 pub fn as_mut_slice<'a>(&'a mut self) -> &'a mut [T] { in as_mut_slice() [all …]
|
| /external/rust/crates/indexmap/.github/workflows/ |
| D | ci.yml | 3 branches: [ master, indexmap-1.x ] 5 branches: [ master, indexmap-1.x ] 15 runs-on: ubuntu-latest 19 - rust: 1.56.0 # MSRV 21 - rust: stable 23 - rust: stable 25 - rust: stable 27 - rust: stable 28 features: rustc-rayon 29 - rust: stable [all …]
|
| /external/rust/crates/chrono/src/ |
| D | datetime.rs | 10 #[cfg(any(feature = "std", test))] 18 #[cfg(any(feature = "alloc", feature = "std", test))] 20 #[cfg(any(feature = "alloc", feature = "std", test))] 22 #[cfg(feature = "unstable-locales")] 55 /// display all available non-zero sub-second digits. This corresponds to 67 /// the general-purpose constructors are all via the methods on the 95 pub fn from_utc(datetime: NaiveDateTime, offset: Tz::Offset) -> DateTime<Tz> { in from_utc() 101 pub fn date(&self) -> Date<Tz> { in date() 108 pub fn time(&self) -> NaiveTime { in time() 112 /// Returns the number of non-leap seconds since January 1, 1970 0:00:00 UTC [all …]
|
| /external/crosvm/tools/impl/catapult_converter/src/ |
| D | main.rs | 2 // Use of this source code is governed by a BSD-style license that can be 12 use serde::Deserialize; 13 use serde::Serialize; 20 /// This tool takes results from Fuchsia performance tests (in Fuchsia's JSON perf test results 27 /// input file: perf test results JSON file 58 #[serde(alias = "nanoseconds", alias = "ns")] 60 #[serde(alias = "milliseconds", alias = "ms")] 62 #[serde(alias = "bytes/second")] 64 #[serde(alias = "bits/second")] 66 #[serde(alias = "bytes")] [all …]
|
| /external/crosvm/jail/src/ |
| D | config.rs | 2 // Use of this source code is governed by a BSD-style license that can be 7 use serde::Deserialize; 8 use serde::Serialize; 11 fn jail_config_default_pivot_root() -> PathBuf { in jail_config_default_pivot_root() 16 #[serde(deny_unknown_fields, rename_all = "kebab-case")] 18 #[serde(default = "jail_config_default_pivot_root")] 21 #[serde(default)] 23 #[serde(default)] 28 fn default() -> Self { in default() 38 #[cfg(test)] [all …]
|
| /external/rust/crates/glam/ |
| D | build_all_msrv.sh | 3 set -e 6 $CARGO test --features "bytemuck mint rand serde debug-glam-assert" && \ 7 $CARGO test --features "scalar-math bytemuck mint rand serde debug-glam-assert" && \ 8 $CARGO test --no-default-features --features "libm scalar-math bytemuck mint rand serde debug-glam-… 9 $CARGO bench --no-run
|
| /external/crosvm/devices/src/virtio/block/ |
| D | block.rs | 2 // Use of this source code is governed by a BSD-style license that can be 10 use serde::Deserialize; 11 use serde::Deserializer; 12 use serde::Serialize; 13 use serde::Serializer; 15 fn block_option_sparse_default() -> bool { in block_option_sparse_default() 18 fn block_option_block_size_default() -> u32 { in block_option_block_size_default() 24 fn block_option_io_concurrency_default() -> NonZeroU32 { in block_option_io_concurrency_default() 30 /// This is based on the virtio-block ID length limit. 36 ) -> Result<S::Ok, S::Error> { [all …]
|
| /external/rust/crates/ahash/.github/workflows/ |
| D | rust.yml | 7 runs-on: ubuntu-latest 9 - uses: actions/checkout@v2 10 - name: Install latest stable 11 uses: actions-rs/toolchain@v1 15 - name: check nostd 16 uses: actions-rs/cargo@v1 19 args: --no-default-features 20 - name: test nostd 21 uses: actions-rs/cargo@v1 23 command: test [all …]
|
| /external/crosvm/base/src/sys/windows/ |
| D | shm.rs | 2 // Use of this source code is governed by a BSD-style license that can be 13 use serde::ser; 14 use serde::Deserialize; 15 use serde::Serialize; 16 use serde::Serializer; 27 #[serde(try_from = "SerializedSharedMemory")] 32 // Elements used internally to perform File-like operations on this Shared Memory 42 pub fn size(&self) -> u64 { in size() 47 // Ideally we'd use Serde's "into" attribute on SharedMemory to convert into SerializedSharedMemory 51 fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error> in serialize() [all …]
|
| /external/rust/crates/serde_test/src/ |
| D | lib.rs | 4 //! [`Serialize`]: serde::ser::Serialize 5 //! [`Deserialize`]: serde::de::Deserialize 11 //! test that a value serializes to a particular sequence of method calls, an 12 //! [`assert_de_tokens`] function to test that a value can be deserialized from 14 //! test both directions. There are also functions to test expected failure 17 //! [`Serializer`]: serde::ser::Serializer 19 //! Here is an example from the [`linked-hash-map`] crate. 21 //! [`linked-hash-map`]: https://github.com/contain-rs/linked-hash-map 32 //! # use serde::ser::{Serialize, Serializer, SerializeMap}; 33 //! # use serde::de::{Deserialize, Deserializer, Visitor, MapAccess}; [all …]
|
| /external/rust/crates/regex-automata/tests/ |
| D | collection.rs | 26 load!(col, "fowler/repetition-long.toml"); 30 load!(col, "no-unicode.toml"); 49 #[serde(default)] 52 #[serde(with = "serde_bytes")] 54 #[serde(rename = "matches")] 56 #[serde(default)] 58 #[serde(default)] 63 #[serde(rename_all = "kebab-case")] 69 #[serde(rename = "invalid-utf8")] 80 fn new() -> RegexTestCollection { in new() [all …]
|
| /external/crosvm/devices/src/ |
| D | serial_device.rs | 2 // Use of this source code is governed by a BSD-style license that can be 26 use serde::Deserialize; 27 use serde::Serialize; 71 #[serde(rename_all = "kebab-case")] 77 #[cfg_attr(unix, serde(rename = "unix"))] 78 #[cfg_attr(windows, serde(rename = "namedpipe"))] 83 fn default() -> Self { in default() 89 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt() 104 #[serde(rename_all = "kebab-case")] 106 Serial, // Standard PC-style (8250/16550 compatible) UART [all …]
|