Searched refs:slice (Results 1 – 5 of 5) sorted by relevance
/smoltcp-0.9.1/src/storage/ |
D | ring_buffer.rs | 326 let slice = self.get_unallocated(offset, data.len()); in write_unallocated() localVariable 327 let slice_len = slice.len(); in write_unallocated() 328 slice.copy_from_slice(&data[..slice_len]); in write_unallocated() 332 let slice = self.get_unallocated(offset, data.len()); in write_unallocated() localVariable 333 let slice_len = slice.len(); in write_unallocated() 334 slice.copy_from_slice(&data[..slice_len]); in write_unallocated() 381 let slice = self.get_allocated(offset, data.len()); in read_allocated() localVariable 382 data[..slice.len()].copy_from_slice(slice); in read_allocated() 383 (slice.len(), offset + slice.len(), &mut data[slice.len()..]) in read_allocated() 386 let slice = self.get_allocated(offset, data.len()); in read_allocated() localVariable [all …]
|
/smoltcp-0.9.1/src/socket/ |
D | raw.rs | 552 let mut slice = [0; 4]; localVariable 553 assert_eq!(socket.recv_slice(&mut slice[..]), Ok(4)); 554 assert_eq!(&slice, &$packet[..slice.len()]); 577 let mut slice = [0; 4]; localVariable 578 assert_eq!(socket.peek_slice(&mut slice[..]), Ok(4)); 579 assert_eq!(&slice, &$packet[..slice.len()]); 580 assert_eq!(socket.recv_slice(&mut slice[..]), Ok(4)); 581 assert_eq!(&slice, &$packet[..slice.len()]); 582 assert_eq!(socket.peek_slice(&mut slice[..]), Err(RecvError::Exhausted));
|
D | udp.rs | 718 let mut slice = [0; 4]; in test_recv_truncated_slice() localVariable 719 assert_eq!(socket.recv_slice(&mut slice[..]), Ok((4, REMOTE_END))); in test_recv_truncated_slice() 720 assert_eq!(&slice, b"abcd"); in test_recv_truncated_slice() 732 let mut slice = [0; 4]; in test_peek_truncated_slice() localVariable 733 assert_eq!(socket.peek_slice(&mut slice[..]), Ok((4, &REMOTE_END))); in test_peek_truncated_slice() 734 assert_eq!(&slice, b"abcd"); in test_peek_truncated_slice() 735 assert_eq!(socket.recv_slice(&mut slice[..]), Ok((4, REMOTE_END))); in test_peek_truncated_slice() 736 assert_eq!(&slice, b"abcd"); in test_peek_truncated_slice() 737 assert_eq!(socket.peek_slice(&mut slice[..]), Err(RecvError::Exhausted)); in test_peek_truncated_slice()
|
D | tcp.rs | 2282 fn write_str(&mut self, slice: &str) -> fmt::Result { in write_str() 2283 let slice = slice.as_bytes(); in write_str() localVariable 2284 if self.send_slice(slice) == Ok(slice.len()) { in write_str()
|
/smoltcp-0.9.1/src/wire/ |
D | tcp.rs | 321 if let TcpOption::SackRange(slice) = option { 322 return Ok(slice); 715 &TcpOption::SackRange(slice) => { in emit() 717 slice in emit() 859 TcpOption::SackRange(slice) => sack_ranges = slice, in parse() 1035 …TcpOption::SackRange(slice) => write!(f, " sACKr{slice:?}")?, // debug print conveniently includes… in fmt()
|