InliningExt docs

This commit is contained in:
AF 2023-07-01 00:05:43 +00:00
parent 7e4966e2b8
commit 9d189d2e8e

View File

@ -19,6 +19,7 @@ pub trait Inlining: Sized {
} }
pub trait InliningExt<E>: Inlining { pub trait InliningExt<E>: Inlining {
/// `const`-length equivalent of [`Inlining::iread_n`].
fn iread_n_const<const N: usize>( fn iread_n_const<const N: usize>(
self, self,
err: impl FnOnce(&[u8]) -> E, err: impl FnOnce(&[u8]) -> E,
@ -58,6 +59,7 @@ impl<D: ?Sized + Deserializer> Inlining for &mut D {
} }
pub trait InliningResultExt<A, E> { pub trait InliningResultExt<A, E> {
/// Drop the deserializer from parsing result.
fn seal(self) -> Result<A, E>; fn seal(self) -> Result<A, E>;
} }