struct

BSONCr::ADocument

Inherits Struct < Value < Object

Constructors

new(bytes : Slice(UInt8))
Source

Instance methods

[](key : String) : Any::Value | Nil
Source
[]=(key : String, value : Any::Value | Any::Type)
Source
byte_size
Source
bytes
Source
bytes=(bytes : Bytes)
Source
count
Source
delete(key : String) : Any::Value | Nil
Source
delete(key : Int) : Any::Value | Nil
Source
delete(key : String, &)
Source
each_pair
Source
empty?
Source
inspect(io : IO)

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
Source
read_value(io, type_byte)
Source
skip_value(io, type_byte)
Source