pub fn until<Reader, T, CondFn, Arg, Ret>(
cond: CondFn,
) -> impl Fn(&mut Reader, &ReadOptions, Arg) -> BinResult<Ret>
Expand description
Read items until a condition is met. The final item will be included.
ยงExamples
#[derive(BinRead)]
struct NullTerminated {
#[br(parse_with = until(|&byte| byte == 0))]
data: Vec<u8>,
}