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 ===========================================================================

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Creates a BitWidth from the given usize.

Errors

  • If the given width is equal to zero.

impl BitWidth
[src]

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

[src]

Converts this BitWidth into a usize.

Trait Implementations

impl Debug for BitWidth
[src]

[src]

Formats the value using the given formatter. Read more

impl Copy for BitWidth
[src]

impl Clone for BitWidth
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for BitWidth
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for BitWidth
[src]

impl PartialOrd for BitWidth
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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]

[src]

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

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Hash for BitWidth
[src]

[src]

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

1.3.0
[src]

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

impl From<usize> for BitWidth
[src]

[src]

Performs the conversion.

impl Serialize for BitWidth
[src]

[src]

Serialize this value into the given Serde serializer. Read more

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

[src]

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

impl Send for BitWidth

impl Sync for BitWidth