-
- Downloads
Remove ByteOrder generic methods from Buf and BufMut (#187)
* make Buf and BufMut usable as trait objects - All the `get_*` and `put_*` methods that take `T: ByteOrder` have a `where Self: Sized` bound added, so that they are only usable from sized types. It was impossible to make `Buf` or `BufMut` into trait objects before, so this change doesn't break anyone. - Add `get_n_be`/`get_n_le`/`put_n_be`/`put_n_le` methods that can be used on trait objects. - Deprecate the export of `ByteOrder` and methods generic on it. * remove deprecated ByteOrder methods Removes the `_be` suffix from all methods, implying that the default people should use is network endian.
Showing
- src/buf/buf.rs 287 additions, 51 deletionssrc/buf/buf.rs
- src/buf/buf_mut.rs 297 additions, 51 deletionssrc/buf/buf_mut.rs
- src/buf/into_buf.rs 4 additions, 4 deletionssrc/buf/into_buf.rs
- src/lib.rs 2 additions, 4 deletionssrc/lib.rs
- tests/test_buf.rs 3 additions, 3 deletionstests/test_buf.rs
- tests/test_buf_mut.rs 2 additions, 2 deletionstests/test_buf_mut.rs
Loading
Please register or sign in to comment