Something went wrong. Try again.
STreaming ARchive format: simpler, stricter, smaller than CARs for a subset of use-cases. forked from microcosm.blue/star
Something went wrong. Try again.
1234567891011121314151617use crate::error::StarError;use crate::parser::StarParser;use crate::types::StarItem;use bytes::{Buf, BytesMut};use tokio_util::codec::Decoder;
impl Decoder for StarParser { type Item = StarItem; type Error = StarError;
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error> { let (consumed, item) = self.parse(src)?; src.advance(consumed); Ok(item) }}