Struct beryl::crystal::Crystal [−][src]
#[repr(transparent)]pub struct Crystal(_);
Expand description
Wrapper struct over a u64
which provides functions to destructure a Crystal
Implementations
Create a Crystal from its raw parts
Example
let c = Crystal::from_parts(42, 42, 42).unwrap(); println!("{:?}", c);
Like Crystal::from_parts
, but doesn’t ensure each part is correctly sized
Trait Implementations
Because some serialization formats do not support unsigned integers, we provide conversion to
and from i64
. This is achieved using std::mem::transmute
, but is safe because we’re
using u64
to represent raw bits anyway.
Auto Trait Implementations
impl RefUnwindSafe for Crystal
impl UnwindSafe for Crystal
Blanket Implementations
Mutably borrows from an owned value. Read more