(buf: &mut &[u8])
| 817 | |
| 818 | impl Quotient { |
| 819 | pub fn put(&self, buf: &mut Vec<u8>) { |
| 820 | self.kind.put_ser(buf); |
| 821 | put_u64(self.lvls, buf); |
| 822 | put_expr(&self.typ, buf); |
| 823 | } |
| 824 | |
| 825 | pub fn get(buf: &mut &[u8]) -> Result<Self, String> { |
| 826 | let kind = QuotKind::get_ser(buf)?; |
| 827 | let lvls = get_u64(buf)?; |
| 828 | let typ = get_expr(buf)?; |
| 829 | Ok(Quotient { kind, lvls, typ }) |
no test coverage detected