Struct apint::ApInt [] [src]

pub struct ApInt { /* fields omitted */ }

An arbitrary precision integer with modulo arithmetics similar to machine integers.

Methods

impl ApInt
[src]

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

[src]

Creates a new ApInt from the given Bit value with a bit width of 1.

This function is generic over types that are convertible to Bit such as bool.

[src]

Creates a new ApInt from a given i8 value with a bit-width of 8.

[src]

Creates a new ApInt from a given u8 value with a bit-width of 8.

[src]

Creates a new ApInt from a given i16 value with a bit-width of 16.

[src]

Creates a new ApInt from a given u16 value with a bit-width of 16.

[src]

Creates a new ApInt from a given i32 value with a bit-width of 32.

[src]

Creates a new ApInt from a given u32 value with a bit-width of 32.

[src]

Creates a new ApInt from a given i64 value with a bit-width of 64.

[src]

Creates a new ApInt from a given u64 value with a bit-width of 64.

[src]

Creates a new ApInt from a given i128 value with a bit-width of 64.

[src]

Creates a new ApInt from a given u128 value with a bit-width of 64.

[src]

Creates a new ApInt with the given bit width that represents zero.

[src]

Creates a new ApInt with the given bit width that represents one.

[src]

Creates a new ApInt with the given bit width that has all bits unset.

Note: This is equal to calling ApInt::zero with the given width.

[src]

Creates a new ApInt with the given bit width that has all bits set.

[src]

Returns the smallest unsigned ApInt that can be represented by the given BitWidth.

[src]

Returns the largest unsigned ApInt that can be represented by the given BitWidth.

[src]

Returns the smallest signed ApInt that can be represented by the given BitWidth.

[src]

Returns the largest signed ApInt that can be represented by the given BitWidth.

impl ApInt
[src]

[src]

Assigns rhs to this ApInt.

This mutates digits and may affect the bitwidth of self which might result in an expensive operations.

After this operation rhs and self are equal to each other.

[src]

Strictly assigns rhs to this ApInt.

After this operation rhs and self are equal to each other.

Note: Strict assigns protect against mutating the bit width of self and thus return an error instead of executing a probably expensive assign operation.

Errors

  • If rhs and self have unmatching bit widths.

impl ApInt
[src]

Casting: Truncation & Extension =======================================================================

[src]

Tries to truncate this ApInt inplace to the given target_width and returns the result.

Note

  • This is useful for method chaining.
  • For more details look into truncate.

Errors

  • If the target_width is greater than the current width.

[src]

Tries to strictly truncate this ApInt inplace to the given target_width and returns the result.

Note

  • This is useful for method chaining.
  • For more details look into strict_truncate.

Errors

  • If target_width is equal to or greater than the bitwidth of the given ApInt.

[src]

Tries to truncate this ApInt inplace to the given target_width.

Note

  • This is a no-op if self.width() and target_width are equal.
  • This operation is inplace as long as self.width() and target_width require the same amount of digits for their representation.

Errors

  • If the target_width is greater than the current width.

[src]

Tries to strictly truncate this ApInt inplace to the given target_width.

Note

  • Strict truncation means that the resulting ApInt is ensured to have a smaller BitWidth than before this operation.
  • For more details look into truncate.

Errors

  • If target_width is equal to or greater than the bitwidth of the given ApInt.

[src]

Tries to zero-extend this ApInt inplace to the given target_width and returns the result.

Note

  • This is useful for method chaining.
  • For more details look into zero_extend.

Errors

  • If the target_width is less than the current width.

[src]

Tries to strictly zero-extend this ApInt inplace to the given target_width and returns the result.

Note

Errors

  • If target_width is equal to or greater than the bitwidth of the given ApInt.

[src]

Tries to zero-extend this ApInt inplace to the given target_width.

Note

  • This is a no-op if self.width() and target_width are equal.
  • This operation is inplace as long as self.width() and target_width require the same amount of digits for their representation.

Errors

  • If the target_width is less than the current width.

[src]

Tries to strictly zero-extends this ApInt inplace to the given target_width.

Note

  • Strict zero-extension means that the resulting ApInt is ensured to have a larger BitWidth than before this operation.
  • For more details look into zero_extend.

Errors

  • If target_width is equal to or greater than the bitwidth of the given ApInt.

[src]

Tries to sign-extend this ApInt inplace to the given target_width and returns the result.

Note

  • This is useful for method chaining.
  • For more details look into sign_extend.

Errors

  • If the target_width is less than the current width.

[src]

Tries to strictly sign-extend this ApInt inplace to the given target_width and returns the result.

Note

Errors

  • If target_width is equal to or greater than the bitwidth of the given ApInt.

[src]

Tries to sign-extend this ApInt inplace to the given target_width.

Note

  • This is a no-op if self.width() and target_width are equal.
  • This operation is inplace as long as self.width() and target_width require the same amount of digits for their representation.

Errors

  • If the target_width is less than the current width.

[src]

Tries to strictly sign-extends this ApInt inplace to the given target_width.

Note

  • Strict sign-extension means that the resulting ApInt is ensured to have a larger BitWidth than before this operation.
  • For more details look into sign_extend.

Errors

  • If target_width is equal to or greater than the bitwidth of the given ApInt.

[src]

Zero-resizes this ApInt to the given target_width and returns the result.

Note

  • This is useful for method chaining.
  • For more details look into zero_resize.

[src]

Tries to strictly zero-resize this ApInt to the given target_width and returns the result.

Note

Errors

  • If target_width is equal to the bitwidth of the given ApInt.

[src]

Sign-resizes this ApInt to the given target_width and returns the result.

Note

  • This is useful for method chaining.
  • For more details look into sign_resize.

[src]

Tries to strictly sign-resize this ApInt to the given target_width and returns the result.

Note

Errors

  • If target_width is equal to the bitwidth of the given ApInt.

[src]

Zero-resizes the given ApInt inplace.

Note

This operation will forward to

  • truncate if target_width is less than or equal to the width of the given ApInt
  • zero_extend otherwise

[src]

Strictly zero-resizes the given ApInt inplace.

Note

This operation will forward to

Errors

  • If target_width is equal to the bitwidth of the given ApInt.

[src]

Sign-resizes the given ApInt inplace.

Note

This operation will forward to

  • truncate if target_width is less than or equal to the width of the given ApInt
  • sign_extend otherwise

[src]

Strictly sign-resizes the given ApInt inplace.

Note

This operation will forward to

Errors

  • If target_width is equal to the bitwidth of the given ApInt.

impl ApInt
[src]

Utility & Helper Methods ===========================================================================

[src]

Returns true if this ApInt represents the value zero (0).

Note

  • Zero (0) is also called the additive neutral element.
  • This operation is more efficient than comparing two instances of ApInt for the same reason.

[src]

Returns true if this ApInt represents the value one (1).

Note

  • One (1) is also called the multiplicative neutral element.
  • This operation is more efficient than comparing two instances of ApInt for the same reason.

[src]

Returns true if this ApInt represents an even number.

[src]

Returns true if this ApInt represents an odd number.

impl ApInt
[src]

Bitwise Operations ===========================================================================

[src]

Flip all bits of this ApInt inplace.

[src]

Tries to bit-and assign this ApInt inplace to rhs and returns the result.

Note: This forwards to checked_bitand.

Errors

If self and rhs have unmatching bit widths.

[src]

Bit-and assigns all bits of this ApInt with the bits of rhs.

Note: This operation is inplace of self and won't allocate memory.

Errors

If self and rhs have unmatching bit widths.

[src]

Tries to bit-and assign this ApInt inplace to rhs and returns the result.

Note: This forwards to checked_bitor.

Errors

If self and rhs have unmatching bit widths.

[src]

Bit-or assigns all bits of this ApInt with the bits of rhs.

Note: This operation is inplace of self and won't allocate memory.

Errors

If self and rhs have unmatching bit widths.

[src]

Tries to bit-xor assign this ApInt inplace to rhs and returns the result.

Note: This forwards to checked_bitxor.

Errors

If self and rhs have unmatching bit widths.

[src]

Bit-xor assigns all bits of this ApInt with the bits of rhs.

Note: This operation is inplace of self and won't allocate memory.

Errors

If self and rhs have unmatching bit widths.

impl ApInt
[src]

Bitwise Access ===========================================================================

[src]

Returns the bit at the given bit position pos.

This returns

  • Bit::Set if the bit at pos is 1
  • Bit::Unset otherwise

Errors

  • If pos is not a valid bit position for the width of this ApInt.

[src]

Sets the bit at the given bit position pos to one (1).

Errors

  • If pos is not a valid bit position for the width of this ApInt.

[src]

Sets the bit at the given bit position pos to zero (0).

Errors

  • If pos is not a valid bit position for the width of this ApInt.

[src]

Flips the bit at the given bit position pos.

Note

  • If the bit at the given position was 0 it will be 1 after this operation and vice versa.

Errors

  • If pos is not a valid bit position for the width of this ApInt.

[src]

Sets all bits of this ApInt to one (1).

[src]

Returns``trueif all bits in theApInt` are set.

[src]

Sets all bits of this ApInt to zero (0).

[src]

Returns true if all bits in the ApInt are unset.

[src]

Flips all bits of this ApInt.

[src]

Returns the sign bit of this ApInt.

Note: This is equal to the most significant bit of this ApInt.

[src]

Sets the sign bit of this ApInt to one (1).

[src]

Sets the sign bit of this ApInt to zero (0).

[src]

Flips the sign bit of this ApInt.

Note

  • If the sign bit was 0 it will be 1 after this operation and vice versa.
  • Depending on the interpretation of the ApInt this operation changes its signedness.

impl ApInt
[src]

Bitwise utility methods. ===========================================================================

[src]

Returns the number of ones in the binary representation of this ApInt.

[src]

Returns the number of zeros in the binary representation of this ApInt.

[src]

Returns the number of leading zeros in the binary representation of this ApInt.

[src]

Returns the number of trailing zeros in the binary representation of this ApInt.

impl ApInt
[src]

Relational Operations =======================================================================

[src]

Unsigned less-than (ult) comparison between self and rhs.

Note

  • Returns Ok(true) if self < rhs.
  • Interprets both ApInt instances as unsigned values.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Unsigned less-equals (ule) comparison between self and rhs.

Note

  • Returns Ok(true) if self <= rhs.
  • Interprets both ApInt instances as unsigned values.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Unsigned greater-than (ugt) comparison between self and rhs.

Note

  • Returns Ok(true) if self > rhs.
  • Interprets both ApInt instances as unsigned values.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Unsigned greater-equals (uge) comparison between self and rhs.

Note

  • Returns Ok(true) if self >= rhs.
  • Interprets both ApInt instances as unsigned values.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Signed less-than (slt) comparison between self and rhs.

Note

  • Returns Ok(true) if self < rhs.
  • Interprets both ApInt instances as signed values.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Signed less-equals (sle) comparison between self and rhs.

Note

  • Returns Ok(true) if self <= rhs.
  • Interprets both ApInt instances as signed values.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Signed greater-than (sgt) comparison between self and rhs.

Note

  • Returns Ok(true) if self > rhs.
  • Interprets both ApInt instances as signed values.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Signed greater-equals (sge) comparison between self and rhs.

Note

  • Returns Ok(true) if self >= rhs.
  • Interprets both ApInt instances as signed values.

Errors

  • If self and rhs have unmatching bit widths.

impl ApInt
[src]

Arithmetic Operations =======================================================================

[src]

Negates this ApInt inplace and returns the result.

Note: This will not allocate memory.

[src]

Negates this ApInt inplace.

Note: This will not allocate memory.

[src]

Adds rhs to self and returns the result.

Note: This will not allocate memory.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Add-assigns rhs to self inplace.

Note: This will not allocate memory.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Subtracts rhs from self and returns the result.

Note

In the low-level bit-wise representation there is no difference between signed and unsigned subtraction of fixed bit-width integers. (Cite: LLVM)

Errors

  • If self and rhs have unmatching bit widths.

[src]

Subtract-assigns rhs from self inplace.

Note

In the low-level bit-wise representation there is no difference between signed and unsigned subtraction of fixed bit-width integers. (Cite: LLVM)

Errors

  • If self and rhs have unmatching bit widths.

[src]

Multiplies rhs with self and returns the result.

Note

In the low-level bit-wise representation there is no difference between signed and unsigned multiplication of fixed bit-width integers. (Cite: LLVM)

Errors

  • If self and rhs have unmatching bit widths.

[src]

Multiply-assigns rhs to self inplace.

Note

In the low-level bit-wise representation there is no difference between signed and unsigned multiplication of fixed bit-width integers. (Cite: LLVM)

Errors

  • If self and rhs have unmatching bit widths.

[src]

Divides self by rhs using unsigned interpretation and returns the result.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Assignes self to the division of self by rhs using unsigned interpretation of the values.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Divides self by rhs using signed interpretation and returns the result.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Assignes self to the division of self by rhs using signed interpretation of the values.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Calculates the unsigned remainder of self by rhs and returns the result.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Assignes self to the unsigned remainder of self by rhs.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Calculates the signed remainder of self by rhs and returns the result.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

[src]

Assignes self to the signed remainder of self by rhs.

Note

  • This operation will not allocate memory and computes inplace of self.
  • In the low-level machine abstraction signed division and unsigned division are two different operations.

Errors

  • If self and rhs have unmatching bit widths.

impl ApInt
[src]

Shift Operations =======================================================================

[src]

Shift this ApInt left by the given shift_amount bits.

This operation is inplace and will not allocate memory.

Errors

  • If the given shift_amount is invalid for the bit width of this ApInt.

[src]

Shift this ApInt left by the given shift_amount bits and returns the result.

This operation is inplace and will not allocate memory.

Errors

  • If the given shift_amount is invalid for the bit width of this ApInt.

[src]

Logically right-shifts this ApInt by the given shift_amount bits.

This operation is inplace and will not allocate memory.

Errors

  • If the given shift_amount is invalid for the bit width of this ApInt.

[src]

Logically right-shifts this ApInt by the given shift_amount bits and returns the result.

This operation is inplace and will not allocate memory.

Errors

  • If the given shift_amount is invalid for the bit width of this ApInt.

[src]

Arithmetically right-shifts this ApInt by the given shift_amount bits.

This operation is inplace and will not allocate memory.

Note

Arithmetic shifting copies the sign bit instead of filling up with zeros.

Errors

  • If the given shift_amount is invalid for the bit width of this ApInt.

[src]

Arithmetically right-shifts this ApInt by the given shift_amount bits and returns the result.

This operation is inplace and will not allocate memory.

Note

Arithmetic shifting copies the sign bit instead of filling up with zeros.

Errors

  • If the given shift_amount is invalid for the bit width of this ApInt.

impl ApInt
[src]

Deserialization =======================================================================

[src]

Parses the given input String with the given Radix and returns an ApInt with the given target_width BitWidth.

Note: The given input is parsed as big-endian value. This means, the most significant bit (MSB) is the leftst bit in the string representation provided by the user.

The string is assumed to contain no whitespace and contain only values within a subset of the range of 0..9 and a..z depending on the given radix.

The string is assumed to have no sign as ApInt does not handle signdness.

Errors

  • If input is empty.
  • If input is not a valid representation for an ApInt for the given radix.
  • If input has trailing zero characters (0), e.g. "0042" instead of "42".
  • If input represents an ApInt value that does not fit into the given target_bitwidth.

Examples

let a = ApInt::from_str_radix(10, "42");      // ok
let b = ApInt::from_str_radix( 2, "1011011"); // ok (dec. = 91)
let c = ApInt::from_str_radix(16, "ffcc00");  // ok (dec. = 16763904)
let c = ApInt::from_str_radix(10, "256");     // Error: 256 does not fit within 8 bits!
let d = ApInt::from_str_radix( 2, "01020");   // Error: Invalid digit '2' at position 3 for given radix.
let e = ApInt::from_str_radix(16, "hello");   // Error: "hello" is not a valid ApInt representation!

impl ApInt
[src]

Serialization =======================================================================

[src]

Returns a String representation of the binary encoded ApInt for the given Radix.

impl ApInt
[src]

Operations to lossful cast to primitive number types. =======================================================================

[src]

Resizes this ApInt to a bool primitive type.

Bits in this ApInt that are not within the bounds of the bool are being ignored.

Note

  • Basically this returns true if the least significant bit of this ApInt is 1 and false otherwise.

[src]

Resizes this ApInt to a i8 primitive type.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 8 bits the value is sign extended to the target bit width.
  • All bits but the least significant 8 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a u8 primitive type.

Note

  • All bits but the least significant 8 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a i16 primitive type.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 16 bits the value is sign extended to the target bit width.
  • All bits but the least significant 16 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a u16 primitive type.

Note

  • All bits but the least significant 16 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a i32 primitive type.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 32 bits the value is sign extended to the target bit width.
  • All bits but the least significant 32 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a u32 primitive type.

Note

  • All bits but the least significant 32 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a i64 primitive type.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 64 bits the value is sign extended to the target bit width.
  • All bits but the least significant 64 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a u64 primitive type.

Note

  • All bits but the least significant 64 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a i128 primitive type.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 128 bits the value is sign extended to the target bit width.
  • All bits but the least significant 128 bits are being ignored by this operation to construct the result.

[src]

Resizes this ApInt to a u128 primitive type.

Note

  • All bits but the least significant 128 bits are being ignored by this operation to construct the result.

impl ApInt
[src]

Operations to lossless cast to primitive number types. =======================================================================

[src]

Tries to represent the value of this ApInt as a bool.

Note

This returns true if the value represented by this ApInt is 1, returns false if the value represented by this ApInt is 0 and returns an error otherwise.

Errors

  • If the value represented by this ApInt can not be represented by a bool.

[src]

Tries to represent the value of this ApInt as a i8.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 8 bits the value is sign extended to the target bit width.
  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u8.

Errors

  • If the value represented by this ApInt can not be represented by a i8.

[src]

Tries to represent the value of this ApInt as a u8.

Note

  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u8.

Errors

  • If the value represented by this ApInt can not be represented by a u8.

[src]

Tries to represent the value of this ApInt as a i16.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 16 bits the value is sign extended to the target bit width.
  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u16.

Errors

  • If the value represented by this ApInt can not be represented by a i16.

[src]

Tries to represent the value of this ApInt as a u16.

Note

  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u16.

Errors

  • If the value represented by this ApInt can not be represented by a u16.

[src]

Tries to represent the value of this ApInt as a i32.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 32 bits the value is sign extended to the target bit width.
  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u32.

Errors

  • If the value represented by this ApInt can not be represented by a i32.

[src]

Tries to represent the value of this ApInt as a u32.

Note

  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u32.

Errors

  • If the value represented by this ApInt can not be represented by a u32.

[src]

Tries to represent the value of this ApInt as a i64.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 64 bits the value is sign extended to the target bit width.
  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u64.

Errors

  • If the value represented by this ApInt can not be represented by a i64.

[src]

Tries to represent the value of this ApInt as a u64.

Note

  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u64.

Errors

  • If the value represented by this ApInt can not be represented by a u64.

[src]

Tries to represent the value of this ApInt as a i128.

Note

  • This operation will conserve the signedness of the value. This means that for ApInt instances with a BitWidth less than 128 bits the value is sign extended to the target bit width.
  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u128.

Errors

  • If the value represented by this ApInt can not be represented by a i128.

[src]

Tries to represent the value of this ApInt as a u128.

Note

  • This conversion is possible as long as the value represented by this ApInt does not exceed the maximum value of u128.

Complexity

  • 𝒪(n) where n is the number of digits of this ApInt.

Errors

  • If the value represented by this ApInt can not be represented by a u128.

impl ApInt
[src]

Random Utilities using rand crate. =======================================================================

[src]

Creates a new ApInt with the given BitWidth and random Digits.

[src]

Creates a new ApInt with the given BitWidth and random Digits using the given random number generator.

Note: This is useful for cryptographic or testing purposes.

[src]

Randomizes the digits of this ApInt inplace.

This won't change its BitWidth.

[src]

Randomizes the digits of this ApInt inplace using the given random number generator.

This won't change its BitWidth.

Trait Implementations

impl Drop for ApInt
[src]

[src]

Executes the destructor for this type. Read more

impl<B> From<B> for ApInt where
    B: Into<Bit>, 
[src]

[src]

Performs the conversion.

impl From<u8> for ApInt
[src]

[src]

Performs the conversion.

impl From<i8> for ApInt
[src]

[src]

Performs the conversion.

impl From<u16> for ApInt
[src]

[src]

Performs the conversion.

impl From<i16> for ApInt
[src]

[src]

Performs the conversion.

impl From<u32> for ApInt
[src]

[src]

Performs the conversion.

impl From<i32> for ApInt
[src]

[src]

Performs the conversion.

impl From<u64> for ApInt
[src]

[src]

Performs the conversion.

impl From<i64> for ApInt
[src]

[src]

Performs the conversion.

impl From<u128> for ApInt
[src]

[src]

Performs the conversion.

impl From<i128> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 2]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 2]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 3]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 3]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 4]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 4]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 5]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 5]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 6]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 6]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 7]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 7]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 8]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 8]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 16]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 16]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[i64; 32]> for ApInt
[src]

[src]

Performs the conversion.

impl From<[u64; 32]> for ApInt
[src]

[src]

Performs the conversion.

impl Clone for ApInt
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for ApInt
[src]

[src]

Formats the value using the given formatter. Read more

impl Hash for ApInt
[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 Width for ApInt
[src]

[src]

Returns the BitWidth of this ApInt.

impl Not for ApInt
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl<'a> BitAnd<&'a ApInt> for ApInt
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a, 'b> BitAnd<&'a ApInt> for &'b ApInt
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a, 'b> BitAnd<&'a ApInt> for &'b mut ApInt
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a> BitOr<&'a ApInt> for ApInt
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a, 'b> BitOr<&'a ApInt> for &'b ApInt
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a, 'b> BitOr<&'a ApInt> for &'b mut ApInt
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a> BitXor<&'a ApInt> for ApInt
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a, 'b> BitXor<&'a ApInt> for &'b ApInt
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a, 'b> BitXor<&'a ApInt> for &'b mut ApInt
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a> BitAndAssign<&'a ApInt> for ApInt
[src]

[src]

Performs the &= operation.

impl<'a> BitOrAssign<&'a ApInt> for ApInt
[src]

[src]

Performs the |= operation.

impl<'a> BitXorAssign<&'a ApInt> for ApInt
[src]

[src]

Performs the ^= operation.

impl PartialEq for ApInt
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Eq for ApInt
[src]

impl Neg for ApInt
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a> Neg for &'a ApInt
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a> Neg for &'a mut ApInt
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a> Add<&'a ApInt> for ApInt
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, 'b> Add<&'a ApInt> for &'b ApInt
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> AddAssign<&'a ApInt> for ApInt
[src]

[src]

Performs the += operation.

impl<'a> Sub<&'a ApInt> for ApInt
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, 'b> Sub<&'a ApInt> for &'b ApInt
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a> SubAssign<&'a ApInt> for ApInt
[src]

[src]

Performs the -= operation.

impl<'a> Mul<&'a ApInt> for ApInt
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, 'b> Mul<&'a ApInt> for &'b ApInt
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> MulAssign<&'a ApInt> for ApInt
[src]

[src]

Performs the *= operation.

impl Serialize for ApInt
[src]

[src]

Serialize this value into the given Serde serializer. Read more

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

[src]

Deserialize this value from the given Serde deserializer. Read more

impl Send for ApInt
[src]

ApInt is safe to send between threads since it does not own aliasing memory and has no reference counting mechanism like Rc.

impl Sync for ApInt
[src]

ApInt is safe to share between threads since it does not own aliasing memory and has no mutable internal state like Cell or RefCell.

impl From<ApInt> for UInt
[src]

[src]

Performs the conversion.

impl From<ApInt> for Int
[src]

[src]

Performs the conversion.

Auto Trait Implementations