pub trait Parser<Input: View<V = Seq<u8>>>: SpecParser {
type PT: DeepView<V = Self::PVal>;
// Required method
exec fn parse(&self, ibuf: &Input) -> r : PResult<Self::PT>;
// Provided method
open spec fn exec_inv(&self) -> bool { ... }
}Expand description
An executable parser proved equivalent to a pure SpecParser.
Input is normally &[u8]. Successful parsing returns both the consumed
byte count and a value whose deep view is exactly the value returned by
SpecParser::spec_parse.
Required Associated Types§
Required Methods§
Provided Methods§
Implementations on Foreign Types§
Source§impl<I, T, Spec, Exec> Parser<I> for (Spec, Exec)
impl<I, T, Spec, Exec> Parser<I> for (Spec, Exec)
Implementors§
Source§impl Parser<&[u8]> for ObjectIdentifierFmt
Available on crate feature alloc only.
impl Parser<&[u8]> for ObjectIdentifierFmt
Available on crate feature
alloc only.type PT = ObjectIdentifier
Source§impl<'i> Parser<&'i [u8]> for BmpStringFmt
Available on crate feature alloc only.
impl<'i> Parser<&'i [u8]> for BmpStringFmt
Available on crate feature
alloc only.Source§impl<'i> Parser<&'i [u8]> for PrintableStringFmt
impl<'i> Parser<&'i [u8]> for PrintableStringFmt
type PT = PrintableString<'i>
Source§impl<'i> Parser<&'i [u8]> for TeletexStringFmt
impl<'i> Parser<&'i [u8]> for TeletexStringFmt
type PT = TeletexString<'i>
Source§impl<'i> Parser<&'i [u8]> for UniversalStringFmt
Available on crate feature alloc only.
impl<'i> Parser<&'i [u8]> for UniversalStringFmt
Available on crate feature
alloc only.Source§impl<'i> Parser<&'i [u8]> for CborInitialFmt
impl<'i> Parser<&'i [u8]> for CborInitialFmt
type PT = CborInitial
Source§impl<'i, C> Parser<&'i [u8]> for BerSequenceFmt<C>
impl<'i, C> Parser<&'i [u8]> for BerSequenceFmt<C>
Source§impl<'i, C> Parser<&'i [u8]> for BerSequenceOfFmt<C>
Available on crate feature alloc only.
impl<'i, C> Parser<&'i [u8]> for BerSequenceOfFmt<C>
Available on crate feature
alloc only.Source§impl<'i, C, const LIMIT: usize> Parser<&'i [u8]> for BerCharStringFmt<C, LIMIT>where
C: BerDecoderOwned,
Available on crate feature alloc only.
impl<'i, C, const LIMIT: usize> Parser<&'i [u8]> for BerCharStringFmt<C, LIMIT>where
C: BerDecoderOwned,
Available on crate feature
alloc only.type PT = <C as BerDecoderOwned>::Owned
Source§impl<'i, const DER: bool> Parser<&'i [u8]> for GeneralizedTimeFmt<DER>
impl<'i, const DER: bool> Parser<&'i [u8]> for GeneralizedTimeFmt<DER>
type PT = GeneralizedTime<'i>
Source§impl<'i, const DET: bool, const LIMIT: usize> Parser<&'i [u8]> for CborFmt<DET, LIMIT>where
CborRecBody<DET>: SpecRecBody<Param = (), T = CborValueSpec, Body = CborBodyFmt<DET>> + ParserRecBody<&'i [u8], EP = (), O = CborValue<'i>>,
<CborRecBody<DET> as SpecRecBody>::Body: Productive,
impl<'i, const DET: bool, const LIMIT: usize> Parser<&'i [u8]> for CborFmt<DET, LIMIT>where
CborRecBody<DET>: SpecRecBody<Param = (), T = CborValueSpec, Body = CborBodyFmt<DET>> + ParserRecBody<&'i [u8], EP = (), O = CborValue<'i>>,
<CborRecBody<DET> as SpecRecBody>::Body: Productive,
Source§impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerAnyFmt<LIMIT>
Available on crate feature alloc only.
impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerAnyFmt<LIMIT>
Available on crate feature
alloc only.Source§impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerBitStringFmt<LIMIT>
Available on crate feature alloc only.
impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerBitStringFmt<LIMIT>
Available on crate feature
alloc only.type PT = BitStringOwned
Source§impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerOctetStringFmt<LIMIT>
Available on crate feature alloc only.
impl<'i, const LIMIT: usize> Parser<&'i [u8]> for BerOctetStringFmt<LIMIT>
Available on crate feature
alloc only.Source§impl<I, A> Parser<I> for OptionalEnd<A>
impl<I, A> Parser<I> for OptionalEnd<A>
Source§impl<I, A> Parser<I> for RepeatTillEnd<A>
Available on crate feature alloc only.
impl<I, A> Parser<I> for RepeatTillEnd<A>
Available on crate feature
alloc only.