graphflo 0.1.0

The graphflo plugin for libflo.
Documentation
use { libflo, libflo_module, serde_json };

error_chain! {
    types { }

    links {
        LibfloError(libflo::Error, libflo::ErrorKind);
        LibfloModuleError(libflo_module::Error, libflo_module::ErrorKind);
    }

    foreign_links {
        SerdeJsonError(serde_json::Error);
    }

    errors {
        ConnectorNotFound(node_index: usize, node_connector_index: usize) {
            description("The node connector does not exist.")
            display(
                "{}{}{}{}{}",
                "The node connector, '",
                node_connector_index,
                "', does not exist on node, '",
                node_index,
                "'."
            )
        }

        ConstructEventNotPassedLibflo {
            description("The object passed to the construct event cannot be cast into an 'Libflo'.")
            display(
                "{}",
                "The object passed to the construct event cannot be cast into an 'Libflo'."
            )
        }

        EnvironmentIsIncorrectType {
            description("The graphflo environment cannot be downcasted. It is not the correct type.")
            display("The graphflo environment cannot be downcasted. It is not the correct type.")
        }

        EnvironmentNeverSet {
            description("The graphflo environment was never set.")
            display("The graphflo environment was never set.")
        }

        LockError(error_text: String) {
            description("Error acquiring lock.")
            display(
                "{}",
                error_text
            )
        }

        NoNodeConnectorFound(connector_index: usize) {
            description("Node connector could not be found.")
            display(
                "{}{}{}",
                "Node connector with index, '",
                connector_index,
                "', could not be found."
            )
        }

        NoNodeDescFound(node_desc_index: usize) {
            description("Node description could not be found.")
            display(
                "{}{}{}",
                "Node description with index, '",
                node_desc_index,
                "', could not be found."
            )
        }

        NoNodeFound(node_index: usize) {
            description("No node could be found with the requested index.")
            display(
                "{}{}{}",
                "No node could be found with the requested index, '",
                node_index,
                "'."
            )
        }

        ResourcesDeserializationFailure(resources_text: String) {
            description("Error deserializing resources text.")
            display(
                "{}{}{}",
                "Error deserializing resources text:\n",
                resources_text,
                "\nThe resources text could not be deserialized.",
            )
        }
    }
}