Lines Matching refs:bytes
234 use bytes::{Bytes, BytesMut};
238 let mut bytes = Bytes::from_static(&[0x00]); in test_channel_type_unmarshal_success() localVariable
239 let channel_type = ChannelType::unmarshal(&mut bytes)?; in test_channel_type_unmarshal_success()
247 let mut bytes = Bytes::from_static(&[0x11]); in test_channel_type_unmarshal_invalid() localVariable
248 match ChannelType::unmarshal(&mut bytes) { in test_channel_type_unmarshal_invalid()
265 let mut bytes = Bytes::from_static(&[]); in test_channel_type_unmarshal_unexpected_end_of_buffer() localVariable
266 match ChannelType::unmarshal(&mut bytes) { in test_channel_type_unmarshal_unexpected_end_of_buffer()
302 let bytes = buf.freeze(); in test_channel_type_marshal() localVariable
303 assert_eq!(&bytes[..], &[0x00]); in test_channel_type_marshal()
319 let mut bytes = Bytes::from_static(&MARSHALED_BYTES); in test_channel_open_unmarshal_success() localVariable
321 let channel_open = DataChannelOpen::unmarshal(&mut bytes)?; in test_channel_open_unmarshal_success()
333 let mut bytes = Bytes::from_static(&[ in test_channel_open_unmarshal_invalid_channel_type() localVariable
340 match DataChannelOpen::unmarshal(&mut bytes) { in test_channel_open_unmarshal_invalid_channel_type()
357 let mut bytes = Bytes::from_static(&[0x00; 5]); in test_channel_open_unmarshal_unexpected_end_of_buffer() localVariable
358 match DataChannelOpen::unmarshal(&mut bytes) { in test_channel_open_unmarshal_unexpected_end_of_buffer()
379 let mut bytes = Bytes::from_static(&[ in test_channel_open_unmarshal_unexpected_length_mismatch() localVariable
386 match DataChannelOpen::unmarshal(&mut bytes) { in test_channel_open_unmarshal_unexpected_length_mismatch()
434 let bytes = buf.freeze(); in test_channel_open_marshal() localVariable
437 assert_eq!(&bytes[..], &MARSHALED_BYTES); in test_channel_open_marshal()