workspaced.api

  • Declaration

    alias AsyncCallback = void delegate(Throwable, JSONValue);

  • Declaration

    enum long async;

    Will get called asynchronously (Must prepend AsyncCallback as argument)

  • Declaration

    enum long load;

    Will get called for loading components

  • Declaration

    enum long unload;

    Will get called for unloading components

  • any

    Declaration

    enum long any;

    Will call this function in any case (cmd: component)

  • Declaration

    enum long disabledFunc;

    Will never call this function

  • Declaration

    struct component;

    Component call

    • Declaration

      string name;

      Name of the component

  • Declaration

    struct Arguments;

    Will get called when some argument matches

    • Declaration

      Argument[] arguments;

      Arguments to match

  • Declaration

    struct CodeReplacement;

    Describes what to insert/replace/delete to do something

    • Declaration

      size_t[2] range;

      Range what to replace. If both indices are the same its inserting.

    • Declaration

      string content;

      Content to replace it with. Empty means remove.

    • Declaration

      string apply(string code);

      Applies this edit to a string.

  • Declaration

    struct FileChanges;

    Code replacements mapped to a file

    • Declaration

      string file;

      File path to change.

    • Declaration

      CodeReplacement[] replacements;

      Replacements to apply.

  • Declaration

    BroadcastCallback broadcastCallback;

    Broadcast callback which might get called by commands. For example when a component is outdated. Will be called in caller thread of function / while function executes.

  • Declaration

    BroadcastCallback crossThreadBroadcastCallback;

    Broadcast callback which might get called by commands. This callback will get called by all threads.

  • Declaration

    JSONValue syncBlocking(alias fn, alias sleepDur = 1.msecs, Args...)(Args args);

    Calls an asynchronous function and blocks until it returns using Thread.sleep

  • Declaration

    JSONValue syncYield(alias fn, Args...)(Args args);

    Calls an asynchronous function and blocks until it returns using Fiber.yield