Lines Matching refs:Bytes
6 use bytes::{Bytes, BytesMut};
17 let raw_pkt = Bytes::from_static(&[ in test_basic()
35 payload: Bytes::from_static(&[0xFF, 0xFF, 0xFF, 0xFF]), in test_basic()
39 payload: Bytes::from_static(&[0x98, 0x36, 0xbe, 0x88, 0x9e]), in test_basic()
79 let mut missing_extension_pkt = Bytes::from_static(&[ in test_extension()
89 let mut invalid_extension_length_pkt = Bytes::from_static(&[ in test_extension()
106 payload: Bytes::from_static(&[0]), in test_extension()
110 payload: Bytes::from_static(&[]), in test_extension()
128 let raw_pkt = Bytes::from_static(&[ in test_padding()
153 payload: Bytes::from_static(&[3, 4]), in test_packet_marshal_unmarshal()
157 payload: Bytes::from_static(&[5, 6]), in test_packet_marshal_unmarshal()
162 payload: Bytes::from_static(&[0xFFu8; 15]), in test_packet_marshal_unmarshal()
175 let raw_pkt = Bytes::from_static(&[ in test_rfc_8285_one_byte_extension()
189 payload: Bytes::from_static(&[0xAA]), in test_rfc_8285_one_byte_extension()
217 let raw_pkt = Bytes::from_static(&[ in test_rfc_8285_one_byte_two_extension_of_two_bytes()
226 let ext1_expect = Bytes::from_static(&[0xAA]); in test_rfc_8285_one_byte_two_extension_of_two_bytes()
234 let ext2_expect = Bytes::from_static(&[0xBB]); in test_rfc_8285_one_byte_two_extension_of_two_bytes()
250 payload: Bytes::from_static(&[0xAA]), in test_rfc_8285_one_byte_two_extension_of_two_bytes()
254 payload: Bytes::from_static(&[0xBB]), in test_rfc_8285_one_byte_two_extension_of_two_bytes()
288 let mut raw_pkt = Bytes::from_static(&[ in test_rfc_8285_one_byte_multiple_extensions_with_padding()
301 let ext1_expect = Bytes::from_static(&[0xAA]); in test_rfc_8285_one_byte_multiple_extensions_with_padding()
309 let ext2_expect = Bytes::from_static(&[0xBB, 0xBB]); in test_rfc_8285_one_byte_multiple_extensions_with_padding()
317 let ext3_expect = Bytes::from_static(&[0xCC, 0xCC, 0xCC, 0xCC]); in test_rfc_8285_one_byte_multiple_extensions_with_padding()
381 payload: Bytes::from_static(&[0xAA]), in test_rfc_8285_one_byte_multiple_extension()
385 payload: Bytes::from_static(&[0xBB, 0xBB]), in test_rfc_8285_one_byte_multiple_extension()
389 payload: Bytes::from_static(&[0xCC, 0xCC]), in test_rfc_8285_one_byte_multiple_extension()
413 let raw_pkt = Bytes::from_static(&[ in test_rfc_8285_two_byte_extension()
429 payload: Bytes::from_static(&[ in test_rfc_8285_two_byte_extension()
465 let mut raw_pkt = Bytes::from_static(&[ in test_rfc8285_two_byte_multiple_extension_with_padding()
474 let ext_expect = Some(Bytes::from_static(&[])); in test_rfc8285_two_byte_multiple_extension_with_padding()
481 let ext_expect = Some(Bytes::from_static(&[0xBB])); in test_rfc8285_two_byte_multiple_extension_with_padding()
488 let ext_expect = Some(Bytes::from_static(&[0xCC, 0xCC, 0xCC, 0xCC])); in test_rfc8285_two_byte_multiple_extension_with_padding()
516 let raw_pkt = Bytes::from_static(&[ in test_rfc8285_two_byte_multiple_extension_with_large_extension()
531 payload: Bytes::from_static(&[]), in test_rfc8285_two_byte_multiple_extension_with_large_extension()
535 payload: Bytes::from_static(&[0xBB]), in test_rfc8285_two_byte_multiple_extension_with_large_extension()
539 payload: Bytes::from_static(&[ in test_rfc8285_two_byte_multiple_extension_with_large_extension()
566 let payload = Bytes::from_static(&[ in test_rfc8285_get_extension_returns_nil_when_extension_disabled()
595 let payload = Bytes::from_static(&[ in test_rfc8285_del_extension()
606 payload: Bytes::from_static(&[0xAA]), in test_rfc8285_del_extension()
637 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_get_extension_ids()
647 payload: Bytes::from_static(&[0xAA]), in test_rfc8285_get_extension_ids()
651 payload: Bytes::from_static(&[0xBB]), in test_rfc8285_get_extension_ids()
683 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_get_extension_ids_return_empty_when_extension_disabled()
705 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_del_extension_returns_error_when_extenstions_disabled()
730 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_one_byte_set_extension_should_enable_extension_when_adding()
747 let extension = Bytes::from_static(&[0xAAu8, 0xAA]); in test_rfc8285_one_byte_set_extension_should_enable_extension_when_adding()
769 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_set_extension_should_set_correct_extension_profile_for_16_byte_extension()
786 let extension = Bytes::from_static(&[ in test_rfc8285_set_extension_should_set_correct_extension_profile_for_16_byte_extension()
801 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_set_extension_should_update_existing_extension()
810 payload: Bytes::from_static(&[0xAA]), in test_rfc8285_set_extension_should_update_existing_extension()
829 let extension = Bytes::from_static(&[0xBBu8]); in test_rfc8285_set_extension_should_update_existing_extension()
842 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_one_byte_set_extension_should_error_when_invalid_id_provided()
851 payload: Bytes::from_static(&[0xAA]), in test_rfc8285_one_byte_set_extension_should_error_when_invalid_id_provided()
866 .set_extension(0, Bytes::from_static(&[0xBBu8])) in test_rfc8285_one_byte_set_extension_should_error_when_invalid_id_provided()
872 .set_extension(15, Bytes::from_static(&[0xBBu8])) in test_rfc8285_one_byte_set_extension_should_error_when_invalid_id_provided()
880 let reserved_id_pkt = Bytes::from_static(&[ in test_rfc8285_one_byte_extension_terminate_processing_when_reserved_id_encountered()
900 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_one_byte_set_extension_should_error_when_payload_too_large()
909 payload: Bytes::from_static(&[0xAAu8]), in test_rfc8285_one_byte_set_extension_should_error_when_payload_too_large()
924 Bytes::from_static(&[ in test_rfc8285_one_byte_set_extension_should_error_when_payload_too_large()
937 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_two_bytes_set_extension_should_enable_extension_when_adding()
955 let extension = Bytes::from_static(&[ in test_rfc8285_two_bytes_set_extension_should_enable_extension_when_adding()
982 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_two_byte_set_extension_should_update_existing_extension()
991 payload: Bytes::from_static(&[0xAA]), in test_rfc8285_two_byte_set_extension_should_update_existing_extension()
1006 Some(Bytes::from_static(&[0xAA])), in test_rfc8285_two_byte_set_extension_should_update_existing_extension()
1010 let extension = Bytes::from_static(&[ in test_rfc8285_two_byte_set_extension_should_update_existing_extension()
1023 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc8285_two_byte_set_extension_should_error_when_payload_too_large()
1032 payload: Bytes::from_static(&[0xAA]), in test_rfc8285_two_byte_set_extension_should_error_when_payload_too_large()
1047 Bytes::from_static(&[ in test_rfc8285_two_byte_set_extension_should_error_when_payload_too_large()
1077 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc3550_set_extension_should_error_when_non_zero()
1086 payload: Bytes::from_static(&[0xAA]), in test_rfc3550_set_extension_should_error_when_non_zero()
1099 p.header.set_extension(0, Bytes::from_static(&[0xBB]))?; in test_rfc3550_set_extension_should_error_when_non_zero()
1103 Some(Bytes::from_static(&[0xBB])), in test_rfc3550_set_extension_should_error_when_non_zero()
1111 let payload = Bytes::from_static(&[0x98u8, 0x36, 0xbe, 0x88, 0x9e]); in test_rfc3550_set_extension_should_error_when_setting_non_zero_id()
1129 let res = p.header.set_extension(1, Bytes::from_static(&[0xBB])); in test_rfc3550_set_extension_should_error_when_setting_non_zero_id()
1136 input: Bytes,
1146 input: Bytes::from_static(&[ in test_unmarshal_error_handling()
1157 input: Bytes::from_static(&[ in test_unmarshal_error_handling()
1168 input: Bytes::from_static(&[ in test_unmarshal_error_handling()
1179 input: Bytes::from_static(&[ in test_unmarshal_error_handling()
1191 input: Bytes::from_static(&[ in test_unmarshal_error_handling()
1214 let raw_pkt = Bytes::from_static(&[ in test_round_trip()