pub fn posits_involving_thing(database: &Database, thing: Thing) -> ResultSet {
    let mut result_set = ResultSet::new();
    for appearance in database
        .thing_to_appearance_lookup
        .lock()
        .unwrap()
        .lookup(&thing)
    {
        for appearance_set in database
            .appearance_to_appearance_set_lookup
            .lock()
            .unwrap()
            .lookup(appearance)
        {
            for posit_thing in database
                .appearance_set_to_posit_thing_lookup
                .lock()
                .unwrap()
                .lookup(appearance_set)
            {
                result_set.insert(*posit_thing);
            }
        }
    }
    result_set
}
// search functions in order to find posits matching certain circumstances
search functions in order to find posits matching certain circumstances
search functions in order to find posits matching certain circumstances
pub fn posits_involving_thing(database: &Database, thing: Thing) -> ResultSet {
    let mut result_set = ResultSet::new();
    for appearance in database
        .thing_to_appearance_lookup
        .lock()
        .unwrap()
        .lookup(&thing)
    {
        for appearance_set in database
            .appearance_to_appearance_set_lookup
            .lock()
            .unwrap()
            .lookup(appearance)
        {
            for posit_thing in database
                .appearance_set_to_posit_thing_lookup
                .lock()
                .unwrap()
                .lookup(appearance_set)
            {
                result_set.insert(*posit_thing);
            }
        }
    }
    result_set
}
pub fn posits_involving_thing ( database : & Database , thing : Thing ) -> ResultSet { let mut result_set = ResultSet :: new ( ) ; for appearance in database . thing_to_appearance_lookup . lock ( ) . unwrap ( ) . lookup ( & thing ) { for appearance_set in database . appearance_to_appearance_set_lookup . lock ( ) . unwrap ( ) . lookup ( appearance ) { for posit_thing in database . appearance_set_to_posit_thing_lookup . lock ( ) . unwrap ( ) . lookup ( appearance_set ) { result_set . insert ( * posit_thing ) ; } } } result_set }
search functions in order to find posits matching certain circumstances
search functions in order to find posits matching certain circumstances
database
&Database
thing
Thing
database
&Database
thing
Thing