bufjson 0.3.0

No frills, low-alloc, low-copy JSON lexer/parser for fast stream-oriented parsing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::lexical::{Content, Error};
use std::{
    pin::Pin,
    task::{Context, Poll},
};

pub trait AsyncAnalyzer {
    type Content: Content;
    type Error: Error;

    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Token>>;

    fn value(&self) -> Option<Result<Self::Content, Self::Error>>;

    fn pos(&self) -> Pos;
}