pub struct BintCell {
pub cell: Cell<u8>,
pub boundary: u8,
}
Expand description
BintCell
: A bounded integer captured in a Cell
.
Allows for Bint functionality in a single entity.
Usage:
use bint::BintCell;
let b = BintCell::new(6);
b.down();
assert_eq!(5, b.value());
b.up();
b.up();
b.up();
assert_eq!(2, b.value());
Fields§
§cell: Cell<u8>
§boundary: u8
Implementations§
Trait Implementations§
source§impl PartialEq for BintCell
impl PartialEq for BintCell
impl Eq for BintCell
impl StructuralPartialEq for BintCell
Auto Trait Implementations§
impl !Freeze for BintCell
impl !RefUnwindSafe for BintCell
impl Send for BintCell
impl !Sync for BintCell
impl Unpin for BintCell
impl UnwindSafe for BintCell
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more