pub fn new(scope: Scope, sessions: Option<Sessions>, records: Option<Records>) -> Self {
        // Store scope
        let mut scope_store = HashMap::new();
        scope_store.insert(scope.scope_id.to_string(), scope.clone());
        // Store sessions
        let mut sessions_store = HashMap::new();
        sessions.into_iter().for_each(|s| {
            sessions_store.insert(scope.scope_id.to_string(), s);
        });
        // Store records
        let mut records_store = HashMap::new();
        records.into_iter().for_each(|r| {
            records_store.insert(scope.scope_id.to_string(), r);
        });
        // Create and return the mock metadata querier
        MetadataQuerier {
            scope_store,
            sessions_store,
            records_store,
        }
    }
/// Create a new mock metdata querier with some scope metadata set. It is assumed that if
/// sessions and records are passed, they are for the provided scope.
Create a new mock metdata querier with some scope metadata set. It is assumed that if
sessions and records are passed, they are for the provided scope.
Create a new mock metdata querier with some scope metadata set . It is assumed that if sessions and records are passed they are for the provided scope .
pub fn new(scope: Scope, sessions: Option<Sessions>, records: Option<Records>) -> Self {
        // Store scope
        let mut scope_store = HashMap::new();
        scope_store.insert(scope.scope_id.to_string(), scope.clone());
        // Store sessions
        let mut sessions_store = HashMap::new();
        sessions.into_iter().for_each(|s| {
            sessions_store.insert(scope.scope_id.to_string(), s);
        });
        // Store records
        let mut records_store = HashMap::new();
        records.into_iter().for_each(|r| {
            records_store.insert(scope.scope_id.to_string(), r);
        });
        // Create and return the mock metadata querier
        MetadataQuerier {
            scope_store,
            sessions_store,
            records_store,
        }
    }
pub fn new ( scope : Scope , sessions : Option < Sessions > , records : Option < Records > ) -> Self { // Store scope let mut scope_store = HashMap :: new ( ) ; scope_store . insert ( scope . scope_id . to_string ( ) , scope . clone ( ) ) ; // Store sessions let mut sessions_store = HashMap :: new ( ) ; sessions . into_iter ( ) . for_each ( | s | { sessions_store . insert ( scope . scope_id . to_string ( ) , s ) ; } ) ; // Store records let mut records_store = HashMap :: new ( ) ; records . into_iter ( ) . for_each ( | r | { records_store . insert ( scope . scope_id . to_string ( ) , r ) ; } ) ; // Create and return the mock metadata querier MetadataQuerier { scope_store , sessions_store , records_store , } }
Create a new mock metdata querier with some scope metadata set.
Create a new mock metdata querier with some scope metadata set .
scope
Scope
sessions
Option<Sessions>
records
Option<Records>
scope
Scope
sessions
Option<Sessions>
records
Option<Records>