/// convinience method to get a GetPermit from a reader
convinience method to get a GetPermit from a reader
convinience method to get a GetPermit from a reader
pub fn permit_from_rdr<R: Read>(rdr: R, key: &str) -> Result<impl GetPermit, E> {
    let mut res = HashMap::new();
    let (_, f) = PermitFile::new(rdr)?;
    for permit in f.permits(key) {
        let p = permit?;
        res.insert(p.cell_permit.cell.clone(), p);
    }
    Ok(res)
}
pub fn permit_from_rdr < R : Read > ( rdr : R , key : & str ) -> Result < impl GetPermit , E > { let mut res = HashMap :: new ( ) ; let ( _ , f ) = PermitFile :: new ( rdr ) ? ; for permit in f . permits ( key ) { let p = permit ? ; res . insert ( p . cell_permit . cell . clone ( ) , p ) ; } Ok ( res ) }
convinience method to get a GetPermit from a reader
convinience method to get a GetPermit from a reader
rdr
R
key
&str