Lines Matching refs:u16
189 buf[2..4].copy_from_slice(&(v.len() as u16).to_be_bytes()); // L in add()
196 length: v.len() as u16, // L in add()
222 self.raw[2..4].copy_from_slice(&(self.length as u16).to_be_bytes()); in write_length()
279 let t = u16::from_be_bytes([buf[0], buf[1]]); // first 2 bytes in decode()
280 let size = u16::from_be_bytes([buf[2], buf[3]]) as usize; // second 2 bytes 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()
473 pub struct Method(u16);
543 const METHOD_ABITS: u16 = 0xf; // 0b0000000000001111
544 const METHOD_BBITS: u16 = 0x70; // 0b0000000001110000
545 const METHOD_DBITS: u16 = 0xf80; // 0b0000111110000000
547 const METHOD_BSHIFT: u16 = 1;
548 const METHOD_DSHIFT: u16 = 2;
550 const FIRST_BIT: u16 = 0x1;
551 const SECOND_BIT: u16 = 0x2;
553 const C0BIT: u16 = FIRST_BIT;
554 const C1BIT: u16 = SECOND_BIT;
556 const CLASS_C0SHIFT: u16 = 4;
557 const CLASS_C1SHIFT: u16 = 7;
574 pub fn value(&self) -> u16 { in value() argument
599 let c = self.class.0 as u16; in value()
608 pub fn read_value(&mut self, value: u16) { in read_value() argument