[][src]Function binread::error::assert

pub fn assert<R, E, A>(
    reader: &mut R,
    test: bool,
    message: &str,
    error: Option<E>
) -> BinResult<()> where
    R: Read + Seek,
    A: Debug + 'static,
    E: Fn() -> A, 

Assert a condition is true and if not optionally apply a function to generate the error