/*
* 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 `VertexProvider`. This trait forms an important part
/// of the interaction between the `DiskIndexSearcher` and a `VertexProvider`. A `VertexProviderFactory` is passed to `DiskIndexSearcher` when
/// it is constructed. When serving each search request, the `DiskIndexSearcher` opens a `VertexProvider`
/// using the provided `VertexProviderFactory`.
///
/// This trait has an associated VertexProvider type that signifies the specific type of VertexProvider which this `VertexProviderFactory` will create.
///
/// # Parameters
/// * `Data`: A `GraphDataType` that defines the vector element type, id type, and associated payload type for the graph.
///
/// # Functions
/// * `create_vertex_provider`: This function takes a `GraphHeader` reference and a max batch size and returns a `VertexProvider` object.
/// The max batch size controls the maximum number of nodes that can be loaded in a single batch.
/// * `get_header`: This function returns the header of the graph.