/external/rust/crates/serde_cbor/tests/ |
D | de.rs | 57 de::from_slice(&[0x66, 0x66, 0x6f, 0x6f, 0x62, 0x61, 0x72]); in test_string1() 63 let value: error::Result<Value> = de::from_slice(&[ in test_string2() 73 let value: error::Result<Value> = de::from_slice(slice); in test_string3() 83 de::from_slice(&[0x46, 0x66, 0x6f, 0x6f, 0x62, 0x61, 0x72]); in test_byte_string() 89 let value: error::Result<Value> = de::from_slice(&[0x00]); in test_numbers1() 95 let value: error::Result<Value> = de::from_slice(&[0x1a, 0x00, 0xbc, 0x61, 0x4e]); in test_numbers2() 101 let value: error::Result<Value> = de::from_slice(&[0x39, 0x07, 0xde]); in test_numbers3() 107 let value: error::Result<Value> = de::from_slice(b"\xf4"); in test_bool() 113 let value: error::Result<Value> = de::from_slice(b"\xf4trailing"); in test_trailing_bytes() 119 let value: error::Result<Value> = de::from_slice(b"\x83\x01\x02\x03"); in test_list1() [all …]
|
D | enum.rs | 36 use serde_cbor::{from_slice, to_vec}; 63 let re: EnumStruct = from_slice(raw).unwrap(); in test_enum() 82 let re: ReprEnumStruct = from_slice(&to_vec(&repr_enum_struct).unwrap()).unwrap(); in test_repr_enum() 96 let re_a: DataEnum = from_slice(&to_vec(&data_enum_a).unwrap()).unwrap(); in test_data_enum() 99 let re_b: DataEnum = from_slice(&to_vec(&data_enum_b).unwrap()).unwrap(); in test_data_enum() 106 let re_c: DataEnum = from_slice(&to_vec(&data_enum_c).unwrap()).unwrap(); in test_data_enum() 129 assert_eq!(from_slice::<Newtype>(&[24, 142]).unwrap(), Newtype(142)); in test_newtype_struct() 141 let value: Vec<Foo> = from_slice(slice).unwrap(); in test_variable_length_array() 218 let empty_str_ds = from_slice(&empty_str_s).unwrap(); in test_enum_as_map() 221 let number_vec_ds = from_slice(&number_vec_s).unwrap(); in test_enum_as_map() [all …]
|
D | tags.rs | 4 use serde_cbor::{from_slice, to_vec}; 42 let value1: Value = from_slice(&bytes1).unwrap(); in tagged_cbor_roundtrip() 44 let value2: Value = from_slice(&bytes2).unwrap(); in tagged_cbor_roundtrip()
|
D | ser.rs | 48 use serde_cbor::{from_slice, to_vec}; 72 let test_object = from_slice(&vec[..]).unwrap(); in test_object() 93 let test_object = from_slice(&vec[..]).unwrap(); in test_object_list_keys() 123 let test_object = from_slice(&vec[..]).unwrap(); in test_object_object_keys() 195 let test_addr: Ipv4Addr = from_slice(&vec).unwrap(); in test_ip_addr() 252 assert_eq!(from_slice::<f32>(&vec[..]).unwrap(), 42.5f32); in test_half()
|
D | std_types.rs | 10 use serde_cbor::{from_reader, from_slice}; 28 let parsed: f64 = from_slice(&serialized[..]).unwrap(); 60 let parsed: $ty = from_slice(&serialized[..]).expect("de1 works"); 63 let parsed_from_packed: $ty = from_slice(packed).expect("parsing packed");
|
D | bennofs.rs | 43 let deserialized: Example = serde_cbor::from_slice(&serialized).expect("bennofs 2"); in test()
|
/external/crosvm/data_model/src/ |
D | lib.rs | 32 fn from_slice(data: &[u8]) -> Option<&Self> { in from_slice() method 85 match Self::from_slice(&aligned_data) { in from_reader() 156 let from_aligned = $T::from_slice(aligned_v); 167 let from_unaligned = $T::from_slice(unaligned_v);
|
/external/crosvm/linux_input_sys/src/ |
D | lib.rs | 62 let data_aligned = Aligner(*<[u8; input_event::SIZE]>::from_slice(data).unwrap()); in decode() 63 let e = Self::from_slice(&data_aligned.0).unwrap(); in decode() 89 let data_aligned = Aligner(*<[u8; virtio_input_event::SIZE]>::from_slice(data).unwrap()); in decode() 90 *Self::from_slice(&data_aligned.0).unwrap() in decode()
|
/external/rust/crates/serde_cbor/examples/ |
D | tags.rs | 65 let value1: Value = serde_cbor::from_slice(&bytes1)?; in main() 70 let value2: Value = serde_cbor::from_slice(&bytes2)?; in main() 73 let result: Bookmark = serde_cbor::from_slice(&bytes2)?; in main()
|
/external/rust/crates/uuid/src/ |
D | serde_support.rs | 62 Uuid::from_slice(value).map_err(de_error) in deserialize() 84 Uuid::from_slice(value).map_err(de_error) in deserialize() 109 let u = Uuid::from_slice(uuid_bytes).unwrap(); in test_serialize_compact()
|
/external/rust/crates/bytes/src/ |
D | serde.rs | 8 ($ty:ident, $visitor_ty:ident, $from_slice:ident, $from_vec:ident) => { 48 Ok($ty::$from_slice(v)) 64 Ok($ty::$from_slice(v.as_bytes()))
|
/external/rust/crates/nix/test/sys/ |
D | test_aio.rs | 55 let mut aiocb = AioCb::from_slice( f.as_raw_fd(), in test_cancel() 80 let mut aiocb = AioCb::from_slice(f.as_raw_fd(), in test_aio_cancel_all() 152 let mut wcb = AioCb::from_slice( f.as_raw_fd(), in test_aio_suspend() 298 let mut aiocb = AioCb::from_slice( f.as_raw_fd(), in test_read_immutable_buffer() 320 let mut aiocb = AioCb::from_slice( f.as_raw_fd(), in test_write() 434 let mut aiocb = AioCb::from_slice( 666, // An invalid file descriptor in test_write_error() 470 let mut aiocb = AioCb::from_slice( f.as_raw_fd(), in test_write_sigev_signal() 508 let wcb = AioCb::from_slice( f.as_raw_fd(), in test_liocb_listio_wait() 555 let wcb = AioCb::from_slice( f.as_raw_fd(), in test_liocb_listio_nowait() 611 let wcb = AioCb::from_slice( f.as_raw_fd(), in test_liocb_listio_signal() [all …]
|
D | test_uio.rs | 28 iovecs.push(IoVec::from_slice(b)); in test_writev() 144 IoVec::from_slice(&to_write[0..17]), in test_pwritev() 145 IoVec::from_slice(&to_write[17..64]), in test_pwritev() 146 IoVec::from_slice(&to_write[64..128]), in test_pwritev()
|
D | test_socket.rs | 275 let iov = [IoVec::from_slice(m)]; in gso() 346 let iov = [IoVec::from_slice(m)]; in udp_sendmmsg() 551 let iov = [IoVec::from_slice(b"hello")]; in test_scm_rights() 635 let iov = IoVec::from_slice(&payload); in test_af_alg_cipher() 643 let iov = IoVec::from_slice(&encrypted); in test_af_alg_cipher() 714 let iov = IoVec::from_slice(&payload); in test_af_alg_aead() 727 let iov = IoVec::from_slice(&encrypted); in test_af_alg_aead() 778 let iov = [IoVec::from_slice(&slice)]; in test_sendmsg_ipv4packetinfo() 836 let iov = [IoVec::from_slice(&slice)]; in test_sendmsg_ipv6packetinfo() 896 let iov = [IoVec::from_slice(&slice)]; in test_scm_rights_single_cmsg_multiple_fds() [all …]
|
D | test_aio_drop.rs | 23 let mut aiocb = AioCb::from_slice( f.as_raw_fd(), in test_drop()
|
/external/rust/crates/rusqlite/src/types/ |
D | serde_json.rs | 19 ValueRef::Text(s) => serde_json::from_slice(s), in column_result() 20 ValueRef::Blob(b) => serde_json::from_slice(b), in column_result()
|
/external/crosvm/src/plugin/ |
D | vcpu.rs | 104 vcpu.set_regs(&VcpuRegs::from_slice(state).ok_or(SysError::new(EINVAL))?.0) in set_vcpu_state() 107 vcpu.set_sregs(&VcpuSregs::from_slice(state).ok_or(SysError::new(EINVAL))?.0) in set_vcpu_state() 110 vcpu.set_fpu(&VcpuFpu::from_slice(state).ok_or(SysError::new(EINVAL))?.0) in set_vcpu_state() 113 &VcpuDebugregs::from_slice(state) in set_vcpu_state() 118 &VcpuXcregs::from_slice(state) in set_vcpu_state() 123 &VcpuLapicState::from_slice(state) in set_vcpu_state() 128 &VcpuMpState::from_slice(state) in set_vcpu_state() 133 &VcpuEvents::from_slice(state) in set_vcpu_state()
|
D | process.rs | 69 &VmPicState::from_slice(state) in set_vm_state() 75 &VmPicState::from_slice(state) in set_vm_state() 80 &VmIoapicState::from_slice(state) in set_vm_state() 85 &VmPitState::from_slice(state) in set_vm_state() 90 &VmClockState::from_slice(state) in set_vm_state()
|
/external/oss-fuzz/projects/serde_json/ |
D | build.sh | 21 cp fuzz/target/x86_64-unknown-linux-gnu/release/from_slice $OUT/
|
/external/rust/crates/nix/src/sys/ |
D | sendfile.rs | 55 headers.map(|s| s.iter().map(|b| IoVec::from_slice(b)).collect()); 57 trailers.map(|s| s.iter().map(|b| IoVec::from_slice(b)).collect());
|
/external/rust/crates/uuid/src/builder/ |
D | mod.rs | 240 pub fn from_slice(b: &[u8]) -> Result<Uuid, crate::Error> { in from_slice() method 347 pub fn from_slice(b: &[u8]) -> Result<Self, crate::Error> { in from_slice() method
|
/external/rust/crates/smallvec/src/ |
D | tests.rs | 616 assert_eq!(&SmallVec::<[u32; 2]>::from_slice(&[1][..])[..], [1]); in test_from_slice() 618 &SmallVec::<[u32; 2]>::from_slice(&[1, 2, 3][..])[..], in test_from_slice() 742 let mut sv: SmallVec<[i32; 5]> = SmallVec::from_slice(&[1, 2, 3, 3, 4]); in test_retain() 750 let mut sv: SmallVec<[i32; 3]> = SmallVec::from_slice(&[1, 2, 3, 3, 4]); in test_retain() 776 let mut dupes: SmallVec<[i32; 5]> = SmallVec::from_slice(&[1, 1, 2, 3, 3]); in test_dedup() 784 let mut all_ones: SmallVec<[i32; 5]> = SmallVec::from_slice(&[1, 1, 1, 1, 1]); in test_dedup() 788 let mut no_dupes: SmallVec<[i32; 5]> = SmallVec::from_slice(&[1, 2, 3, 4, 5]); in test_dedup()
|
/external/rust/crates/serde_cbor/src/ |
D | lib.rs | 298 pub use crate::de::from_slice;
|
/external/rust/crates/protobuf/src/ |
D | repeated.rs | 315 RepeatedField::from_slice(values) in from() 329 pub fn from_slice(values: &[T]) -> RepeatedField<T> { in from_slice() method 336 RepeatedField::from_slice(values.as_ref()) in from_ref()
|
/external/oss-fuzz/docs/getting-started/new-project-guide/ |
D | rust_lang.md | 83 cp fuzz/target/x86_64-unknown-linux-gnu/release/from_slice $OUT/ 89 the `from_slice` binary is the fuzz target.
|