Lines Matching refs:b
47 pub fn is_message(b: &[u8]) -> bool { in is_message()
48 b.len() >= MESSAGE_HEADER_SIZE && u32::from_be_bytes([b[4], b[5], b[6], b[7]]) == MAGIC_COOKIE in is_message()
105 fn add_to(&self, b: &mut Message) -> Result<()> { in add_to()
106 b.transaction_id = self.transaction_id; in add_to()
107 b.write_transaction_id(); in add_to()
210 for b in buf { in add()
211 *b = 0; in add()
306 let mut b = &buf[MESSAGE_HEADER_SIZE..full_size]; in decode() localVariable
310 if b.len() < ATTRIBUTE_HEADER_SIZE { in decode()
313 b.len(), in decode()
319 typ: compat_attr_type(u16::from_be_bytes([b[0], b[1]])), // first 2 bytes in decode()
320 length: u16::from_be_bytes([b[2], b[3]]), // second 2 bytes in decode()
326 b = &b[ATTRIBUTE_HEADER_SIZE..]; // slicing again to simplify value read in decode()
328 if b.len() < a_buff_l { in decode()
332 b.len(), in decode()
337 a.value = b[..a_l].to_vec(); in decode()
339 b = &b[a_buff_l..]; in decode()
378 pub fn clone_to(&self, b: &mut Message) -> Result<()> { in clone_to()
379 b.raw.clear(); in clone_to()
380 b.raw.extend_from_slice(&self.raw); in clone_to()
381 b.decode() in clone_to()
587 let b = method & METHOD_BBITS; // B = M * 0b0000000001110000 (3 bits after A) in value() localVariable
591 let method = a + (b << METHOD_BSHIFT) + (d << METHOD_DSHIFT); in value()
618 let b = (value >> METHOD_BSHIFT) & METHOD_BBITS; // B(M4-M6) in read_value() localVariable
620 let m = a + b + d; in read_value()