Thrift::Protocol::BaseProtocol
Inherits Reference < Object
BaseProtocol outlines how values are to be encoded
Constants
Constructors
Instance methods
Reads a Thrift Binary (Thrift String without encoding). In Crystal 1.5.2 and onward, all Strings will be returned with an Encoding of BINARY.
Returns a String.
Reads a Thrift String. In Crystal 1.5.2 and onward, all Strings will be returned with an Encoding of UTF-8.
Returns a String.
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.
Writes a Thrift Binary (Thrift String with no encoding). In Crystal 1.5.2 and onward
buf - The Bytes to write
Returns nothing.
Writes a Thrift String. In Crystal 1.5.2 and onward, the String passed will be transcoded to UTF-8.
str - The String to write.
Raises EncodingError if the transcoding to UTF-8 fails.
Returns nothing.