Hi,
Is it reasonable to integrate
#[inline(always)]
fn ptr_at<T>(ctx: &XdpContext, offset: usize) -> Result<*const T, ()> {
let start = ctx.data();
let end = ctx.data_end();
let len = mem::size_of::<T>();
if start + offset + len > end {
return Err(());
}
Ok((start + offset) as *const T)
}
into the crate so that we don't have to write it ourselves? That's a tiny dev experience improvement (in a very good crate).
It's generic enough so it should not be an issue?
Hi,
Is it reasonable to integrate
into the crate so that we don't have to write it ourselves? That's a tiny dev experience improvement (in a very good crate).
It's generic enough so it should not be an issue?