Lines Matching refs:off

60         let src = &$b.buf[$b.off..];
69 let off = (mem::size_of::<$ty>() - len) as isize; localVariable
71 ptr::copy_nonoverlapping(src.as_ptr(), dst.offset(off), len);
82 $b.off += $len;
92 if $b.buf.len() < $b.off + len {
99 let dst = &mut $b.buf[$b.off..($b.off + len)];
103 let off = (mem::size_of::<$ty>() - len) as isize; localVariable
105 ptr::copy_nonoverlapping(src.offset(off), dst.as_mut_ptr(), len);
108 $b.off += $len;
127 off: usize, field
136 Octets { buf, off: 0 } in with_slice()
212 buf: &self.buf[self.off..self.off + len], in get_bytes()
213 off: 0, in get_bytes()
216 self.off += len; in get_bytes()
252 buf: &self.buf[self.off..self.off + len], in peek_bytes()
253 off: 0, in peek_bytes()
265 Ok(&self.buf[self.off..self.off + len]) in slice()
280 self.buf.len() - self.off in cap()
289 pub fn off(&self) -> usize { in off() method
290 self.off in off()
306 &self.buf[self.off..] in as_ref()
316 off: usize, field
325 OctetsMut { buf, off: 0 } in with_slice()
473 buf: &self.buf[self.off..self.off + len], in get_bytes()
474 off: 0, in get_bytes()
477 self.off += len; in get_bytes()
490 buf: &mut self.buf[self.off..self.off + len], in get_bytes_mut()
491 off: 0, in get_bytes_mut()
494 self.off += len; in get_bytes_mut()
530 buf: &self.buf[self.off..self.off + len], in peek_bytes()
531 off: 0, in peek_bytes()
545 buf: &mut self.buf[self.off..self.off + len], in peek_bytes_mut()
546 off: 0, in peek_bytes_mut()
567 self.off += len; in put_bytes()
573 pub fn split_at(&mut self, off: usize) -> Result<(OctetsMut, OctetsMut)> { in split_at()
574 if self.len() < off { in split_at()
578 let (left, right) = self.buf.split_at_mut(off); in split_at()
580 let first = OctetsMut { buf: left, off: 0 }; in split_at()
582 let last = OctetsMut { buf: right, off: 0 }; in split_at()
593 Ok(&mut self.buf[self.off..self.off + len]) in slice()
608 self.buf.len() - self.off in cap()
617 pub fn off(&self) -> usize { in off() method
618 self.off in off()
634 &self.buf[self.off..] in as_ref()
640 &mut self.buf[self.off..] in as_mut()
683 assert_eq!(b.off(), 0); in get_u()
687 assert_eq!(b.off(), 1); in get_u()
691 assert_eq!(b.off(), 3); in get_u()
695 assert_eq!(b.off(), 6); in get_u()
699 assert_eq!(b.off(), 10); in get_u()
703 assert_eq!(b.off(), 18); in get_u()
720 assert_eq!(b.off(), 0); in get_u_mut()
724 assert_eq!(b.off(), 1); in get_u_mut()
728 assert_eq!(b.off(), 3); in get_u_mut()
732 assert_eq!(b.off(), 6); in get_u_mut()
736 assert_eq!(b.off(), 10); in get_u_mut()
740 assert_eq!(b.off(), 18); in get_u_mut()
755 assert_eq!(b.off(), 0); in peek_u()
759 assert_eq!(b.off(), 0); in peek_u()
763 assert_eq!(b.off(), 0); in peek_u()
776 assert_eq!(b.off(), 0); in peek_u_mut()
780 assert_eq!(b.off(), 0); in peek_u_mut()
784 assert_eq!(b.off(), 0); in peek_u_mut()
796 assert_eq!(b.off(), 0); in get_bytes()
800 assert_eq!(b.off(), 5); in get_bytes()
804 assert_eq!(b.off(), 8); in get_bytes()
808 assert_eq!(b.off(), 8); in get_bytes()
812 assert_eq!(b.off(), 10); in get_bytes()
822 assert_eq!(b.off(), 0); in get_bytes_mut()
826 assert_eq!(b.off(), 5); in get_bytes_mut()
830 assert_eq!(b.off(), 8); in get_bytes_mut()
834 assert_eq!(b.off(), 8); in get_bytes_mut()
838 assert_eq!(b.off(), 10); in get_bytes_mut()
848 assert_eq!(b.off(), 0); in peek_bytes()
852 assert_eq!(b.off(), 0); in peek_bytes()
856 assert_eq!(b.off(), 0); in peek_bytes()
866 assert_eq!(b.off(), 0); in peek_bytes_mut()
870 assert_eq!(b.off(), 0); in peek_bytes_mut()
874 assert_eq!(b.off(), 0); in peek_bytes_mut()
885 assert_eq!(b.off(), 8); in get_varint()
891 assert_eq!(b.off(), 4); in get_varint()
897 assert_eq!(b.off(), 2); in get_varint()
903 assert_eq!(b.off(), 2); in get_varint()
909 assert_eq!(b.off(), 1); in get_varint()
918 assert_eq!(b.off(), 8); in get_varint_mut()
924 assert_eq!(b.off(), 4); in get_varint_mut()
930 assert_eq!(b.off(), 2); in get_varint_mut()
936 assert_eq!(b.off(), 2); in get_varint_mut()
942 assert_eq!(b.off(), 1); in get_varint_mut()
952 assert_eq!(b.off(), 8); in put_varint()
962 assert_eq!(b.off(), 4); in put_varint()
972 assert_eq!(b.off(), 2); in put_varint()
982 assert_eq!(b.off(), 1); in put_varint()
992 assert_eq!(b.off(), 0); in put_varint()
1013 assert_eq!(b.off(), 0); in put_u()
1017 assert_eq!(b.off(), 1); in put_u()
1021 assert_eq!(b.off(), 3); in put_u()
1025 assert_eq!(b.off(), 6); in put_u()
1029 assert_eq!(b.off(), 10); in put_u()
1033 assert_eq!(b.off(), 18); in put_u()
1051 assert_eq!(b.off(), 0); in put_bytes()
1056 assert_eq!(b.off(), 5); in put_bytes()
1071 assert_eq!(b.off(), 0); in split()
1076 assert_eq!(b.off(), 5); in split()
1079 let off = b.off(); in split() localVariable
1081 let (first, last) = b.split_at(off).unwrap(); in split()
1083 assert_eq!(first.off(), 0); in split()
1087 assert_eq!(last.off(), 0); in split()