Skip to content

ErlangBitstring

[Source]

A bitstring that is not a whole number of bytes.

used_bits_in_last_byte is 1..7 for a partial bitstring. Only those bits travel: the unused low bits of the last byte are cleared on construction, so a value always matches what comes back off the wire.

A bitstring that is a whole number of bytes is an ErlangBinary on the wire, and decodes as one. An empty value has no last byte to count, so it is stored as a whole byte too.

class val ErlangBitstring is
  Equatable[ErlangBitstring val] ref,
  Hashable ref

Implements


Constructors

create

[Source]

new val create(
  value': String val,
  used_bits_in_last_byte': U8 val = 8)
: ErlangBitstring val^

Parameters

  • value': String val
  • used_bits_in_last_byte': U8 val = 8

Returns


Public fields

let value: String val

[Source]


let used_bits_in_last_byte: U8 val

[Source]


Public Functions

eq

[Source]

fun box eq(
  that: ErlangBitstring val)
: Bool val

Parameters

Returns


hash

[Source]

fun box hash()
: USize val

Returns


ne

[Source]

fun box ne(
  that: ErlangBitstring val)
: Bool val

Parameters

Returns