Ton.Bitstring (ton v0.2.0)

Defines an array of bits. Data structure used in cells

Link to this section Summary

Link to this section Types

@type t() :: %Ton.Bitstring{
  array: [non_neg_integer()],
  cursor: non_neg_integer(),
  length: non_neg_integer()
}

Link to this section Functions

Link to this function

available(bitstring)

@spec available(t()) :: non_neg_integer()
Link to this function

get_bit(bitstring, bit_number)

@spec get_bit(t(), non_neg_integer()) :: boolean()
Link to this function

get_top_upped_array(bitstring)

@spec get_top_upped_array(t()) :: binary()
Link to this function

get_top_upped_length(bitstring)

@spec get_top_upped_length(t()) :: non_neg_integer()
Link to this function

new(length \\ 1023)

@spec new(non_neg_integer()) :: t()
Link to this function

off_bit(bitstring, bit_number)

@spec off_bit(t(), non_neg_integer()) :: t()
Link to this function

on_bit(bitstring, bit_number)

@spec on_bit(t(), non_neg_integer()) :: t()
Link to this function

set_top_upped_array(binary_data, fullfilled_bytes \\ true)

@spec set_top_upped_array(binary(), boolean()) :: t() | no_return()
Link to this function

write_address(bitstring, address)

@spec write_address(t(), Ton.Address.t() | nil) :: t()
Link to this function

write_binary(bitstring, data)

@spec write_binary(t(), binary()) :: t()
Link to this function

write_bistring(bitstring, second_bitstring)

@spec write_bistring(t(), t()) :: t()
Link to this function

write_bit(bitstring, value)

@spec write_bit(t(), boolean() | non_neg_integer()) :: t()
Link to this function

write_coins(bitstring, value)

@spec write_coins(t(), non_neg_integer()) :: t()
Link to this function

write_uint8(bitstring, value)

@spec write_uint8(t(), non_neg_integer()) :: t()
Link to this function

write_uint(bitstring, value, bit_length)

@spec write_uint(t(), non_neg_integer(), non_neg_integer()) :: t()