TLV::Any
Inherits Struct < Value < Object
Constructors
from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : Any
Parse a single TLV element from IO
from_tlv(data : Bytes) : Any
Sourcenew(header : Header, value : Types | Arrays | List | Structure)
Sourcenew(value : Nil, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Create TLV::Any from Crystal values
new(value : Bool, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Sourcenew(value : Int8, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Signed integers - use minimum-size encoding
new(value : UInt8, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Unsigned integers - use minimum-size encoding
new(value : Float32, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Sourcenew(value : Float64, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Sourcenew(value : String, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Sourcenew(value : Bytes, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Sourcenew(value : Structure, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil) : Any
Sourcenew(value : Int16, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil, *, fixed_size : Bool = false) : Any
Sourcenew(value : Int32, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil, *, fixed_size : Bool = false) : Any
Sourcenew(value : Int64, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil, *, fixed_size : Bool = false) : Any
Sourcenew(value : UInt16, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil, *, fixed_size : Bool = false) : Any
Sourcenew(value : UInt32, tag : Nil | UInt8 | Tuple(UInt16, UInt16) | Tuple(UInt16, UInt16, UInt16) = nil, *, fixed_size : Bool = false) : Any
SourceInstance methods
[]?(tag : TagId) : Any | Nil
Sourceas_bool
Sourceas_bool?
Sourceas_bytes
Sourceas_bytes?
Sourceas_f32
Sourceas_f32?
Sourceas_f64
Sourceas_f64?
Sourceas_i16
Sourceas_i16?
Sourceas_i32
Sourceas_i32?
Sourceas_i64
Sourceas_i64?
Sourceas_i8
Sourceas_list
Sourceas_list?
Sourceas_nil
Sourceas_nil?
Sourceas_s
Sourceas_s?
Sourceas_structure
Sourceas_structure?
Sourceas_u16
Sourceas_u16?
Sourceas_u32
Sourceas_u32?
Sourceas_u64
Sourceas_u64?
Sourceas_u8
Sourceas_u8?
Sourceheader
Sourceto_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::LittleEndian) : Nil
Write TLV element to IO
to_tlv
Sourcevalue
Source