Pudu programming language
Menu
API reference

Std.Bits.width

14 declarations with this name

fn

width: &T -> Int where T: Bits

This is a callable function.

What it does

How many bits a value's type has.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (Int)

width: &Int -> Int

This declaration implements the function for one concrete type.

What it does

One implementation per integer width, each reporting its own. Int and

UInt report the target's pointer width, which is the one place the target

shows through into the library.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (Int128)

width: &Int128 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (Int16)

width: &Int16 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (Int32)

width: &Int32 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (Int64)

width: &Int64 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (Int8)

width: &Int8 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (trait Bits)

width: &Self -> Int

This declaration defines a function required by a trait.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Self means the concrete type that implements this trait.

fn (UInt)

width: &UInt -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (UInt128)

width: &UInt128 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (UInt16)

width: &UInt16 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (UInt32)

width: &UInt32 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (UInt64)

width: &UInt64 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

fn (UInt8)

width: &UInt8 -> Int

This declaration implements the function for one concrete type.

What it does

Return the fixed number of bits stored by this integer type.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

Back to Std.BitsSearch related declarations