dolor.types.string¶
String-related types.
- class String(max_length, *, prefix: dolor.types.type.Type = None, encoding=None)[source]¶
Bases:
dolor.types.type.TypeA string.
- Parameters
max_length (
int) – The maximum length of the string. By default32767.prefix (subclass of
Type, optional) – The type at the start of the data that tells how many bytes to read to get the string data. By defaultVarInt.encoding (
str, optional) – What encoding to use for parsing the string data. By default"utf-8".
- max_length = 32767¶
- prefix¶
alias of
dolor.types.numeric.VarInt
- encoding = 'utf-8'¶
- class Json[source]¶
Bases:
dolor.types.type.TypeJSON data.
Wraps
json.loads()and json.dumps andString.
- class Identifier[source]¶
Bases:
dolor.types.type.TypeAn identifier for a resource location.
- class Identifier(id=None)[source]¶
Bases:
objectThe value type of
Identifier.- Parameters
id (
str, optional) –The namespaced location.
See https://wiki.vg/Protocol#Identifier for details.