binread::error

Function assert

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

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