Document Pu128
.
And move the `repr` line after the `derive` line, where it's harder to overlook. (I overlooked it initially, and didn't understand how this type worked.)
This commit is contained in:
parent
55b6ff8e41
commit
d7814e72eb
1 changed files with 3 additions and 1 deletions
|
@ -3,8 +3,10 @@ use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
#[repr(packed(8))]
|
/// A packed 128-bit integer. Useful for reducing the size of structures in
|
||||||
|
/// some cases.
|
||||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
|
#[repr(packed(8))]
|
||||||
pub struct Pu128(pub u128);
|
pub struct Pu128(pub u128);
|
||||||
|
|
||||||
impl Pu128 {
|
impl Pu128 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue