decouple RegularAtomic
from ImplMode
This commit is contained in:
parent
ef250932b6
commit
0d8a10fae6
@ -94,7 +94,9 @@ impl<A: ParseMode> ImplMode for AtomicFactory<A> {
|
|||||||
type Mode = A::Mode;
|
type Mode = A::Mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, Ctx: Context<'a>, A: RegularAtomic> AoProxy<'a, Ctx> for WithMode<A, RegularMode> {
|
impl<'a, Ctx: Context<'a>, A: RegularAtomic + ImplMode> AoProxy<'a, Ctx>
|
||||||
|
for WithMode<A, RegularMode>
|
||||||
|
{
|
||||||
type Mtbl = AtomicObject<A>;
|
type Mtbl = AtomicObject<A>;
|
||||||
|
|
||||||
type Fctr = AtomicFactory<A>;
|
type Fctr = AtomicFactory<A>;
|
||||||
@ -108,7 +110,9 @@ impl<'a, Ctx: Context<'a>, A: RegularAtomic> AoProxy<'a, Ctx> for WithMode<A, Re
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, Ctx: Context<'a>, A: RegularAtomic> RegularFactory<'a, Ctx> for AtomicFactory<A> {
|
impl<'a, Ctx: Context<'a>, A: RegularAtomic + ImplMode> RegularFactory<'a, Ctx>
|
||||||
|
for AtomicFactory<A>
|
||||||
|
{
|
||||||
fn rdeserialize(&self, inctx: impl InCtx<'a, Ctx>) -> ParseResult<'a, Ctx, Self> {
|
fn rdeserialize(&self, inctx: impl InCtx<'a, Ctx>) -> ParseResult<'a, Ctx, Self> {
|
||||||
Ok(A::a_deserialize(inctx)?.into())
|
Ok(A::a_deserialize(inctx)?.into())
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait RegularAtomic: AtomicBase + ImplMode<Mode = RegularMode> {
|
pub trait RegularAtomic: AtomicBase + ParseMode<Mode = RegularMode> {
|
||||||
fn ra_deserialize(inlining: impl Inlining) -> AParseResult<Self>;
|
fn ra_deserialize(inlining: impl Inlining) -> AParseResult<Self>;
|
||||||
fn ra_extend(self, tail: &[u8]) -> AParseResult<Self>;
|
fn ra_extend(self, tail: &[u8]) -> AParseResult<Self>;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user