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::Config
typedsnp_graph_core::dsnp::api_types::Update::DeletePage
typedsnp_graph_core::dsnp::api_types::DsnpKeys
typedsnp_graph_core::dsnp::dsnp_types::DsnpPublicKey
type- Output type for
dsnp_graph_core::dsnp::api_types::DsnpPublicKey
list - Output type for
dsnp_graph_core::dsnp::dsn_types::DsnpGraphEdge
list - Output type for
dsnp_graph_core::dsnp::dsn_types::DsnpUserId
list dsnp_graph_core::dsnp::api_types::GraphKeyPair
type- Output type for
dsnp_graph_core::dsnp::api_types::Update
dsnp_graph_core::dsnp::api_types::ImportBundle
typedsnp_graph_core::dsnp::api_types::KeyData
typedsnp_graph_core::dsnp::api_types::PageData
typedsnp_graph_core::dsnp::api_types::Update::PersistPage
typedsnp_graph_core::dsnp::api_types::SchemaConfig
type
Enums
- Different kind of actions that can be applied to the graph
Environment
type 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