Function cryiorust::frame::open [−][src]
Expand description
A universal function to open a file as a Frame.
Example:
use std::{io, fmt};
use cryiorust::frame::{Frame, self};
use std::path::Path;
fn test_frame<P: AsRef<Path> + fmt::Debug>(path: P) -> io::Result<Box<dyn Frame>> {
let testfile = path;
let frame: Box<dyn Frame> = frame::open(testfile)?;
Ok(frame)
}