Struct bigwise::Bw64 [] [src]

pub struct Bw64(_);

A Bigwise type composed of 64 bits.

Wraps a u64

Trait Implementations

impl Copy for Bw64
[src]

impl Clone for Bw64
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Bw64
[src]

impl PartialEq for Bw64
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for Bw64
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for Bw64
[src]

Returns the "default value" for a type. Read more

impl Ord for Bw64
[src]

This method returns an Ordering between self and other. Read more

impl PartialOrd for Bw64
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Bigwise for Bw64
[src]

Number of bits stored.

A value with all bits set to 0.

A value with all bits set to 1.

Creates a value based on raw data. Read more

The content of the value as raw bytes. Read more

The boolean value of the given bit. Read more

Assigns a boolean value to a given bit. Read more

Rotates all the bits n positions to the left. Read more

Rotates all the bits n positions to the right. Read more

impl Rand for Bw64
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl Debug for Bw64
[src]

The sequence of zeroes and ones, the MSB (most significant bit) appearing on the left.

Formats the value using the given formatter.

impl BitAnd for Bw64
[src]

The resulting type after applying the & operator

The method for the & operator

impl BitOr for Bw64
[src]

The resulting type after applying the | operator

The method for the | operator

impl BitXor for Bw64
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl Not for Bw64
[src]

The resulting type after applying the ! operator

The method for the unary ! operator

impl Shl<u32> for Bw64
[src]

The resulting type after applying the << operator

The method for the << operator

impl Shr<u32> for Bw64
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl IntoIterator for Bw64
[src]

An iterator over the bits.

Bits are iterated from the least significant one to the most significant one.

Examples

use bigwise::{Bigwise, Bw64};
let b = Bw64::from_bytes(&[0b11111000]);
let mut it = b.into_iter();
assert_eq!(Some(false), it.next());
assert_eq!(Some(false), it.next());
assert_eq!(Some(false), it.next());
assert_eq!(Some(true), it.next());
assert_eq!(Some(true), it.next());
assert_eq!(Some(true), it.next());
assert_eq!(Some(true), it.next());
assert_eq!(Some(true), it.next());
assert_eq!(Some(false), it.next());
assert_eq!(Some(false), it.next());
assert!(it.take(200).all(|v| v == false));

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more