Struct yapb::Counter256
source · pub struct Counter256 { /* private fields */ }
Expand description
A spinner that cycles through 256 states by counting in binary using braille
Examples
let mut spinner = Counter256::new();
assert_eq!(format!("{}", spinner), "⠀");
spinner.step(0x0F);
assert_eq!(format!("{}", spinner), "⡇");
spinner.step(0xF0);
assert_eq!(format!("{}", spinner), "⣿");
Implementations
sourceimpl Counter256
impl Counter256
Trait Implementations
sourceimpl Clone for Counter256
impl Clone for Counter256
sourcefn clone(&self) -> Counter256
fn clone(&self) -> Counter256
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Counter256
impl Debug for Counter256
sourceimpl Display for Counter256
impl Display for Counter256
sourceimpl Ord for Counter256
impl Ord for Counter256
sourcefn cmp(&self, other: &Counter256) -> Ordering
fn cmp(&self, other: &Counter256) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Counter256> for Counter256
impl PartialEq<Counter256> for Counter256
sourcefn eq(&self, other: &Counter256) -> bool
fn eq(&self, other: &Counter256) -> bool
sourceimpl PartialOrd<Counter256> for Counter256
impl PartialOrd<Counter256> for Counter256
sourcefn partial_cmp(&self, other: &Counter256) -> Option<Ordering>
fn partial_cmp(&self, other: &Counter256) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl Spinner for Counter256
impl Spinner for Counter256
impl Copy for Counter256
impl Eq for Counter256
impl StructuralEq for Counter256
impl StructuralPartialEq for Counter256
Auto Trait Implementations
impl RefUnwindSafe for Counter256
impl Send for Counter256
impl Sync for Counter256
impl Unpin for Counter256
impl UnwindSafe for Counter256
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more