Crate dsnp_graph_sdk_ffi
source ·Expand description
Graph SDK FFI Module
This module provides a C-compatible FFI (Foreign Function Interface) layer for the Graph SDK. This FFI layer allows you to call Graph SDK functions from C, C++, or other programming languages that support FFI.
Usage
To use the FFI layer, you need to build the dynamic library (e.g., .so, .dylib, or .dll) by adding
the appropriate configuration to Cargo.toml. Then, include the generated dynamic library and
the C header file dsnp_graph_sdk_ffi.h in your C, C++, or other FFI-compatible projects.
Structs
dsnp_graph_config::Configtypedsnp_graph_core::dsnp::api_types::Update::DeletePagetypedsnp_graph_core::dsnp::api_types::DsnpKeystypedsnp_graph_core::dsnp::dsnp_types::DsnpPublicKeytype- Output type for
dsnp_graph_core::dsnp::api_types::DsnpPublicKeylist - Output type for
dsnp_graph_core::dsnp::dsn_types::DsnpGraphEdgelist - Output type for
dsnp_graph_core::dsnp::dsn_types::DsnpUserIdlist dsnp_graph_core::dsnp::api_types::GraphKeyPairtype- Output type for
dsnp_graph_core::dsnp::api_types::Update dsnp_graph_core::dsnp::api_types::ImportBundletypedsnp_graph_core::dsnp::api_types::KeyDatatypedsnp_graph_core::dsnp::api_types::PageDatatypedsnp_graph_core::dsnp::api_types::Update::PersistPagetypedsnp_graph_core::dsnp::api_types::SchemaConfigtype
Enums
- Different kind of actions that can be applied to the graph
Environmenttype forConfig
Functions
- Get error code from graph error
- Get error message from graph error
- Free GraphError
- Free error message
- Free graph config
- Free GraphConnections
- Free GraphConnectionsWithoutKeys
- Free DsnpPublicKeys
- Free graph state
- Free GraphStates
- Free GraphUpdates
- Get the graph config for the given environment
- Get total graph states in GRAPH_STATES collection
- Safety
- Apply actions to graph state
- Commit pending actions to a graph state
- Check if a given state contains user graph
- Returns the deserialized dsnp keys
- Export updates from graph state
- Export updates from graph state
- Force recalculate graph updates from graph state
- Get connections for user from graph state
- Get user connections without keys from graph state
- Get one sided private friendship connections for a user from graph state
- Get a list of published and imported public keys associated with a user
- Import users data to graph state
- Remove user from graph state
- Rollback pending actions in a graph state
- Count of users in current graph state
- Initialize a graph state with the given environment