ParseMode for StaticPairObject
This commit is contained in:
parent
9e26d8be7f
commit
68daaf1ccb
@ -211,9 +211,9 @@ pub trait StaticPairAtomic:
|
|||||||
'static + Send + Sync + Clone + Sized + StaticPairSerializable<SA = Self::A, SB = Self::B>
|
'static + Send + Sync + Clone + Sized + StaticPairSerializable<SA = Self::A, SB = Self::B>
|
||||||
{
|
{
|
||||||
/// First element's type. Must equal [`StaticPairSerializable::SA`].
|
/// First element's type. Must equal [`StaticPairSerializable::SA`].
|
||||||
type A: AtomicBase;
|
type A: AtomicBase + ParseMode;
|
||||||
/// Second element's type. Must equal [`StaticPairSerializable::SB`].
|
/// Second element's type. Must equal [`StaticPairSerializable::SB`].
|
||||||
type B: AtomicBase;
|
type B: AtomicBase + ParseMode;
|
||||||
|
|
||||||
type AParseError: Error;
|
type AParseError: Error;
|
||||||
/// Construct the atomic from the elements.
|
/// Construct the atomic from the elements.
|
||||||
@ -227,3 +227,7 @@ pub trait StaticPairAtomic:
|
|||||||
impl<SP: StaticPairAtomic> AtomicBase for StaticPairObject<SP> {
|
impl<SP: StaticPairAtomic> AtomicBase for StaticPairObject<SP> {
|
||||||
type AParseError = SP::AParseError;
|
type AParseError = SP::AParseError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<SP: StaticPairAtomic> ParseMode for StaticPairObject<SP> {
|
||||||
|
type Mode = <SP::B as ParseMode>::Mode;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user