Struct apint::BitWidth[][src]

pub struct BitWidth(_);

The BitWidth represents the length of an ApInt.

Its invariant restricts it to always be a positive, non-zero value. Code that built's on top of BitWidth may and should use this invariant.

Methods

impl BitWidth
[src]

Constructors ===========================================================================

Creates a BitWidth that represents a bit-width of 1 bit.

Creates a BitWidth that represents a bit-width of 8 bits.

Creates a BitWidth that represents a bit-width of 16 bits.

Creates a BitWidth that represents a bit-width of 32 bits.

Creates a BitWidth that represents a bit-width of 64 bits.

Creates a BitWidth that represents a bit-width of 128 bits.

Creates a BitWidth from the given usize.

Errors

  • If the given width is equal to zero.

impl BitWidth
[src]

API ===========================================================================

Converts this BitWidth into a usize.

Trait Implementations

impl Debug for BitWidth
[src]

Formats the value using the given formatter. Read more

impl Copy for BitWidth
[src]

impl Clone for BitWidth
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for BitWidth
[src]

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

This method tests for !=.

impl Eq for BitWidth
[src]

impl PartialOrd for BitWidth
[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 Ord for BitWidth
[src]

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Hash for BitWidth
[src]

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

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

impl From<usize> for BitWidth
[src]

Performs the conversion.

impl Serialize for BitWidth
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de> Deserialize<'de> for BitWidth
[src]

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

impl Send for BitWidth

impl Sync for BitWidth