pub fn new() -> Self {
        let mut f: File = File::open(BARS_FILE_PATH).unwrap();
        let bars: Vec<Bar> = serde_json::from_reader(&mut f).unwrap();
        Self {
            bars: RwLock::new(bars),
        }
    }
/// Create a new directory of bars serving picklebacks.
///
/// # Panics
/// This panics if we can't load the initial listing from disk.
Create a new directory of bars serving picklebacks.
Create a new directory of bars serving picklebacks .
pub fn new() -> Self {
        let mut f: File = File::open(BARS_FILE_PATH).unwrap();
        let bars: Vec<Bar> = serde_json::from_reader(&mut f).unwrap();
        Self {
            bars: RwLock::new(bars),
        }
    }
pub fn new ( ) -> Self { let mut f : File = File :: open ( BARS_FILE_PATH ) . unwrap ( ) ; let bars : Vec < Bar > = serde_json :: from_reader ( & mut f ) . unwrap ( ) ; Self { bars : RwLock :: new ( bars ) , } }
Create a new directory of bars serving picklebacks.
Create a new directory of bars serving picklebacks .
panics
This panics if we can't load the initial listing from disk.
This panics if we can ' t load the initial listing from disk .