Module properties

Source
Expand description

Node labels

SwhGraphProperties is populated by the load_properties and load_all_properties of SwhUnidirectionalGraph and SwhBidirectionalGraph and returned by their properties method.

use swh_graph::graph::SwhGraphWithProperties;
use swh_graph::mph::DynMphf;
use swh_graph::SwhGraphProperties;

let properties: &SwhGraphProperties<_, _, _, _, _, _> =
    swh_graph::graph::SwhUnidirectionalGraph::new(PathBuf::from("./graph"))
    .expect("Could not load graph")
    .load_all_properties::<DynMphf>()
    .expect("Could not load properties")
    .properties();

Structs§

GuaranteedDataFiles
Helper type that implements DataFilesAvailability to signal underlying data files are guaranteed to be available once the graph is loaded
LabelIdFromNameError
MappedContents
MappedLabelNames
MappedMaps
MappedPersons
MappedStrings
Strings implementation backed by files guaranteed to be present once the graph is loaded
MappedTimestamps
NoContents
Placeholder for when “contents” properties are not loaded.
NoLabelNames
Placeholder for when label names are not loaded.
NoMaps
Placeholder for when maps are not loaded.
NoPersons
Placeholder for when person ids are not loaded
NoStrings
Placeholder for when string properties are not loaded
NoTimestamps
Placeholder for when timestamp properties are not loaded
OptMappedContents
Variant of MappedStrings that checks at runtime that files are present every time it is accessed
OptMappedPersons
OptMappedStrings
Variant of MappedStrings that checks at runtime that files are present every time it is accessed
OptMappedTimestamps
OptionalDataFiles
Helper type that implements DataFilesAvailability to signal underlying data files may be missing at runtime
SwhGraphProperties
Properties on graph nodes
UnavailableProperty
VecContents
VecLabelNames
VecMaps
Trivial implementation of Maps that stores everything in a vector, instead of mmapping from disk
VecPersons
VecStrings
VecTimestamps

Enums§

NodeIdFromSwhidError

Traits§

Contents
Trait for backend storage of content properties (either in-memory or memory-mapped)
DataFilesAvailability
Helper trait to work with PropertiesResult
LabelNames
Trait for backend storage of label names (either in-memory or memory-mapped)
Maps
Trait for backend storage of maps (either in-memory, or loaded from disk and memory-mapped)
MaybeContents
Trait implemented by both NoContents and all implementors of Contents, to allow loading content properties only if needed.
MaybeLabelNames
Trait implemented by both NoLabelNames and all implementors of LabelNames, to allow loading label names only if needed.
MaybeMaps
Trait implemented by both NoMaps and all implementors of Maps, to allow loading maps only if needed.
MaybePersons
Trait implemented by both NoPersons and all implementors of Persons, to allow loading person ids only if needed.
MaybeStrings
Trait implemented by both NoStrings and all implementors of Strings, to allow loading string properties only if needed.
MaybeTimestamps
Trait implemented by both NoTimestamps and all implementors of Timestamps, to allow loading timestamp properties only if needed.
OptContents
Trait implemented by all implementors of MaybeContents but NoContents
OptPersons
Trait for backend storage of person properties (either in-memory or memory-mapped)
OptStrings
Trait implemented by all implementors of MaybeStrings but NoStrings
OptTimestamps
Trait for backend storage of timestamp properties (either in-memory or memory-mapped)
Persons
Trait for backend storage of person properties (either in-memory or memory-mapped)
PropertiesBackend
Common trait for type parameters of SwhGraphProperties
Strings
Trait for backend storage of string properties (either in-memory or memory-mapped)
Timestamps
Trait for backend storage of timestamp properties (either in-memory or memory-mapped)

Type Aliases§

AllSwhGraphDynProperties
AllSwhGraphProperties
PropertiesResult
Wrapper for the return type of SwhGraphProperties methods.