/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT license.
*/
use crateGraphDataType;
use ANNResult;
use VertexProvider;
use crateGraphHeader;
/// The `VertexProviderFactory` trait provides an interface to create a GraphProvider`. This trait forms an important part
/// of the interaction between the `ANNWrapper` and the creation of `DiskIndexSearcher`. The `ANNWrapper` passes a `VertexProviderFactory` when
/// it initializes a `DiskIndexSearcher` When serving each search request, the `DiskIndexSearcher` opens a `VertexProvider`
/// using the provided `VertexProviderFactory`. There will be two flavors of VertexProviderFactory, one that reads vertex data from data another that reads vertex data from a stream.
///
/// This trait has an associated VertexProvider type that signifies the specific type of VertexProvider which this `VertexProviderFactory` will create.
///
/// # Parameters
/// * `GraphMetadata`: This contains the metadata of the disk index graph, like the number of points, dimension, max_node_length, etc.
///
/// # Functions
/// * `create_vertex_provider`: This function takes a `Metadata` object as an argument and returns a `VertexProvider` object. It also accepts a max batch read sizes which is
/// used to control the maximum number of nodes it can get in one batch.
/// * `get_header`: This function returns the metadata of the graph.