decouple InliningAtomic
from ImplMode
This commit is contained in:
parent
7d07f5ffea
commit
7c64e38954
@ -53,7 +53,7 @@ pub trait ConstSizeObject<'a, Ctx: Context<'a>>: FixedSizeObject<'a, Ctx> {
|
|||||||
pub type ADParseResult<A, D> = Result<(A, D), AParseError<A>>;
|
pub type ADParseResult<A, D> = Result<(A, D), AParseError<A>>;
|
||||||
|
|
||||||
/// Atomic analogue of [`InliningFactory`]/[`InliningObject`].
|
/// Atomic analogue of [`InliningFactory`]/[`InliningObject`].
|
||||||
pub trait InliningAtomic: AtomicBase + ImplMode<Mode = InliningMode> {
|
pub trait InliningAtomic: AtomicBase + ParseMode<Mode = InliningMode> {
|
||||||
fn a_extension_error(tail: &[u8]) -> Self::AParseError;
|
fn a_extension_error(tail: &[u8]) -> Self::AParseError;
|
||||||
|
|
||||||
fn a_ideserialize<D: Inlining>(inlining: D) -> ADParseResult<Self, D>;
|
fn a_ideserialize<D: Inlining>(inlining: D) -> ADParseResult<Self, D>;
|
||||||
@ -68,7 +68,8 @@ pub trait ConstSizeAtomic: InliningAtomic {
|
|||||||
const SIZE: usize;
|
const SIZE: usize;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, Ctx: Context<'a>, A: InliningAtomic> InliningFactory<'a, Ctx> for AtomicFactory<A>
|
impl<'a, Ctx: Context<'a>, A: ImplMode + InliningAtomic> InliningFactory<'a, Ctx>
|
||||||
|
for AtomicFactory<A>
|
||||||
where
|
where
|
||||||
<A as WithParseMode>::WithMode: AoProxy<'a, Ctx, Fctr = Self, A = A>,
|
<A as WithParseMode>::WithMode: AoProxy<'a, Ctx, Fctr = Self, A = A>,
|
||||||
{
|
{
|
||||||
@ -85,7 +86,8 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, Ctx: Context<'a>, A: ConstSizeAtomic> FixedSizeFactory<'a, Ctx> for AtomicFactory<A>
|
impl<'a, Ctx: Context<'a>, A: ImplMode + ConstSizeAtomic> FixedSizeFactory<'a, Ctx>
|
||||||
|
for AtomicFactory<A>
|
||||||
where
|
where
|
||||||
<A as WithParseMode>::WithMode: AoProxy<'a, Ctx, Fctr = Self, A = A>,
|
<A as WithParseMode>::WithMode: AoProxy<'a, Ctx, Fctr = Self, A = A>,
|
||||||
{
|
{
|
||||||
@ -94,7 +96,8 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, Ctx: Context<'a>, A: ConstSizeAtomic> ConstSizeFactory<'a, Ctx> for AtomicFactory<A>
|
impl<'a, Ctx: Context<'a>, A: ImplMode + ConstSizeAtomic> ConstSizeFactory<'a, Ctx>
|
||||||
|
for AtomicFactory<A>
|
||||||
where
|
where
|
||||||
<A as WithParseMode>::WithMode: AoProxy<'a, Ctx, Fctr = Self, A = A>,
|
<A as WithParseMode>::WithMode: AoProxy<'a, Ctx, Fctr = Self, A = A>,
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user