Skip to main content

any_fmt

Function any_fmt 

Source
pub open spec fn any_fmt<const DER: bool>() -> AnyInnerFmt<DER>
Expand description
{
    Refined(
        Mapped {
            inner: Pair(
                TagFmt,
                Bind(LengthFmt::<DER>, |len: usize| ExactLen(len, Tail)),
            ),
            mapper: (
                |v: (Tag, (usize, Seq<u8>))| AnySpec {
                    tag: v.0,
                    content: v.1.1,
                },
                |v: AnySpec| (v.tag, (v.content.len() as usize, v.content)),
            ),
        },
        |v: AnySpec| v.tag != TagFmt::EOC,
    )
}