Struct dsnp_graph_config::Config
source · pub struct Config {
pub sdk_max_stale_friendship_days: u32,
pub max_graph_page_size_bytes: u32,
pub max_page_id: u32,
pub max_key_page_size_bytes: u32,
pub schema_map: HashMap<SchemaId, SchemaConfig>,
pub graph_public_key_schema_id: SchemaId,
pub dsnp_versions: Vec<DsnpVersion>,
}
Expand description
Config This is used to configure the graph state
Fields§
§sdk_max_stale_friendship_days: u32
Maximum number of days a friendship can be stale before it is removed
max_graph_page_size_bytes: u32
Maximum size of a graph page in bytes
max_page_id: u32
Maximum page id
max_key_page_size_bytes: u32
Maximum size of a key page in bytes
schema_map: HashMap<SchemaId, SchemaConfig>
Schema map
graph_public_key_schema_id: SchemaId
GraphKeyPair schema_id
dsnp_versions: Vec<DsnpVersion>
DSNP versions
Implementations§
source§impl Config
impl Config
sourcepub fn get_dsnp_version_from_schema_id(
&self,
schema_id: SchemaId
) -> Option<DsnpVersion>
pub fn get_dsnp_version_from_schema_id( &self, schema_id: SchemaId ) -> Option<DsnpVersion>
Returns the DSNP version for the given schema id
sourcepub fn get_connection_type_from_schema_id(
&self,
schema_id: SchemaId
) -> Option<ConnectionType>
pub fn get_connection_type_from_schema_id( &self, schema_id: SchemaId ) -> Option<ConnectionType>
Returns the connection type for the given schema id
sourcepub fn get_schema_id_from_connection_type(
&self,
connection_type: ConnectionType
) -> Option<SchemaId>
pub fn get_schema_id_from_connection_type( &self, connection_type: ConnectionType ) -> Option<SchemaId>
Returns the schema id for the given DSNP version and connection type
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Config
impl PartialEq for Config
impl Eq for Config
impl StructuralEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more