class GLib::Variant
- GLib::Variant
- Reference
- Object
Defined in:
lib/gi-crystal/src/bindings/g_lib/variant.crConstructors
- .new(ptr : Pointer(Void), transfer : GICrystal::Transfer)
- .new(value)
-
.parse(text : String) : Variant
Parses a GVariant from a text representation.
Instance Method Summary
-
#==(other : Variant) : Bool
Returns true if other variant have the same type and value of this variant.
- #as_bool : Bool
- #as_bool? : Bool | Nil
- #as_f : Float64
- #as_f64 : Float64
- #as_f64? : Float64 | Nil
- #as_f? : Float64 | Nil
- #as_i : Int32
- #as_i16 : Int16
- #as_i16? : Int16 | Nil
- #as_i32 : Int32
- #as_i32? : Int32 | Nil
- #as_i64 : Int64
- #as_i64? : Int64 | Nil
- #as_i? : Int32 | Nil
- #as_s : String
- #as_s? : String | Nil
- #as_u : UInt32
- #as_u16 : UInt16
- #as_u16? : UInt16 | Nil
- #as_u32 : UInt32
- #as_u32? : UInt32 | Nil
- #as_u64 : UInt64
- #as_u64? : UInt64 | Nil
- #as_u8 : UInt8
- #as_u8? : UInt8 | Nil
- #as_u? : UInt32 | Nil
- #as_variant : GLib::Variant
- #as_variant? : GLib::Variant | Nil
- #classify : VariantClass
- #finalize
- #raw
-
#to_s(io : IO, type_annotate : Bool)
ditto
-
#to_s(type_annotate : Bool)
Pretty-prints value in the format understood by
#parse
. -
#to_s(io : IO)
ditto
- #type : GLib::VariantType
- #type_string : String
Constructor Detail
Parses a GVariant from a text representation.
Instance Method Detail
Returns true if other variant have the same type and value of this variant.
Pretty-prints value in the format understood by #parse
.