dscord.types.base

Undocumented in source.

Public Imports

dscord.util.json
public import dscord.util.json;
Undocumented in source.
std.datetime
public import std.datetime;
Undocumented in source.

Members

Aliases

Snowflake
alias Snowflake = ulong
Undocumented in source.

Classes

AsyncChainer
class AsyncChainer(T)
Undocumented in source.
IModel
class IModel

Base class for all models. Provides a simple interface definition and some utility constructor code.

ModelMap
class ModelMap(TKey, TValue)

A utility wrapper around an associative array that stores models.

Functions

loadMany
void loadMany(Client client, JSON obj, void delegate(T) F)

Utility method that loads many of a model T off of a fast JSON object. Calls the delegate f for each member loaded, returning nothing.

loadManyArray
T[] loadManyArray(Client client, JSON obj)

Utility method which loads many of a model T off of a fast JSON object. Returns an array of model T objects.

loadManyComplex
void loadManyComplex(TSub sub, JSON obj, void delegate(T) F)

Utility method that loads many of a model T off of a fast JSON object, passing in a sub-type TSub as the first argument to the constructor. Calls the delegate f for each member loaded, returning nothing.

readSnowflake
Snowflake readSnowflake(JSON obj)

Utility method which reads a Snowflake off of a fast JSON object.

toString
string toString(Snowflake s)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixin templates

Model
mixintemplate Model()

Base template for all models. Provides utility methods for AsyncChaining and a base constructor that calls the parent IModel constructor.

Meta